@webstudio-is/react-sdk 0.95.0 → 0.97.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.
Files changed (44) hide show
  1. package/lib/css/normalize.js +127 -53
  2. package/lib/index.js +1850 -32
  3. package/lib/types/component-renderer.d.ts +3 -1
  4. package/lib/types/context.d.ts +2 -0
  5. package/lib/types/index.d.ts +0 -1
  6. package/lib/types/tree/create-elements-tree.d.ts +3 -1
  7. package/lib/types/tree/root.d.ts +3 -1
  8. package/package.json +7 -7
  9. package/lib/app/index.js +0 -2
  10. package/lib/app/root.js +0 -18
  11. package/lib/component-renderer.js +0 -130
  12. package/lib/components/component-meta.js +0 -62
  13. package/lib/components/components-utils.js +0 -2
  14. package/lib/context.js +0 -21
  15. package/lib/css/css.js +0 -59
  16. package/lib/css/global-rules.js +0 -15
  17. package/lib/css/index.js +0 -4
  18. package/lib/css/normalize-type-check.js +0 -4
  19. package/lib/css/presets.js +0 -25
  20. package/lib/css/style-rules.js +0 -63
  21. package/lib/css/style-rules.test.js +0 -149
  22. package/lib/embed-template.js +0 -341
  23. package/lib/embed-template.test.js +0 -648
  24. package/lib/expression.js +0 -330
  25. package/lib/expression.test.js +0 -281
  26. package/lib/generator.js +0 -112
  27. package/lib/generator.test.js +0 -166
  28. package/lib/hook.js +0 -12
  29. package/lib/hook.test.js +0 -15
  30. package/lib/instance-utils.js +0 -43
  31. package/lib/instance-utils.test.js +0 -65
  32. package/lib/prop-meta.js +0 -150
  33. package/lib/props.js +0 -176
  34. package/lib/props.test.js +0 -159
  35. package/lib/pubsub/create.js +0 -56
  36. package/lib/pubsub/index.js +0 -2
  37. package/lib/pubsub/raf-queue.js +0 -20
  38. package/lib/tree/create-elements-tree.js +0 -134
  39. package/lib/tree/index.js +0 -4
  40. package/lib/tree/root.js +0 -85
  41. package/lib/tree/webstudio-component.js +0 -61
  42. package/lib/types/pubsub/create.d.ts +0 -28
  43. package/lib/types/pubsub/index.d.ts +0 -1
  44. package/lib/types/pubsub/raf-queue.d.ts +0 -1
@@ -1,28 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const createPubsub: <PublishMap>() => {
3
- /**
4
- * To publish a postMessage event on the current window and parent window from the iframe.
5
- */
6
- publish<Type extends keyof PublishMap>(action: undefined extends PublishMap[Type] ? {
7
- type: Type;
8
- payload?: PublishMap[Type] | undefined;
9
- } : {
10
- type: Type;
11
- payload: PublishMap[Type];
12
- }): void;
13
- /**
14
- * To publish a postMessage event on the iframe and parent window from the parent window.
15
- */
16
- usePublish(): readonly [<Type_1 extends keyof PublishMap>(action: undefined extends PublishMap[Type_1] ? {
17
- type: Type_1;
18
- payload?: PublishMap[Type_1] | undefined;
19
- } : {
20
- type: Type_1;
21
- payload: PublishMap[Type_1];
22
- }) => void, import("react").MutableRefObject<HTMLIFrameElement | null>];
23
- /**
24
- * To subscribe a message event on the current window.
25
- */
26
- useSubscribe<Type_2 extends keyof PublishMap>(type: Type_2, onAction: (payload: PublishMap[Type_2]) => void): void;
27
- subscribe<Type_3 extends keyof PublishMap>(type: Type_3, onAction: (payload: PublishMap[Type_3]) => void): import("nanoevents").Unsubscribe;
28
- };
@@ -1 +0,0 @@
1
- export * from "./create";
@@ -1 +0,0 @@
1
- export declare const batchUpdate: (update: () => void) => void;