@webstudio-is/sdk-components-animation 0.0.0-bd48788 → 0.0.0-bdb8a58

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,27 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ import { animationCanPlayOnCanvasProperty as o } from "./shared/consts.js";
4
+ const c = m(
5
+ ({ debug: t = !1, action: n, ...i }, s) => /* @__PURE__ */ r("div", { ref: s, style: { display: "contents" }, ...i })
6
+ ), a = "AnimateChildren";
7
+ c.displayName = a;
8
+ const e = "@webstudio-is/sdk-components-animation", h = {
9
+ onNavigatorUnselect: (t, n) => {
10
+ n.instancePath.length > 0 && n.instancePath[0].component === `${e}:${a}` && t.setMemoryProp(
11
+ n.instancePath[0],
12
+ o,
13
+ void 0
14
+ );
15
+ },
16
+ onNavigatorSelect: (t, n) => {
17
+ n.instancePath.length > 0 && n.instancePath[0].component === `${e}:${a}` && t.setMemoryProp(
18
+ n.instancePath[0],
19
+ o,
20
+ !0
21
+ );
22
+ }
23
+ };
24
+ export {
25
+ c as AnimateChildren,
26
+ h as hooksAnimateChildren
27
+ };
package/lib/components.js CHANGED
@@ -1 +1,4 @@
1
-
1
+ import { AnimateChildren as i } from "./animate-children.js";
2
+ export {
3
+ i as AnimateChildren
4
+ };
package/lib/hooks.js CHANGED
@@ -1,4 +1,5 @@
1
- const o = [];
1
+ import { hooksAnimateChildren as o } from "./animate-children.js";
2
+ const t = [o];
2
3
  export {
3
- o as hooks
4
+ t as hooks
4
5
  };
package/lib/metas.js CHANGED
@@ -1 +1,4 @@
1
-
1
+ import { meta as m } from "./scroll.ws.js";
2
+ export {
3
+ m as AnimateChildren
4
+ };
package/lib/props.js CHANGED
@@ -1 +1,4 @@
1
-
1
+ import { propsMeta as a } from "./scroll.ws.js";
2
+ export {
3
+ a as AnimateChildren
4
+ };
@@ -0,0 +1,23 @@
1
+ import { SlotComponentIcon as n } from "@webstudio-is/icons/svg";
2
+ const i = {
3
+ category: "general",
4
+ type: "container",
5
+ description: "Animate Children",
6
+ icon: n,
7
+ order: 5,
8
+ label: "Animate Children"
9
+ }, t = {
10
+ props: {
11
+ action: {
12
+ required: !1,
13
+ control: "animationAction",
14
+ type: "animationAction",
15
+ description: "Animation Action"
16
+ }
17
+ },
18
+ initialProps: ["action"]
19
+ };
20
+ export {
21
+ i as meta,
22
+ t as propsMeta
23
+ };
@@ -0,0 +1,4 @@
1
+ const a = "data-ws-animation-can-play-on-canvas";
2
+ export {
3
+ a as animationCanPlayOnCanvasProperty
4
+ };
@@ -0,0 +1,10 @@
1
+ import type { Hook } from "@webstudio-is/react-sdk";
2
+ import type { AnimationAction } from "@webstudio-is/sdk";
3
+ type ScrollProps = {
4
+ debug?: boolean;
5
+ children?: React.ReactNode;
6
+ action: AnimationAction;
7
+ };
8
+ export declare const AnimateChildren: import("react").ForwardRefExoticComponent<ScrollProps & import("react").RefAttributes<HTMLDivElement>>;
9
+ export declare const hooksAnimateChildren: Hook;
10
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export { AnimateChildren } from "./animate-children";
@@ -1 +1 @@
1
- export {};
1
+ export { meta as AnimateChildren } from "./scroll.ws";
@@ -1 +1 @@
1
- export {};
1
+ export { propsMeta as AnimateChildren } from "./scroll.ws";
@@ -0,0 +1,3 @@
1
+ import type { WsComponentMeta, WsComponentPropsMeta } from "@webstudio-is/sdk";
2
+ export declare const meta: WsComponentMeta;
3
+ export declare const propsMeta: WsComponentPropsMeta;
@@ -0,0 +1 @@
1
+ export declare const animationCanPlayOnCanvasProperty = "data-ws-animation-can-play-on-canvas";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webstudio-is/sdk-components-animation",
3
- "version": "0.0.0-bd48788",
3
+ "version": "0.0.0-bdb8a58",
4
4
  "description": "Webstudio components for animation",
