@animatter/vue 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alanshown
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
- # Temporary Holding Version
1
+ # @animatter/vue
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Optional Vue 3 composition functions for the shared Animatter runtime. Peer dependencies: Vue >=3.3 and animatter ^0.1.0. Version 0.1.0 is available on npm.
4
+
5
+ useAnimatter(rootRef,options) returns a shallow world ref. useSurface(worldRef,elementRef,options) registers and cleans up with component ownership. Use configure/setMode for live changes.
6
+
7
+ [Usage and tests](https://github.com/Alanshown/Animatter.js/blob/main/README.md#framework-integrations). MIT.
@@ -0,0 +1,62 @@
1
+ import { type App, type InjectionKey, type Ref, type VNode, type Directive } from "vue";
2
+ import { presets as builtinPresets, type AnimatterWorld, type PresetDefinition, type PresetInput, type SurfaceOptions, type WorldOptions } from "animatter";
3
+ export declare const animatterKey: InjectionKey<AnimatterWorld>;
4
+ /** Provides a world to all components and directives in the app. Install once with app.use(). */
5
+ export declare function createAnimatterPlugin(world: AnimatterWorld): {
6
+ install(app: App): void;
7
+ };
8
+ /** Creates a world bound to a ref'd root element. Destroyed automatically on unmount. */
9
+ export declare function useAnimatter(root: Ref<HTMLElement | null>, options?: Omit<WorldOptions, "root">): Ref<AnimatterWorld | null>;
10
+ /** Injects the world supplied by createAnimatterPlugin. */
11
+ export declare function usePhysicsWorld(): AnimatterWorld | null;
12
+ /** Registers an element with a world. Options are applied with configure when they change; the surface is not recreated. */
13
+ export declare function useSurface(world: Ref<AnimatterWorld | null>, element: Ref<HTMLElement | null>, options?: SurfaceOptions): void;
14
+ type DirectiveValue = string | {
15
+ preset?: string;
16
+ strength?: number;
17
+ disabled?: boolean;
18
+ } | PresetInput | undefined;
19
+ /** Resolves a directive value into preset definitions. Strings are space-separated built-in names. */
20
+ export declare function resolveDirectivePresets(value: DirectiveValue, fallback: keyof typeof builtinPresets | null): PresetDefinition[];
21
+ /** v-animatter="'elastic magnetic'" or v-animatter="{ preset: 'snap', strength: 0.5 }" */
22
+ export declare const vAnimatter: Directive<HTMLElement, DirectiveValue>;
23
+ /** v-magnetic or v-magnetic="{ strength: 0.6 }" */
24
+ export declare const vMagnetic: Directive<HTMLElement, DirectiveValue>;
25
+ /** v-spring or v-spring="{ strength: 0.8 }" */
26
+ export declare const vSpring: Directive<HTMLElement, DirectiveValue>;
27
+ /** Declarative wrapper component: renders a div whose element is enhanced with the given presets. */
28
+ export declare const AmSurface: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
29
+ presets: {
30
+ type: () => string | PresetDefinition[];
31
+ default: string;
32
+ };
33
+ strength: {
34
+ type: NumberConstructor;
35
+ default: undefined;
36
+ };
37
+ tag: {
38
+ type: StringConstructor;
39
+ default: string;
40
+ };
41
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
42
+ [key: string]: any;
43
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
44
+ presets: {
45
+ type: () => string | PresetDefinition[];
46
+ default: string;
47
+ };
48
+ strength: {
49
+ type: NumberConstructor;
50
+ default: undefined;
51
+ };
52
+ tag: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ }>> & Readonly<{}>, {
57
+ strength: number;
58
+ presets: string | PresetDefinition[];
59
+ tag: string;
60
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
61
+ export {};
62
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,GAAG,EAER,KAAK,YAAY,EACjB,KAAK,GAAG,EACR,KAAK,KAAK,EACV,KAAK,SAAS,EACf,MAAM,KAAK,CAAC;AACb,OAAO,EAEL,OAAO,IAAI,cAAc,EACzB,KAAK,cAAc,EAEnB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,cAAc,CAAuB,CAAC;AAE9E,iGAAiG;AACjG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc;iBAE1C,GAAG,GAAG,IAAI;EAK1B;AAOD,yFAAyF;AACzF,wBAAgB,YAAY,CAC1B,IAAI,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAC7B,OAAO,GAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAM,GACvC,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAU5B;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,IAAI,cAAc,GAAG,IAAI,CAEvD;AAED,4HAA4H;AAC5H,wBAAgB,UAAU,CACxB,KAAK,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,EACjC,OAAO,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAChC,OAAO,GAAE,cAAmB,GAC3B,IAAI,CAeN;AAcD,KAAK,cAAc,GACf,MAAM,GACN;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1D,WAAW,GACX,SAAS,CAAC;AAEd,sGAAsG;AACtG,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,cAAc,GAAG,IAAI,GAAG,gBAAgB,EAAE,CAwB/H;AA+CD,0FAA0F;AAC1F,eAAO,MAAM,UAAU,wCAAsB,CAAC;AAC9C,mDAAmD;AACnD,eAAO,MAAM,SAAS,wCAA4B,CAAC;AACnD,+CAA+C;AAC/C,eAAO,MAAM,OAAO,wCAA2B,CAAC;AAEhD,qGAAqG;AACrG,eAAO,MAAM,SAAS;;cAG6B,MAAM,MAAM,GAAG,gBAAgB,EAAE;;;;;;;;;;;;;;;cAAjC,MAAM,MAAM,GAAG,gBAAgB,EAAE;;;;;;;;;;;;;;;4EA8BlF,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,164 @@
1
+ import { defineComponent, h, inject, onBeforeUnmount, onMounted, shallowRef, watch, } from "vue";
2
+ import { createWorld, presets as builtinPresets, } from "animatter";
3
+ export const animatterKey = Symbol("animatter");
4
+ /** Provides a world to all components and directives in the app. Install once with app.use(). */
5
+ export function createAnimatterPlugin(world) {
6
+ return {
7
+ install(app) {
8
+ app.provide(animatterKey, world);
9
+ app.config.globalProperties.$animatter = world;
10
+ },
11
+ };
12
+ }
13
+ function worldFromVNode(vnode) {
14
+ const global = vnode.appContext?.config.globalProperties;
15
+ return global?.$animatter ?? null;
16
+ }
17
+ /** Creates a world bound to a ref'd root element. Destroyed automatically on unmount. */
18
+ export function useAnimatter(root, options = {}) {
19
+ const world = shallowRef(null);
20
+ onMounted(() => {
21
+ if (root.value)
22
+ world.value = createWorld({ ...options, root: root.value });
23
+ });
24
+ onBeforeUnmount(() => {
25
+ world.value?.destroy();
26
+ world.value = null;
27
+ });
28
+ return world;
29
+ }
30
+ /** Injects the world supplied by createAnimatterPlugin. */
31
+ export function usePhysicsWorld() {
32
+ return inject(animatterKey, null);
33
+ }
34
+ /** Registers an element with a world. Options are applied with configure when they change; the surface is not recreated. */
35
+ export function useSurface(world, element, options = {}) {
36
+ let cleanup;
37
+ const stop = watch([world, element], ([w, el]) => {
38
+ cleanup?.();
39
+ cleanup = undefined;
40
+ if (w && el)
41
+ cleanup = w.register(el, options);
42
+ }, { immediate: true });
43
+ onBeforeUnmount(() => {
44
+ stop();
45
+ cleanup?.();
46
+ });
47
+ }
48
+ const bindings = new WeakMap();
49
+ function presetKey(list) {
50
+ return list.map((p) => `${p.name}:${JSON.stringify(p.options)}`).join("|");
51
+ }
52
+ /** Resolves a directive value into preset definitions. Strings are space-separated built-in names. */
53
+ export function resolveDirectivePresets(value, fallback) {
54
+ if (value === undefined || value === null || value === "") {
55
+ return fallback ? [builtinPresets[fallback]()] : [];
56
+ }
57
+ if (typeof value === "string") {
58
+ return value
59
+ .split(/\s+/)
60
+ .filter(Boolean)
61
+ .map((name) => {
62
+ if (!Object.hasOwn(builtinPresets, name))
63
+ throw new TypeError(`Unknown preset "${name}"`);
64
+ return builtinPresets[name]();
65
+ });
66
+ }
67
+ if (Array.isArray(value))
68
+ return [...value];
69
+ if (typeof value === "object" && "name" in value && "install" in value)
70
+ return [value];
71
+ const options = value;
72
+ const names = (options.preset ?? fallback ?? "").split(/\s+/).filter(Boolean);
73
+ return names.map((name) => {
74
+ if (!Object.hasOwn(builtinPresets, name))
75
+ throw new TypeError(`Unknown preset "${name}"`);
76
+ return builtinPresets[name](options.strength === undefined ? {} : { strength: options.strength });
77
+ });
78
+ }
79
+ function apply(el, value, fallback, world) {
80
+ const existing = bindings.get(el);
81
+ if (!world)
82
+ return;
83
+ const list = resolveDirectivePresets(value, fallback);
84
+ const disabled = typeof value === "object" && value !== null && !Array.isArray(value) && "disabled" in value
85
+ ? Boolean(value.disabled)
86
+ : false;
87
+ const key = presetKey(list);
88
+ if (existing && existing.world === world) {
89
+ if (existing.key !== key) {
90
+ existing.handle.update({ presets: list });
91
+ existing.key = key;
92
+ }
93
+ if (disabled)
94
+ existing.handle.disable();
95
+ else
96
+ existing.handle.enable();
97
+ return;
98
+ }
99
+ existing?.handle.destroy();
100
+ const handle = world.enhance(el, list);
101
+ if (disabled)
102
+ handle.disable();
103
+ bindings.set(el, { world, handle, key });
104
+ }
105
+ function release(el) {
106
+ const binding = bindings.get(el);
107
+ if (!binding)
108
+ return;
109
+ binding.handle.destroy();
110
+ bindings.delete(el);
111
+ }
112
+ function makeDirective(fallback) {
113
+ return {
114
+ mounted(el, binding, vnode) {
115
+ apply(el, binding.value, fallback, worldFromVNode(vnode));
116
+ },
117
+ updated(el, binding, vnode) {
118
+ apply(el, binding.value, fallback, worldFromVNode(vnode));
119
+ },
120
+ unmounted(el) {
121
+ release(el);
122
+ },
123
+ };
124
+ }
125
+ /** v-animatter="'elastic magnetic'" or v-animatter="{ preset: 'snap', strength: 0.5 }" */
126
+ export const vAnimatter = makeDirective(null);
127
+ /** v-magnetic or v-magnetic="{ strength: 0.6 }" */
128
+ export const vMagnetic = makeDirective("magnetic");
129
+ /** v-spring or v-spring="{ strength: 0.8 }" */
130
+ export const vSpring = makeDirective("elastic");
131
+ /** Declarative wrapper component: renders a div whose element is enhanced with the given presets. */
132
+ export const AmSurface = defineComponent({
133
+ name: "AmSurface",
134
+ props: {
135
+ presets: { type: [String, Array], default: "" },
136
+ strength: { type: Number, default: undefined },
137
+ tag: { type: String, default: "div" },
138
+ },
139
+ setup(props, { slots }) {
140
+ const el = shallowRef(null);
141
+ const world = usePhysicsWorld();
142
+ let handle = null;
143
+ const attach = () => {
144
+ if (!world || !el.value)
145
+ return;
146
+ const value = props.presets;
147
+ const list = resolveDirectivePresets(Array.isArray(value)
148
+ ? value
149
+ : props.strength === undefined
150
+ ? value
151
+ : { preset: value, strength: props.strength }, null);
152
+ handle?.destroy();
153
+ handle = world.enhance(el.value, list);
154
+ };
155
+ onMounted(attach);
156
+ watch(() => [props.presets, props.strength], attach);
157
+ onBeforeUnmount(() => {
158
+ handle?.destroy();
159
+ handle = null;
160
+ });
161
+ return () => h(props.tag, { ref: el }, slots.default?.());
162
+ },
163
+ });
164
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,UAAU,EACV,KAAK,GAON,MAAM,KAAK,CAAC;AACb,OAAO,EACL,WAAW,EACX,OAAO,IAAI,cAAc,GAO1B,MAAM,WAAW,CAAC;AAEnB,MAAM,CAAC,MAAM,YAAY,GAAiC,MAAM,CAAC,WAAW,CAAC,CAAC;AAE9E,iGAAiG;AACjG,MAAM,UAAU,qBAAqB,CAAC,KAAqB;IACzD,OAAO;QACL,OAAO,CAAC,GAAQ;YACd,GAAG,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;YACjC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,GAAG,KAAK,CAAC;QACjD,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,KAAY;IAClC,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,gBAA+D,CAAC;IACxG,OAAO,MAAM,EAAE,UAAU,IAAI,IAAI,CAAC;AACpC,CAAC;AA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AAO,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC,CAAC;QACF,SAAS,CAAC,MAAM,CAAC,CAAC;QAClB,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;QACrD,eAAe,CAAC,GAAG,EAAE;YACnB,MAAM,EAAE,OAAO,EAAE,CAAC;YAClB,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,47 @@
1
1
  {
2
2
  "name": "@animatter/vue",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "files": [
7
+ "dist",
8
+ "README.md",
9
+ "LICENSE"
10
+ ],
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ }
18
+ },
19
+ "peerDependencies": {
20
+ "animatter": "^0.2.0",
21
+ "vue": ">=3.3"
22
+ },
23
+ "description": "Vue composition functions for the shared Animatter.js physics interaction runtime",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/Alanshown/Animatter.js.git",
27
+ "directory": "packages/vue"
28
+ },
29
+ "homepage": "https://github.com/Alanshown/Animatter.js#readme",
30
+ "bugs": {
31
+ "url": "https://github.com/Alanshown/Animatter.js/issues"
32
+ },
33
+ "author": "Alanshown",
34
+ "keywords": [
35
+ "physics",
36
+ "interaction",
37
+ "animation",
38
+ "typescript",
39
+ "web",
40
+ "vue"
41
+ ],
42
+ "sideEffects": false,
43
+ "publishConfig": {
44
+ "access": "public",
45
+ "registry": "https://registry.npmjs.org/"
46
+ }
47
+ }