use-scroll-animate 3.8.0 → 3.9.0
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/CHANGELOG.md +20 -0
- package/README.md +1 -0
- package/README_ja.md +1 -0
- package/README_zh.md +1 -0
- package/dist/chunks/{base-BpROOcey.js → base-BRIPyPtX.js} +11 -2
- package/dist/chunks/{base-BpROOcey.js.map → base-BRIPyPtX.js.map} +1 -1
- package/dist/chunks/{base-CXx7jZ-o.cjs → base-Dm6ee5ug.cjs} +11 -1
- package/dist/chunks/{base-CXx7jZ-o.cjs.map → base-Dm6ee5ug.cjs.map} +1 -1
- package/dist/chunks/{core-IaorbTdu.cjs → core-CHAtivHV.cjs} +2 -2
- package/dist/chunks/{core-IaorbTdu.cjs.map → core-CHAtivHV.cjs.map} +1 -1
- package/dist/chunks/{core-uxs3ETou.js → core-CYozf_E-.js} +2 -2
- package/dist/chunks/{core-uxs3ETou.js.map → core-CYozf_E-.js.map} +1 -1
- package/dist/chunks/{index-tags-BANJ-e4H.js → index-tags-BmQR17Sb.js} +2 -1
- package/dist/chunks/{index-tags-BANJ-e4H.js.map → index-tags-BmQR17Sb.js.map} +1 -1
- package/dist/chunks/{index-tags-wbuPiMR6.cjs → index-tags-DYYsgbba.cjs} +2 -1
- package/dist/chunks/{index-tags-wbuPiMR6.cjs.map → index-tags-DYYsgbba.cjs.map} +1 -1
- package/dist/chunks/{spring-2OTnYCzm.cjs → spring-Dp5BllPB.cjs} +2 -2
- package/dist/chunks/{spring-2OTnYCzm.cjs.map → spring-Dp5BllPB.cjs.map} +1 -1
- package/dist/chunks/{spring-C-fw7_9f.js → spring-UBPhrh1X.js} +2 -2
- package/dist/chunks/{spring-C-fw7_9f.js.map → spring-UBPhrh1X.js.map} +1 -1
- package/dist/chunks/{variants-CHe1VbSn.js → variants-DTypaOH3.js} +2 -2
- package/dist/chunks/{variants-CHe1VbSn.js.map → variants-DTypaOH3.js.map} +1 -1
- package/dist/chunks/{variants-BNIrn4ch.cjs → variants-_dC-ey6R.cjs} +2 -2
- package/dist/chunks/{variants-BNIrn4ch.cjs.map → variants-_dC-ey6R.cjs.map} +1 -1
- package/dist/components/angular.cjs +6 -5
- package/dist/components/angular.cjs.map +1 -1
- package/dist/components/angular.d.cts +25 -0
- package/dist/components/angular.d.ts +25 -0
- package/dist/components/angular.js +6 -5
- package/dist/components/angular.js.map +1 -1
- package/dist/components/background.cjs +2 -2
- package/dist/components/background.js +3 -3
- package/dist/components/cards.cjs +2 -2
- package/dist/components/cards.js +3 -3
- package/dist/components/click.cjs +2 -2
- package/dist/components/click.js +3 -3
- package/dist/components/depth.cjs +3 -3
- package/dist/components/depth.js +4 -4
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.js +2 -2
- package/dist/components/gesture.cjs +3 -3
- package/dist/components/gesture.js +5 -5
- package/dist/components/interaction.cjs +1 -1
- package/dist/components/interaction.js +2 -2
- package/dist/components/jsx.d.cts +1 -0
- package/dist/components/jsx.d.ts +1 -0
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.js +2 -2
- package/dist/components/lazy.cjs +2 -1
- package/dist/components/lazy.cjs.map +1 -1
- package/dist/components/lazy.d.cts +1 -0
- package/dist/components/lazy.d.ts +1 -0
- package/dist/components/lazy.js +2 -1
- package/dist/components/lazy.js.map +1 -1
- package/dist/components/packs.cjs +194 -0
- package/dist/components/packs.cjs.map +1 -0
- package/dist/components/packs.css +3 -0
- package/dist/components/packs.d.cts +107 -0
- package/dist/components/packs.d.ts +107 -0
- package/dist/components/packs.js +185 -0
- package/dist/components/packs.js.map +1 -0
- package/dist/components/page.cjs +2 -2
- package/dist/components/page.js +3 -3
- package/dist/components/physics.cjs +2 -2
- package/dist/components/physics.js +4 -4
- package/dist/components/react.cjs +1 -1
- package/dist/components/react.js +1 -1
- package/dist/components/reveal.cjs +1 -1
- package/dist/components/reveal.js +2 -2
- package/dist/components/solid.cjs +6 -5
- package/dist/components/solid.cjs.map +1 -1
- package/dist/components/solid.d.cts +25 -0
- package/dist/components/solid.d.ts +25 -0
- package/dist/components/solid.js +6 -5
- package/dist/components/solid.js.map +1 -1
- package/dist/components/svelte.cjs +6 -5
- package/dist/components/svelte.cjs.map +1 -1
- package/dist/components/svelte.d.cts +25 -0
- package/dist/components/svelte.d.ts +25 -0
- package/dist/components/svelte.js +6 -5
- package/dist/components/svelte.js.map +1 -1
- package/dist/components/svg.cjs +1 -1
- package/dist/components/svg.js +2 -2
- package/dist/components/text.cjs +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/timeline.cjs +1 -1
- package/dist/components/timeline.js +2 -2
- package/dist/components/transitions.cjs +5 -1
- package/dist/components/transitions.cjs.map +1 -1
- package/dist/components/transitions.d.cts +2 -0
- package/dist/components/transitions.d.ts +2 -0
- package/dist/components/transitions.js +6 -2
- package/dist/components/transitions.js.map +1 -1
- package/dist/components/ui.cjs +3 -3
- package/dist/components/ui.js +5 -5
- package/dist/components/vue.cjs +6 -5
- package/dist/components/vue.cjs.map +1 -1
- package/dist/components/vue.d.cts +25 -0
- package/dist/components/vue.d.ts +25 -0
- package/dist/components/vue.js +6 -5
- package/dist/components/vue.js.map +1 -1
- package/dist/components/webgl.cjs +1 -1
- package/dist/components/webgl.js +2 -2
- package/dist/components.cjs +14 -5
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +1 -0
- package/dist/components.d.cts +65 -2
- package/dist/components.d.ts +65 -2
- package/dist/components.js +11 -8
- package/dist/components.js.map +1 -1
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/docs/components.md +14 -0
- package/docs/upgrading-4.md +65 -0
- package/package.json +13 -2
|
@@ -3,27 +3,28 @@
|
|
|
3
3
|
var components = require('../components.cjs');
|
|
4
4
|
var bind = require('../chunks/bind-Ui43-n2d.cjs');
|
|
5
5
|
require('./reveal.cjs');
|
|
6
|
-
require('../chunks/base-
|
|
6
|
+
require('../chunks/base-Dm6ee5ug.cjs');
|
|
7
7
|
require('./text.cjs');
|
|
8
8
|
require('./interaction.cjs');
|
|
9
9
|
require('./feedback.cjs');
|
|
10
10
|
require('./background.cjs');
|
|
11
|
-
require('../chunks/variants-
|
|
11
|
+
require('../chunks/variants-_dC-ey6R.cjs');
|
|
12
12
|
require('./transitions.cjs');
|
|
13
13
|
require('./physics.cjs');
|
|
14
|
-
require('../chunks/spring-
|
|
14
|
+
require('../chunks/spring-Dp5BllPB.cjs');
|
|
15
15
|
require('./cards.cjs');
|
|
16
16
|
require('./click.cjs');
|
|
17
17
|
require('./ui.cjs');
|
|
18
18
|
require('./page.cjs');
|
|
19
19
|
require('./timeline.cjs');
|
|
20
20
|
require('./gesture.cjs');
|
|
21
|
-
require('../chunks/core-
|
|
21
|
+
require('../chunks/core-CHAtivHV.cjs');
|
|
22
22
|
require('./svg.cjs');
|
|
23
23
|
require('./webgl.cjs');
|
|
24
24
|
require('./depth.cjs');
|
|
25
25
|
require('./layout.cjs');
|
|
26
|
-
require('
|
|
26
|
+
require('./packs.cjs');
|
|
27
|
+
require('../chunks/index-tags-DYYsgbba.cjs');
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* use-scroll-animate/components/svelte — Svelte integration (v3.8).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte.cjs","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":["bindUsa","defineComponents"],"mappings":"
|
|
1
|
+
{"version":3,"file":"svelte.cjs","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":["bindUsa","defineComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAOH;SACgB,GAAG,CAAC,IAAiB,EAAE,UAAsB,EAAE,EAAA;AAC7D,IAAA,OAAOA,YAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC/B;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAEC,2BAAgB,CAAC,UAAU,CAAC;AACjE;;;;;;;"}
|
|
@@ -1590,6 +1590,30 @@ declare global {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
1592
|
|
|
1593
|
+
/**
|
|
1594
|
+
* `<usa-pack name="ecommerce">` — applies an effect pack (`ecommerce` ·
|
|
1595
|
+
* `portfolio` · `dashboard` · `game` · `landing`) to its subtree:
|
|
1596
|
+
* descendants opt in with `data-role` (see `PACKS`). Re-applies when
|
|
1597
|
+
* `name` changes; undone on disconnect.
|
|
1598
|
+
*/
|
|
1599
|
+
interface UsaPackElement extends UsaElement {
|
|
1600
|
+
readonly roles: string[];
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/**
|
|
1604
|
+
* use-scroll-animate/components/packs — effect packs (v3.9).
|
|
1605
|
+
* Ready-made motion for e-commerce, portfolio, dashboard, game UI and
|
|
1606
|
+
* landing pages: mark elements with `data-role` and apply a pack with
|
|
1607
|
+
* `<usa-pack name="…">` or `applyPack(name, root)`. Includes `flyToCart()`
|
|
1608
|
+
* and `countUp()`.
|
|
1609
|
+
*/
|
|
1610
|
+
|
|
1611
|
+
declare global {
|
|
1612
|
+
interface HTMLElementTagNameMap {
|
|
1613
|
+
'usa-pack': UsaPackElement;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1593
1617
|
/** The component categories and their default tags. */
|
|
1594
1618
|
declare const COMPONENT_CATEGORIES: {
|
|
1595
1619
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
@@ -1609,6 +1633,7 @@ declare const COMPONENT_CATEGORIES: {
|
|
|
1609
1633
|
readonly webgl: readonly ["usa-shader", "usa-distort", "usa-liquid"];
|
|
1610
1634
|
readonly depth: readonly ["usa-cube", "usa-depth"];
|
|
1611
1635
|
readonly layout: readonly ["usa-auto-animate", "usa-masonry"];
|
|
1636
|
+
readonly packs: readonly ["usa-pack"];
|
|
1612
1637
|
};
|
|
1613
1638
|
type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
|
|
1614
1639
|
|
|
@@ -1590,6 +1590,30 @@ declare global {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
1592
|
|
|
1593
|
+
/**
|
|
1594
|
+
* `<usa-pack name="ecommerce">` — applies an effect pack (`ecommerce` ·
|
|
1595
|
+
* `portfolio` · `dashboard` · `game` · `landing`) to its subtree:
|
|
1596
|
+
* descendants opt in with `data-role` (see `PACKS`). Re-applies when
|
|
1597
|
+
* `name` changes; undone on disconnect.
|
|
1598
|
+
*/
|
|
1599
|
+
interface UsaPackElement extends UsaElement {
|
|
1600
|
+
readonly roles: string[];
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
/**
|
|
1604
|
+
* use-scroll-animate/components/packs — effect packs (v3.9).
|
|
1605
|
+
* Ready-made motion for e-commerce, portfolio, dashboard, game UI and
|
|
1606
|
+
* landing pages: mark elements with `data-role` and apply a pack with
|
|
1607
|
+
* `<usa-pack name="…">` or `applyPack(name, root)`. Includes `flyToCart()`
|
|
1608
|
+
* and `countUp()`.
|
|
1609
|
+
*/
|
|
1610
|
+
|
|
1611
|
+
declare global {
|
|
1612
|
+
interface HTMLElementTagNameMap {
|
|
1613
|
+
'usa-pack': UsaPackElement;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1593
1617
|
/** The component categories and their default tags. */
|
|
1594
1618
|
declare const COMPONENT_CATEGORIES: {
|
|
1595
1619
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
@@ -1609,6 +1633,7 @@ declare const COMPONENT_CATEGORIES: {
|
|
|
1609
1633
|
readonly webgl: readonly ["usa-shader", "usa-distort", "usa-liquid"];
|
|
1610
1634
|
readonly depth: readonly ["usa-cube", "usa-depth"];
|
|
1611
1635
|
readonly layout: readonly ["usa-auto-animate", "usa-masonry"];
|
|
1636
|
+
readonly packs: readonly ["usa-pack"];
|
|
1612
1637
|
};
|
|
1613
1638
|
type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
|
|
1614
1639
|
|
|
@@ -2,27 +2,28 @@ import { defineComponents } from '../components.js';
|
|
|
2
2
|
import { b as bindUsa } from '../chunks/bind-B_CTL6Qn.js';
|
|
3
3
|
export { u as usaEventName } from '../chunks/bind-B_CTL6Qn.js';
|
|
4
4
|
import './reveal.js';
|
|
5
|
-
import '../chunks/base-
|
|
5
|
+
import '../chunks/base-BRIPyPtX.js';
|
|
6
6
|
import './text.js';
|
|
7
7
|
import './interaction.js';
|
|
8
8
|
import './feedback.js';
|
|
9
9
|
import './background.js';
|
|
10
|
-
import '../chunks/variants-
|
|
10
|
+
import '../chunks/variants-DTypaOH3.js';
|
|
11
11
|
import './transitions.js';
|
|
12
12
|
import './physics.js';
|
|
13
|
-
import '../chunks/spring-
|
|
13
|
+
import '../chunks/spring-UBPhrh1X.js';
|
|
14
14
|
import './cards.js';
|
|
15
15
|
import './click.js';
|
|
16
16
|
import './ui.js';
|
|
17
17
|
import './page.js';
|
|
18
18
|
import './timeline.js';
|
|
19
19
|
import './gesture.js';
|
|
20
|
-
import '../chunks/core-
|
|
20
|
+
import '../chunks/core-CYozf_E-.js';
|
|
21
21
|
import './svg.js';
|
|
22
22
|
import './webgl.js';
|
|
23
23
|
import './depth.js';
|
|
24
24
|
import './layout.js';
|
|
25
|
-
import '
|
|
25
|
+
import './packs.js';
|
|
26
|
+
import '../chunks/index-tags-BmQR17Sb.js';
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* use-scroll-animate/components/svelte — Svelte integration (v3.8).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte.js","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"svelte.js","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAOH;SACgB,GAAG,CAAC,IAAiB,EAAE,UAAsB,EAAE,EAAA;AAC7D,IAAA,OAAO,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC/B;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,gBAAgB,CAAC,UAAU,CAAC;AACjE;;;;"}
|
package/dist/components/svg.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var base = require('../chunks/base-
|
|
3
|
+
var base = require('../chunks/base-Dm6ee5ug.cjs');
|
|
4
4
|
|
|
5
5
|
const NUM = /-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi;
|
|
6
6
|
/** `true` when two path strings share the same commands (so their numbers can be interpolated). */
|
package/dist/components/svg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as clamp, m as motionScale, e as caf, p as prefersReducedMotion, n as now, r as raf,
|
|
2
|
-
export { a as configureComponents } from '../chunks/base-
|
|
1
|
+
import { b as clamp, m as motionScale, e as caf, p as prefersReducedMotion, n as now, r as raf, i as defineElement, h as EASE_OUT } from '../chunks/base-BRIPyPtX.js';
|
|
2
|
+
export { a as configureComponents } from '../chunks/base-BRIPyPtX.js';
|
|
3
3
|
|
|
4
4
|
const NUM = /-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi;
|
|
5
5
|
/** `true` when two path strings share the same commands (so their numbers can be interpolated). */
|
package/dist/components/text.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var base = require('../chunks/base-
|
|
3
|
+
var base = require('../chunks/base-Dm6ee5ug.cjs');
|
|
4
4
|
|
|
5
5
|
var css$5 = "usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}";
|
|
6
6
|
|
package/dist/components/text.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-
|
|
1
|
+
import { i as defineElement, l as srText, e as caf, n as now, r as raf, h as EASE_OUT, E as EASE_SPRING, b as clamp } from '../chunks/base-BRIPyPtX.js';
|
|
2
|
+
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-BRIPyPtX.js';
|
|
3
3
|
|
|
4
4
|
var css$5 = "usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as prefersReducedMotion, e as caf, b as clamp, d as applyFrame, r as raf, m as motionScale, n as now,
|
|
2
|
-
export { a as configureComponents } from '../chunks/base-
|
|
1
|
+
import { p as prefersReducedMotion, e as caf, b as clamp, d as applyFrame, r as raf, m as motionScale, n as now, i as defineElement } from '../chunks/base-BRIPyPtX.js';
|
|
2
|
+
export { a as configureComponents } from '../chunks/base-BRIPyPtX.js';
|
|
3
3
|
|
|
4
4
|
/** Keyframe presets usable by name in `to()` and `data-tl`. */
|
|
5
5
|
const TIMELINE_PRESETS = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var base = require('../chunks/base-
|
|
3
|
+
var base = require('../chunks/base-Dm6ee5ug.cjs');
|
|
4
4
|
|
|
5
5
|
var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-kind^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-kind=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-kind=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-kind=\"drawer-bottom\"] [part=\"panel\"],dialog[data-kind=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-kind=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
|
|
6
6
|
|
|
@@ -252,6 +252,7 @@ function defineFlipList(tag = 'usa-flip-list') {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
mount() {
|
|
255
|
+
base.deprecate('usa-flip-list', '<usa-flip-list> is deprecated and will be removed in 4.0 — use <usa-auto-animate> (components/layout), which also animates additions and removals. See docs/upgrading-4.md.');
|
|
255
256
|
this.snapshot();
|
|
256
257
|
if (typeof MutationObserver !== 'undefined') {
|
|
257
258
|
const mo = new MutationObserver(() => {
|
|
@@ -498,8 +499,11 @@ async function flip(targets, mutate, options = {}) {
|
|
|
498
499
|
* `ConnectedAnimationService`: `to` flies from the position and size of
|
|
499
500
|
* `from` into its own place (e.g. a thumbnail opening into a detail view).
|
|
500
501
|
* Call it right after `to` is shown. Transforms only.
|
|
502
|
+
*
|
|
503
|
+
* @deprecated since 3.9, removed in 4.0 — use `sharedTransition()` (components/layout).
|
|
501
504
|
*/
|
|
502
505
|
async function connectedAnimation(from, to, options = {}) {
|
|
506
|
+
base.deprecate('connectedAnimation', "connectedAnimation() is deprecated and will be removed in 4.0 — use sharedTransition() from 'use-scroll-animate/components/layout' (data-shared=\"id\" on both elements). See docs/upgrading-4.md.");
|
|
503
507
|
if (base.prefersReducedMotion() || typeof to.animate !== 'function')
|
|
504
508
|
return;
|
|
505
509
|
const a = from.getBoundingClientRect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.cjs","sources":["../../src/components/transitions/dialog.ts","../../src/components/transitions/accordion.ts","../../src/components/transitions/flip-list.ts","../../src/components/transitions/view-switch.ts","../../src/components/transitions/helpers.ts","../../src/components/transitions/index.ts"],"sourcesContent":["import { kindOf, defineElement, shadowStyles, EASE_OUT, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport shadowCss from './dialog.shadow.css?raw';\nimport css from './dialog.css?raw';\n\nexport type DialogVariant = 'modal' | 'drawer-start' | 'drawer-end' | 'drawer-bottom' | 'sheet';\n\n/**\n * `<usa-dialog>` — an animated modal or drawer built on the native\n * `<dialog>` (top layer, focus trapping, inert page, Esc to close). Its\n * children are slotted into the panel (they stay in the light DOM, so\n * React / Vue / Svelte keep owning them). Style with `::part(panel)`,\n * `::part(backdrop)` and the `--usa-dialog-*` custom properties.\n *\n * Attributes: `open` (reflects; set/remove to open/close), `kind`\n * (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`\n * slide from the side, `drawer-bottom` / `sheet` from below), `label`\n * (accessible name), `no-backdrop-close`, `no-esc`. Elements inside\n * with `data-close` close it. Events: `usa:open`, `usa:close` (cancelable\n * `usa:beforeclose`). Reduced motion: fade only.\n */\nexport interface UsaDialogElement extends UsaElement {\n open: boolean;\n show(): Promise<void>;\n close(returnValue?: string): Promise<void>;\n readonly dialog: HTMLDialogElement | null;\n returnValue: string;\n}\n\nconst FROM: Record<string, string> = {\n modal: 'scale(0.94)',\n 'drawer-start': 'translateX(-100%)',\n 'drawer-end': 'translateX(100%)',\n 'drawer-bottom': 'translateY(100%)',\n sheet: 'translateY(40px)',\n};\n\nexport function defineDialog(tag = 'usa-dialog'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaDialog extends Base {\n static get observedAttributes(): string[] {\n return ['open', 'kind', 'label'];\n }\n\n private _dialog: HTMLDialogElement | null = null;\n private _panel: HTMLElement | null = null;\n private _backdrop: HTMLElement | null = null;\n private _busy: Promise<void> | null = null;\n private _syncing = false;\n returnValue = '';\n\n get dialog(): HTMLDialogElement | null {\n return this._dialog;\n }\n get open(): boolean {\n return this.hasAttribute('open');\n }\n set open(v: boolean) {\n this.toggleAttribute('open', !!v);\n }\n\n private get kind(): string {\n return kindOf(this, FROM, 'modal');\n }\n\n changed(name: string): void {\n if (name === 'open') {\n if (this._syncing) return;\n if (this.open) this.show();\n else this.close();\n } else this.syncAttrs();\n }\n\n private syncAttrs(): void {\n if (!this._dialog) return;\n this._dialog.setAttribute('data-kind', this.kind);\n this._dialog.setAttribute('aria-modal', 'true');\n const label = this.getAttribute('label');\n if (label) this._dialog.setAttribute('aria-label', label);\n }\n\n mount(): void {\n if (!this._dialog) {\n const root = this.shadowRoot || this.attachShadow({ mode: 'open' });\n root.innerHTML = '<dialog part=\"dialog\"><div part=\"backdrop\" aria-hidden=\"true\"></div><div part=\"panel\"><slot></slot></div></dialog>';\n shadowStyles(root, shadowCss);\n this._dialog = root.querySelector('dialog');\n this._backdrop = root.querySelector('[part=backdrop]');\n this._panel = root.querySelector('[part=panel]');\n }\n this.syncAttrs();\n const dlg = this._dialog!;\n this.listen(dlg, 'cancel', (e: Event) => {\n e.preventDefault();\n if (!this.flag('no-esc')) this.close('cancel');\n });\n this.listen(this._backdrop!, 'click', () => !this.flag('no-backdrop-close') && this.close('backdrop'));\n this.listen(this, 'click', (e: Event) => {\n const t = (e.target as Element).closest?.('[data-close]');\n if (t && this.contains(t)) this.close((t as HTMLElement).getAttribute('data-close') || 'close');\n });\n if (this.open && !dlg.open) this.show();\n }\n\n unmount(): void {\n if (this._dialog?.open) this._dialog.close();\n }\n\n private setOpenAttr(on: boolean): void {\n this._syncing = true;\n this.toggleAttribute('open', on);\n this._syncing = false;\n }\n\n async show(): Promise<void> {\n await this._busy;\n const dlg = this._dialog;\n if (!dlg) {\n this.setOpenAttr(true); // opens on connect\n return;\n }\n if (dlg.open) return;\n this.setOpenAttr(true);\n try {\n if (typeof dlg.showModal === 'function') dlg.showModal();\n else dlg.setAttribute('open', '');\n } catch {\n dlg.setAttribute('open', '');\n }\n this.emit('open');\n if (this.reduced) {\n await this.animate2([{ opacity: 0 }, { opacity: 1 }], [{ opacity: 0 }, { opacity: 1 }], 160, EASE_OUT);\n return;\n }\n await this.animate2(\n [{ opacity: 0, transform: FROM[this.kind] }, { opacity: 1, transform: 'none' }],\n [{ opacity: 0 }, { opacity: 1 }],\n this.kind === 'modal' ? 260 : 360,\n FLUENT_DECELERATE\n );\n }\n\n async close(returnValue = ''): Promise<void> {\n await this._busy;\n const dlg = this._dialog;\n if (!dlg || !dlg.open) {\n this.setOpenAttr(false);\n return;\n }\n if (!this.emit('beforeclose', { returnValue })) {\n this.setOpenAttr(true);\n return;\n }\n this.returnValue = returnValue;\n this._busy = (async () => {\n const panelTo = this.reduced ? { opacity: 0 } : { opacity: 0, transform: FROM[this.kind] };\n const panelFrom = this.reduced ? { opacity: 1 } : { opacity: 1, transform: 'none' };\n await this.animate2([panelFrom, panelTo], [{ opacity: 1 }, { opacity: 0 }], this.reduced ? 120 : 200, 'cubic-bezier(0.7, 0, 0.84, 0)', 'forwards');\n try {\n if (typeof dlg.close === 'function') dlg.close(returnValue);\n else dlg.removeAttribute('open');\n } catch {\n dlg.removeAttribute('open');\n }\n dlg.removeAttribute('open');\n this._panel?.getAnimations?.().forEach((a) => a.cancel());\n this._backdrop?.getAnimations?.().forEach((a) => a.cancel());\n this.setOpenAttr(false);\n this.emit('close', { returnValue });\n })();\n await this._busy;\n this._busy = null;\n }\n\n private animate2(panel: Keyframe[], backdrop: Keyframe[], duration: number, easing: string, fill: FillMode = 'none'): Promise<void> {\n const a = this._panel ? this.motion(this._panel, panel, { duration, easing, fill }) : null;\n const b = this._backdrop ? this.motion(this._backdrop, backdrop, { duration, easing: 'linear', fill }) : null;\n return Promise.all([a?.finished, b?.finished].map((p) => p?.catch(() => undefined))).then(() => undefined);\n }\n },\n { id: 'dialog', text: css }\n );\n}\n","import { defineElement, EASE_OUT, type UsaElement } from '../base';\nimport css from './accordion.css?raw';\n\n/**\n * `<usa-accordion>` — smooth expand / collapse for the native `<details>`\n * elements inside it (keeps their semantics, keyboard support and\n * find-in-page, and adds no wrapper elements, so framework-rendered content\n * is left alone). Only one stays open unless `multiple` is set.\n *\n * Attributes: `multiple`, `duration` (ms, 300). Event: `usa:toggle`\n * (`detail.details`, `detail.open`). Reduced motion: instant.\n * Heights are measured once per toggle and animated on the `<details>`.\n */\nexport interface UsaAccordionElement extends UsaElement {\n readonly items: HTMLDetailsElement[];\n toggleItem(details: HTMLDetailsElement, open?: boolean): Promise<void>;\n}\n\nexport function defineAccordion(tag = 'usa-accordion'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaAccordion extends Base {\n static get observedAttributes(): string[] {\n return [];\n }\n\n private _running = new WeakMap<HTMLDetailsElement, Animation>();\n\n get items(): HTMLDetailsElement[] {\n return Array.from(this.children).filter((c): c is HTMLDetailsElement => c.tagName === 'DETAILS');\n }\n\n mount(): void {\n this.listen(this, 'click', (e: MouseEvent) => {\n const summary = (e.target as Element).closest?.('summary');\n const d = summary?.parentElement;\n if (!summary || !d || d.tagName !== 'DETAILS' || d.parentElement !== this) return;\n e.preventDefault();\n this.toggleItem(d as HTMLDetailsElement);\n });\n }\n\n /** Height of `d` when closed: its summary plus its own padding and border. */\n private closedHeight(d: HTMLDetailsElement): number {\n const summary = d.querySelector(':scope > summary');\n const cs = typeof getComputedStyle === 'function' ? getComputedStyle(d) : null;\n const extra = cs\n ? ['paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth'].reduce((n, k) => n + (parseFloat((cs as any)[k]) || 0), 0)\n : 0;\n return (summary ? summary.getBoundingClientRect().height : 0) + extra;\n }\n\n async toggleItem(d: HTMLDetailsElement, open = !d.open || d.hasAttribute('data-closing')): Promise<void> {\n if (open && !this.flag('multiple')) this.items.forEach((o) => o !== d && o.open && this.toggleItem(o, false));\n this._running.get(d)?.cancel();\n this._running.delete(d);\n const duration = this.reduced ? 0 : this.num('duration', 300);\n const startH = d.getBoundingClientRect().height;\n if (open) {\n d.removeAttribute('data-closing');\n d.open = true;\n }\n this.emit('toggle', { details: d, open });\n if (!duration || typeof d.animate !== 'function') {\n if (!open) d.open = false;\n return;\n }\n const endH = open ? d.getBoundingClientRect().height : this.closedHeight(d);\n if (!open) d.setAttribute('data-closing', '');\n d.style.overflow = 'hidden';\n const a = d.animate([{ height: `${startH}px` }, { height: `${endH}px` }], { duration, easing: EASE_OUT });\n this._running.set(d, a);\n await a.finished.catch(() => undefined);\n if (this._running.get(d) !== a) return;\n this._running.delete(d);\n d.style.overflow = '';\n if (!open) {\n d.open = false;\n d.removeAttribute('data-closing');\n }\n }\n },\n { id: 'accordion', text: css }\n );\n}\n","import { defineElement, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport css from './flip-list.css?raw';\n\n/**\n * `<usa-flip-list>` — animates its children to their new places whenever\n * they are added, removed or reordered (FLIP: transforms only). Works with\n * any rendering: plain DOM, React keyed lists, Vue `v-for`, Svelte `{#each}`.\n *\n * Attributes: `duration` (ms, 420), `easing`, `disabled`.\n * Method: `flip(mutate)` for explicit changes (also measures resizes).\n * Reduced motion: no animation.\n */\nexport interface UsaFlipListElement extends UsaElement {\n flip(mutate: () => void | Promise<void>): Promise<void>;\n}\n\nexport function defineFlipList(tag = 'usa-flip-list'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaFlipList extends Base {\n static get observedAttributes(): string[] {\n return [];\n }\n\n /** Child positions relative to the host, from the last layout we saw. */\n private _pos = new WeakMap<Element, { x: number; y: number }>();\n private _manual = false;\n\n private snapshot(): void {\n const host = this.getBoundingClientRect();\n for (const el of Array.from(this.children)) {\n const r = el.getBoundingClientRect();\n this._pos.set(el, { x: r.left - host.left, y: r.top - host.top });\n }\n }\n\n mount(): void {\n this.snapshot();\n if (typeof MutationObserver !== 'undefined') {\n const mo = new MutationObserver(() => {\n if (!this._manual) this.animateFrom(this._pos);\n });\n mo.observe(this, { childList: true });\n this.onCleanup(() => mo.disconnect());\n }\n if (typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.snapshot());\n ro.observe(this);\n this.onCleanup(() => ro.disconnect());\n }\n }\n\n private animateFrom(prev: WeakMap<Element, { x: number; y: number }>): Promise<void> {\n const off = this.reduced || this.flag('disabled');\n const host = this.getBoundingClientRect();\n const kids = Array.from(this.children) as HTMLElement[];\n const now = kids.map((el) => {\n const r = el.getBoundingClientRect();\n return { x: r.left - host.left, y: r.top - host.top };\n });\n const anims: Promise<unknown>[] = [];\n const duration = this.num('duration', 420);\n const easing = this.str('easing', FLUENT_DECELERATE);\n kids.forEach((el, i) => {\n const before = prev.get(el);\n this._pos.set(el, now[i]);\n if (off || typeof el.animate !== 'function') return;\n if (!before) {\n anims.push(el.animate([{ opacity: 0, transform: 'scale(0.92)' }, { opacity: 1, transform: 'none' }], { duration, easing }).finished.catch(() => 0));\n return;\n }\n const dx = before.x - now[i].x;\n const dy = before.y - now[i].y;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;\n anims.push(el.animate([{ transform: `translate(${dx}px, ${dy}px)` }, { transform: 'none' }], { duration, easing, composite: 'add' } as KeyframeAnimationOptions).finished.catch(() => 0));\n });\n return Promise.all(anims).then(() => undefined);\n }\n\n async flip(mutate: () => void | Promise<void>): Promise<void> {\n this.snapshot();\n const prev = this._pos;\n this._pos = new WeakMap();\n // Copy the snapshot so the observer does not overwrite it mid-mutation\n for (const el of Array.from(this.children)) {\n const p = prev.get(el);\n if (p) this._pos.set(el, p);\n }\n this._manual = true;\n try {\n await mutate();\n } finally {\n this._manual = false;\n }\n await this.animateFrom(prev);\n }\n },\n { id: 'flip-list', text: css }\n );\n}\n","import { defineElement, EASE_OUT, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport css from './view-switch.css?raw';\n\n/**\n * `<usa-view-switch>` — shows one of its children at a time (tabs, wizard\n * steps, app pages) and animates between them. Children are views; name\n * them with `data-view`, or address them by index.\n *\n * Attributes: `active` (view name or index, default the first),\n * `effect` (`fade` | `slide` (default, direction-aware — Fluent \"page\n * transition\") | `scale` | `drill`), `duration` (ms, 320). Inactive views\n * get `hidden` + `inert`. Event: `usa:change` (`detail.view`,\n * `detail.index`). Reduced motion: a quick fade.\n */\nexport interface UsaViewSwitchElement extends UsaElement {\n active: string;\n readonly views: HTMLElement[];\n show(view: string | number): Promise<void>;\n}\n\nexport function defineViewSwitch(tag = 'usa-view-switch'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaViewSwitch extends Base {\n static get observedAttributes(): string[] {\n return ['active'];\n }\n\n private _index = -1;\n private _anims: Animation[] = [];\n\n get views(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n get active(): string {\n return this.str('active', '0');\n }\n set active(v: string) {\n this.setAttribute('active', String(v));\n }\n\n private indexOf(v: string | number): number {\n const views = this.views;\n const byName = views.findIndex((el) => el.dataset.view === String(v));\n if (byName >= 0) return byName;\n const n = Number(v);\n return Number.isInteger(n) && n >= 0 && n < views.length ? n : -1;\n }\n\n changed(): void {\n this.show(this.active);\n }\n\n mount(): void {\n const i = Math.max(0, this.indexOf(this.active));\n this._index = i;\n this.views.forEach((v, j) => this.setVisible(v, j === i));\n }\n\n private setVisible(v: HTMLElement, on: boolean): void {\n v.hidden = !on;\n v.toggleAttribute('inert', !on);\n v.toggleAttribute('data-active', on);\n }\n\n async show(view: string | number): Promise<void> {\n const next = this.indexOf(view);\n const prev = this._index;\n if (next < 0 || next === prev) return;\n const views = this.views;\n const from = views[prev];\n const to = views[next];\n this._index = next;\n const name = to.dataset.view ?? String(next);\n if (this.active !== name && this.active !== String(next)) this.setAttribute('active', name);\n this._anims.splice(0).forEach((a) => a.finish());\n this.setVisible(to, true);\n this.emit('change', { view: to, index: next, name });\n if (!from) return;\n const duration = this.num('duration', 320);\n const effect = this.reduced ? 'fade' : this.str('effect', 'slide');\n const dir = next > prev ? 1 : -1;\n let outF: Keyframe;\n let inF: Keyframe;\n switch (effect) {\n case 'fade':\n outF = { opacity: 0 };\n inF = { opacity: 0 };\n break;\n case 'scale':\n outF = { opacity: 0, transform: 'scale(0.96)' };\n inF = { opacity: 0, transform: 'scale(1.04)' };\n break;\n case 'drill':\n outF = { opacity: 0, transform: `scale(${dir > 0 ? 1.06 : 0.94})` };\n inF = { opacity: 0, transform: `scale(${dir > 0 ? 0.94 : 1.06})` };\n break;\n default:\n outF = { opacity: 0, transform: `translateX(${-dir * 32}px)` };\n inF = { opacity: 0, transform: `translateX(${dir * 48}px)` };\n }\n const neutral = (f: Keyframe): Keyframe => ('transform' in f ? { opacity: 1, transform: 'none' } : { opacity: 1 });\n // Outgoing view stays stacked in the same grid cell while it leaves\n from.setAttribute('data-leaving', '');\n const a = this.motion(from, [neutral(outF), outF], { duration: duration * 0.6, easing: EASE_OUT, fill: 'forwards' });\n const b = this.motion(to, [inF, neutral(inF)], { duration, delay: duration * 0.15, easing: FLUENT_DECELERATE, fill: 'backwards' });\n this._anims = [a, b].filter((x): x is Animation => !!x);\n await Promise.all(this._anims.map((x) => x.finished.catch(() => undefined)));\n from.removeAttribute('data-leaving');\n if (this._index !== prev) this.setVisible(from, false);\n a?.cancel();\n }\n },\n { id: 'view-switch', text: css }\n );\n}\n","import { prefersReducedMotion, EASE_OUT, FLUENT_DECELERATE } from '../base';\n\nexport interface ViewTransitionOptions {\n /**\n * Element to cross-fade when the View Transitions API is missing (default:\n * none — the update is applied without animation).\n */\n fallback?: HTMLElement | null;\n /** Fallback fade duration in ms (default 180 out + 220 in). */\n duration?: number;\n /** View transition types (`document.startViewTransition({ types })`, where supported). */\n types?: string[];\n}\n\n/**\n * Run `update()` (which changes the DOM) inside a view transition:\n * `document.startViewTransition()` where available (Chrome/Edge 111+, so\n * Electron, WebView2 and Tauri on Windows), otherwise a short cross-fade of\n * `options.fallback`. Instant under reduced motion. Resolves when finished.\n *\n * Give elements a `view-transition-name` in CSS for shared-element morphs.\n */\nexport async function viewTransition(update: () => void | Promise<void>, options: ViewTransitionOptions = {}): Promise<void> {\n const doc: any = typeof document !== 'undefined' ? document : null;\n if (!doc || prefersReducedMotion()) {\n await update();\n return;\n }\n if (typeof doc.startViewTransition === 'function') {\n let vt: any;\n try {\n vt = options.types ? doc.startViewTransition({ update, types: options.types }) : doc.startViewTransition(update);\n } catch {\n vt = doc.startViewTransition(update);\n }\n await vt.finished.catch(() => undefined);\n return;\n }\n const el = options.fallback;\n const d = options.duration ?? 200;\n if (!el || typeof el.animate !== 'function') {\n await update();\n return;\n }\n await el.animate([{ opacity: 1 }, { opacity: 0 }], { duration: d * 0.8, easing: 'ease-in', fill: 'forwards' }).finished.catch(() => undefined);\n await update();\n const a = el.animate([{ opacity: 0, transform: 'translateY(6px)' }, { opacity: 1, transform: 'none' }], { duration: d * 1.1, easing: EASE_OUT });\n // remove the forwards fill of the fade-out\n el.getAnimations?.().forEach((x) => x !== a && x.cancel());\n await a.finished.catch(() => undefined);\n}\n\nexport interface FlipOptions {\n duration?: number;\n easing?: string;\n /** Fade/scale in elements that did not exist before (default true). */\n animateEnter?: boolean;\n}\n\ntype Targets = Element | Iterable<Element> | ArrayLike<Element>;\nconst list = (t: Targets): HTMLElement[] =>\n (t instanceof Element ? Array.from(t.children) : Array.from(t as ArrayLike<Element>)) as HTMLElement[];\n\n/**\n * FLIP animation for layout changes (list reorder, filter, grid resize):\n * measures `targets` (an element's children, or a list), runs `mutate()`,\n * then animates each element from its old position to its new one with\n * transforms only. Elements added by `mutate()` fade in.\n *\n * ```js\n * await flip(list, () => list.append(...shuffled));\n * ```\n */\nexport async function flip(targets: Targets, mutate: () => void | Promise<void>, options: FlipOptions = {}): Promise<void> {\n const before = new Map(list(targets).map((el) => [el, el.getBoundingClientRect()]));\n await mutate();\n if (prefersReducedMotion()) return;\n const after = list(targets);\n const duration = options.duration ?? 420;\n const easing = options.easing ?? FLUENT_DECELERATE;\n const anims: Animation[] = [];\n // Read all, then write all\n const rects = after.map((el) => el.getBoundingClientRect());\n after.forEach((el, i) => {\n if (typeof el.animate !== 'function') return;\n const first = before.get(el);\n const last = rects[i];\n if (!first) {\n if (options.animateEnter !== false) anims.push(el.animate([{ opacity: 0, transform: 'scale(0.9)' }, { opacity: 1, transform: 'none' }], { duration, easing }));\n return;\n }\n const dx = first.left - last.left;\n const dy = first.top - last.top;\n const sx = last.width ? first.width / last.width : 1;\n const sy = last.height ? first.height / last.height : 1;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5 && Math.abs(sx - 1) < 0.01 && Math.abs(sy - 1) < 0.01) return;\n anims.push(\n el.animate(\n [{ transformOrigin: '0 0', transform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})` }, { transformOrigin: '0 0', transform: 'none' }],\n { duration, easing }\n )\n );\n });\n await Promise.all(anims.map((a) => a.finished.catch(() => undefined)));\n}\n\nexport interface ConnectedOptions {\n duration?: number;\n easing?: string;\n /** Hide `from` while the animation runs (default true). */\n hideSource?: boolean;\n}\n\n/**\n * Connected (shared-element) animation, like WinUI's\n * `ConnectedAnimationService`: `to` flies from the position and size of\n * `from` into its own place (e.g. a thumbnail opening into a detail view).\n * Call it right after `to` is shown. Transforms only.\n */\nexport async function connectedAnimation(from: Element, to: HTMLElement, options: ConnectedOptions = {}): Promise<void> {\n if (prefersReducedMotion() || typeof to.animate !== 'function') return;\n const a = from.getBoundingClientRect();\n const b = to.getBoundingClientRect();\n if (!b.width || !b.height) return;\n const hide = options.hideSource !== false && from instanceof HTMLElement;\n const prev = hide ? (from as HTMLElement).style.visibility : '';\n if (hide) (from as HTMLElement).style.visibility = 'hidden';\n const anim = to.animate(\n [\n { transformOrigin: '0 0', transform: `translate(${a.left - b.left}px, ${a.top - b.top}px) scale(${a.width / b.width}, ${a.height / b.height})` },\n { transformOrigin: '0 0', transform: 'none' },\n ],\n { duration: options.duration ?? 480, easing: options.easing ?? FLUENT_DECELERATE }\n );\n await anim.finished.catch(() => undefined);\n if (hide) (from as HTMLElement).style.visibility = prev;\n}\n","/**\n * use-scroll-animate/components/transitions — view & layout transitions.\n * `<usa-dialog>`, `<usa-accordion>`, `<usa-flip-list>`, `<usa-view-switch>`\n * and the `viewTransition()`, `flip()`, `connectedAnimation()` helpers.\n */\nimport { defineDialog, type UsaDialogElement } from './dialog';\nimport { defineAccordion, type UsaAccordionElement } from './accordion';\nimport { defineFlipList, type UsaFlipListElement } from './flip-list';\nimport { defineViewSwitch, type UsaViewSwitchElement } from './view-switch';\n\nexport { defineDialog, defineAccordion, defineFlipList, defineViewSwitch };\nexport { viewTransition, flip, connectedAnimation } from './helpers';\nexport type { ViewTransitionOptions, FlipOptions, ConnectedOptions } from './helpers';\nexport type { DialogVariant } from './dialog';\nexport type { UsaDialogElement, UsaAccordionElement, UsaFlipListElement, UsaViewSwitchElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineTransitionComponents(): void {\n defineDialog();\n defineAccordion();\n defineFlipList();\n defineViewSwitch();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-dialog': UsaDialogElement;\n 'usa-accordion': UsaAccordionElement;\n 'usa-flip-list': UsaFlipListElement;\n 'usa-view-switch': UsaViewSwitchElement;\n }\n}\n"],"names":["defineElement","kindOf","shadowStyles","EASE_OUT","FLUENT_DECELERATE","css","prefersReducedMotion"],"mappings":";;;;;;;;AA4BA,MAAM,IAAI,GAA2B;AACnC,IAAA,KAAK,EAAE,a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"version":3,"file":"transitions.cjs","sources":["../../src/components/transitions/dialog.ts","../../src/components/transitions/accordion.ts","../../src/components/transitions/flip-list.ts","../../src/components/transitions/view-switch.ts","../../src/components/transitions/helpers.ts","../../src/components/transitions/index.ts"],"sourcesContent":["import { kindOf, defineElement, shadowStyles, EASE_OUT, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport shadowCss from './dialog.shadow.css?raw';\nimport css from './dialog.css?raw';\n\nexport type DialogVariant = 'modal' | 'drawer-start' | 'drawer-end' | 'drawer-bottom' | 'sheet';\n\n/**\n * `<usa-dialog>` — an animated modal or drawer built on the native\n * `<dialog>` (top layer, focus trapping, inert page, Esc to close). Its\n * children are slotted into the panel (they stay in the light DOM, so\n * React / Vue / Svelte keep owning them). Style with `::part(panel)`,\n * `::part(backdrop)` and the `--usa-dialog-*` custom properties.\n *\n * Attributes: `open` (reflects; set/remove to open/close), `kind`\n * (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`\n * slide from the side, `drawer-bottom` / `sheet` from below), `label`\n * (accessible name), `no-backdrop-close`, `no-esc`. Elements inside\n * with `data-close` close it. Events: `usa:open`, `usa:close` (cancelable\n * `usa:beforeclose`). Reduced motion: fade only.\n */\nexport interface UsaDialogElement extends UsaElement {\n open: boolean;\n show(): Promise<void>;\n close(returnValue?: string): Promise<void>;\n readonly dialog: HTMLDialogElement | null;\n returnValue: string;\n}\n\nconst FROM: Record<string, string> = {\n modal: 'scale(0.94)',\n 'drawer-start': 'translateX(-100%)',\n 'drawer-end': 'translateX(100%)',\n 'drawer-bottom': 'translateY(100%)',\n sheet: 'translateY(40px)',\n};\n\nexport function defineDialog(tag = 'usa-dialog'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaDialog extends Base {\n static get observedAttributes(): string[] {\n return ['open', 'kind', 'label'];\n }\n\n private _dialog: HTMLDialogElement | null = null;\n private _panel: HTMLElement | null = null;\n private _backdrop: HTMLElement | null = null;\n private _busy: Promise<void> | null = null;\n private _syncing = false;\n returnValue = '';\n\n get dialog(): HTMLDialogElement | null {\n return this._dialog;\n }\n get open(): boolean {\n return this.hasAttribute('open');\n }\n set open(v: boolean) {\n this.toggleAttribute('open', !!v);\n }\n\n private get kind(): string {\n return kindOf(this, FROM, 'modal');\n }\n\n changed(name: string): void {\n if (name === 'open') {\n if (this._syncing) return;\n if (this.open) this.show();\n else this.close();\n } else this.syncAttrs();\n }\n\n private syncAttrs(): void {\n if (!this._dialog) return;\n this._dialog.setAttribute('data-kind', this.kind);\n this._dialog.setAttribute('aria-modal', 'true');\n const label = this.getAttribute('label');\n if (label) this._dialog.setAttribute('aria-label', label);\n }\n\n mount(): void {\n if (!this._dialog) {\n const root = this.shadowRoot || this.attachShadow({ mode: 'open' });\n root.innerHTML = '<dialog part=\"dialog\"><div part=\"backdrop\" aria-hidden=\"true\"></div><div part=\"panel\"><slot></slot></div></dialog>';\n shadowStyles(root, shadowCss);\n this._dialog = root.querySelector('dialog');\n this._backdrop = root.querySelector('[part=backdrop]');\n this._panel = root.querySelector('[part=panel]');\n }\n this.syncAttrs();\n const dlg = this._dialog!;\n this.listen(dlg, 'cancel', (e: Event) => {\n e.preventDefault();\n if (!this.flag('no-esc')) this.close('cancel');\n });\n this.listen(this._backdrop!, 'click', () => !this.flag('no-backdrop-close') && this.close('backdrop'));\n this.listen(this, 'click', (e: Event) => {\n const t = (e.target as Element).closest?.('[data-close]');\n if (t && this.contains(t)) this.close((t as HTMLElement).getAttribute('data-close') || 'close');\n });\n if (this.open && !dlg.open) this.show();\n }\n\n unmount(): void {\n if (this._dialog?.open) this._dialog.close();\n }\n\n private setOpenAttr(on: boolean): void {\n this._syncing = true;\n this.toggleAttribute('open', on);\n this._syncing = false;\n }\n\n async show(): Promise<void> {\n await this._busy;\n const dlg = this._dialog;\n if (!dlg) {\n this.setOpenAttr(true); // opens on connect\n return;\n }\n if (dlg.open) return;\n this.setOpenAttr(true);\n try {\n if (typeof dlg.showModal === 'function') dlg.showModal();\n else dlg.setAttribute('open', '');\n } catch {\n dlg.setAttribute('open', '');\n }\n this.emit('open');\n if (this.reduced) {\n await this.animate2([{ opacity: 0 }, { opacity: 1 }], [{ opacity: 0 }, { opacity: 1 }], 160, EASE_OUT);\n return;\n }\n await this.animate2(\n [{ opacity: 0, transform: FROM[this.kind] }, { opacity: 1, transform: 'none' }],\n [{ opacity: 0 }, { opacity: 1 }],\n this.kind === 'modal' ? 260 : 360,\n FLUENT_DECELERATE\n );\n }\n\n async close(returnValue = ''): Promise<void> {\n await this._busy;\n const dlg = this._dialog;\n if (!dlg || !dlg.open) {\n this.setOpenAttr(false);\n return;\n }\n if (!this.emit('beforeclose', { returnValue })) {\n this.setOpenAttr(true);\n return;\n }\n this.returnValue = returnValue;\n this._busy = (async () => {\n const panelTo = this.reduced ? { opacity: 0 } : { opacity: 0, transform: FROM[this.kind] };\n const panelFrom = this.reduced ? { opacity: 1 } : { opacity: 1, transform: 'none' };\n await this.animate2([panelFrom, panelTo], [{ opacity: 1 }, { opacity: 0 }], this.reduced ? 120 : 200, 'cubic-bezier(0.7, 0, 0.84, 0)', 'forwards');\n try {\n if (typeof dlg.close === 'function') dlg.close(returnValue);\n else dlg.removeAttribute('open');\n } catch {\n dlg.removeAttribute('open');\n }\n dlg.removeAttribute('open');\n this._panel?.getAnimations?.().forEach((a) => a.cancel());\n this._backdrop?.getAnimations?.().forEach((a) => a.cancel());\n this.setOpenAttr(false);\n this.emit('close', { returnValue });\n })();\n await this._busy;\n this._busy = null;\n }\n\n private animate2(panel: Keyframe[], backdrop: Keyframe[], duration: number, easing: string, fill: FillMode = 'none'): Promise<void> {\n const a = this._panel ? this.motion(this._panel, panel, { duration, easing, fill }) : null;\n const b = this._backdrop ? this.motion(this._backdrop, backdrop, { duration, easing: 'linear', fill }) : null;\n return Promise.all([a?.finished, b?.finished].map((p) => p?.catch(() => undefined))).then(() => undefined);\n }\n },\n { id: 'dialog', text: css }\n );\n}\n","import { defineElement, EASE_OUT, type UsaElement } from '../base';\nimport css from './accordion.css?raw';\n\n/**\n * `<usa-accordion>` — smooth expand / collapse for the native `<details>`\n * elements inside it (keeps their semantics, keyboard support and\n * find-in-page, and adds no wrapper elements, so framework-rendered content\n * is left alone). Only one stays open unless `multiple` is set.\n *\n * Attributes: `multiple`, `duration` (ms, 300). Event: `usa:toggle`\n * (`detail.details`, `detail.open`). Reduced motion: instant.\n * Heights are measured once per toggle and animated on the `<details>`.\n */\nexport interface UsaAccordionElement extends UsaElement {\n readonly items: HTMLDetailsElement[];\n toggleItem(details: HTMLDetailsElement, open?: boolean): Promise<void>;\n}\n\nexport function defineAccordion(tag = 'usa-accordion'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaAccordion extends Base {\n static get observedAttributes(): string[] {\n return [];\n }\n\n private _running = new WeakMap<HTMLDetailsElement, Animation>();\n\n get items(): HTMLDetailsElement[] {\n return Array.from(this.children).filter((c): c is HTMLDetailsElement => c.tagName === 'DETAILS');\n }\n\n mount(): void {\n this.listen(this, 'click', (e: MouseEvent) => {\n const summary = (e.target as Element).closest?.('summary');\n const d = summary?.parentElement;\n if (!summary || !d || d.tagName !== 'DETAILS' || d.parentElement !== this) return;\n e.preventDefault();\n this.toggleItem(d as HTMLDetailsElement);\n });\n }\n\n /** Height of `d` when closed: its summary plus its own padding and border. */\n private closedHeight(d: HTMLDetailsElement): number {\n const summary = d.querySelector(':scope > summary');\n const cs = typeof getComputedStyle === 'function' ? getComputedStyle(d) : null;\n const extra = cs\n ? ['paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth'].reduce((n, k) => n + (parseFloat((cs as any)[k]) || 0), 0)\n : 0;\n return (summary ? summary.getBoundingClientRect().height : 0) + extra;\n }\n\n async toggleItem(d: HTMLDetailsElement, open = !d.open || d.hasAttribute('data-closing')): Promise<void> {\n if (open && !this.flag('multiple')) this.items.forEach((o) => o !== d && o.open && this.toggleItem(o, false));\n this._running.get(d)?.cancel();\n this._running.delete(d);\n const duration = this.reduced ? 0 : this.num('duration', 300);\n const startH = d.getBoundingClientRect().height;\n if (open) {\n d.removeAttribute('data-closing');\n d.open = true;\n }\n this.emit('toggle', { details: d, open });\n if (!duration || typeof d.animate !== 'function') {\n if (!open) d.open = false;\n return;\n }\n const endH = open ? d.getBoundingClientRect().height : this.closedHeight(d);\n if (!open) d.setAttribute('data-closing', '');\n d.style.overflow = 'hidden';\n const a = d.animate([{ height: `${startH}px` }, { height: `${endH}px` }], { duration, easing: EASE_OUT });\n this._running.set(d, a);\n await a.finished.catch(() => undefined);\n if (this._running.get(d) !== a) return;\n this._running.delete(d);\n d.style.overflow = '';\n if (!open) {\n d.open = false;\n d.removeAttribute('data-closing');\n }\n }\n },\n { id: 'accordion', text: css }\n );\n}\n","import { defineElement, deprecate, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport css from './flip-list.css?raw';\n\n/**\n * `<usa-flip-list>` — animates its children to their new places whenever\n * they are added, removed or reordered (FLIP: transforms only). Works with\n * any rendering: plain DOM, React keyed lists, Vue `v-for`, Svelte `{#each}`.\n *\n * Attributes: `duration` (ms, 420), `easing`, `disabled`.\n * Method: `flip(mutate)` for explicit changes (also measures resizes).\n * Reduced motion: no animation.\n */\nexport interface UsaFlipListElement extends UsaElement {\n flip(mutate: () => void | Promise<void>): Promise<void>;\n}\n\nexport function defineFlipList(tag = 'usa-flip-list'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaFlipList extends Base {\n static get observedAttributes(): string[] {\n return [];\n }\n\n /** Child positions relative to the host, from the last layout we saw. */\n private _pos = new WeakMap<Element, { x: number; y: number }>();\n private _manual = false;\n\n private snapshot(): void {\n const host = this.getBoundingClientRect();\n for (const el of Array.from(this.children)) {\n const r = el.getBoundingClientRect();\n this._pos.set(el, { x: r.left - host.left, y: r.top - host.top });\n }\n }\n\n mount(): void {\n deprecate('usa-flip-list', '<usa-flip-list> is deprecated and will be removed in 4.0 — use <usa-auto-animate> (components/layout), which also animates additions and removals. See docs/upgrading-4.md.');\n this.snapshot();\n if (typeof MutationObserver !== 'undefined') {\n const mo = new MutationObserver(() => {\n if (!this._manual) this.animateFrom(this._pos);\n });\n mo.observe(this, { childList: true });\n this.onCleanup(() => mo.disconnect());\n }\n if (typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.snapshot());\n ro.observe(this);\n this.onCleanup(() => ro.disconnect());\n }\n }\n\n private animateFrom(prev: WeakMap<Element, { x: number; y: number }>): Promise<void> {\n const off = this.reduced || this.flag('disabled');\n const host = this.getBoundingClientRect();\n const kids = Array.from(this.children) as HTMLElement[];\n const now = kids.map((el) => {\n const r = el.getBoundingClientRect();\n return { x: r.left - host.left, y: r.top - host.top };\n });\n const anims: Promise<unknown>[] = [];\n const duration = this.num('duration', 420);\n const easing = this.str('easing', FLUENT_DECELERATE);\n kids.forEach((el, i) => {\n const before = prev.get(el);\n this._pos.set(el, now[i]);\n if (off || typeof el.animate !== 'function') return;\n if (!before) {\n anims.push(el.animate([{ opacity: 0, transform: 'scale(0.92)' }, { opacity: 1, transform: 'none' }], { duration, easing }).finished.catch(() => 0));\n return;\n }\n const dx = before.x - now[i].x;\n const dy = before.y - now[i].y;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;\n anims.push(el.animate([{ transform: `translate(${dx}px, ${dy}px)` }, { transform: 'none' }], { duration, easing, composite: 'add' } as KeyframeAnimationOptions).finished.catch(() => 0));\n });\n return Promise.all(anims).then(() => undefined);\n }\n\n async flip(mutate: () => void | Promise<void>): Promise<void> {\n this.snapshot();\n const prev = this._pos;\n this._pos = new WeakMap();\n // Copy the snapshot so the observer does not overwrite it mid-mutation\n for (const el of Array.from(this.children)) {\n const p = prev.get(el);\n if (p) this._pos.set(el, p);\n }\n this._manual = true;\n try {\n await mutate();\n } finally {\n this._manual = false;\n }\n await this.animateFrom(prev);\n }\n },\n { id: 'flip-list', text: css }\n );\n}\n","import { defineElement, EASE_OUT, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport css from './view-switch.css?raw';\n\n/**\n * `<usa-view-switch>` — shows one of its children at a time (tabs, wizard\n * steps, app pages) and animates between them. Children are views; name\n * them with `data-view`, or address them by index.\n *\n * Attributes: `active` (view name or index, default the first),\n * `effect` (`fade` | `slide` (default, direction-aware — Fluent \"page\n * transition\") | `scale` | `drill`), `duration` (ms, 320). Inactive views\n * get `hidden` + `inert`. Event: `usa:change` (`detail.view`,\n * `detail.index`). Reduced motion: a quick fade.\n */\nexport interface UsaViewSwitchElement extends UsaElement {\n active: string;\n readonly views: HTMLElement[];\n show(view: string | number): Promise<void>;\n}\n\nexport function defineViewSwitch(tag = 'usa-view-switch'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaViewSwitch extends Base {\n static get observedAttributes(): string[] {\n return ['active'];\n }\n\n private _index = -1;\n private _anims: Animation[] = [];\n\n get views(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n get active(): string {\n return this.str('active', '0');\n }\n set active(v: string) {\n this.setAttribute('active', String(v));\n }\n\n private indexOf(v: string | number): number {\n const views = this.views;\n const byName = views.findIndex((el) => el.dataset.view === String(v));\n if (byName >= 0) return byName;\n const n = Number(v);\n return Number.isInteger(n) && n >= 0 && n < views.length ? n : -1;\n }\n\n changed(): void {\n this.show(this.active);\n }\n\n mount(): void {\n const i = Math.max(0, this.indexOf(this.active));\n this._index = i;\n this.views.forEach((v, j) => this.setVisible(v, j === i));\n }\n\n private setVisible(v: HTMLElement, on: boolean): void {\n v.hidden = !on;\n v.toggleAttribute('inert', !on);\n v.toggleAttribute('data-active', on);\n }\n\n async show(view: string | number): Promise<void> {\n const next = this.indexOf(view);\n const prev = this._index;\n if (next < 0 || next === prev) return;\n const views = this.views;\n const from = views[prev];\n const to = views[next];\n this._index = next;\n const name = to.dataset.view ?? String(next);\n if (this.active !== name && this.active !== String(next)) this.setAttribute('active', name);\n this._anims.splice(0).forEach((a) => a.finish());\n this.setVisible(to, true);\n this.emit('change', { view: to, index: next, name });\n if (!from) return;\n const duration = this.num('duration', 320);\n const effect = this.reduced ? 'fade' : this.str('effect', 'slide');\n const dir = next > prev ? 1 : -1;\n let outF: Keyframe;\n let inF: Keyframe;\n switch (effect) {\n case 'fade':\n outF = { opacity: 0 };\n inF = { opacity: 0 };\n break;\n case 'scale':\n outF = { opacity: 0, transform: 'scale(0.96)' };\n inF = { opacity: 0, transform: 'scale(1.04)' };\n break;\n case 'drill':\n outF = { opacity: 0, transform: `scale(${dir > 0 ? 1.06 : 0.94})` };\n inF = { opacity: 0, transform: `scale(${dir > 0 ? 0.94 : 1.06})` };\n break;\n default:\n outF = { opacity: 0, transform: `translateX(${-dir * 32}px)` };\n inF = { opacity: 0, transform: `translateX(${dir * 48}px)` };\n }\n const neutral = (f: Keyframe): Keyframe => ('transform' in f ? { opacity: 1, transform: 'none' } : { opacity: 1 });\n // Outgoing view stays stacked in the same grid cell while it leaves\n from.setAttribute('data-leaving', '');\n const a = this.motion(from, [neutral(outF), outF], { duration: duration * 0.6, easing: EASE_OUT, fill: 'forwards' });\n const b = this.motion(to, [inF, neutral(inF)], { duration, delay: duration * 0.15, easing: FLUENT_DECELERATE, fill: 'backwards' });\n this._anims = [a, b].filter((x): x is Animation => !!x);\n await Promise.all(this._anims.map((x) => x.finished.catch(() => undefined)));\n from.removeAttribute('data-leaving');\n if (this._index !== prev) this.setVisible(from, false);\n a?.cancel();\n }\n },\n { id: 'view-switch', text: css }\n );\n}\n","import { deprecate, prefersReducedMotion, EASE_OUT, FLUENT_DECELERATE } from '../base';\n\nexport interface ViewTransitionOptions {\n /**\n * Element to cross-fade when the View Transitions API is missing (default:\n * none — the update is applied without animation).\n */\n fallback?: HTMLElement | null;\n /** Fallback fade duration in ms (default 180 out + 220 in). */\n duration?: number;\n /** View transition types (`document.startViewTransition({ types })`, where supported). */\n types?: string[];\n}\n\n/**\n * Run `update()` (which changes the DOM) inside a view transition:\n * `document.startViewTransition()` where available (Chrome/Edge 111+, so\n * Electron, WebView2 and Tauri on Windows), otherwise a short cross-fade of\n * `options.fallback`. Instant under reduced motion. Resolves when finished.\n *\n * Give elements a `view-transition-name` in CSS for shared-element morphs.\n */\nexport async function viewTransition(update: () => void | Promise<void>, options: ViewTransitionOptions = {}): Promise<void> {\n const doc: any = typeof document !== 'undefined' ? document : null;\n if (!doc || prefersReducedMotion()) {\n await update();\n return;\n }\n if (typeof doc.startViewTransition === 'function') {\n let vt: any;\n try {\n vt = options.types ? doc.startViewTransition({ update, types: options.types }) : doc.startViewTransition(update);\n } catch {\n vt = doc.startViewTransition(update);\n }\n await vt.finished.catch(() => undefined);\n return;\n }\n const el = options.fallback;\n const d = options.duration ?? 200;\n if (!el || typeof el.animate !== 'function') {\n await update();\n return;\n }\n await el.animate([{ opacity: 1 }, { opacity: 0 }], { duration: d * 0.8, easing: 'ease-in', fill: 'forwards' }).finished.catch(() => undefined);\n await update();\n const a = el.animate([{ opacity: 0, transform: 'translateY(6px)' }, { opacity: 1, transform: 'none' }], { duration: d * 1.1, easing: EASE_OUT });\n // remove the forwards fill of the fade-out\n el.getAnimations?.().forEach((x) => x !== a && x.cancel());\n await a.finished.catch(() => undefined);\n}\n\nexport interface FlipOptions {\n duration?: number;\n easing?: string;\n /** Fade/scale in elements that did not exist before (default true). */\n animateEnter?: boolean;\n}\n\ntype Targets = Element | Iterable<Element> | ArrayLike<Element>;\nconst list = (t: Targets): HTMLElement[] =>\n (t instanceof Element ? Array.from(t.children) : Array.from(t as ArrayLike<Element>)) as HTMLElement[];\n\n/**\n * FLIP animation for layout changes (list reorder, filter, grid resize):\n * measures `targets` (an element's children, or a list), runs `mutate()`,\n * then animates each element from its old position to its new one with\n * transforms only. Elements added by `mutate()` fade in.\n *\n * ```js\n * await flip(list, () => list.append(...shuffled));\n * ```\n */\nexport async function flip(targets: Targets, mutate: () => void | Promise<void>, options: FlipOptions = {}): Promise<void> {\n const before = new Map(list(targets).map((el) => [el, el.getBoundingClientRect()]));\n await mutate();\n if (prefersReducedMotion()) return;\n const after = list(targets);\n const duration = options.duration ?? 420;\n const easing = options.easing ?? FLUENT_DECELERATE;\n const anims: Animation[] = [];\n // Read all, then write all\n const rects = after.map((el) => el.getBoundingClientRect());\n after.forEach((el, i) => {\n if (typeof el.animate !== 'function') return;\n const first = before.get(el);\n const last = rects[i];\n if (!first) {\n if (options.animateEnter !== false) anims.push(el.animate([{ opacity: 0, transform: 'scale(0.9)' }, { opacity: 1, transform: 'none' }], { duration, easing }));\n return;\n }\n const dx = first.left - last.left;\n const dy = first.top - last.top;\n const sx = last.width ? first.width / last.width : 1;\n const sy = last.height ? first.height / last.height : 1;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5 && Math.abs(sx - 1) < 0.01 && Math.abs(sy - 1) < 0.01) return;\n anims.push(\n el.animate(\n [{ transformOrigin: '0 0', transform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})` }, { transformOrigin: '0 0', transform: 'none' }],\n { duration, easing }\n )\n );\n });\n await Promise.all(anims.map((a) => a.finished.catch(() => undefined)));\n}\n\nexport interface ConnectedOptions {\n duration?: number;\n easing?: string;\n /** Hide `from` while the animation runs (default true). */\n hideSource?: boolean;\n}\n\n/**\n * Connected (shared-element) animation, like WinUI's\n * `ConnectedAnimationService`: `to` flies from the position and size of\n * `from` into its own place (e.g. a thumbnail opening into a detail view).\n * Call it right after `to` is shown. Transforms only.\n *\n * @deprecated since 3.9, removed in 4.0 — use `sharedTransition()` (components/layout).\n */\nexport async function connectedAnimation(from: Element, to: HTMLElement, options: ConnectedOptions = {}): Promise<void> {\n deprecate('connectedAnimation', \"connectedAnimation() is deprecated and will be removed in 4.0 — use sharedTransition() from 'use-scroll-animate/components/layout' (data-shared=\\\"id\\\" on both elements). See docs/upgrading-4.md.\");\n if (prefersReducedMotion() || typeof to.animate !== 'function') return;\n const a = from.getBoundingClientRect();\n const b = to.getBoundingClientRect();\n if (!b.width || !b.height) return;\n const hide = options.hideSource !== false && from instanceof HTMLElement;\n const prev = hide ? (from as HTMLElement).style.visibility : '';\n if (hide) (from as HTMLElement).style.visibility = 'hidden';\n const anim = to.animate(\n [\n { transformOrigin: '0 0', transform: `translate(${a.left - b.left}px, ${a.top - b.top}px) scale(${a.width / b.width}, ${a.height / b.height})` },\n { transformOrigin: '0 0', transform: 'none' },\n ],\n { duration: options.duration ?? 480, easing: options.easing ?? FLUENT_DECELERATE }\n );\n await anim.finished.catch(() => undefined);\n if (hide) (from as HTMLElement).style.visibility = prev;\n}\n","/**\n * use-scroll-animate/components/transitions — view & layout transitions.\n * `<usa-dialog>`, `<usa-accordion>`, `<usa-flip-list>`, `<usa-view-switch>`\n * and the `viewTransition()`, `flip()`, `connectedAnimation()` helpers.\n */\nimport { defineDialog, type UsaDialogElement } from './dialog';\nimport { defineAccordion, type UsaAccordionElement } from './accordion';\nimport { defineFlipList, type UsaFlipListElement } from './flip-list';\nimport { defineViewSwitch, type UsaViewSwitchElement } from './view-switch';\n\nexport { defineDialog, defineAccordion, defineFlipList, defineViewSwitch };\nexport { viewTransition, flip, connectedAnimation } from './helpers';\nexport type { ViewTransitionOptions, FlipOptions, ConnectedOptions } from './helpers';\nexport type { DialogVariant } from './dialog';\nexport type { UsaDialogElement, UsaAccordionElement, UsaFlipListElement, UsaViewSwitchElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineTransitionComponents(): void {\n defineDialog();\n defineAccordion();\n defineFlipList();\n defineViewSwitch();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-dialog': UsaDialogElement;\n 'usa-accordion': UsaAccordionElement;\n 'usa-flip-list': UsaFlipListElement;\n 'usa-view-switch': UsaViewSwitchElement;\n }\n}\n"],"names":["defineElement","kindOf","shadowStyles","EASE_OUT","FLUENT_DECELERATE","css","deprecate","prefersReducedMotion"],"mappings":";;;;;;;;AA4BA,MAAM,IAAI,GAA2B;AACnC,IAAA,KAAK,EAAE,aAAa;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AAA,eAAe,EAAE;AACjB,IAAA,cAAc,EAAE;AAChB,IAAA,gBAAgB,EAAE;AACpB;;;;;;;;;;;;;"}
|
|
@@ -164,6 +164,8 @@ interface ConnectedOptions {
|
|
|
164
164
|
* `ConnectedAnimationService`: `to` flies from the position and size of
|
|
165
165
|
* `from` into its own place (e.g. a thumbnail opening into a detail view).
|
|
166
166
|
* Call it right after `to` is shown. Transforms only.
|
|
167
|
+
*
|
|
168
|
+
* @deprecated since 3.9, removed in 4.0 — use `sharedTransition()` (components/layout).
|
|
167
169
|
*/
|
|
168
170
|
declare function connectedAnimation(from: Element, to: HTMLElement, options?: ConnectedOptions): Promise<void>;
|
|
169
171
|
|
|
@@ -164,6 +164,8 @@ interface ConnectedOptions {
|
|
|
164
164
|
* `ConnectedAnimationService`: `to` flies from the position and size of
|
|
165
165
|
* `from` into its own place (e.g. a thumbnail opening into a detail view).
|
|
166
166
|
* Call it right after `to` is shown. Transforms only.
|
|
167
|
+
*
|
|
168
|
+
* @deprecated since 3.9, removed in 4.0 — use `sharedTransition()` (components/layout).
|
|
167
169
|
*/
|
|
168
170
|
declare function connectedAnimation(from: Element, to: HTMLElement, options?: ConnectedOptions): Promise<void>;
|
|
169
171
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { a as configureComponents } from '../chunks/base-
|
|
1
|
+
import { i as defineElement, k as kindOf, s as shadowStyles, h as EASE_OUT, F as FLUENT_DECELERATE, j as deprecate, p as prefersReducedMotion } from '../chunks/base-BRIPyPtX.js';
|
|
2
|
+
export { a as configureComponents } from '../chunks/base-BRIPyPtX.js';
|
|
3
3
|
|
|
4
4
|
var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-kind^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-kind=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-kind=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-kind=\"drawer-bottom\"] [part=\"panel\"],dialog[data-kind=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-kind=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
|
|
5
5
|
|
|
@@ -251,6 +251,7 @@ function defineFlipList(tag = 'usa-flip-list') {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
mount() {
|
|
254
|
+
deprecate('usa-flip-list', '<usa-flip-list> is deprecated and will be removed in 4.0 — use <usa-auto-animate> (components/layout), which also animates additions and removals. See docs/upgrading-4.md.');
|
|
254
255
|
this.snapshot();
|
|
255
256
|
if (typeof MutationObserver !== 'undefined') {
|
|
256
257
|
const mo = new MutationObserver(() => {
|
|
@@ -497,8 +498,11 @@ async function flip(targets, mutate, options = {}) {
|
|
|
497
498
|
* `ConnectedAnimationService`: `to` flies from the position and size of
|
|
498
499
|
* `from` into its own place (e.g. a thumbnail opening into a detail view).
|
|
499
500
|
* Call it right after `to` is shown. Transforms only.
|
|
501
|
+
*
|
|
502
|
+
* @deprecated since 3.9, removed in 4.0 — use `sharedTransition()` (components/layout).
|
|
500
503
|
*/
|
|
501
504
|
async function connectedAnimation(from, to, options = {}) {
|
|
505
|
+
deprecate('connectedAnimation', "connectedAnimation() is deprecated and will be removed in 4.0 — use sharedTransition() from 'use-scroll-animate/components/layout' (data-shared=\"id\" on both elements). See docs/upgrading-4.md.");
|
|
502
506
|
if (prefersReducedMotion() || typeof to.animate !== 'function')
|
|
503
507
|
return;
|
|
504
508
|
const a = from.getBoundingClientRect();
|