use-scroll-animate 3.7.0 → 3.8.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.
@@ -0,0 +1,58 @@
1
+ import { defineComponents } from '../components.js';
2
+ import { b as bindUsa } from '../chunks/bind-B_CTL6Qn.js';
3
+ export { u as usaEventName } from '../chunks/bind-B_CTL6Qn.js';
4
+ import './reveal.js';
5
+ import '../chunks/base-BpROOcey.js';
6
+ import './text.js';
7
+ import './interaction.js';
8
+ import './feedback.js';
9
+ import './background.js';
10
+ import '../chunks/variants-CHe1VbSn.js';
11
+ import './transitions.js';
12
+ import './physics.js';
13
+ import '../chunks/spring-C-fw7_9f.js';
14
+ import './cards.js';
15
+ import './click.js';
16
+ import './ui.js';
17
+ import './page.js';
18
+ import './timeline.js';
19
+ import './gesture.js';
20
+ import '../chunks/core-uxs3ETou.js';
21
+ import './svg.js';
22
+ import './webgl.js';
23
+ import './depth.js';
24
+ import './layout.js';
25
+ import '../chunks/index-tags-BANJ-e4H.js';
26
+
27
+ /**
28
+ * use-scroll-animate/components/solid — Solid integration (v3.8).
29
+ * Solid renders custom elements natively: set properties with `prop:` and
30
+ * listen with `on:` (`<usa-toggle prop:checked={on()} on:usa:change={…}>`).
31
+ * This entry adds `defineUsa()` (client only, SolidStart-safe), a `usa`
32
+ * directive for `use:usa={{ props, on }}`, and JSX types.
33
+ *
34
+ * ```tsx
35
+ * import { defineUsa, usa } from 'use-scroll-animate/components/solid';
36
+ * import type {} from 'use-scroll-animate/components/solid'; // JSX types
37
+ * onMount(() => defineUsa());
38
+ * false && usa; // keep the directive import (Solid convention)
39
+ * <usa-card use:usa={{ on: { flip: (e) => console.log(e.detail) } }} effect="flip">…</usa-card>
40
+ * ```
41
+ */
42
+ /**
43
+ * Solid directive (`use:usa`). Solid calls it with the element and an
44
+ * accessor; the binding is read once on mount and re-read whenever
45
+ * `refresh()` on the returned handle is called (or wrap it in `createEffect`).
46
+ */
47
+ function usa(el, accessor) {
48
+ const b = bindUsa(el, accessor() || {});
49
+ return { refresh: () => b.update(accessor() || {}), destroy: b.destroy };
50
+ }
51
+ /** Register the elements (all, or some categories) — call from `onMount` in SSR apps. */
52
+ function defineUsa(categories) {
53
+ if (typeof window !== 'undefined')
54
+ defineComponents(categories);
55
+ }
56
+
57
+ export { bindUsa, defineUsa, usa };
58
+ //# sourceMappingURL=solid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solid.js","sources":["../../src/components/frameworks/solid.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/solid — Solid integration (v3.8).\n * Solid renders custom elements natively: set properties with `prop:` and\n * listen with `on:` (`<usa-toggle prop:checked={on()} on:usa:change={…}>`).\n * This entry adds `defineUsa()` (client only, SolidStart-safe), a `usa`\n * directive for `use:usa={{ props, on }}`, and JSX types.\n *\n * ```tsx\n * import { defineUsa, usa } from 'use-scroll-animate/components/solid';\n * import type {} from 'use-scroll-animate/components/solid'; // JSX types\n * onMount(() => defineUsa());\n * false && usa; // keep the directive import (Solid convention)\n * <usa-card use:usa={{ on: { flip: (e) => console.log(e.detail) } }} effect=\"flip\">…</usa-card>\n * ```\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\nimport type { UsaIntrinsicElements } from './jsx';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/**\n * Solid directive (`use:usa`). Solid calls it with the element and an\n * accessor; the binding is read once on mount and re-read whenever\n * `refresh()` on the returned handle is called (or wrap it in `createEffect`).\n */\nexport function usa(el: HTMLElement, accessor: () => UsaBinding | undefined): { refresh(): void; destroy(): void } {\n const b = bindUsa(el, accessor() || {});\n return { refresh: () => b.update(accessor() || {}), destroy: b.destroy };\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` in SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n\n/** JSX intrinsic elements for Solid (same attribute types as the React/Preact ones). */\nexport type SolidUsaIntrinsicElements = UsaIntrinsicElements;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;AAQH;;;;AAIG;AACG,SAAU,GAAG,CAAC,EAAe,EAAE,QAAsC,EAAA;IACzE,MAAM,CAAC,GAAG,OAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;AAC1E;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,gBAAgB,CAAC,UAAU,CAAC;AACjE;;;;"}
@@ -0,0 +1,59 @@
1
+ 'use strict';
2
+
3
+ var components = require('../components.cjs');
4
+ var bind = require('../chunks/bind-Ui43-n2d.cjs');
5
+ require('./reveal.cjs');
6
+ require('../chunks/base-CXx7jZ-o.cjs');
7
+ require('./text.cjs');
8
+ require('./interaction.cjs');
9
+ require('./feedback.cjs');
10
+ require('./background.cjs');
11
+ require('../chunks/variants-BNIrn4ch.cjs');
12
+ require('./transitions.cjs');
13
+ require('./physics.cjs');
14
+ require('../chunks/spring-2OTnYCzm.cjs');
15
+ require('./cards.cjs');
16
+ require('./click.cjs');
17
+ require('./ui.cjs');
18
+ require('./page.cjs');
19
+ require('./timeline.cjs');
20
+ require('./gesture.cjs');
21
+ require('../chunks/core-IaorbTdu.cjs');
22
+ require('./svg.cjs');
23
+ require('./webgl.cjs');
24
+ require('./depth.cjs');
25
+ require('./layout.cjs');
26
+ require('../chunks/index-tags-wbuPiMR6.cjs');
27
+
28
+ /**
29
+ * use-scroll-animate/components/svelte — Svelte integration (v3.8).
30
+ * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets
31
+ * **properties** and `usa:*` listeners in one place, and `defineUsa()`
32
+ * registers the elements on the client only (safe in SvelteKit SSR).
33
+ *
34
+ * ```svelte
35
+ * <script>
36
+ * import { usa, defineUsa } from 'use-scroll-animate/components/svelte';
37
+ * import { onMount } from 'svelte';
38
+ * onMount(() => defineUsa(['click', 'ui']));
39
+ * let on = false;
40
+ * </script>
41
+ * <usa-toggle use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-toggle>
42
+ * ```
43
+ * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.
44
+ */
45
+ /** Svelte action: `use:usa={{ props, on }}`. */
46
+ function usa(node, binding = {}) {
47
+ return bind.bindUsa(node, binding);
48
+ }
49
+ /** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */
50
+ function defineUsa(categories) {
51
+ if (typeof window !== 'undefined')
52
+ components.defineComponents(categories);
53
+ }
54
+
55
+ exports.bindUsa = bind.bindUsa;
56
+ exports.usaEventName = bind.usaEventName;
57
+ exports.defineUsa = defineUsa;
58
+ exports.usa = usa;
59
+ //# sourceMappingURL=svelte.cjs.map
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;"}