create-plasmic-app 0.0.96 → 0.0.97

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 (76) 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/lib.js +1 -1
  30. package/dist/react/react.js +36 -11
  31. package/package.json +2 -2
  32. package/src/lib.ts +1 -1
  33. package/src/react/react.ts +47 -16
  34. package/cpa-out/react-codegen-js/src/index.js +0 -17
  35. package/cpa-out/react-codegen-js/src/reportWebVitals.js +0 -13
  36. package/cpa-out/react-codegen-js/src/setupTests.js +0 -5
  37. package/cpa-out/react-codegen-ts/src/index.tsx +0 -19
  38. package/cpa-out/react-codegen-ts/src/react-app-env.d.ts +0 -1
  39. package/cpa-out/react-codegen-ts/src/reportWebVitals.ts +0 -15
  40. package/cpa-out/react-codegen-ts/src/setupTests.ts +0 -5
  41. package/cpa-out/react-loader-js/package.json +0 -40
  42. package/cpa-out/react-loader-js/plasmic.json +0 -127
  43. package/cpa-out/react-loader-js/src/App.jsx +0 -9
  44. package/cpa-out/react-loader-js/src/components/Button.jsx +0 -13
  45. package/cpa-out/react-loader-js/src/components/DynamicPage.jsx +0 -26
  46. package/cpa-out/react-loader-js/src/components/Homepage.jsx +0 -26
  47. package/cpa-out/react-loader-js/src/components/RandomDynamicPageButton.jsx +0 -24
  48. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +0 -625
  49. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +0 -166
  50. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +0 -29
  51. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +0 -210
  52. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +0 -161
  53. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +0 -39
  54. package/cpa-out/react-loader-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +0 -37
  55. package/cpa-out/react-loader-js/src/index.js +0 -17
  56. package/cpa-out/react-loader-js/src/reportWebVitals.js +0 -13
  57. package/cpa-out/react-loader-js/src/setupTests.js +0 -5
  58. package/cpa-out/react-loader-ts/package.json +0 -45
  59. package/cpa-out/react-loader-ts/plasmic.json +0 -127
  60. package/cpa-out/react-loader-ts/src/App.tsx +0 -9
  61. package/cpa-out/react-loader-ts/src/components/Button.tsx +0 -36
  62. package/cpa-out/react-loader-ts/src/components/DynamicPage.tsx +0 -45
  63. package/cpa-out/react-loader-ts/src/components/Homepage.tsx +0 -45
  64. package/cpa-out/react-loader-ts/src/components/RandomDynamicPageButton.tsx +0 -44
  65. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +0 -725
  66. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +0 -248
  67. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +0 -31
  68. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +0 -294
  69. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +0 -240
  70. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +0 -44
  71. package/cpa-out/react-loader-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +0 -41
  72. package/cpa-out/react-loader-ts/src/index.tsx +0 -19
  73. package/cpa-out/react-loader-ts/src/react-app-env.d.ts +0 -1
  74. package/cpa-out/react-loader-ts/src/reportWebVitals.ts +0 -15
  75. package/cpa-out/react-loader-ts/src/setupTests.ts +0 -5
  76. package/cpa-out/react-loader-ts/tsconfig.json +0 -26
@@ -9,22 +9,26 @@
9
9
  // Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
10
10
  // Component: TQcvW_pSKi3
11
11
  import * as React from "react";
12
- import * as p from "@plasmicapp/react-web";
13
- import * as ph from "@plasmicapp/react-web/lib/host";
14
- import * as pp from "@plasmicapp/react-web";
15
12
  import {
16
- hasVariant,
13
+ Stack as Stack__,
17
14
  classNames,
18
15
  createPlasmicElementProxy,
19
- useTrigger,
20
- deriveRenderOpts
16
+ deriveRenderOpts,
17
+ hasVariant,
18
+ renderPlasmicSlot,
19
+ useDollarState,
20
+ useTrigger
21
21
  } from "@plasmicapp/react-web";