5
5
  "author": "Webstudio <github@webstudio.is>",
6
6
  "homepage": "https://webstudio.is",
@@ -14,6 +14,7 @@
14
14
  ],
15
15
  "exports": {
16
16
  ".": {
17
+ "webstudio-private": "./private-src/components.ts",
17
18
  "webstudio": "./src/components.ts",
18
19
  "types": "./lib/types/components.d.ts",
19
20
  "import": "./lib/components.js"
@@ -44,26 +45,40 @@
44
45
  "react-dom": "18.3.0-canary-14898b6a9-20240318"
45
46
  },
46
47
  "dependencies": {
47
- "@webstudio-is/icons": "0.0.0-bd48788",
48
- "@webstudio-is/react-sdk": "0.0.0-bd48788",
49
- "@webstudio-is/sdk": "0.0.0-bd48788"
48
+ "change-case": "^5.4.4",
49
+ "react-error-boundary": "^5.0.0",
50
+ "scroll-timeline-polyfill": "^1.1.0",
51
+ "@webstudio-is/icons": "0.0.0-bdb8a58",
52
+ "@webstudio-is/css-engine": "0.0.0-bdb8a58",
53
+ "@webstudio-is/sdk": "0.0.0-bdb8a58",
54
+ "@webstudio-is/react-sdk": "0.0.0-bdb8a58"
50
55
  },
51
56
  "devDependencies": {
52
57
  "@types/react": "^18.2.70",
53
58
  "@types/react-dom": "^18.2.25",
59
+ "@vitest/browser": "^3.0.4",
60
+ "fast-glob": "^3.3.2",
61
+ "playwright": "^1.50.1",
54
62
  "react": "18.3.0-canary-14898b6a9-20240318",
55
63
  "react-dom": "18.3.0-canary-14898b6a9-20240318",
64
+ "type-fest": "^4.32.0",
65
+ "vitest": "^3.0.4",
66
+ "zod": "^3.22.4",
67
+ "@webstudio-is/css-data": "0.0.0",
68
+ "@webstudio-is/design-system": "0.0.0",
69
+ "@webstudio-is/generate-arg-types": "0.0.0",
56
70
  "@webstudio-is/sdk-cli": "^0.94.0",
57
- "@webstudio-is/sdk-components-react": "0.0.0-bd48788",
58
- "@webstudio-is/template": "0.0.0-bd48788",
59
- "@webstudio-is/tsconfig": "1.0.7",
60
- "@webstudio-is/generate-arg-types": "0.0.0"
71
+ "@webstudio-is/sdk-components-react": "0.0.0-bdb8a58",
72
+ "@webstudio-is/template": "0.0.0-bdb8a58",
73
+ "@webstudio-is/tsconfig": "1.0.7"
61
74
  },
62
75
  "scripts": {
63
76
  "build": "vite build --config ../../vite.sdk-components.config.ts",
64
77
  "build:args": "NODE_OPTIONS=--conditions=webstudio generate-arg-types './src/*.tsx !./src/*.stories.tsx !./src/*.ws.ts !./src/*.template.tsx !./src/*.test.{ts,tsx}' -e asChild -e modal -e defaultOpen -e defaultChecked && prettier --write \"**/*.props.ts\"",
65
78
  "build:stories": "webstudio-sdk generate-stories && prettier --write \"src/__generated__/*.stories.tsx\"",
66
79
  "dts": "tsc --project tsconfig.dts.json",
67
- "typecheck": "tsc"
80
+ "typecheck": "tsc",
81
+ "test": "vitest run",
82
+ "playwright-init": "playwright install --with-deps"
68
83
  }
69
84
  }
@@ -1,15 +0,0 @@
1
- export declare const animation: Record<string, {
2
- displayName: string;
3
- } & ((props: Record<string, unknown> & Record<`${string}:expression`, string> & {
4
- "ws:id"?: string;
5
- "ws:label"?: string;
6
- "ws:style"?: import("@webstudio-is/template").TemplateStyleDecl[];
7
- "ws:show"?: boolean | {
8
- chunks: string[];
9
- variables: Array<import("@webstudio-is/template").Variable | import("@webstudio-is/template").Parameter | import("@webstudio-is/template").ResourceValue>;
10
- };
11
- children?: import("react").ReactNode | {
12
- chunks: string[];
13
- variables: Array<import("@webstudio-is/template").Variable | import("@webstudio-is/template").Parameter | import("@webstudio-is/template").ResourceValue>;
14
- } | import("@webstudio-is/template").PlaceholderValue;
15
- }) => import("react").ReactNode)>;