create-plasmic-app 0.0.96 → 0.0.98

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 (78) hide show
  1. package/cpa-out/react-codegen-js/eslint.config.js +38 -0
  2. package/cpa-out/react-codegen-js/package.json +22 -32
  3. package/cpa-out/react-codegen-js/plasmic.json +16 -10
  4. package/cpa-out/react-codegen-js/src/App.jsx +1 -1
  5. package/cpa-out/react-codegen-js/src/components/Button.jsx +1 -3
  6. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +47 -96
  7. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +35 -29
  8. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +2 -14
  9. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +24 -24
  10. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +44 -58
  11. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +2 -2
  12. package/cpa-out/react-codegen-js/src/main.jsx +10 -0
  13. package/cpa-out/react-codegen-js/vite.config.js +7 -0
  14. package/cpa-out/react-codegen-ts/eslint.config.js +28 -0
  15. package/cpa-out/react-codegen-ts/package.json +23 -37
  16. package/cpa-out/react-codegen-ts/plasmic.json +16 -10
  17. package/cpa-out/react-codegen-ts/src/App.tsx +1 -1
  18. package/cpa-out/react-codegen-ts/src/components/Button.tsx +4 -5
  19. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +84 -62
  20. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +73 -44
  21. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +2 -14
  22. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +62 -38
  23. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +83 -70
  24. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +3 -3
  25. package/cpa-out/react-codegen-ts/src/main.tsx +10 -0
  26. package/cpa-out/react-codegen-ts/src/vite-env.d.ts +1 -0
  27. package/cpa-out/react-codegen-ts/tsconfig.json +4 -23
  28. package/cpa-out/react-codegen-ts/vite.config.ts +7 -0
  29. package/dist/index.js +3 -3
  30. package/dist/lib.js +1 -1
  31. package/dist/react/react.js +36 -11
  32. package/package.json +2 -2
  33. package/src/index.ts +3 -3
  34. package/src/lib.ts +1 -1
  35. package/src/react/react.ts +47 -16
  36. package/cpa-out/react-codegen-js/src/index.js +0 -17
  37. package/cpa-out/react-codegen-js/src/reportWebVitals.js +0 -13
  38. package/cpa-out/react-codegen-js/src/setupTests.js +0 -5
  39. package/cpa-out/react-codegen-ts/src/index.tsx +0 -19
  40. package/cpa-out/react-codegen-ts/src/react-app-env.d.ts +0 -1
  41. package/cpa-out/react-codegen-ts/src/reportWebVitals.ts +0 -15
  42. package/cpa-out/react-codegen-ts/src/setupTests.ts +0 -5
  43. package/cpa-out/react-loader-js/package.json +0 -40
  44. package/cpa-out/react-loader-js/plasmic.json +0 -127
  45. package/cpa-out/react-loader-js/src/App.jsx +0 -9
  46. package/cpa-out/react-loader-js/src/components/Button.jsx +0 -13
  47. package/cpa-out/react-loader-js/src/components/DynamicPage.jsx +0 -26
  48. package/cpa-out/react-loader-js/src/components/Homepage.jsx +0 -26
  49. package/cpa-out/react-loader-js/src/components/RandomDynamicPageButton.jsx +0 -24
  50. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +0 -625
  51. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +0 -166
  52. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +0 -29
  53. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +0 -210
  54. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +0 -161
  55. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +0 -39
  56. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +0 -37
  57. package/cpa-out/react-loader-js/src/index.js +0 -17
  58. package/cpa-out/react-loader-js/src/reportWebVitals.js +0 -13
  59. package/cpa-out/react-loader-js/src/setupTests.js +0 -5
  60. package/cpa-out/react-loader-ts/package.json +0 -45
  61. package/cpa-out/react-loader-ts/plasmic.json +0 -127
  62. package/cpa-out/react-loader-ts/src/App.tsx +0 -9
  63. package/cpa-out/react-loader-ts/src/components/Button.tsx +0 -36
  64. package/cpa-out/react-loader-ts/src/components/DynamicPage.tsx +0 -45
  65. package/cpa-out/react-loader-ts/src/components/Homepage.tsx +0 -45
  66. package/cpa-out/react-loader-ts/src/components/RandomDynamicPageButton.tsx +0 -44
  67. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +0 -725
  68. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +0 -248
  69. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +0 -31
  70. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +0 -294
  71. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +0 -240
  72. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +0 -44
  73. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +0 -41
  74. package/cpa-out/react-loader-ts/src/index.tsx +0 -19
  75. package/cpa-out/react-loader-ts/src/react-app-env.d.ts +0 -1
  76. package/cpa-out/react-loader-ts/src/reportWebVitals.ts +0 -15
  77. package/cpa-out/react-loader-ts/src/setupTests.ts +0 -5
  78. package/cpa-out/react-loader-ts/tsconfig.json +0 -26