22
+ import { useDataEnv } from "@plasmicapp/react-web/lib/host";
23
+ import * as pp from "@plasmicapp/react-web";
22
24
  import "@plasmicapp/react-web/lib/plasmic.css";
23
- import projectcss from "./plasmic_create_plasmic_app.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
25
+ import projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
24
26
  import sty from "./PlasmicButton.module.css"; // plasmic-import: TQcvW_pSKi3/css
25
- import ChecksvgIcon from "./icons/PlasmicIcon__Checksvg"; // plasmic-import: gj-_D7n31Ho/icon
27
+ import CheckSvgIcon from "./icons/PlasmicIcon__CheckSvg"; // plasmic-import: gj-_D7n31Ho/icon
26
28
  import IconIcon from "./icons/PlasmicIcon__Icon"; // plasmic-import: 6PNxx3YMyDQ/icon
27
29
 
30
+ createPlasmicElementProxy;
31
+
28
32
  export const PlasmicButton__VariantProps = new Array(
29
33
  "showStartIcon",
30
34
  "showEndIcon",
@@ -38,86 +42,79 @@ export const PlasmicButton__ArgProps = new Array(
38
42
  "children",
39
43
  "startIcon",
40
44
  "endIcon",
41
- "link"
45
+ "link",
46
+ "submitsForm"
42
47
  );
43
48
 
44
- const __wrapUserFunction =
45
- globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
46
-
47
- const __wrapUserPromise =
48
- globalThis.__PlasmicWrapUserPromise ??
49
- (async (loc, promise) => {
50
- return await promise;
51
- });
49
+ const $$ = {};
52
50
 
53
51
  function PlasmicButton__RenderFunc(props) {
54
52
  const { variants, overrides, forNode } = props;
55
- const $ctx = ph.useDataEnv?.() || {};
56
- const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
53
+ const args = React.useMemo(
54
+ () =>
55
+ Object.assign(
56
+ {},
57
+ Object.fromEntries(
58
+ Object.entries(props.args).filter(([_, v]) => v !== undefined)
59
+ )
60
+ ),
61
+ [props.args]
62
+ );
57
63
  const $props = {
58
64
  ...args,
59
65
  ...variants
60
66
  };
67
+ const $ctx = useDataEnv?.() || {};
61
68
  const refsRef = React.useRef({});
62
69
  const $refs = refsRef.current;
63
- const currentUser = p.useCurrentUser?.() || {};
64
- const [$queries, setDollarQueries] = React.useState({});
65
70
  const stateSpecs = React.useMemo(
66
71
  () => [
67
72
  {
68
73
  path: "showStartIcon",
69
74
  type: "private",
70
75
  variableType: "variant",
71
- initFunc: true
72
- ? ({ $props, $state, $queries, $ctx }) => $props.showStartIcon
73
- : undefined
76
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.showStartIcon
74
77
  },
75
78
  {
76
79
  path: "showEndIcon",
77
80
  type: "private",
78
81
  variableType: "variant",
79
- initFunc: true
80
- ? ({ $props, $state, $queries, $ctx }) => $props.showEndIcon
81
- : undefined
82
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.showEndIcon
82
83
  },
83
84
  {
84
85
  path: "isDisabled",
85
86
  type: "private",
86
87
  variableType: "variant",
87
- initFunc: true
88
- ? ({ $props, $state, $queries, $ctx }) => $props.isDisabled
89
- : undefined
88
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.isDisabled
90
89
  },
91
90
  {
92
91
  path: "shape",
93
92
  type: "private",
94
93
  variableType: "variant",
95
- initFunc: true
96
- ? ({ $props, $state, $queries, $ctx }) => $props.shape
97
- : undefined
94
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.shape
98
95
  },
99
96
  {
100
97
  path: "size",
101
98
  type: "private",
102
99
  variableType: "variant",
103
- initFunc: true
104
- ? ({ $props, $state, $queries, $ctx }) => $props.size
105
- : undefined
100
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.size
106
101
  },
107
102
  {
108
103
  path: "color",
109
104
  type: "private",
110
105
  variableType: "variant",
111
- initFunc: true
112
- ? ({ $props, $state, $queries, $ctx }) => $props.color
113
- : undefined
106
+ initFunc: ({ $props, $state, $queries, $ctx }) => $props.color
114
107
  }
115
108
  ],
116
109
 
117
- [$props, $ctx]
110
+ [$props, $ctx, $refs]
118
111
  );
119
-
120
- const $state = p.useDollarState(stateSpecs, { $props, $ctx, $queries });
112
+ const $state = useDollarState(stateSpecs, {
113
+ $props,
114
+ $ctx,
115
+ $queries: {},
116
+ $refs
117
+ });
121
118
  const [isRootFocusVisibleWithin, triggerRootFocusVisibleWithinProps] =
122
119
  useTrigger("useFocusVisibleWithin", {
123
120
  isTextInput: false
@@ -126,7 +123,7 @@ function PlasmicButton__RenderFunc(props) {
126
123
  focusVisibleWithin_root: isRootFocusVisibleWithin
127
124
  };
128
125
  return (
129
- <p.Stack
126
+ <Stack__
130
127
  as={"button"}
131
128
  data-plasmic-name={"root"}
132
129
  data-plasmic-override={overrides.root}
@@ -139,6 +136,7 @@ function PlasmicButton__RenderFunc(props) {
139
136
  projectcss.root_reset,
140
137
  projectcss.plasmic_default_styles,
141
138
  projectcss.plasmic_mixins,
139
+ projectcss.plasmic_tokens,
142
140
  sty.root,
143
141
  {
144
142
  [sty.root___focusVisibleWithin]: triggers.focusVisibleWithin_root,
@@ -176,7 +174,6 @@ function PlasmicButton__RenderFunc(props) {
176
174
  "showEndIcon",
177
175
  "showEndIcon"
178
176
  ),
179
-
180
177
  [sty.rootshowEndIcon_shape_rounded]:
181
178
  hasVariant($state, "showEndIcon", "showEndIcon") &&
182
179
  hasVariant($state, "shape", "rounded"),
@@ -192,7 +189,6 @@ function PlasmicButton__RenderFunc(props) {
192
189
  "showStartIcon",
193
190
  "showStartIcon"
194
191
  ),
195
-
196
192
  [sty.rootsize_compact]: hasVariant($state, "size", "compact"),
197
193
  [sty.rootsize_compact_showStartIcon]:
198
194
  hasVariant($state, "size", "compact") &&
@@ -212,7 +208,6 @@ function PlasmicButton__RenderFunc(props) {
212
208
  "color",
213
209
  "blue"
214
210
  ),
215
-
216
211
  [sty.startIconContainershape_rounded_showStartIcon]:
217
212
  hasVariant($state, "shape", "rounded") &&
218
213
  hasVariant($state, "showStartIcon", "showStartIcon"),
@@ -223,9 +218,9 @@ function PlasmicButton__RenderFunc(props) {
223
218
  )
224
219
  })}
225
220
  >
226
- {p.renderPlasmicSlot({
221
+ {renderPlasmicSlot({
227
222
  defaultContents: (
228
- <ChecksvgIcon
223
+ <CheckSvgIcon
229
224
  className={classNames(projectcss.all, sty.svg__s6Xxe)}
230
225
  role={"img"}
231
226
  />
@@ -238,61 +233,51 @@ function PlasmicButton__RenderFunc(props) {
238
233
  "color",
239
234
  "blue"
240
235
  ),
241
-
242
236
  [sty.slotTargetStartIconcolor_clear]: hasVariant(
243
237
  $state,
244
238
  "color",
245
239
  "clear"
246
240
  ),
247
-
248
241
  [sty.slotTargetStartIconcolor_link]: hasVariant(
249
242
  $state,
250
243
  "color",
251
244
  "link"
252
245
  ),
253
-
254
246
  [sty.slotTargetStartIconcolor_softBlue]: hasVariant(
255
247
  $state,
256
248
  "color",
257
249
  "softBlue"
258
250
  ),
259
-
260
251
  [sty.slotTargetStartIconcolor_softGreen]: hasVariant(
261
252
  $state,
262
253
  "color",
263
254
  "softGreen"
264
255
  ),
265
-
266
256
  [sty.slotTargetStartIconcolor_softRed]: hasVariant(
267
257
  $state,
268
258
  "color",
269
259
  "softRed"
270
260
  ),
271
-
272
261
  [sty.slotTargetStartIconcolor_softSand]: hasVariant(
273
262
  $state,
274
263
  "color",
275
264
  "softSand"
276
265
  ),
277
-
278
266
  [sty.slotTargetStartIconcolor_softYellow]: hasVariant(
279
267
  $state,
280
268
  "color",
281
269
  "softYellow"
282
270
  ),
283
-
284
271
  [sty.slotTargetStartIconcolor_white]: hasVariant(
285
272
  $state,
286
273
  "color",
287
274
  "white"
288
275
  ),
289
-
290
276
  [sty.slotTargetStartIconcolor_yellow]: hasVariant(
291
277
  $state,
292
278
  "color",
293
279
  "yellow"
294
280
  ),
295
-
296
281
  [sty.slotTargetStartIconshowStartIcon]: hasVariant(
297
282
  $state,
298
283
  "showStartIcon",
@@ -302,7 +287,6 @@ function PlasmicButton__RenderFunc(props) {
302
287
  })}
303
288
  </div>
304
289
  ) : null}
305
-
306
290
  <div
307
291
  data-plasmic-name={"contentContainer"}
308
292
  data-plasmic-override={overrides.contentContainer}
@@ -314,13 +298,11 @@ function PlasmicButton__RenderFunc(props) {
314
298
  "isDisabled",
315
299
  "isDisabled"
316
300
  ),
317
-
318
301
  [sty.contentContainershape_rounded]: hasVariant(
319
302
  $state,
320
303
  "shape",
321
304
  "rounded"
322
305
  ),
323
-
324
306
  [sty.contentContainershowEndIcon]: hasVariant(
325
307
  $state,
326
308
  "showEndIcon",
@@ -328,7 +310,7 @@ function PlasmicButton__RenderFunc(props) {
328
310
  )
329
311
  })}
330
312
  >
331
- {p.renderPlasmicSlot({
313
+ {renderPlasmicSlot({
332
314
  defaultContents: "Button",
333
315
  value: args.children,
334
316
  className: classNames(sty.slotTargetChildren, {
@@ -339,25 +321,21 @@ function PlasmicButton__RenderFunc(props) {
339
321
  "color",
340
322
  "blue"
341
323
  ),
342
-
343
324
  [sty.slotTargetChildrencolor_clear]: hasVariant(
344
325
  $state,
345
326
  "color",
346
327
  "clear"
347
328
  ),
348
-
349
329
  [sty.slotTargetChildrencolor_green]: hasVariant(
350
330
  $state,
351
331
  "color",
352
332
  "green"
353
333
  ),
354
-
355
334
  [sty.slotTargetChildrencolor_link]: hasVariant(
356
335
  $state,
357
336
  "color",
358
337
  "link"
359
338
  ),
360
-
361
339
  [sty.slotTargetChildrencolor_link_size_minimal]:
362
340
  hasVariant($state, "color", "link") &&
363
341
  hasVariant($state, "size", "minimal"),
@@ -366,79 +344,66 @@ function PlasmicButton__RenderFunc(props) {
366
344
  "color",
367
345
  "red"
368
346
  ),
369
-
370
347
  [sty.slotTargetChildrencolor_sand]: hasVariant(
371
348
  $state,
372
349
  "color",
373
350
  "sand"
374
351
  ),
375
-
376
352
  [sty.slotTargetChildrencolor_softBlue]: hasVariant(
377
353
  $state,
378
354
  "color",
379
355
  "softBlue"
380
356
  ),
381
-
382
357
  [sty.slotTargetChildrencolor_softGreen]: hasVariant(
383
358
  $state,
384
359
  "color",
385
360
  "softGreen"
386
361
  ),
387
-
388
362
  [sty.slotTargetChildrencolor_softRed]: hasVariant(
389
363
  $state,
390
364
  "color",
391
365
  "softRed"
392
366
  ),
393
-
394
367
  [sty.slotTargetChildrencolor_softSand]: hasVariant(
395
368
  $state,
396
369
  "color",
397
370
  "softSand"
398
371
  ),
399
-
400
372
  [sty.slotTargetChildrencolor_softYellow]: hasVariant(
401
373
  $state,
402
374
  "color",
403
375
  "softYellow"
404
376
  ),
405
-
406
377
  [sty.slotTargetChildrencolor_white]: hasVariant(
407
378
  $state,
408
379
  "color",
409
380
  "white"
410
381
  ),
411
-
412
382
  [sty.slotTargetChildrencolor_yellow]: hasVariant(
413
383
  $state,
414
384
  "color",
415
385
  "yellow"
416
386
  ),
417
-
418
387
  [sty.slotTargetChildrenisDisabled]: hasVariant(
419
388
  $state,
420
389
  "isDisabled",
421
390
  "isDisabled"
422
391
  ),
423
-
424
392
  [sty.slotTargetChildrenshape_rounded]: hasVariant(
425
393
  $state,
426
394
  "shape",
427
395
  "rounded"
428
396
  ),
429
-
430
397
  [sty.slotTargetChildrenshowEndIcon]: hasVariant(
431
398
  $state,
432
399
  "showEndIcon",
433
400
  "showEndIcon"
434
401
  ),
435
-
436
402
  [sty.slotTargetChildrenshowStartIcon]: hasVariant(
437
403
  $state,
438
404
  "showStartIcon",
439
405
  "showStartIcon"
440
406
  ),
441
-
442
407
  [sty.slotTargetChildrensize_minimal]: hasVariant(
443
408
  $state,
444
409
  "size",
@@ -447,7 +412,6 @@ function PlasmicButton__RenderFunc(props) {
447
412
  })
448
413
  })}
449
414
  </div>
450
-
451
415
  {(hasVariant($state, "showEndIcon", "showEndIcon") ? true : false) ? (
452
416
  <div
453
417
  data-plasmic-name={"endIconContainer"}
@@ -458,13 +422,11 @@ function PlasmicButton__RenderFunc(props) {
458
422
  "color",
459
423
  "white"
460
424
  ),
461
-
462
425
  [sty.endIconContainercolor_yellow]: hasVariant(
463
426
  $state,
464
427
  "color",
465
428
  "yellow"
466
429
  ),
467
-
468
430
  [sty.endIconContainershowEndIcon]: hasVariant(
469
431
  $state,
470
432
  "showEndIcon",
@@ -472,7 +434,7 @@ function PlasmicButton__RenderFunc(props) {
472
434
  )
473
435
  })}
474
436
  >
475
- {p.renderPlasmicSlot({
437
+ {renderPlasmicSlot({
476
438
  defaultContents: (
477
439
  <IconIcon
478
440
  className={classNames(projectcss.all, sty.svg__liJa)}
@@ -487,55 +449,46 @@ function PlasmicButton__RenderFunc(props) {
487
449
  "color",
488
450
  "clear"
489
451
  ),
490
-
491
452
  [sty.slotTargetEndIconcolor_link]: hasVariant(
492
453
  $state,
493
454
  "color",
494
455
  "link"
495
456
  ),
496
-
497
457
  [sty.slotTargetEndIconcolor_softBlue]: hasVariant(
498
458
  $state,
499
459
  "color",
500
460
  "softBlue"
501
461
  ),
502
-
503
462
  [sty.slotTargetEndIconcolor_softGreen]: hasVariant(
504
463
  $state,
505
464
  "color",
506
465
  "softGreen"
507
466
  ),
508
-
509
467
  [sty.slotTargetEndIconcolor_softRed]: hasVariant(
510
468
  $state,
511
469
  "color",
512
470
  "softRed"
513
471
  ),
514
-
515
472
  [sty.slotTargetEndIconcolor_softSand]: hasVariant(
516
473
  $state,
517
474
  "color",
518
475
  "softSand"
519
476
  ),
520
-
521
477
  [sty.slotTargetEndIconcolor_softYellow]: hasVariant(
522
478
  $state,
523
479
  "color",
524
480
  "softYellow"
525
481
  ),
526
-
527
482
  [sty.slotTargetEndIconcolor_white]: hasVariant(
528
483
  $state,
529
484
  "color",
530
485
  "white"
531
486
  ),
532
-
533
487
  [sty.slotTargetEndIconcolor_yellow]: hasVariant(
534
488
  $state,
535
489
  "color",
536
490
  "yellow"
537
491
  ),
538
-
539
492
  [sty.slotTargetEndIconshowEndIcon]: hasVariant(
540
493
  $state,
541
494
  "showEndIcon",
@@ -545,7 +498,7 @@ function PlasmicButton__RenderFunc(props) {
545
498
  })}
546
499
  </div>
547
500
  ) : null}
548
- </p.Stack>
501
+ </Stack__>
549
502
  );
550
503
  }
551
504
 
@@ -567,7 +520,6 @@ function useBehavior(props, ref) {
567
520
  },
568
521
  ref
569
522
  );
570
-
571
523
  return b;
572
524
  }
573
525
 
@@ -584,13 +536,12 @@ function makeNodeComponent(nodeName) {
584
536
  () =>
585
537
  deriveRenderOpts(props, {
586
538
  name: nodeName,
587
- descendantNames: [...PlasmicDescendants[nodeName]],
539
+ descendantNames: PlasmicDescendants[nodeName],
588
540
  internalArgPropNames: PlasmicButton__ArgProps,
589
541
  internalVariantPropNames: PlasmicButton__VariantProps
590
542
  }),
591
543
  [props, nodeName]
592
544
  );
593
-
594
545
  return PlasmicButton__RenderFunc({
595
546
  variants,
596
547
  args,
@@ -9,43 +9,45 @@
9
9
  // Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
10
10
  // Component: AO44A-w7hh
11
11
  import * as React from "react";
12
- import * as p from "@plasmicapp/react-web";
13
- import * as ph from "@plasmicapp/react-web/lib/host";
14
12
  import {
13
+ Stack as Stack__,
15
14
  classNames,
16
15
  createPlasmicElementProxy,
17
16
  deriveRenderOpts
18
17
  } from "@plasmicapp/react-web";
18
+ import { useDataEnv } from "@plasmicapp/react-web/lib/host";
19
19
  import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
20
20
  import "@plasmicapp/react-web/lib/plasmic.css";
21
- import projectcss from "./plasmic_create_plasmic_app.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
21
+ import projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
22
22
  import sty from "./PlasmicDynamicPage.module.css"; // plasmic-import: AO44A-w7hh/css
23
23
 
24
+ createPlasmicElementProxy;
25
+
24
26
  export const PlasmicDynamicPage__VariantProps = new Array();
25
27
 
26
28
  export const PlasmicDynamicPage__ArgProps = new Array();
27
29
 
28
- const __wrapUserFunction =
29
- globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
30
-
31
- const __wrapUserPromise =
32
- globalThis.__PlasmicWrapUserPromise ??
33
- (async (loc, promise) => {
34
- return await promise;
35
- });
30
+ const $$ = {};
36
31
 
37
32
  function PlasmicDynamicPage__RenderFunc(props) {
38
33
  const { variants, overrides, forNode } = props;
39
- const $ctx = ph.useDataEnv?.() || {};
40
- const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
34
+ const args = React.useMemo(
35
+ () =>
36
+ Object.assign(
37
+ {},
38
+ Object.fromEntries(
39
+ Object.entries(props.args).filter(([_, v]) => v !== undefined)
40
+ )
41
+ ),
42
+ [props.args]
43
+ );
41
44
  const $props = {
42
45
  ...args,
43
46
  ...variants
44
47
  };
48
+ const $ctx = useDataEnv?.() || {};
45
49
  const refsRef = React.useRef({});
46
50
  const $refs = refsRef.current;
47
- const currentUser = p.useCurrentUser?.() || {};
48
- const [$queries, setDollarQueries] = React.useState({});
49
51
  return (
50
52
  <React.Fragment>
51
53
  <div className={projectcss.plasmic_page_wrapper}>
@@ -59,10 +61,11 @@ function PlasmicDynamicPage__RenderFunc(props) {
59
61
  projectcss.root_reset,
60
62
  projectcss.plasmic_default_styles,
61
63
  projectcss.plasmic_mixins,
64
+ projectcss.plasmic_tokens,
62
65
  sty.root
63
66
  )}
64
67
  >
65
- <p.Stack
68
+ <Stack__
66
69
  as={"section"}
67
70
  data-plasmic-name={"section"}
68
71
  data-plasmic-override={overrides.section}
@@ -79,18 +82,22 @@ function PlasmicDynamicPage__RenderFunc(props) {
79
82
  sty.h1
80
83
  )}
81
84
  >
82
- {(() => {
83
- try {
84
- return $ctx.params.slug;
85
- } catch (e) {
86
- if (e instanceof TypeError) {
87
- return "Page 1";
85
+ <React.Fragment>
86
+ {(() => {
87
+ try {
88
+ return $ctx.params.slug;
89
+ } catch (e) {
90
+ if (
91
+ e instanceof TypeError ||
92
+ e?.plasmicType === "PlasmicUndefinedDataError"
93
+ ) {
94
+ return "Page 1";
95
+ }
96
+ throw e;
88
97
  }
89
- throw e;
90
- }
91
- })()}
98
+ })()}
99
+ </React.Fragment>
92
100
  </h1>
93
-
94
101
  <RandomDynamicPageButton
95
102
  data-plasmic-name={"randomDynamicPageButton"}
96
103
  data-plasmic-override={overrides.randomDynamicPageButton}
@@ -99,7 +106,7 @@ function PlasmicDynamicPage__RenderFunc(props) {
99
106
  sty.randomDynamicPageButton
100
107
  )}
101
108
  />
102
- </p.Stack>
109
+ </Stack__>
103
110
  </div>
104
111
  </div>
105
112
  </React.Fragment>
@@ -119,13 +126,12 @@ function makeNodeComponent(nodeName) {
119
126
  () =>
120
127
  deriveRenderOpts(props, {
121
128
  name: nodeName,
122
- descendantNames: [...PlasmicDescendants[nodeName]],
129
+ descendantNames: PlasmicDescendants[nodeName],
123
130
  internalArgPropNames: PlasmicDynamicPage__ArgProps,
124
131
  internalVariantPropNames: PlasmicDynamicPage__VariantProps
125
132
  }),
126
133
  [props, nodeName]
127
134
  );
128
-
129
135
  return PlasmicDynamicPage__RenderFunc({
130
136
  variants,
131
137
  args,
@@ -3,25 +3,13 @@
3
3
  /* tslint:disable */
4
4
  /* prettier-ignore-start */
5
5
  import * as React from "react";
6
- import * as p from "@plasmicapp/react-web";
6
+ import { createUseScreenVariants } from "@plasmicapp/react-web";
7
7
 
8
8
  export const ScreenContext = React.createContext(
9
9
  "PLEASE_RENDER_INSIDE_PROVIDER"
10
10
  );
11
- /**
12
- * @deprecated Plasmic now uses a custom hook for Screen variants, which is
13
- * automatically included in your components. Please remove this provider
14
- * from your code.
15
- */
16
11
 
17
- export function ScreenVariantProvider(props) {
18
- console.warn(
19
- "DEPRECATED: Plasmic now uses a custom hook for Screen variants, which is automatically included in your components. Please remove this provider from your code."
20
- );
21
- return props.children;
22
- }
23
-
24
- export const useScreenVariants = p.createUseScreenVariants(true, {
12
+ export const useScreenVariants = createUseScreenVariants(true, {
25
13
  desktopOnly: "(min-width:768px)",
26
14
  });
27
15