Skip to content

🎥 Make videos programmatically with React

Elements: Standardize Element Library terminology

JonnyBurger1081c5164bc7
diff --git a/.agents/skills/pr-name/SKILL.md b/.agents/skills/pr-name/SKILL.md
index d9041e6448..3e77f00cfb 100644
--- a/.agents/skills/pr-name/SKILL.md
+++ b/.agents/skills/pr-name/SKILL.md
@@ -62,12 +62,12 @@ Useful title shapes include:
Examples:
```
-`@remotion/studio-protocol`: Add `addElementLibraryToStudio()` for adding Element libraries to the config
+`@remotion/studio-protocol`: Add `addElementLibraryToStudio()` for adding Element Libraries to the config
`@remotion/web-renderer`: Add a `metadata` option to `renderMediaOnWeb()` using Mediabunny's `MetadataTags`
`@remotion/studio`: Remove Asset Inspector quick action scrollbar
```
-The first example is better than "Add Element catalogs to Studio" because it
+The first example is better than "Add libraries to Studio" because it
names the main API and explains its purpose. The Studio CSS example deliberately
describes the visible result instead of the CSS file or overflow rule that
implemented it.
diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts
index d0fd1a79ef..0d38cdb16b 100644
--- a/packages/cli/src/config/index.ts
+++ b/packages/cli/src/config/index.ts
@@ -631,7 +631,7 @@ declare global {
type FlatConfig = RemotionConfigObject &
RemotionBundlingOptions & {
/**
- * Add an Element library to the Remotion Studio.
+ * Add an Element Library to the Remotion Studio.
*/
addElementLibrary: (options: AddElementLibraryOptions) => void;
/**
diff --git a/packages/cli/src/test/config-reset.test.ts b/packages/cli/src/test/config-reset.test.ts
index e7318b1053..9a788bee7f 100644
--- a/packages/cli/src/test/config-reset.test.ts
+++ b/packages/cli/src/test/config-reset.test.ts
@@ -12,7 +12,7 @@ test('Studio render defaults keep the startup log level', () => {
expect(getRenderDefaults('warn').logLevel).toBe('warn');
});
-test('Element library configuration must be valid', () => {
+test('Element Library configuration must be valid', () => {
ConfigInternals.resetConfigOptions();
expect(() => Config.addElementLibrary({url: '/elements'})).toThrow(
diff --git a/packages/docs/docs/config.mdx b/packages/docs/docs/config.mdx
index 6e68dc1fc6..30fab5864f 100644
--- a/packages/docs/docs/config.mdx
+++ b/packages/docs/docs/config.mdx
@@ -195,7 +195,7 @@ The [command line flag](/docs/cli/render#--log) `--log` will take precedence ove
## `addElementLibrary()`<AvailableFrom v="4.0.517" />
-Adds a third-party Element library to Remotion Studio from an externally hosted Element catalog.
+Adds a third-party Element Library to Remotion Studio from an externally hosted URL.
```ts twoslash title="remotion.config.ts"
import {Config} from '@remotion/cli/config';
@@ -206,11 +206,11 @@ Config.addElementLibrary({
});
```
-Call `addElementLibrary()` once for each third-party Element library. The `displayName` property is optional. If it is omitted, the URL host and path are shown instead.
+Call `addElementLibrary()` once for each third-party Element Library. The `displayName` property is optional. If it is omitted, the URL host and path are shown instead.
When at least one library is configured, Browse Elements shows a dropdown containing Remotion Elements and every configured library. All libraries open in an embedded Studio modal.
-Registering the catalog does not install an individual Element's source code or dependencies. The URL must be an absolute HTTP or HTTPS URL. Remotion Elements remains available without adding it to the configuration.
+Registering the Element Library does not install an individual Element's source code or dependencies. The URL must be an absolute HTTP or HTTPS URL. Remotion Elements remains available without adding it to the configuration.
## `setMaxTimelineTracks()`<AvailableFrom v="2.1.10" />
diff --git a/packages/docs/docs/studio-protocol/add-element-library-to-studio.mdx b/packages/docs/docs/studio-protocol/add-element-library-to-studio.mdx
index 6d08ccbd50..3753f32ba5 100644
--- a/packages/docs/docs/studio-protocol/add-element-library-to-studio.mdx
+++ b/packages/docs/docs/studio-protocol/add-element-library-to-studio.mdx
@@ -6,11 +6,11 @@ crumb: '@remotion/studio-protocol'
# addElementLibraryToStudio()<AvailableFrom v="4.0.518" />
-Requests that the Element catalog for a third-party Element library is added to a recently focused Remotion Studio project.
+Requests that a third-party Element Library is added to a recently focused Remotion Studio project.
## Example
-```ts twoslash title="add-catalog.ts"
+```ts twoslash title="add-element-library.ts"
import {addElementLibraryToStudio} from '@remotion/studio-protocol';
const result = await addElementLibraryToStudio({
@@ -31,7 +31,7 @@ Local Studio ports are probed and the most recently focused compatible writable
### url
-An absolute HTTP or HTTPS URL for the Element catalog. The URL is normalized before it is stored.
+An absolute HTTP or HTTPS URL for the Element Library. The URL is normalized before it is stored.
### displayName?
@@ -77,17 +77,17 @@ A human-readable failure message. Use `code` for application logic.
## Persistence
-After confirmation, Studio adds an object-form [`Config.addElementLibrary()`](/docs/config#addelementlibrary) call to the loaded `remotion.config.ts`. Existing config source and catalog entries are preserved.
+After confirmation, Studio adds an object-form [`Config.addElementLibrary()`](/docs/config#addelementlibrary) call to the loaded `remotion.config.ts`. Existing config source and library entries are preserved.
-Catalogs are identified by their normalized URL. Requesting an already configured URL does not add another call or replace its display name.
+Element Libraries are identified by their normalized URL. Requesting an already configured URL does not add another call or replace its display name.
A project without a loaded `remotion.config.ts` returns `no-config-file`.
## Supported origins
-The function supports HTTPS websites. HTTP is supported only on `localhost` and `127.0.0.1` for local development. The catalog itself must use HTTP or HTTPS.
+The function supports HTTPS websites. HTTP is supported only on `localhost` and `127.0.0.1` for local development. The Element Library itself must use HTTP or HTTPS.
-The confirmation shows the requesting website, catalog URL, and display name. The catalog is not added or loaded before confirmation. Adding a catalog does not install Element source code or dependencies; each Element installation keeps its own confirmation.
+The confirmation shows the requesting website, Element Library URL, and display name. The Element Library is not added or loaded before confirmation. Adding an Element Library does not install Element source code or dependencies; each Element installation keeps its own confirmation.
## Compatibility
diff --git a/packages/docs/docs/studio-protocol/component-library-integration.mdx b/packages/docs/docs/studio-protocol/component-library-integration.mdx
index 9ae83084d6..a14943a24c 100644
--- a/packages/docs/docs/studio-protocol/component-library-integration.mdx
+++ b/packages/docs/docs/studio-protocol/component-library-integration.mdx
@@ -1,15 +1,15 @@
---
image: /generated/articles-docs-studio-protocol-component-library-integration.png
-title: 'Integrating a component library with Studio'
-sidebar_label: 'Component library integration'
+title: 'Integrating an Element Library with Studio'
+sidebar_label: 'Element Library integration'
crumb: '@remotion/studio-protocol'
---
-# Integrating a component library with Studio
+# Integrating an Element Library with Studio
An Element contains the source code for one component. It also contains the data that Studio needs to insert the component.
-Studio writes the source code to an `.element.tsx` file. Studio installs only the packages in the Element's `dependencies` list. You do not have to publish or install the component library in the target project.
+Studio writes the source code to an `.element.tsx` file. Studio installs only the packages in the Element's `dependencies` list. You do not have to publish or install the Element Library in the target project.
A component that follows the [Element guidelines](/elements/contributing#element-guidelines) is usually ready for Studio.
@@ -66,7 +66,7 @@ export const LowerThirdGalleryItem = () => {
};
```
-The shape of `lowerThirdElementDefinition` is specific to the component library. The Studio Protocol does not require this object.
+The shape of `lowerThirdElementDefinition` is specific to the Element Library. The Studio Protocol does not require this object.
### Next.js
@@ -98,7 +98,7 @@ When Studio embeds the library through Browse Elements, use [`isInsideStudio()`]
## See also
-- [Third-party Element libraries](/elements/libraries)
+- [Third-party Element Libraries](/elements/libraries)
- [Element guidelines](/elements/contributing#element-guidelines)
- [`<Player>`](/docs/player)
- [`createElementPayload()`](/docs/studio-protocol/create-element-payload)
diff --git a/packages/docs/docs/studio-protocol/create-element-payload.mdx b/packages/docs/docs/studio-protocol/create-element-payload.mdx
index a53078ee17..e19f1269bc 100644
--- a/packages/docs/docs/studio-protocol/create-element-payload.mdx
+++ b/packages/docs/docs/studio-protocol/create-element-payload.mdx
@@ -48,7 +48,7 @@ A lowercase Element identifier. Its final path segment is used to create the `.e
A string containing the complete Element source code. It must contain exactly one exported named component.
-See [Integrating a component library with Studio](/docs/studio-protocol/component-library-integration) for recommended ways to preview a component and represent it as Element source in Vite-based projects and Next.js.
+See [Integrating an Element Library with Studio](/docs/studio-protocol/component-library-integration) for recommended ways to preview a component and represent it as Element source in Vite-based projects and Next.js.
### dependencies
diff --git a/packages/docs/docs/studio-protocol/index.mdx b/packages/docs/docs/studio-protocol/index.mdx
index 82205fcacf..39575b0adb 100644
--- a/packages/docs/docs/studio-protocol/index.mdx
+++ b/packages/docs/docs/studio-protocol/index.mdx
@@ -19,15 +19,14 @@ Websites can provide [Elements](/elements) to a Studio either using drag-and-dro
<Step>1</Step> Create an Element payload with [`createElementPayload()`](/docs/studio-protocol/create-element-payload).<br />
<Step>2</Step> Put it on a drag event with [`setStudioDragData()`](/docs/studio-protocol/set-studio-drag-data), or send a signal to a Studio using [`installInStudio()`](/docs/studio-protocol/install-in-studio).
+| Method | Benefits | Tradeoffs |
+| -------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
+| [Drag-and-drop](/docs/studio-protocol/set-studio-drag-data) | The user chooses the exact Studio tab, timeline position, and canvas position. | Studio labels the source as [unverified](/docs/studio-protocol/security#confirmation-boundary). |
+| [Installation dialog](/docs/studio-protocol/install-in-studio) | The requesting website is shown. Remotion attempts to bring the Studio to the foreground. | Always the most recently focused Studio is taken. |
-| Method | Benefits | Tradeoffs |
-| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
-| [Drag-and-drop](/docs/studio-protocol/set-studio-drag-data) | The user chooses the exact Studio tab, timeline position, and canvas position. | Studio labels the source as [unverified](/docs/studio-protocol/security#confirmation-boundary). |
-| [Installation dialog](/docs/studio-protocol/install-in-studio) | The requesting website is shown. Remotion attempts to bring the Studio to the foreground. | Always the most recently focused Studio is taken. |
+### Adding an Element Library
-### Adding Element catalogs
-
-Using [`addElementLibraryToStudio()`](/docs/studio-protocol/add-element-library-to-studio) you can request to add an element library to the Studio.
+Using [`addElementLibraryToStudio()`](/docs/studio-protocol/add-element-library-to-studio) you can request to add an Element Library to the Studio.
### Previewing Elements
@@ -49,4 +48,4 @@ Learn about the [confirmation and origin policy](/docs/studio-protocol/security)
## See also
-- [Integrating a component library with Studio](/docs/studio-protocol/component-library-integration)
+- [Integrating an Element Library with Studio](/docs/studio-protocol/component-library-integration)
diff --git a/packages/docs/docs/studio-protocol/is-inside-studio.mdx b/packages/docs/docs/studio-protocol/is-inside-studio.mdx
index 84155e332c..02a05bc248 100644
--- a/packages/docs/docs/studio-protocol/is-inside-studio.mdx
+++ b/packages/docs/docs/studio-protocol/is-inside-studio.mdx
@@ -6,7 +6,7 @@ crumb: '@remotion/studio-protocol'
# isInsideStudio()<AvailableFrom v="4.0.518" />
-Returns whether the current website is loaded in the Element library modal in Remotion Studio.
+Returns whether the current website is loaded in the Element Library modal in Remotion Studio.
Use it to adapt library UI that is redundant inside Studio, such as a "Drag into Studio" handle.
@@ -43,6 +43,6 @@ The result is a UI hint, not proof of Studio identity. Do not use it as a securi
## See also
-- [Integrating a component library with Studio](/docs/studio-protocol/component-library-integration)
+- [Integrating an Element Library with Studio](/docs/studio-protocol/component-library-integration)
- [`setStudioDragData()`](/docs/studio-protocol/set-studio-drag-data)
- [Studio Protocol security](/docs/studio-protocol/security)
diff --git a/packages/docs/docs/studio-protocol/security.mdx b/packages/docs/docs/studio-protocol/security.mdx
index 059d2153c8..14d1d3f321 100644
--- a/packages/docs/docs/studio-protocol/security.mdx
+++ b/packages/docs/docs/studio-protocol/security.mdx
@@ -7,11 +7,11 @@ crumb: '@remotion/studio-protocol'
# Studio Protocol security
-An Element contains executable React source code and may declare npm dependencies. Studio requires confirmation before applying an Element delivered through drag-and-drop or an installation request. It also requires confirmation before adding an external Element catalog to a project.
+An Element contains executable React source code and may declare npm dependencies. Studio requires confirmation before applying an Element delivered through drag-and-drop or an installation request. It also requires confirmation before adding an external Element Library to a project.
## Allowed origins
-Any HTTPS website can request an Element installation or catalog confirmation. HTTP is supported only for local development pages on `localhost` or `127.0.0.1`.
+Any HTTPS website can request an Element installation or request to add an Element Library. HTTP is supported only for local development pages on `localhost` or `127.0.0.1`.
Studio reflects only the requesting allowed origin in CORS. It does not use wildcard CORS or cross-origin credentials.
@@ -23,9 +23,9 @@ Before confirming, Studio shows the requesting source, destination choice, sourc
Declining the confirmation does not write source files or install packages.
-A catalog request made with [`addElementLibraryToStudio()`](/docs/studio-protocol/add-element-library-to-studio) shows the requesting origin, exact catalog URL, and requested display name. The catalog is not loaded before confirmation. Confirming persists a [`Config.addElementLibrary()`](/docs/config#addelementlibrary) call in `remotion.config.ts`; it does not install Element source code or dependencies. Individual Element installations still require confirmation.
+An Element Library request made with [`addElementLibraryToStudio()`](/docs/studio-protocol/add-element-library-to-studio) shows the requesting origin, exact Element Library URL, and requested display name. The Element Library is not loaded before confirmation. Confirming persists a [`Config.addElementLibrary()`](/docs/config#addelementlibrary) call in `remotion.config.ts`; it does not install Element source code or dependencies. Individual Element installations still require confirmation.
-Declining or closing the catalog confirmation does not change the config.
+Declining or closing the Element Library confirmation does not change the config.
## Target information
diff --git a/packages/docs/docs/studio-protocol/table-of-contents.tsx b/packages/docs/docs/studio-protocol/table-of-contents.tsx
index 662bfd05bf..60a6e47b12 100644
--- a/packages/docs/docs/studio-protocol/table-of-contents.tsx
+++ b/packages/docs/docs/studio-protocol/table-of-contents.tsx
@@ -23,7 +23,7 @@ export const TableOfContents: React.FC = () => {
</TOCItem>
<TOCItem link="/docs/studio-protocol/add-element-library-to-studio">
<strong>addElementLibraryToStudio()</strong>
- <div>Add an Element catalog to a Studio project</div>
+ <div>Add an Element Library to a Studio project</div>
</TOCItem>
<TOCItem link="/docs/studio-protocol/is-inside-studio">
<strong>isInsideStudio()</strong>
diff --git a/packages/docs/docs/studio/studio.mdx b/packages/docs/docs/studio/studio.mdx
index 5203ab11d3..5be616f6b9 100644
--- a/packages/docs/docs/studio/studio.mdx
+++ b/packages/docs/docs/studio/studio.mdx
@@ -98,6 +98,6 @@ A server will be started on port `3000` (or a higher port if it isn't available)
## Browse Elements
-Browse Elements includes the first-party [Remotion Elements](/elements). You can add [third-party Element libraries](/elements/libraries) to the library selector for more options.
+Browse Elements includes the first-party [Remotion Elements](/elements). You can add [third-party Element Libraries](/elements/libraries) to the library selector for more options.
-Adding a library makes its catalog available to browse. Installing an individual Element's source code remains a separate, confirmed action.
+Adding an Element Library makes it available to browse. Installing an individual Element's source code remains a separate, confirmed action.
diff --git a/packages/docs/docs/third-party.mdx b/packages/docs/docs/third-party.mdx
index 10ebc03772..fa9eafb7b5 100644
--- a/packages/docs/docs/third-party.mdx
+++ b/packages/docs/docs/third-party.mdx
@@ -10,9 +10,9 @@ All animations in Remotion must be driven by the value returned by the [`useCurr
On this page, we maintain a list of integrations for popular ways of animating on the web, and provide status for popular requests.
-## Element libraries
+## Element Libraries
-You can add [third-party Element libraries](/elements/libraries) to Browse Elements in Remotion Studio. Adding a library registers its catalog; installing an individual Element's source code is a separate action.
+You can add [third-party Element Libraries](/elements/libraries) to Browse Elements in Remotion Studio. Adding an Element Library registers it; installing an individual Element's source code is a separate action.
## After Effects
diff --git a/packages/docs/elements/index.mdx b/packages/docs/elements/index.mdx
index f0b18797f4..a910fbc702 100644
--- a/packages/docs/elements/index.mdx
+++ b/packages/docs/elements/index.mdx
@@ -14,7 +14,7 @@ Install one into your codebase and see it appear on your active Studio canvas.
Make it yours, [interactively](/docs/studio/interactivity) or [with an agent](/docs/ai).
-You can also add [third-party Element libraries](/elements/libraries) to Browse Elements in Studio.
+You can also add [third-party Element Libraries](/elements/libraries) to Browse Elements in Studio.
<ElementLibrary category={null} />
diff --git a/packages/docs/elements/libraries.mdx b/packages/docs/elements/libraries.mdx
index 71912e93d2..88633dd883 100644
--- a/packages/docs/elements/libraries.mdx
+++ b/packages/docs/elements/libraries.mdx
@@ -1,7 +1,7 @@
---
title: Third-party Elements
sidebar_label: Third-party Elements
-description: Third-party Element libraries that integrate with Remotion Studio.
+description: Third-party Element Libraries that integrate with Remotion Studio.
---
import {ThirdPartyElementLibraries} from '@site/src/components/Elements/ThirdPartyElementLibraries';
@@ -12,8 +12,8 @@ This is a list of third-party websites providing Remotion [Elements](/elements).
Click **Add to Studio** to register libraries in your project so you can quickly access them from Remotion Studio.
-Anybody can create Element libraries. Click [here](/docs/studio-protocol/component-library-integration) for instructions.
+Anybody can create Element Libraries. Click [here](/docs/studio-protocol/component-library-integration) for instructions.
-Contact [[email protected]](mailto:[email protected]) to propose inclusion of your Element library on this page.
+Contact [[email protected]](mailto:[email protected]) to propose inclusion of your Element Library on this page.
<ThirdPartyElementLibraries />
diff --git a/packages/docs/src/components/Elements/ThirdPartyElementLibraries.tsx b/packages/docs/src/components/Elements/ThirdPartyElementLibraries.tsx
index c7af00ac01..c2a6a447c9 100644
--- a/packages/docs/src/components/Elements/ThirdPartyElementLibraries.tsx
+++ b/packages/docs/src/components/Elements/ThirdPartyElementLibraries.tsx
@@ -33,7 +33,7 @@ const ThirdPartyElementLibraryItem: React.FC<{
try {
const result = await requestLibraryAddition({
displayName: library.displayName,
- url: library.catalogUrl,
+ url: library.libraryUrl,
});
if (!result.success) {
setAddState({
@@ -56,7 +56,7 @@ const ThirdPartyElementLibraryItem: React.FC<{
type: 'error',
});
}
- }, [library.catalogUrl, library.displayName, requestLibraryAddition]);
+ }, [library.libraryUrl, library.displayName, requestLibraryAddition]);
let status: React.ReactNode = null;
if (addState.type === 'awaiting-confirmation') {
@@ -153,7 +153,7 @@ export const ThirdPartyElementLibraryList: React.FC<{
<ul className={styles.list} role="list">
{thirdPartyElementLibraries.map((library) => (
<ThirdPartyElementLibraryItem
- key={library.catalogUrl}
+ key={library.libraryUrl}
library={library}
requestLibraryAddition={requestLibraryAddition}
/>
diff --git a/packages/docs/src/components/Elements/element-definitions.ts b/packages/docs/src/components/Elements/element-definitions.ts
index 97b199c19d..4a348119cd 100644
--- a/packages/docs/src/components/Elements/element-definitions.ts
+++ b/packages/docs/src/components/Elements/element-definitions.ts
@@ -94,7 +94,7 @@ export type ElementDefinition = {
readonly width: number;
};
-// Array order defines the order of categories and cards in the Element library.
+// Array order defines the order of categories and cards in the Element Library.
const elementImplementations = [
{
slug: 'audio/oscilloscope',
diff --git a/packages/docs/src/components/Elements/third-party-element-library-data.ts b/packages/docs/src/components/Elements/third-party-element-library-data.ts
index 13954ec1ac..a4d5932f6c 100644
--- a/packages/docs/src/components/Elements/third-party-element-library-data.ts
+++ b/packages/docs/src/components/Elements/third-party-element-library-data.ts
@@ -1,7 +1,7 @@
export type ThirdPartyElementLibrary = {
readonly bannerUrl: string | null;
readonly browseUrl: string;
- readonly catalogUrl: string;
+ readonly libraryUrl: string;
readonly displayName: string;
};
@@ -10,14 +10,14 @@ export const thirdPartyElementLibraries = [
bannerUrl:
'https://remotion.media/elements/third-party-libraries/remocn.png',
browseUrl: 'https://remocn.dev/docs/components',
- catalogUrl: 'https://remocn.dev/docs/typography',
+ libraryUrl: 'https://remocn.dev/docs/typography',
displayName: 'Remocn',
},
{
bannerUrl:
'https://remotion.media/elements/third-party-libraries/lexington-themes.png',
browseUrl: 'https://lexingtonthemes.com/remotion/free-templates',
- catalogUrl: 'https://lexingtonthemes.com/remotion/free-templates',
+ libraryUrl: 'https://lexingtonthemes.com/remotion/free-templates',
displayName: 'Lexington Themes',
},
] as const satisfies readonly ThirdPartyElementLibrary[];
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 9745f09866..4f3eb7c1b3 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -7204,7 +7204,7 @@ export const articles = [
},
{
id: 'studio-protocol/component-library-integration',
- title: 'Integrating a component library with Studio',
+ title: 'Integrating an Element Library with Studio',
relativePath: 'docs/studio-protocol/component-library-integration.mdx',
compId: 'articles-docs-studio-protocol-component-library-integration',
crumb: '@remotion/studio-protocol',
diff --git a/packages/docs/src/raw-markdown/replace-components.ts b/packages/docs/src/raw-markdown/replace-components.ts
index 476f04dd6c..881e45295a 100644
--- a/packages/docs/src/raw-markdown/replace-components.ts
+++ b/packages/docs/src/raw-markdown/replace-components.ts
@@ -191,7 +191,7 @@ const rawMarkdownComponentReplacements: readonly RawMarkdownComponentReplacement
thirdPartyElementLibraries
.map(
(library) =>
- `- [${library.displayName}](${library.browseUrl})\n - Element catalog: \`${library.catalogUrl}\``,
+ `- [${library.displayName}](${library.browseUrl})\n - Element Library: \`${library.libraryUrl}\``,
)
.join('\n'),
removeImport:
diff --git a/packages/docs/src/test/elements.test.ts b/packages/docs/src/test/elements.test.ts
index f44f95e598..de1dbd54b5 100644
--- a/packages/docs/src/test/elements.test.ts
+++ b/packages/docs/src/test/elements.test.ts
@@ -211,7 +211,7 @@ describe('Element MDX pages', () => {
});
});
-describe('Element library', () => {
+describe('Element Library', () => {
test('injects the exact source files needed by each listing', () => {
const completeSourceCodeBySlug = getRemotionElementSourceMap({
elementsRoot,
diff --git a/packages/example/e2e/studio-protocol.test.mts b/packages/example/e2e/studio-protocol.test.mts
index e7e02ff551..7cd0849dea 100644
--- a/packages/example/e2e/studio-protocol.test.mts
+++ b/packages/example/e2e/studio-protocol.test.mts
@@ -123,7 +123,7 @@ const CloseupPlaceholder = () => {
const externalLibraryUrl = 'https://external-elements.example.com/library';
const reloadedExternalLibraryUrl =
'https://second-elements.example.com/components';
- const protocolLibraryUrl = 'https://protocol-catalog.example.com/library';
+ const protocolLibraryUrl = 'https://protocol-library.example.com/library';
const configFile = path.join(temporaryProject, 'remotion.config.ts');
fs.appendFileSync(
configFile,
@@ -178,7 +178,7 @@ const CloseupPlaceholder = () => {
response.writeHead(200, {'Content-Type': 'text/html'});
response.end(`<!doctype html>
<button id="install">Install in Studio</button>
- <button id="add-library">Add catalog to Studio</button>
+ <button id="add-library">Add Element Library to Studio</button>
<button id="license">Configure license in Studio</button>
<p id="environment"></p>
<p id="status"></p>
@@ -210,7 +210,7 @@ const CloseupPlaceholder = () => {
document.querySelector('#status').textContent = '';
const result = await addElementLibraryToStudio({
url: '${protocolLibraryUrl}',
- displayName: 'Protocol Catalog',
+ displayName: 'Protocol Library',
});
document.querySelector('#status').textContent = JSON.stringify(result);
};
@@ -845,9 +845,9 @@ const CloseupPlaceholder = () => {
await senderPage.locator('#status').evaluate((element) => {
element.textContent = '';
});
- const configBeforeCatalogConfirmation = fs.readFileSync(configFile, 'utf8');
+ const configBeforeLibraryConfirmation = fs.readFileSync(configFile, 'utf8');
await senderPage
- .getByRole('button', {name: 'Add catalog to Studio'})
+ .getByRole('button', {name: 'Add Element Library to Studio'})
.click();
await senderPage.waitForFunction(
() => document.querySelector('#status')?.textContent !== '',
@@ -857,30 +857,34 @@ const CloseupPlaceholder = () => {
);
await studioPage.bringToFront();
- const addCatalogDialog = studioPage.getByRole('dialog');
+ const addLibraryDialog = studioPage.getByRole('dialog');
await expect(
- addCatalogDialog.getByText('Add Element catalog', {exact: true}),
+ addLibraryDialog.getByText('Add Element Library', {exact: true}),
).toBeVisible();
await expect(
- addCatalogDialog.getByText(senderUrl, {exact: true}),
+ addLibraryDialog.getByText(senderUrl, {exact: true}),
).toBeVisible();
await expect(
- addCatalogDialog.getByText(protocolLibraryUrl, {exact: true}),
+ addLibraryDialog.getByText(protocolLibraryUrl, {exact: true}),
).toBeVisible();
- const catalogDetails = addCatalogDialog.getByLabel('Catalog details');
+ const libraryDetails = addLibraryDialog.getByLabel(
+ 'Element Library details',
+ );
await expect(
- catalogDetails.getByText('Display name', {exact: true}),
+ libraryDetails.getByText('Display name', {exact: true}),
).toBeVisible();
await expect(
- catalogDetails.getByText('Protocol Catalog', {exact: true}),
+ libraryDetails.getByText('Protocol Library', {exact: true}),
).toBeVisible();
- await expect(decoyStudioPage.getByText('Add Element catalog')).toHaveCount(
+ await expect(decoyStudioPage.getByText('Add Element Library')).toHaveCount(
0,
);
expect(fs.readFileSync(configFile, 'utf8')).toBe(
- configBeforeCatalogConfirmation,
+ configBeforeLibraryConfirmation,
);
- await addCatalogDialog.getByRole('button', {name: /^Add catalog/}).click();
+ await addLibraryDialog
+ .getByRole('button', {name: /^Add Element Library/})
+ .click();
await expect
.poll(() => fs.readFileSync(configFile, 'utf8'), {timeout: 30_000})
.toContain(protocolLibraryUrl);
@@ -888,7 +892,7 @@ const CloseupPlaceholder = () => {
await browseElements.click();
await expect(
studioPage.getByRole('button', {
- name: 'Protocol Catalog',
+ name: 'Protocol Library',
exact: true,
}),
).toBeVisible({timeout: 30_000});
@@ -898,7 +902,7 @@ const CloseupPlaceholder = () => {
await studioPage.mouse.click(500, 300);
await senderPage.bringToFront();
await senderPage
- .getByRole('button', {name: 'Add catalog to Studio'})
+ .getByRole('button', {name: 'Add Element Library to Studio'})
.click();
await senderPage.waitForFunction(
() => document.querySelector('#status')?.textContent !== '',
@@ -906,7 +910,7 @@ const CloseupPlaceholder = () => {
await studioPage.bringToFront();
await studioPage
.getByRole('dialog')
- .getByRole('button', {name: /^Add catalog/})
+ .getByRole('button', {name: /^Add Element Library/})
.click();
await expect
.poll(
diff --git a/packages/studio-protocol/src/add-element-library-to-studio.ts b/packages/studio-protocol/src/add-element-library-to-studio.ts
index 8c2718def8..c69718fae6 100644
--- a/packages/studio-protocol/src/add-element-library-to-studio.ts
+++ b/packages/studio-protocol/src/add-element-library-to-studio.ts
@@ -103,12 +103,12 @@ export const addElementLibraryToStudioWithDependencies = async (
if (!isAllowedStudioProtocolPageOrigin(dependencies.pageOrigin)) {
return failure(
'unsupported-origin',
- 'Adding an Element catalog is only supported on HTTPS websites and local development origins.',
+ 'Adding an Element Library is only supported on HTTPS websites and local development origins.',
);
}
if (typeof url !== 'string') {
- return failure('invalid-url', 'The Element catalog URL must be a string.');
+ return failure('invalid-url', 'The Element Library URL must be a string.');
}
let normalizedUrl: string;
@@ -117,7 +117,7 @@ export const addElementLibraryToStudioWithDependencies = async (
if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
return failure(
'invalid-url',
- 'The Element catalog URL must use HTTP or HTTPS.',
+ 'The Element Library URL must use HTTP or HTTPS.',
);
}
@@ -125,14 +125,14 @@ export const addElementLibraryToStudioWithDependencies = async (
} catch {
return failure(
'invalid-url',
- 'The Element catalog URL must be an absolute HTTP or HTTPS URL.',
+ 'The Element Library URL must be an absolute HTTP or HTTPS URL.',
);
}
if (displayName !== null && typeof displayName !== 'string') {
return failure(
'invalid-display-name',
- 'The Element catalog display name must be a string.',
+ 'The Element Library display name must be a string.',
);
}
@@ -140,7 +140,7 @@ export const addElementLibraryToStudioWithDependencies = async (
if (normalizedDisplayName === '') {
return failure(
'invalid-display-name',
- 'The Element catalog display name must not be empty.',
+ 'The Element Library display name must not be empty.',
);
}
@@ -173,7 +173,7 @@ export const addElementLibraryToStudioWithDependencies = async (
if (supportedStudios.length === 0) {
return failure(
'studio-upgrade-required',
- 'This Remotion Studio cannot add an Element catalog through Studio Protocol. Upgrade Remotion to 4.0.518 or newer.',
+ 'This Remotion Studio cannot add an Element Library through Studio Protocol. Upgrade Remotion to 4.0.518 or newer.',
);
}
@@ -238,7 +238,7 @@ export const addElementLibraryToStudioWithDependencies = async (
} catch {
return failure(
'invalid-response',
- 'Remotion Studio returned an invalid Element catalog response.',
+ 'Remotion Studio returned an invalid Element Library response.',
);
}
@@ -268,7 +268,7 @@ export const addElementLibraryToStudioWithDependencies = async (
return failure(
'invalid-response',
- 'Remotion Studio returned an invalid Element catalog response.',
+ 'Remotion Studio returned an invalid Element Library response.',
);
};
diff --git a/packages/studio-protocol/src/test/add-element-library-to-studio.test.ts b/packages/studio-protocol/src/test/add-element-library-to-studio.test.ts
index 849e0573d8..dda6228473 100644
--- a/packages/studio-protocol/src/test/add-element-library-to-studio.test.ts
+++ b/packages/studio-protocol/src/test/add-element-library-to-studio.test.ts
@@ -98,7 +98,7 @@ test('requests confirmation in the most recently focused compatible Studio', asy
expect(
await addElementLibraryToStudioWithDependencies(
- {url: 'https://catalog.example.com', displayName: ' Catalog '},
+ {url: 'https://library.example.com', displayName: ' Library '},
{...dependencies, fetchFn},
),
).toEqual({
@@ -120,15 +120,15 @@ test('requests confirmation in the most recently focused compatible Studio', asy
protocol: 'remotion-studio-protocol',
protocolVersion: 1,
targetId: 'focused-target',
- url: 'https://catalog.example.com/',
- displayName: 'Catalog',
+ url: 'https://library.example.com/',
+ displayName: 'Library',
});
});
test('returns an actionable result when no Studio is running', async () => {
const requests: string[] = [];
const result = await addElementLibraryToStudioWithDependencies(
- {url: 'https://catalog.example.com', displayName: null},
+ {url: 'https://library.example.com', displayName: null},
{
...dependencies,
fetchFn: (input) => {
@@ -152,8 +152,8 @@ test('returns an actionable result when no Studio is running', async () => {
test('validates the request before probing localhost', async () => {
for (const request of [
{url: '/relative', displayName: null},
- {url: 'file:///tmp/catalog', displayName: null},
- {url: 'https://catalog.example.com', displayName: ' '},
+ {url: 'file:///tmp/library', displayName: null},
+ {url: 'https://library.example.com', displayName: ' '},
]) {
let requestCount = 0;
const result = await addElementLibraryToStudioWithDependencies(request, {
@@ -169,7 +169,7 @@ test('validates the request before probing localhost', async () => {
let probes = 0;
const unsupportedOrigin = await addElementLibraryToStudioWithDependencies(
- {url: 'https://catalog.example.com', displayName: null},
+ {url: 'https://library.example.com', displayName: null},
{
...dependencies,
pageOrigin: 'http://elements.example.com',
@@ -188,7 +188,7 @@ test('validates the request before probing localhost', async () => {
test('distinguishes an old Studio from one without a focused target', async () => {
const oldStudio = await addElementLibraryToStudioWithDependencies(
- {url: 'https://catalog.example.com', displayName: null},
+ {url: 'https://library.example.com', displayName: null},
{
...dependencies,
ports: [3000],
@@ -217,7 +217,7 @@ test('distinguishes an old Studio from one without a focused target', async () =
targetId: 'unused',
});
const noTarget = await addElementLibraryToStudioWithDependencies(
- {url: 'https://catalog.example.com', displayName: null},
+ {url: 'https://library.example.com', displayName: null},
{
...dependencies,
ports: [3000],
@@ -243,7 +243,7 @@ test('distinguishes an old Studio from one without a focused target', async () =
test('maps structured server errors and malformed responses', async () => {
const run = (response: Response) =>
addElementLibraryToStudioWithDependencies(
- {url: 'https://catalog.example.com', displayName: null},
+ {url: 'https://library.example.com', displayName: null},
{
...dependencies,
ports: [3000],
diff --git a/packages/studio-server/src/preview-server/studio-protocol/handle-element-library.ts b/packages/studio-server/src/preview-server/studio-protocol/handle-element-library.ts
index ec12341b26..60f3bbd4ff 100644
--- a/packages/studio-server/src/preview-server/studio-protocol/handle-element-library.ts
+++ b/packages/studio-server/src/preview-server/studio-protocol/handle-element-library.ts
@@ -41,7 +41,7 @@ export const handleStudioProtocolElementLibrary = async ({
if (request.method !== 'POST') {
writeStudioProtocolError({
code: 'method-not-allowed',
- message: 'Use POST to add an Element catalog.',
+ message: 'Use POST to add an Element Library.',
response,
status: 405,
});
@@ -96,7 +96,7 @@ export const handleStudioProtocolElementLibrary = async ({
} catch {
writeStudioProtocolError({
code: 'invalid-url',
- message: 'The Element catalog URL must be an absolute HTTP or HTTPS URL.',
+ message: 'The Element Library URL must be an absolute HTTP or HTTPS URL.',
response,
status: 400,
});
@@ -107,7 +107,7 @@ export const handleStudioProtocolElementLibrary = async ({
if (displayName === '') {
writeStudioProtocolError({
code: 'invalid-display-name',
- message: 'The Element catalog display name must not be empty.',
+ message: 'The Element Library display name must not be empty.',
response,
status: 400,
});
diff --git a/packages/studio-server/src/test/studio-protocol-routes.test.ts b/packages/studio-server/src/test/studio-protocol-routes.test.ts
index 11fe2e85fc..d655b0e9c5 100644
--- a/packages/studio-server/src/test/studio-protocol-routes.test.ts
+++ b/packages/studio-server/src/test/studio-protocol-routes.test.ts
@@ -349,7 +349,7 @@ test('discovers an exact Studio target and delivers one install request over HTT
}
});
-test('delivers an Element catalog request without changing config before confirmation', async () => {
+test('delivers an Element Library request without changing config before confirmation', async () => {
clearElementInstallStateForTests();
const deliveredEvents: EventSourceEvent[] = [];
const focusedUrls: string[] = [];
@@ -429,7 +429,7 @@ test('delivers an Element catalog request without changing config before confirm
}
const origin = `http://127.0.0.1:${address.port}`;
- const requestOrigin = 'https://catalog.example.com';
+ const requestOrigin = 'https://library.example.com';
const preflight = await fetch(
`${origin}/api/studio-protocol/element-library`,
{method: 'OPTIONS', headers: {Origin: requestOrigin}},
@@ -459,13 +459,13 @@ test('delivers an Element catalog request without changing config before confirm
protocol: 'remotion-studio-protocol',
protocolVersion: 1,
targetId,
- url: 'https://new.example.com/catalog',
- displayName: ' New catalog ',
+ url: 'https://new.example.com/library',
+ displayName: ' New library ',
};
for (const invalidBody of [
{...body, protocolVersion: 2},
- {...body, url: 'file:///tmp/catalog'},
+ {...body, url: 'file:///tmp/library'},
{...body, displayName: ' '},
]) {
const invalidResponse = await fetch(
@@ -513,8 +513,8 @@ test('delivers an Element catalog request without changing config before confirm
expect(deliveredEvents).toEqual([
{
type: 'element-library-add-request',
- url: 'https://new.example.com/catalog',
- displayName: 'New catalog',
+ url: 'https://new.example.com/library',
+ displayName: 'New library',
origin: requestOrigin,
},
]);
diff --git a/packages/studio-server/src/test/update-config.test.ts b/packages/studio-server/src/test/update-config.test.ts
index 1bb5bf4f63..34cdcd3b13 100644
--- a/packages/studio-server/src/test/update-config.test.ts
+++ b/packages/studio-server/src/test/update-config.test.ts
@@ -129,10 +129,10 @@ test('escapes line separators before writing a config value', () => {
);
});
-test('adds Element catalogs without replacing or duplicating existing calls', () => {
+test('adds Element Libraries without replacing or duplicating existing calls', () => {
const configContents = [
"import {Config} from '@remotion/cli/config';",
- '// Keep this catalog and comment.',
+ '// Keep this library and comment.',
"Config.addElementLibrary({url: 'https://existing.example.com/'});",
'Config.setOverwriteOutput(true);',
'',
@@ -145,21 +145,21 @@ test('adds Element catalogs without replacing or duplicating existing calls', ()
setter: 'addElementLibrary',
type: 'set',
value: {
- url: 'https://new.example.com/catalog',
- displayName: " O'Reilly \\ Catalog\u2028Name ",
+ url: 'https://new.example.com/library',
+ displayName: " O'Reilly \\ Library\u2028Name ",
},
},
],
});
- expect(updated).toContain('// Keep this catalog and comment.');
+ expect(updated).toContain('// Keep this library and comment.');
expect(updated).toContain(
"Config.addElementLibrary({url: 'https://existing.example.com/'});",
);
expect(updated).toContain('Config.setOverwriteOutput(true);');
- expect(updated).toContain("'url': 'https://new.example.com/catalog'");
+ expect(updated).toContain("'url': 'https://new.example.com/library'");
expect(updated).toContain(
- "'displayName': 'O\\'Reilly \\\\ Catalog\\u2028Name'",
+ "'displayName': 'O\\'Reilly \\\\ Library\\u2028Name'",
);
const repeated = updateConfigFile({
@@ -169,7 +169,7 @@ test('adds Element catalogs without replacing or duplicating existing calls', ()
{
setter: 'addElementLibrary',
type: 'set',
- value: {url: 'https://new.example.com/catalog'},
+ value: {url: 'https://new.example.com/library'},
},
],
});
@@ -191,7 +191,7 @@ test('adds Element catalogs without replacing or duplicating existing calls', ()
).toBe(configContents);
});
-test('uses runtime catalogs for dynamic config deduplication and skips no-op writes', async () => {
+test('uses runtime Element Libraries for dynamic config deduplication and skips no-op writes', async () => {
const directory = mkdtempSync(join(tmpdir(), 'remotion-config-update-'));
const configFile = join(directory, 'remotion.config.ts');
const configContents = [
@@ -245,7 +245,7 @@ test('uses runtime catalogs for dynamic config deduplication and skips no-op wri
type: 'set',
value: {
url: 'https://new.example.com',
- displayName: ' New catalog ',
+ displayName: ' New library ',
},
},
],
@@ -255,7 +255,7 @@ test('uses runtime catalogs for dynamic config deduplication and skips no-op wri
expect(additionResponse).toEqual({success: true});
const addedContents = readFileSync(configFile, 'utf8');
expect(addedContents).toContain("'url': 'https://new.example.com/'");
- expect(addedContents).toContain("'displayName': 'New catalog'");
+ expect(addedContents).toContain("'displayName': 'New library'");
expect(configChangeEvent).toMatchObject({
originatorClientId: 'settings-client',
type: 'changed',
@@ -395,7 +395,7 @@ test('rejects invalid updates without changing the config', async () => {
{
setter: 'addElementLibrary',
type: 'set' as const,
- value: {url: 'file:///tmp/catalog'},
+ value: {url: 'file:///tmp/library'},
},
],
[
@@ -403,7 +403,7 @@ test('rejects invalid updates without changing the config', async () => {
setter: 'addElementLibrary',
type: 'set' as const,
value: {
- url: 'https://catalog.example.com',
+ url: 'https://library.example.com',
displayName: ' ',
},
},
diff --git a/packages/studio/src/components/ElementInstallConfirmation.tsx b/packages/studio/src/components/ElementInstallConfirmation.tsx
index f978abaf66..30a74cfd18 100644
--- a/packages/studio/src/components/ElementInstallConfirmation.tsx
+++ b/packages/studio/src/components/ElementInstallConfirmation.tsx
@@ -302,7 +302,7 @@ export const ElementLibraryAddConfirmation: React.FC<{
}> = ({displayName, origin, url}) => {
return (
<div style={container}>
- <dl style={metadataStyle} aria-label="Catalog details">
+ <dl style={metadataStyle} aria-label="Element Library details">
{displayName === null ? null : (
<div style={metadataRowStyle}>
<dt style={metadataTermStyle}>Display name</dt>
@@ -314,7 +314,7 @@ export const ElementLibraryAddConfirmation: React.FC<{
<dd style={metadataDescriptionStyle}>{origin}</dd>
</div>
<div style={metadataRowStyle}>
- <dt style={metadataTermStyle}>Catalog URL</dt>
+ <dt style={metadataTermStyle}>Element Library URL</dt>
<dd style={metadataDescriptionStyle}>
<code style={codeStyle}>{url}</code>
</dd>
@@ -324,7 +324,7 @@ export const ElementLibraryAddConfirmation: React.FC<{
<div style={warningStyle}>
<WarningTriangle style={warningIconStyle} />
<p style={warningDescriptionStyle}>
- This adds the catalog to{' '}
+ This adds the Element Library to{' '}
<strong style={browseElementsStyle}>Browse Elements</strong> when
nothing is selected on the canvas. It is saved in{' '}
<code style={codeStyle}>remotion.config.ts</code>.
diff --git a/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx b/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx
index 8f0c8e4b02..eadd6b7031 100644
--- a/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx
+++ b/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx
@@ -110,7 +110,7 @@ export const ElementLibraryButton: React.FC = () => {
segmentId: 'element-library',
selectedId: null,
style: elementLibraryDropdownSegmentStyle,
- title: 'Choose an Element library to browse inside Studio.',
+ title: 'Choose an Element Library to browse inside Studio.',
tooltipLabel: null,
type: 'menu',
values: [
diff --git a/packages/studio/src/components/Modals.tsx b/packages/studio/src/components/Modals.tsx
index b9918826df..b55a70f4ca 100644
--- a/packages/studio/src/components/Modals.tsx
+++ b/packages/studio/src/components/Modals.tsx
@@ -76,7 +76,7 @@ export const Modals: React.FC<{
(async () => {
const confirmed = await confirm({
- title: 'Add Element catalog',
+ title: 'Add Element Library',
message: (
<ElementLibraryAddConfirmation
displayName={event.displayName}
@@ -84,7 +84,7 @@ export const Modals: React.FC<{
url={event.url}
/>
),
- confirmLabel: 'Add catalog',
+ confirmLabel: 'Add Element Library',
cancelLabel: 'Cancel',
});
if (!confirmed) {
@@ -92,7 +92,10 @@ export const Modals: React.FC<{
}
if (previewServerState.type !== 'connected') {
- showNotification('Could not add catalog: Studio disconnected', 4000);
+ showNotification(
+ 'Could not add Element Library: Studio disconnected',
+ 4000,
+ );
return;
}
@@ -111,11 +114,14 @@ export const Modals: React.FC<{
],
});
if (!result.success) {
- showNotification(`Could not add catalog: ${result.reason}`, 4000);
+ showNotification(
+ `Could not add Element Library: ${result.reason}`,
+ 4000,
+ );
}
} catch (error) {
showNotification(
- `Could not add catalog: ${(error as Error).message}`,
+ `Could not add Element Library: ${(error as Error).message}`,
4000,
);
}