@@ -13,35 +13,60 @@
13
13
 
14
14
  import * as React from "react";
15
15
 
16
- import * as p from "@plasmicapp/react-web";
17
- import * as ph from "@plasmicapp/react-web/lib/host";
18
-
19
- import * as pp from "@plasmicapp/react-web";
20
16
  import {
21
- hasVariant,
22
- classNames,
23
- wrapWithClassName,
24
- createPlasmicElementProxy,
25
- makeFragment,
17
+ Flex as Flex__,
26
18
  MultiChoiceArg,
19
+ PlasmicDataSourceContextProvider as PlasmicDataSourceContextProvider__,
20
+ PlasmicIcon as PlasmicIcon__,
21
+ PlasmicImg as PlasmicImg__,
22
+ PlasmicLink as PlasmicLink__,
23
+ PlasmicPageGuard as PlasmicPageGuard__,
27
24
  SingleBooleanChoiceArg,
28
25
  SingleChoiceArg,
29
- pick,
30
- omit,
31
- useTrigger,
26
+ Stack as Stack__,
32
27
  StrictProps,
28
+ Trans as Trans__,
29
+ classNames,
30
+ createPlasmicElementProxy,
33
31
  deriveRenderOpts,
34
- ensureGlobalVariants
32
+ ensureGlobalVariants,
33
+ generateOnMutateForSpec,
34
+ generateStateOnChangeProp,
35
+ generateStateOnChangePropForCodeComponents,
36
+ generateStateValueProp,
37
+ get as $stateGet,
38
+ hasVariant,
39
+ initializeCodeComponentStates,
40
+ initializePlasmicStates,
41
+ makeFragment,
42
+ omit,
43
+ pick,
44
+ renderPlasmicSlot,
45
+ set as $stateSet,
46
+ useCurrentUser,
47
+ useDollarState,
48
+ usePlasmicTranslator,
49
+ useTrigger,
50
+ wrapWithClassName
35
51
  } from "@plasmicapp/react-web";
52
+ import {
53
+ DataCtxReader as DataCtxReader__,
54
+ useDataEnv,
55
+ useGlobalActions
56
+ } from "@plasmicapp/react-web/lib/host";
57
+
58
+ import * as pp from "@plasmicapp/react-web";
36
59
 
37
60
  import "@plasmicapp/react-web/lib/plasmic.css";
38
61
 
39
- import projectcss from "./plasmic_create_plasmic_app.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
62
+ import projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
40
63
  import sty from "./PlasmicButton.module.css"; // plasmic-import: TQcvW_pSKi3/css
41
64
 
42
- import ChecksvgIcon from "./icons/PlasmicIcon__Checksvg"; // plasmic-import: gj-_D7n31Ho/icon
65
+ import CheckSvgIcon from "./icons/PlasmicIcon__CheckSvg"; // plasmic-import: gj-_D7n31Ho/icon
43
66
  import IconIcon from "./icons/PlasmicIcon__Icon"; // plasmic-import: 6PNxx3YMyDQ/icon
44
67
 
