@studiometa/ui-motion 2.0.0-alpha.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog.js +1 -1
- package/dist/catalog.js.map +1 -1
- package/dist/manifest.js +4 -4
- package/dist/manifest.js.map +1 -1
- package/dist/scripts/manifest-types.d.ts +5 -2
- package/package.json +1 -1
package/dist/catalog.js
CHANGED
package/dist/catalog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"catalog.js","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["import type {\n ComponentCatalog,\n CuratedComponentMetadata,\n} from '../../../scripts/manifest-types.js';\n\n// Motion is external (import-map resolved) and never bundled, so the component\n// declares neither a CDN-served stylesheet nor a bundled integration chunk —\n// consumers load the Motion JavaScript from the source their import map points at.\n//\n// Every component is `eager`: it mounts because its element is on the page,\n// which is also the strategy its class declares by default, so the manifest\n// and the class agree for every element. A viewport strategy fails each of\n// them:\n//\n// - `Motion` applies its `initial` styles on mount, so they must be in place\n// before the element is first seen, or the final state flashes. A `Motion`\n// inside a closed `<dialog>` must also exist before the dialog opens, for an\n// `Action` that plays it. Viewport-driven playback is its `inView` option.\n// - `MotionScrollTimeline` links its `Motion` children once, when it mounts,\n// and a child deep in a tall timeline is far below the viewport then.\n// `MotionSequence` builds its animation from its children the same way.\n// - `MotionView` changes its element's visibility: its `leaveTo` class often\n// starts it out not rendered, and it must already listen when a containing\n// `Dialog` opens or a descendant announces a DOM update.\n//\n// `MotionView` imports the Motion library only on its first `update()`; the\n// other components import it on mount.\nconst components: readonly CuratedComponentMetadata[] = [\n { token: 'Motion', group: 'motion' },\n { token: 'MotionScrollTimeline', group: 'motion', children: ['Motion'] },\n { token: 'MotionSequence', group: 'motion', children: ['Motion'] },\n { token: 'MotionView', group: 'motion' },\n];\n\n/** The autoload catalog for every declarative `@studiometa/ui-motion` component. */\nexport const catalog: ComponentCatalog = {\n packageName: '@studiometa/ui-motion',\n strategy: 'eager',\n components,\n abstractExports: [],\n};\n"],"mappings":";AAmCA,MAAa,UAA4B;CACvC,aAAa;CACb,UAAU;CACV,YAXsD;EACtD;GAAE,OAAO;GAAU,OAAO;GAAU;EACpC;GAAE,OAAO;GAAwB,OAAO;GAAU,UAAU,CAAC,SAAS;GAAE;EACxE;GAAE,OAAO;GAAkB,OAAO;GAAU,UAAU,CAAC,SAAS;GAAE;EAClE;GAAE,OAAO;GAAc,OAAO;GAAU;EACzC;CAOC,iBAAiB,EAAE;CACpB"}
|
package/dist/manifest.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
//#region src/manifest.ts
|
|
2
2
|
const manifest = {
|
|
3
3
|
Motion: {
|
|
4
|
-
mountStrategy: "
|
|
4
|
+
mountStrategy: "eager",
|
|
5
5
|
load: () => import("./Motion.js").then(({ Motion }) => Motion)
|
|
6
6
|
},
|
|
7
7
|
MotionScrollTimeline: {
|
|
8
|
-
mountStrategy: "
|
|
8
|
+
mountStrategy: "eager",
|
|
9
9
|
load: () => import("./MotionScrollTimeline.js").then(({ MotionScrollTimeline }) => MotionScrollTimeline)
|
|
10
10
|
},
|
|
11
11
|
MotionSequence: {
|
|
12
|
-
mountStrategy: "
|
|
12
|
+
mountStrategy: "eager",
|
|
13
13
|
load: () => import("./MotionSequence.js").then(({ MotionSequence }) => MotionSequence)
|
|
14
14
|
},
|
|
15
15
|
MotionView: {
|
|
16
|
-
mountStrategy: "
|
|
16
|
+
mountStrategy: "eager",
|
|
17
17
|
load: () => import("./MotionView.js").then(({ MotionView }) => MotionView)
|
|
18
18
|
}
|
|
19
19
|
};
|
package/dist/manifest.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","names":[],"sources":["../src/manifest.ts"],"sourcesContent":["// This file is generated by scripts/generate-manifests.ts. Do not edit.\nimport type { ComponentManifest } from '@studiometa/js-toolkit';\n\nexport const manifest: ComponentManifest = {\n Motion: {\n mountStrategy: '
|
|
1
|
+
{"version":3,"file":"manifest.js","names":[],"sources":["../src/manifest.ts"],"sourcesContent":["// This file is generated by scripts/generate-manifests.ts. Do not edit.\nimport type { ComponentManifest } from '@studiometa/js-toolkit';\n\nexport const manifest: ComponentManifest = {\n Motion: {\n mountStrategy: 'eager',\n load: () => import('./Motion.js').then(({ Motion }) => Motion),\n },\n MotionScrollTimeline: {\n mountStrategy: 'eager',\n load: () =>\n import('./MotionScrollTimeline.js').then(({ MotionScrollTimeline }) => MotionScrollTimeline),\n },\n MotionSequence: {\n mountStrategy: 'eager',\n load: () => import('./MotionSequence.js').then(({ MotionSequence }) => MotionSequence),\n },\n MotionView: {\n mountStrategy: 'eager',\n load: () => import('./MotionView.js').then(({ MotionView }) => MotionView),\n },\n};\n"],"mappings":";AAGA,MAAa,WAA8B;CACzC,QAAQ;EACN,eAAe;EACf,YAAY,OAAO,eAAe,MAAM,EAAE,aAAa,OAAO;EAC/D;CACD,sBAAsB;EACpB,eAAe;EACf,YACE,OAAO,6BAA6B,MAAM,EAAE,2BAA2B,qBAAqB;EAC/F;CACD,gBAAgB;EACd,eAAe;EACf,YAAY,OAAO,uBAAuB,MAAM,EAAE,qBAAqB,eAAe;EACvF;CACD,YAAY;EACV,eAAe;EACf,YAAY,OAAO,mBAAmB,MAAM,EAAE,iBAAiB,WAAW;EAC3E;CACF"}
|
|
@@ -11,7 +11,8 @@ import { MountStrategy } from "@studiometa/js-toolkit";
|
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* Curated authoring metadata for a single component, consumed by the manifest generator. The
|
|
14
|
-
* `subpath` and `exportName` default to the `token` when omitted
|
|
14
|
+
* `subpath` and `exportName` default to the `token` when omitted, and `strategy` defaults to the
|
|
15
|
+
* one the catalog declares for the whole package.
|
|
15
16
|
*/
|
|
16
17
|
interface CuratedComponentMetadata {
|
|
17
18
|
token: string;
|
|
@@ -21,10 +22,12 @@ interface CuratedComponentMetadata {
|
|
|
21
22
|
integrations?: readonly string[];
|
|
22
23
|
subpath?: string;
|
|
23
24
|
exportName?: string;
|
|
25
|
+
strategy?: MountStrategy;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* The authoring catalog for a component package: the list of its components, the default strategy
|
|
27
|
-
*
|
|
29
|
+
* a component inherits when it declares none of its own, and the abstract exports that are
|
|
30
|
+
* intentionally excluded from the manifest.
|
|
28
31
|
*/
|
|
29
32
|
interface ComponentCatalog {
|
|
30
33
|
packageName: string;
|