68
+ createPlasmicElementProxy;
69
+
45
70
  export type PlasmicButton__VariantMembers = {
46
71
  showStartIcon: "showStartIcon";
47
72
  showEndIcon: "showEndIcon";
@@ -100,23 +125,26 @@ export type PlasmicButton__ArgsType = {
100
125
  startIcon?: React.ReactNode;
101
126
  endIcon?: React.ReactNode;
102
127
  link?: string;
128
+ submitsForm?: boolean;
103
129
  };
104
130
  type ArgPropType = keyof PlasmicButton__ArgsType;
105
131
  export const PlasmicButton__ArgProps = new Array<ArgPropType>(
106
132
  "children",
107
133
  "startIcon",
108
134
  "endIcon",
109
- "link"
135
+ "link",
136
+ "submitsForm"
110
137
  );
111
138
 
112
139
  export type PlasmicButton__OverridesType = {
113
- root?: p.Flex<"button">;
114
- startIconContainer?: p.Flex<"div">;
115
- contentContainer?: p.Flex<"div">;
116
- endIconContainer?: p.Flex<"div">;
140
+ root?: Flex__<"button">;
141
+ startIconContainer?: Flex__<"div">;
142
+ contentContainer?: Flex__<"div">;
143
+ endIconContainer?: Flex__<"div">;
117
144
  };
118
145
 
119
146
  export interface DefaultButtonProps extends pp.BaseButtonProps {
147
+ submitsForm?: boolean;
120
148
  shape?: SingleChoiceArg<"rounded" | "round" | "sharp">;
121
149
  size?: SingleChoiceArg<"compact" | "minimal">;
122
150
  color?: SingleChoiceArg<
@@ -136,13 +164,7 @@ export interface DefaultButtonProps extends pp.BaseButtonProps {
136
164
  >;
137
165
  }
138
166
 
139
- const __wrapUserFunction =
140
- globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
141
- const __wrapUserPromise =
142
- globalThis.__PlasmicWrapUserPromise ??
143
- (async (loc, promise) => {
144
- return await promise;
145
- });
167
+ const $$ = {};
146
168
 
147
169
  function PlasmicButton__RenderFunc(props: {
148
170
  variants: PlasmicButton__VariantsArgs;
@@ -152,72 +174,73 @@ function PlasmicButton__RenderFunc(props: {
152
174
  }) {
153
175
  const { variants, overrides, forNode } = props;
154
176
 
155
- const $ctx = ph.useDataEnv?.() || {};
156
- const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
177
+ const args = React.useMemo(
178
+ () =>
179
+ Object.assign(
180
+ {},
181
+ Object.fromEntries(
182
+ Object.entries(props.args).filter(([_, v]) => v !== undefined)
183
+ )
184
+ ),
185
+ [props.args]
186
+ );
157
187
 
158
188
  const $props = {
159
189
  ...args,
160
190
  ...variants
161
191
  };
192
+
193
+ const $ctx = useDataEnv?.() || {};
162
194
  const refsRef = React.useRef({});
163
195
  const $refs = refsRef.current;
164
196
 
165
- const currentUser = p.useCurrentUser?.() || {};
166
- const [$queries, setDollarQueries] = React.useState({});
167
- const stateSpecs = React.useMemo(
197
+ const stateSpecs: Parameters<typeof useDollarState>[0] = React.useMemo(
168
198
  () => [
169
199
  {
170
200
  path: "showStartIcon",
171
201
  type: "private",
172
202
  variableType: "variant",
173
- initFunc: true
174
- ? ({ $props, $state, $queries, $ctx }) => $props.showStartIcon
175
- : undefined
203
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.showStartIcon
176
204
  },
177
205
  {
178
206
  path: "showEndIcon",
179
207
  type: "private",
180
208
  variableType: "variant",
181
- initFunc: true
182
- ? ({ $props, $state, $queries, $ctx }) => $props.showEndIcon
183
- : undefined
209
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.showEndIcon
184
210
  },
185
211
  {
186
212
  path: "isDisabled",
187
213
  type: "private",
188
214
  variableType: "variant",
189
- initFunc: true
190
- ? ({ $props, $state, $queries, $ctx }) => $props.isDisabled
191
- : undefined
215
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.isDisabled
192
216
  },
193
217
  {
194
218
  path: "shape",
195
219
  type: "private",
196
220
  variableType: "variant",
197
- initFunc: true
198
- ? ({ $props, $state, $queries, $ctx }) => $props.shape
199
- : undefined
221
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.shape
200
222
  },
201
223
  {
202
224
  path: "size",
203
225
  type: "private",
204
226
  variableType: "variant",
205
- initFunc: true
206
- ? ({ $props, $state, $queries, $ctx }) => $props.size
207
- : undefined
227
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.size
208
228
  },
209
229
  {
210
230
  path: "color",
211
231
  type: "private",
212
232
  variableType: "variant",
213
- initFunc: true
214
- ? ({ $props, $state, $queries, $ctx }) => $props.color
215
- : undefined
233
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.color
216
234
  }
217
235
  ],
218
- [$props, $ctx]
236
+ [$props, $ctx, $refs]
219
237
  );
220
- const $state = p.useDollarState(stateSpecs, { $props, $ctx, $queries });
238
+ const $state = useDollarState(stateSpecs, {
239
+ $props,
240
+ $ctx,
241
+ $queries: {},
242
+ $refs
243
+ });
221
244
 
222
245
  const [isRootFocusVisibleWithin, triggerRootFocusVisibleWithinProps] =
223
246
  useTrigger("useFocusVisibleWithin", {
@@ -228,7 +251,7 @@ function PlasmicButton__RenderFunc(props: {
228
251
  };
229
252
 
230
253
  return (
231
- <p.Stack
254
+ <Stack__
232
255
  as={"button"}
233
256
  data-plasmic-name={"root"}
234
257
  data-plasmic-override={overrides.root}
@@ -241,6 +264,7 @@ function PlasmicButton__RenderFunc(props: {
241
264
  projectcss.root_reset,
242
265
  projectcss.plasmic_default_styles,
243
266
  projectcss.plasmic_mixins,
267
+ projectcss.plasmic_tokens,
244
268
  sty.root,
245
269
  {
246
270
  [sty.root___focusVisibleWithin]: triggers.focusVisibleWithin_root,
@@ -322,9 +346,9 @@ function PlasmicButton__RenderFunc(props: {
322
346
  )
323
347
  })}
324
348
  >
325
- {p.renderPlasmicSlot({
349
+ {renderPlasmicSlot({
326
350
  defaultContents: (
327
- <ChecksvgIcon
351
+ <CheckSvgIcon
328
352
  className={classNames(projectcss.all, sty.svg__s6Xxe)}
329
353
  role={"img"}
330
354
  />
@@ -391,7 +415,6 @@ function PlasmicButton__RenderFunc(props: {
391
415
  })}
392
416
  </div>
393
417
  ) : null}
394
-
395
418
  <div
396
419
  data-plasmic-name={"contentContainer"}
397
420
  data-plasmic-override={overrides.contentContainer}
@@ -415,7 +438,7 @@ function PlasmicButton__RenderFunc(props: {
415
438
  )
416
439
  })}
417
440
  >
418
- {p.renderPlasmicSlot({
441
+ {renderPlasmicSlot({
419
442
  defaultContents: "Button",
420
443
  value: args.children,
421
444
  className: classNames(sty.slotTargetChildren, {
@@ -517,7 +540,6 @@ function PlasmicButton__RenderFunc(props: {
517
540
  })
518
541
  })}
519
542
  </div>
520
-
521
543
  {(hasVariant($state, "showEndIcon", "showEndIcon") ? true : false) ? (
522
544
  <div
523
545
  data-plasmic-name={"endIconContainer"}
@@ -540,7 +562,7 @@ function PlasmicButton__RenderFunc(props: {
540
562
  )
541
563
  })}
542
564
  >
543
- {p.renderPlasmicSlot({
565
+ {renderPlasmicSlot({
544
566
  defaultContents: (
545
567
  <IconIcon
546
568
  className={classNames(projectcss.all, sty.svg__liJa)}
@@ -604,11 +626,11 @@ function PlasmicButton__RenderFunc(props: {
604
626
  })}
605
627
  </div>
606
628
  ) : null}
607
- </p.Stack>
629
+ </Stack__>
608
630
  ) as React.ReactElement | null;
609
631
  }
610
632
 
611
- function useBehavior<P extends pp.BaseButtonProps>(
633
+ function useBehavior<P extends pp.PlumeButtonProps>(
612
634
  props: P,
613
635
  ref: pp.ButtonRef
614
636
  ) {
@@ -683,7 +705,7 @@ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
683
705
  () =>
684
706
  deriveRenderOpts(props, {
685
707
  name: nodeName,
686
- descendantNames: [...PlasmicDescendants[nodeName]],
708
+ descendantNames: PlasmicDescendants[nodeName],
687
709
  internalArgPropNames: PlasmicButton__ArgProps,
688
710
  internalVariantPropNames: PlasmicButton__VariantProps
689
711
  }),
@@ -13,32 +13,57 @@
13
13
 
14
14
  import * as React from "react";
15
15
 
16
- import * as p from "@plasmicapp/react-web";
17
- import * as ph from "@plasmicapp/react-web/lib/host";
18
-
19
16
  import {
20
- hasVariant,
21
- classNames,
22
- wrapWithClassName,
23
- createPlasmicElementProxy,
24
- makeFragment,
17
+ Flex as Flex__,
25
18
  MultiChoiceArg,
19
+ PlasmicDataSourceContextProvider as PlasmicDataSourceContextProvider__,
20
+ PlasmicIcon as PlasmicIcon__,
21
+ PlasmicImg as PlasmicImg__,
22
+ PlasmicLink as PlasmicLink__,
23
+ PlasmicPageGuard as PlasmicPageGuard__,
26
24
  SingleBooleanChoiceArg,
27
25
  SingleChoiceArg,
28
- pick,
29
- omit,
30
- useTrigger,
26
+ Stack as Stack__,
31
27
  StrictProps,
28
+ Trans as Trans__,
29
+ classNames,
30
+ createPlasmicElementProxy,
32
31
  deriveRenderOpts,
33
- ensureGlobalVariants
32
+ ensureGlobalVariants,
33
+ generateOnMutateForSpec,
34
+ generateStateOnChangeProp,
35
+ generateStateOnChangePropForCodeComponents,
36
+ generateStateValueProp,
37
+ get as $stateGet,
38
+ hasVariant,
39
+ initializeCodeComponentStates,
40
+ initializePlasmicStates,
41
+ makeFragment,
42
+ omit,
43
+ pick,
44
+ renderPlasmicSlot,
45
+ set as $stateSet,
46
+ useCurrentUser,
47
+ useDollarState,
48
+ usePlasmicTranslator,
49
+ useTrigger,
50
+ wrapWithClassName
34
51
  } from "@plasmicapp/react-web";
52
+ import {
53
+ DataCtxReader as DataCtxReader__,
54
+ useDataEnv,
55
+ useGlobalActions
56
+ } from "@plasmicapp/react-web/lib/host";
57
+
35
58
  import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
36
59
 
37
60
  import "@plasmicapp/react-web/lib/plasmic.css";
38
61
 
39
- import projectcss from "./plasmic_create_plasmic_app.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
62
+ import projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
40
63
  import sty from "./PlasmicDynamicPage.module.css"; // plasmic-import: AO44A-w7hh/css
41
64
 
65
+ createPlasmicElementProxy;
66
+
42
67
  export type PlasmicDynamicPage__VariantMembers = {};
43
68
  export type PlasmicDynamicPage__VariantsArgs = {};
44
69
  type VariantPropType = keyof PlasmicDynamicPage__VariantsArgs;
@@ -49,23 +74,17 @@ type ArgPropType = keyof PlasmicDynamicPage__ArgsType;
49
74
  export const PlasmicDynamicPage__ArgProps = new Array<ArgPropType>();
50
75
 
51
76
  export type PlasmicDynamicPage__OverridesType = {
52
- root?: p.Flex<"div">;
53
- section?: p.Flex<"section">;
54
- h1?: p.Flex<"h1">;
55
- randomDynamicPageButton?: p.Flex<typeof RandomDynamicPageButton>;
77
+ root?: Flex__<"div">;
78
+ section?: Flex__<"section">;
79
+ h1?: Flex__<"h1">;
80
+ randomDynamicPageButton?: Flex__<typeof RandomDynamicPageButton>;
56
81
  };
57
82
 
58
83
  export interface DefaultDynamicPageProps {
59
84
  className?: string;
60
85
  }
61
86
 
62
- const __wrapUserFunction =
63
- globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
64
- const __wrapUserPromise =
65
- globalThis.__PlasmicWrapUserPromise ??
66
- (async (loc, promise) => {
67
- return await promise;
68
- });
87
+ const $$ = {};
69
88
 
70
89
  function PlasmicDynamicPage__RenderFunc(props: {
71
90
  variants: PlasmicDynamicPage__VariantsArgs;
@@ -75,23 +94,28 @@ function PlasmicDynamicPage__RenderFunc(props: {
75
94
  }) {
76
95
  const { variants, overrides, forNode } = props;
77
96
 
78
- const $ctx = ph.useDataEnv?.() || {};
79
- const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
97
+ const args = React.useMemo(
98
+ () =>
99
+ Object.assign(
100
+ {},
101
+ Object.fromEntries(
102
+ Object.entries(props.args).filter(([_, v]) => v !== undefined)
103
+ )
104
+ ),
105
+ [props.args]
106
+ );
80
107
 
81
108
  const $props = {
82
109
  ...args,
83
110
  ...variants
84
111
  };
112
+
113
+ const $ctx = useDataEnv?.() || {};
85
114
  const refsRef = React.useRef({});
86
115
  const $refs = refsRef.current;
87
116
 
88
- const currentUser = p.useCurrentUser?.() || {};
89
- const [$queries, setDollarQueries] = React.useState({});
90
-
91
117
  return (
92
118
  <React.Fragment>
93
- {}
94
-
95
119
  <div className={projectcss.plasmic_page_wrapper}>
96
120
  <div
97
121
  data-plasmic-name={"root"}
@@ -103,10 +127,11 @@ function PlasmicDynamicPage__RenderFunc(props: {
103
127
  projectcss.root_reset,
104
128
  projectcss.plasmic_default_styles,
105
129
  projectcss.plasmic_mixins,
130
+ projectcss.plasmic_tokens,
106
131
  sty.root
107
132
  )}
108
133
  >
109
- <p.Stack
134
+ <Stack__
110
135
  as={"section"}
111
136
  data-plasmic-name={"section"}
112
137
  data-plasmic-override={overrides.section}
@@ -123,18 +148,22 @@ function PlasmicDynamicPage__RenderFunc(props: {
123
148
  sty.h1
124
149
  )}
125
150
  >
126
- {(() => {
127
- try {
128
- return $ctx.params.slug;
129
- } catch (e) {
130
- if (e instanceof TypeError) {
131
- return "Page 1";
151
+ <React.Fragment>
152
+ {(() => {
153
+ try {
154
+ return $ctx.params.slug;
155
+ } catch (e) {
156
+ if (
157
+ e instanceof TypeError ||
158
+ e?.plasmicType === "PlasmicUndefinedDataError"
159
+ ) {
160
+ return "Page 1";
161
+ }
162
+ throw e;
132
163
  }
133
- throw e;
134
- }
135
- })()}
164
+ })()}
165
+ </React.Fragment>
136
166
  </h1>
137
-
138
167
  <RandomDynamicPageButton
139
168
  data-plasmic-name={"randomDynamicPageButton"}
140
169
  data-plasmic-override={overrides.randomDynamicPageButton}
@@ -143,7 +172,7 @@ function PlasmicDynamicPage__RenderFunc(props: {
143
172
  sty.randomDynamicPageButton
144
173
  )}
145
174
  />
146
- </p.Stack>
175
+ </Stack__>
147
176
  </div>
148
177
  </div>
149
178
  </React.Fragment>
@@ -200,7 +229,7 @@ function makeNodeComponent<NodeName extends NodeNameType>(nodeName: NodeName) {
200
229
  () =>
201
230
  deriveRenderOpts(props, {
202
231
  name: nodeName,
203
- descendantNames: [...PlasmicDescendants[nodeName]],
232
+ descendantNames: PlasmicDescendants[nodeName],
204
233
  internalArgPropNames: PlasmicDynamicPage__ArgProps,
205
234
  internalVariantPropNames: PlasmicDynamicPage__VariantProps
206
235
  }),
@@ -4,26 +4,14 @@
4
4
  /* prettier-ignore-start */
5
5
 
6
6
  import * as React from "react";
7
- import * as p from "@plasmicapp/react-web";
7
+ import { createUseScreenVariants } from "@plasmicapp/react-web";
8
8
 
9
9
  export type ScreenValue = "desktopOnly";
10
10
  export const ScreenContext = React.createContext<ScreenValue[] | undefined>(
11
11
  "PLEASE_RENDER_INSIDE_PROVIDER" as any
12
12
  );
13
13
 
14
- /**
15
- * @deprecated Plasmic now uses a custom hook for Screen variants, which is
16
- * automatically included in your components. Please remove this provider
17
- * from your code.
18
- */
19
- export function ScreenVariantProvider(props: React.PropsWithChildren) {
20
- console.warn(
21
- "DEPRECATED: Plasmic now uses a custom hook for Screen variants, which is automatically included in your components. Please remove this provider from your code."
22
- );
23
- return props.children;
24
- }
25
-
26
- export const useScreenVariants = p.createUseScreenVariants(true, {
14
+ export const useScreenVariants = createUseScreenVariants(true, {
27
15
  desktopOnly: "(min-width:768px)",
28
16
  });
29
17