create-plasmic-app 0.0.99 → 0.0.101

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 (111) hide show
  1. package/cpa-out/gatsby-codegen-js/gatsby-browser.jsx +2 -1
  2. package/cpa-out/gatsby-codegen-js/gatsby-ssr.jsx +2 -1
  3. package/cpa-out/gatsby-codegen-js/package.json +4 -4
  4. package/cpa-out/gatsby-codegen-js/plasmic.json +14 -8
  5. package/cpa-out/gatsby-codegen-js/src/components/Button.jsx +1 -3
  6. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +53 -100
  7. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +36 -30
  8. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +3 -15
  9. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +25 -25
  10. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +45 -59
  11. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +3 -3
  12. package/cpa-out/gatsby-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
  13. package/cpa-out/gatsby-codegen-js/src/pages/dynamic/[slug].jsx +5 -4
  14. package/cpa-out/gatsby-codegen-js/src/pages/index.jsx +5 -4
  15. package/cpa-out/gatsby-codegen-ts/gatsby-browser.tsx +2 -1
  16. package/cpa-out/gatsby-codegen-ts/gatsby-ssr.tsx +2 -1
  17. package/cpa-out/gatsby-codegen-ts/package.json +9 -9
  18. package/cpa-out/gatsby-codegen-ts/plasmic.json +14 -8
  19. package/cpa-out/gatsby-codegen-ts/src/components/Button.tsx +4 -5
  20. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +99 -75
  21. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +80 -49
  22. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +3 -15
  23. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +69 -43
  24. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +90 -77
  25. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +4 -4
  26. package/cpa-out/gatsby-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
  27. package/cpa-out/gatsby-codegen-ts/src/pages/dynamic/[slug].tsx +6 -5
  28. package/cpa-out/gatsby-codegen-ts/src/pages/index.tsx +6 -5
  29. package/cpa-out/gatsby-loader-js/package.json +3 -3
  30. package/cpa-out/gatsby-loader-js/src/templates/defaultPlasmicPage.jsx +1 -0
  31. package/cpa-out/gatsby-loader-ts/package.json +8 -8
  32. package/cpa-out/gatsby-loader-ts/src/templates/defaultPlasmicPage.tsx +1 -0
  33. package/cpa-out/nextjs-app-loader-js/package.json +8 -6
  34. package/cpa-out/nextjs-app-loader-js/plasmic-init.js +10 -1
  35. package/cpa-out/nextjs-app-loader-ts/package.json +12 -10
  36. package/cpa-out/nextjs-app-loader-ts/plasmic-init.ts +10 -1
  37. package/cpa-out/nextjs-app-loader-ts/tsconfig.json +2 -9
  38. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicButton.jsx +6 -5
  39. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -1
  40. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +1 -1
  41. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +1 -1
  42. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +1 -1
  43. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +1 -1
  44. package/cpa-out/nextjs-pages-codegen-js/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
  45. package/cpa-out/nextjs-pages-codegen-js/package.json +4 -4
  46. package/cpa-out/nextjs-pages-codegen-js/pages/_app.jsx +2 -1
  47. package/cpa-out/nextjs-pages-codegen-js/plasmic.json +2 -2
  48. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicButton.tsx +17 -14
  49. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +7 -7
  50. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -1
  51. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -7
  52. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +7 -7
  53. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +1 -1
  54. package/cpa-out/nextjs-pages-codegen-ts/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
  55. package/cpa-out/nextjs-pages-codegen-ts/package.json +4 -4
  56. package/cpa-out/nextjs-pages-codegen-ts/pages/_app.tsx +2 -1
  57. package/cpa-out/nextjs-pages-codegen-ts/pages/dynamic/[slug].tsx +1 -0
  58. package/cpa-out/nextjs-pages-codegen-ts/pages/index.tsx +1 -0
  59. package/cpa-out/nextjs-pages-codegen-ts/plasmic.json +2 -2
  60. package/cpa-out/nextjs-pages-loader-js/package.json +3 -3
  61. package/cpa-out/nextjs-pages-loader-ts/package.json +3 -3
  62. package/cpa-out/react-codegen-js/eslint.config.js +1 -6
  63. package/cpa-out/react-codegen-js/package.json +10 -11
  64. package/cpa-out/react-codegen-js/plasmic.json +2 -2
  65. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicButton.jsx +6 -5
  66. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.jsx +1 -1
  67. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.jsx +1 -1
  68. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicHomepage.jsx +1 -1
  69. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.jsx +1 -1
  70. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.jsx +1 -1
  71. package/cpa-out/react-codegen-js/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.jsx +1 -1
  72. package/cpa-out/react-codegen-ts/package.json +11 -11
  73. package/cpa-out/react-codegen-ts/plasmic.json +2 -2
  74. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicButton.tsx +17 -14
  75. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicDynamicPage.tsx +7 -7
  76. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicGlobalVariant__Screen.tsx +1 -1
  77. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicHomepage.tsx +7 -7
  78. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/PlasmicRandomDynamicPageButton.tsx +7 -7
  79. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Checksvg.tsx +1 -1
  80. package/cpa-out/react-codegen-ts/src/components/plasmic/create_plasmic_app/icons/PlasmicIcon__Icon.tsx +1 -1
  81. package/dist/index.js +6 -1
  82. package/dist/lib.js +3 -1
  83. package/dist/tanstack/tanstack.d.ts +2 -0
  84. package/dist/tanstack/tanstack.js +79 -0
  85. package/dist/tanstack/templates/file-router/config.d.ts +1 -0
  86. package/dist/tanstack/templates/file-router/config.js +33 -0
  87. package/dist/tanstack/templates/file-router/plasmic-host.d.ts +1 -0
  88. package/dist/tanstack/templates/file-router/plasmic-host.js +27 -0
  89. package/dist/tanstack/templates/file-router/root.d.ts +2 -0
  90. package/dist/tanstack/templates/file-router/root.js +44 -0
  91. package/dist/utils/types.d.ts +1 -1
  92. package/dist/utils/types.js +7 -1
  93. package/package.json +2 -2
  94. package/run-cpa.ts +14 -6
  95. package/src/index.ts +6 -1
  96. package/src/lib.ts +3 -1
  97. package/src/tanstack/tanstack.ts +82 -0
  98. package/src/tanstack/templates/file-router/config.ts +29 -0
  99. package/src/tanstack/templates/file-router/plasmic-host.ts +23 -0
  100. package/src/tanstack/templates/file-router/root.ts +42 -0
  101. package/src/utils/types.ts +8 -2
  102. package/cpa-out/nextjs-app-loader-js/app/[[...catchall]]/page.jsx +0 -56
  103. package/cpa-out/nextjs-app-loader-js/app/api/hello/route.js +0 -3
  104. package/cpa-out/nextjs-app-loader-js/app/layout.js +0 -14
  105. package/cpa-out/nextjs-app-loader-js/app/plasmic-host/page.jsx +0 -6
  106. package/cpa-out/nextjs-app-loader-js/plasmic-init-client.jsx +0 -65
  107. package/cpa-out/nextjs-app-loader-ts/app/[[...catchall]]/page.tsx +0 -59
  108. package/cpa-out/nextjs-app-loader-ts/app/api/hello/route.ts +0 -3
  109. package/cpa-out/nextjs-app-loader-ts/app/layout.tsx +0 -18
  110. package/cpa-out/nextjs-app-loader-ts/app/plasmic-host/page.tsx +0 -6
  111. package/cpa-out/nextjs-app-loader-ts/plasmic-init-client.tsx +0 -65
@@ -1,6 +1,6 @@
1
- // @ts-nocheck
2
1
  /* eslint-disable */
3
2
  /* tslint:disable */
3
+ // @ts-nocheck
4
4
  /* prettier-ignore-start */
5
5
  /** @jsxRuntime classic */
6
6
  /** @jsx createPlasmicElementProxy */
@@ -9,30 +9,25 @@
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 * as projectcss from "./plasmic_create_plasmic_app.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
21
+ import * as projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
22
22
  import * as 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
  export function Head() {
38
33
  return <></>;
@@ -40,16 +35,23 @@ export function Head() {
40
35
 
41
36
  function PlasmicDynamicPage__RenderFunc(props) {
42
37
  const { variants, overrides, forNode } = props;
43
- const $ctx = ph.useDataEnv?.() || {};
44
- const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
38
+ const args = React.useMemo(
39
+ () =>
40
+ Object.assign(
41
+ {},
42
+ Object.fromEntries(
43
+ Object.entries(props.args).filter(([_, v]) => v !== undefined)
44
+ )
45
+ ),
46
+ [props.args]
47
+ );
45
48
  const $props = {
46
49
  ...args,
47
50
  ...variants
48
51
  };
52
+ const $ctx = useDataEnv?.() || {};
49
53
  const refsRef = React.useRef({});
50
54
  const $refs = refsRef.current;
51
- const currentUser = p.useCurrentUser?.() || {};
52
- const [$queries, setDollarQueries] = React.useState({});
53
55
  return (
54
56
  <React.Fragment>
55
57
  <style>{`
@@ -69,10 +71,11 @@ function PlasmicDynamicPage__RenderFunc(props) {
69
71
  projectcss.root_reset,
70
72
  projectcss.plasmic_default_styles,
71
73
  projectcss.plasmic_mixins,
74
+ projectcss.plasmic_tokens,
72
75
  sty.root
73
76
  )}
74
77
  >
75
- <p.Stack
78
+ <Stack__
76
79
  as={"section"}
77
80
  data-plasmic-name={"section"}
78
81
  data-plasmic-override={overrides.section}
@@ -89,18 +92,22 @@ function PlasmicDynamicPage__RenderFunc(props) {
89
92
  sty.h1
90
93
  )}
91
94
  >
92
- {(() => {
93
- try {
94
- return $ctx.params.slug;
95
- } catch (e) {
96
- if (e instanceof TypeError) {
97
- return "Page 1";
95
+ <React.Fragment>
96
+ {(() => {
97
+ try {
98
+ return $ctx.params.slug;
99
+ } catch (e) {
100
+ if (
101
+ e instanceof TypeError ||
102
+ e?.plasmicType === "PlasmicUndefinedDataError"
103
+ ) {
104
+ return "Page 1";
105
+ }
106
+ throw e;
98
107
  }
99
- throw e;
100
- }
101
- })()}
108
+ })()}
109
+ </React.Fragment>
102
110
  </h1>
103
-
104
111
  <RandomDynamicPageButton
105
112
  data-plasmic-name={"randomDynamicPageButton"}
106
113
  data-plasmic-override={overrides.randomDynamicPageButton}
@@ -109,7 +116,7 @@ function PlasmicDynamicPage__RenderFunc(props) {
109
116
  sty.randomDynamicPageButton
110
117
  )}
111
118
  />
112
- </p.Stack>
119
+ </Stack__>
113
120
  </div>
114
121
  </div>
115
122
  </React.Fragment>
@@ -129,13 +136,12 @@ function makeNodeComponent(nodeName) {
129
136
  () =>
130
137
  deriveRenderOpts(props, {
131
138
  name: nodeName,
132
- descendantNames: [...PlasmicDescendants[nodeName]],
139
+ descendantNames: PlasmicDescendants[nodeName],
133
140
  internalArgPropNames: PlasmicDynamicPage__ArgProps,
134
141
  internalVariantPropNames: PlasmicDynamicPage__VariantProps
135
142
  }),
136
143
  [props, nodeName]
137
144
  );
138
-
139
145
  return PlasmicDynamicPage__RenderFunc({
140
146
  variants,
141
147
  args,
@@ -1,27 +1,15 @@
1
- // @ts-nocheck
2
1
  /* eslint-disable */
3
2
  /* tslint:disable */
3
+ // @ts-nocheck
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
-
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
11
 
24
- export const useScreenVariants = p.createUseScreenVariants(true, {
12
+ export const useScreenVariants = createUseScreenVariants(true, {
25
13
  desktopOnly: "(min-width:768px)",
26
14
  });
27
15
 
@@ -1,6 +1,6 @@
1
- // @ts-nocheck
2
1
  /* eslint-disable */
3
2
  /* tslint:disable */
3
+ // @ts-nocheck
4
4
  /* prettier-ignore-start */
5
5
  /** @jsxRuntime classic */
6
6
  /** @jsx createPlasmicElementProxy */
@@ -9,33 +9,28 @@
9
9
  // Plasmic Project: 47tFXWjN2C4NyHFGGpaYQ3
10
10
  // Component: 6uuAAE1jiCew
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 {
15
- hasVariant,
13
+ Stack as Stack__,
16
14
  classNames,
17
15
  createPlasmicElementProxy,
18
16
  deriveRenderOpts,
19
- ensureGlobalVariants
17
+ ensureGlobalVariants,
18
+ hasVariant
20
19
  } from "@plasmicapp/react-web";
20
+ import { useDataEnv } from "@plasmicapp/react-web/lib/host";
21
21
  import RandomDynamicPageButton from "../../RandomDynamicPageButton"; // plasmic-import: Q23H1_1M_P/component
22
22
  import { useScreenVariants as useScreenVariantsscBjPxgdxdzbv } from "./PlasmicGlobalVariant__Screen"; // plasmic-import: SCBjPXGDXDZBV/globalVariant
23
23
  import "@plasmicapp/react-web/lib/plasmic.css";
24
- import * as projectcss from "./plasmic_create_plasmic_app.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
24
+ import * as projectcss from "./plasmic.module.css"; // plasmic-import: 47tFXWjN2C4NyHFGGpaYQ3/projectcss
25
25
  import * as sty from "./PlasmicHomepage.module.css"; // plasmic-import: 6uuAAE1jiCew/css
26
26
 
27
+ createPlasmicElementProxy;
28
+
27
29
  export const PlasmicHomepage__VariantProps = new Array();
28
30
 
29
31
  export const PlasmicHomepage__ArgProps = new Array();
30
32
 
31
- const __wrapUserFunction =
32
- globalThis.__PlasmicWrapUserFunction ?? ((loc, fn) => fn());
33
-
34
- const __wrapUserPromise =
35
- globalThis.__PlasmicWrapUserPromise ??
36
- (async (loc, promise) => {
37
- return await promise;
38
- });
33
+ const $$ = {};
39
34
 
40
35
  export function Head() {
41
36
  return <></>;
@@ -43,16 +38,23 @@ export function Head() {
43
38
 
44
39
  function PlasmicHomepage__RenderFunc(props) {
45
40
  const { variants, overrides, forNode } = props;
46
- const $ctx = ph.useDataEnv?.() || {};
47
- const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
41
+ const args = React.useMemo(
42
+ () =>
43
+ Object.assign(
44
+ {},
45
+ Object.fromEntries(
46
+ Object.entries(props.args).filter(([_, v]) => v !== undefined)
47
+ )
48
+ ),
49
+ [props.args]
50
+ );
48
51
  const $props = {
49
52
  ...args,
50
53
  ...variants
51
54
  };
55
+ const $ctx = useDataEnv?.() || {};
52
56
  const refsRef = React.useRef({});
53
57
  const $refs = refsRef.current;
54
- const currentUser = p.useCurrentUser?.() || {};
55
- const [$queries, setDollarQueries] = React.useState({});
56
58
  const globalVariants = ensureGlobalVariants({
57
59
  screen: useScreenVariantsscBjPxgdxdzbv()
58
60
  });
@@ -75,10 +77,11 @@ function PlasmicHomepage__RenderFunc(props) {
75
77
  projectcss.root_reset,
76
78
  projectcss.plasmic_default_styles,
77
79
  projectcss.plasmic_mixins,
80
+ projectcss.plasmic_tokens,
78
81
  sty.root
79
82
  )}
80
83
  >
81
- <p.Stack
84
+ <Stack__
82
85
  as={"section"}
83
86
  data-plasmic-name={"section"}
84
87
  data-plasmic-override={overrides.section}
@@ -97,7 +100,6 @@ function PlasmicHomepage__RenderFunc(props) {
97
100
  >
98
101
  {"create-plasmic-app"}
99
102
  </h1>
100
-
101
103
  <div
102
104
  data-plasmic-name={"text"}
103
105
  data-plasmic-override={overrides.text}
@@ -125,7 +127,7 @@ function PlasmicHomepage__RenderFunc(props) {
125
127
  <React.Fragment>
126
128
  <React.Fragment>
127
129
  {
128
- "If you haven't already done so, go back and learn the basics by going through the Plasmic Levels tutorial.\n\nIt's always easier to start from examples! Add a new page using a template—do this from the list of pages in the top left (the gray + button).\n\nOr press the big blue + button to start dragging items into this page.\n\nIntegrate this project into your codebase—press the "
130
+ "If you haven't already done so, go back and learn the basics by going through the Plasmic Levels tutorial.\n\nIt's always easier to start from examples! Add a new page using a template\u2014do this from the list of pages in the top left (the gray + button).\n\nOr press the big blue + button to start dragging items into this page.\n\nIntegrate this project into your codebase\u2014press the "
129
131
  }
130
132
  </React.Fragment>
131
133
  <span
@@ -142,7 +144,6 @@ function PlasmicHomepage__RenderFunc(props) {
142
144
  </React.Fragment>
143
145
  )}
144
146
  </div>
145
-
146
147
  <RandomDynamicPageButton
147
148
  data-plasmic-name={"randomDynamicPageButton"}
148
149
  data-plasmic-override={overrides.randomDynamicPageButton}
@@ -151,7 +152,7 @@ function PlasmicHomepage__RenderFunc(props) {
151
152
  sty.randomDynamicPageButton
152
153
  )}
153
154
  />
154
- </p.Stack>
155
+ </Stack__>
155
156
  </div>
156
157
  </div>
157
158
  </React.Fragment>
@@ -172,13 +173,12 @@ function makeNodeComponent(nodeName) {
172
173
  () =>
173
174
  deriveRenderOpts(props, {
174
175
  name: nodeName,
175
- descendantNames: [...PlasmicDescendants[nodeName]],
176
+ descendantNames: PlasmicDescendants[nodeName],
176
177
  internalArgPropNames: PlasmicHomepage__ArgProps,
177
178
  internalVariantPropNames: PlasmicHomepage__VariantProps
178
179
  }),
179
180
  [props, nodeName]
180
181
  );
181
-
182
182
  return PlasmicHomepage__RenderFunc({
183
183
  variants,
184
184
  args,
@@ -1,6 +1,6 @@
1
- // @ts-nocheck
2
1
  /* eslint-disable */
3
2
  /* tslint:disable */
3
+ // @ts-nocheck
4
4
  /* prettier-ignore-start */
5
5
  /** @jsxRuntime classic */
6
6
  /** @jsx createPlasmicElementProxy */
@@ -10,42 +10,43 @@
10
10
  // Component: Q23H1_1M_P
11
11
  import * as React from "react";
12
12
  import { navigate as __gatsbyNavigate } from "gatsby";
13
- import * as p from "@plasmicapp/react-web";
14
- import * as ph from "@plasmicapp/react-web/lib/host";
15
13
  import {
16
14
  classNames,
17
15
  createPlasmicElementProxy,
18
16
  deriveRenderOpts
19
17
  } from "@plasmicapp/react-web";
18
+ import { useDataEnv } from "@plasmicapp/react-web/lib/host";
20
19
  import Button from "../../Button"; // plasmic-import: TQcvW_pSKi3/component
21
20
  import "@plasmicapp/react-web/lib/plasmic.css";
22
21
  import * as sty from "./PlasmicRandomDynamicPageButton.module.css"; // plasmic-import: Q23H1_1M_P/css
23
22
 
23
+ createPlasmicElementProxy;
24
+
24
25
  export const PlasmicRandomDynamicPageButton__VariantProps = new Array();
25
26
 
26
27
  export const PlasmicRandomDynamicPageButton__ArgProps = new Array();
27
28
 
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
- });
29
+ const $$ = {};
36
30
 
37
31
  function PlasmicRandomDynamicPageButton__RenderFunc(props) {
38
32
  const { variants, overrides, forNode } = props;
39
- const $ctx = ph.useDataEnv?.() || {};
40
- const args = React.useMemo(() => Object.assign({}, props.args), [props.args]);
33
+ const args = React.useMemo(
34
+ () =>
35
+ Object.assign(
36
+ {},
37
+ Object.fromEntries(
38
+ Object.entries(props.args).filter(([_, v]) => v !== undefined)
39
+ )
40
+ ),
41
+ [props.args]
42
+ );
41
43
  const $props = {
42
44
  ...args,
43
45
  ...variants
44
46
  };
47
+ const $ctx = useDataEnv?.() || {};
45
48
  const refsRef = React.useRef({});
46
49
  const $refs = refsRef.current;
47
- const currentUser = p.useCurrentUser?.() || {};
48
- const [$queries, setDollarQueries] = React.useState({});
49
50
  return (
50
51
  <Button
51
52
  data-plasmic-name={"root"}
@@ -58,57 +59,43 @@ function PlasmicRandomDynamicPageButton__RenderFunc(props) {
58
59
  $steps["goToDynamicPage"] = true
59
60
  ? (() => {
60
61
  const actionArgs = {
61
- destination: __wrapUserFunction(
62
- {
63
- type: "InteractionArgLoc",
64
- actionName: "navigation",
65
- interactionUuid: "9Y3jL0zxjA",
66
- componentUuid: "Q23H1_1M_P",
67
- argName: "destination"
68
- },
69
- () =>
70
- `/dynamic/${(() => {
71
- try {
72
- return Math.random().toString(36).slice(2);
73
- } catch (e) {
74
- if (e instanceof TypeError) {
75
- return "value";
76
- }
77
- throw e;
78
- }
79
- })()}`
80
- )
62
+ destination: `/dynamic/${(() => {
63
+ try {
64
+ return Math.random().toString(36).slice(2);
65
+ } catch (e) {
66
+ if (
67
+ e instanceof TypeError ||
68
+ e?.plasmicType === "PlasmicUndefinedDataError"
69
+ ) {
70
+ return "value";
71
+ }
72
+ throw e;
73
+ }
74
+ })()}`
81
75
  };
82
- return __wrapUserFunction(
83
- {
84
- type: "InteractionLoc",
85
- actionName: "navigation",
86
- interactionUuid: "9Y3jL0zxjA",
87
- componentUuid: "Q23H1_1M_P"
88
- },
89
- () =>
90
- (({ destination }) => {
91
- __gatsbyNavigate(destination);
92
- })?.apply(null, [actionArgs]),
93
- actionArgs
94
- );
76
+ return (({ destination }) => {
77
+ if (
78
+ typeof destination === "string" &&
79
+ destination.startsWith("#")
80
+ ) {
81
+ document
82
+ .getElementById(destination.substr(1))
83
+ .scrollIntoView({ behavior: "smooth" });
84
+ } else {
85
+ __gatsbyNavigate(destination);
86
+ }
87
+ })?.apply(null, [actionArgs]);
95
88
  })()
96
89
  : undefined;
97
90
  if (
91
+ $steps["goToDynamicPage"] != null &&
98
92
  typeof $steps["goToDynamicPage"] === "object" &&
99
93
  typeof $steps["goToDynamicPage"].then === "function"
100
94
  ) {
101
- $steps["goToDynamicPage"] = await __wrapUserPromise(
102
- {
103
- type: "InteractionLoc",
104
- actionName: "navigation",
105
- interactionUuid: "9Y3jL0zxjA",
106
- componentUuid: "Q23H1_1M_P"
107
- },
108
- $steps["goToDynamicPage"]
109
- );
95
+ $steps["goToDynamicPage"] = await $steps["goToDynamicPage"];
110
96
  }
111
97
  }}
98
+ submitsForm={true}
112
99
  >
113
100
  {"Random Dynamic Page"}
114
101
  </Button>
@@ -125,13 +112,12 @@ function makeNodeComponent(nodeName) {
125
112
  () =>
126
113
  deriveRenderOpts(props, {
127
114
  name: nodeName,
128
- descendantNames: [...PlasmicDescendants[nodeName]],
115
+ descendantNames: PlasmicDescendants[nodeName],
129
116
  internalArgPropNames: PlasmicRandomDynamicPageButton__ArgProps,
130
117
  internalVariantPropNames: PlasmicRandomDynamicPageButton__VariantProps
131
118
  }),
132
119
  [props, nodeName]
133
120
  );
134
-
135
121
  return PlasmicRandomDynamicPageButton__RenderFunc({
136
122
  variants,
137
123
  args,
@@ -1,11 +1,11 @@
1
- // @ts-nocheck
2
1
  /* eslint-disable */
3
2
  /* tslint:disable */
3
+ // @ts-nocheck
4
4
  /* prettier-ignore-start */
5
5
  import React from "react";
6
6
  import { classNames } from "@plasmicapp/react-web";
7
7
 
8
- export function ChecksvgIcon(props) {
8
+ export function CheckSvgIcon(props) {
9
9
  const { className, style, title, ...restProps } = props;
10
10
  return (
11
11
  <svg
@@ -35,5 +35,5 @@ export function ChecksvgIcon(props) {
35
35
  );
36
36
  }
37
37
 
38
- export default ChecksvgIcon;
38
+ export default CheckSvgIcon;
39
39
  /* prettier-ignore-end */
@@ -1,6 +1,6 @@
1
- // @ts-nocheck
2
1
  /* eslint-disable */
3
2
  /* tslint:disable */
3
+ // @ts-nocheck
4
4
  /* prettier-ignore-start */
5
5
  import React from "react";
6
6
  import { classNames } from "@plasmicapp/react-web";
@@ -1,7 +1,7 @@
1
1
  // This is a skeleton starter React page generated by Plasmic.
2
2
  // This file is owned by you, feel free to edit as you see fit.
3
3
  import * as React from "react";
4
- import * as ph from "@plasmicapp/react-web/lib/host";
4
+ import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/react-web/lib/host";
5
5
  import {
6
6
  PlasmicDynamicPage,
7
7
  Head
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  export { Head };
11
11
 
12
- function DynamicPage({ location, params }) {
12
+ function DynamicPage({ location, path, params }) {
13
13
  // Use PlasmicDynamicPage to render this component as it was
14
14
  // designed in Plasmic, by activating the appropriate variants,
15
15
  // attaching the appropriate event handlers, etc. You
@@ -27,12 +27,13 @@ function DynamicPage({ location, params }) {
27
27
  // Gatsby "wrapRootElement" function
28
28
  // (https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr#wrapRootElement).
29
29
  return (
30
- <ph.PageParamsProvider
30
+ <PageParamsProvider__
31
+ route={path}
31
32
  params={params}
32
33
  query={Object.fromEntries(new URLSearchParams(location.search))}
33
34
  >
34
35
  <PlasmicDynamicPage />
35
- </ph.PageParamsProvider>
36
+ </PageParamsProvider__>
36
37
  );
37
38
  }
38
39
 
@@ -1,7 +1,7 @@
1
1
  // This is a skeleton starter React page generated by Plasmic.
2
2
  // This file is owned by you, feel free to edit as you see fit.
3
3
  import * as React from "react";
4
- import * as ph from "@plasmicapp/react-web/lib/host";
4
+ import { PageParamsProvider as PageParamsProvider__ } from "@plasmicapp/react-web/lib/host";
5
5
  import {
6
6
  PlasmicHomepage,
7
7
  Head
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  export { Head };
11
11
 
12
- function Homepage({ location, params }) {
12
+ function Homepage({ location, path, params }) {
13
13
  // Use PlasmicHomepage to render this component as it was
14
14
  // designed in Plasmic, by activating the appropriate variants,
15
15
  // attaching the appropriate event handlers, etc. You
@@ -27,12 +27,13 @@ function Homepage({ location, params }) {
27
27
  // Gatsby "wrapRootElement" function
28
28
  // (https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr#wrapRootElement).
29
29
  return (
30
- <ph.PageParamsProvider
30
+ <PageParamsProvider__
31
+ route={path}
31
32
  params={params}
32
33
  query={Object.fromEntries(new URLSearchParams(location.search))}
33
34
  >
34
35
  <PlasmicHomepage />
35
- </ph.PageParamsProvider>
36
+ </PageParamsProvider__>
36
37
  );
37
38
  }
38
39
 
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
2
  import { PlasmicRootProvider } from "@plasmicapp/react-web";
3
+ import { Link } from "gatsby";
3
4
  import Helmet from "react-helmet";
4
5
 
5
6
  export const wrapRootElement = ({ element }) => {
6
7
  return (
7
- <PlasmicRootProvider Head={Helmet}>
8
+ <PlasmicRootProvider Head={Helmet} Link={Link}>
8
9
  {element}
9
10
  </PlasmicRootProvider>
10
11
  );
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
2
  import { PlasmicRootProvider } from "@plasmicapp/react-web";
3
+ import { Link } from "gatsby";
3
4
  import Helmet from "react-helmet";
4
5
 
5
6
  export const wrapRootElement = ({ element }) => {
6
7
  return (
7
- <PlasmicRootProvider Head={Helmet}>
8
+ <PlasmicRootProvider Head={Helmet} Link={Link}>
8
9
  {element}
9
10
  </PlasmicRootProvider>
10
11
  );
@@ -15,19 +15,19 @@
15
15
  "typecheck": "tsc --noEmit"
16
16
  },
17
17
  "dependencies": {
18
- "@plasmicapp/cli": "^0.1.231",
19
- "@plasmicapp/react-web": "^0.2.174",
20
- "gatsby": "^5.7.0",
21
- "gatsby-plugin-react-helmet": "^6.7.0",
18
+ "@plasmicapp/cli": "^0.1.337",
19
+ "@plasmicapp/react-web": "^0.2.381",
20
+ "gatsby": "^5.14.1",
21
+ "gatsby-plugin-react-helmet": "^6.14.0",
22
22
  "react": "^18.2.0",
23
23
  "react-dom": "^18.2.0",
24
24
  "react-helmet": "^6.1.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@types/node": "^18.15.0",
28
- "@types/react": "^18.0.28",
29
- "@types/react-dom": "^18.0.11",
30
- "@types/react-helmet": "^6.1.6",
31
- "typescript": "^4.9.5"
27
+ "@types/node": "^20.11.19",
28
+ "@types/react": "^18.2.55",
29
+ "@types/react-dom": "^18.2.19",
30
+ "@types/react-helmet": "^6.1.11",
31
+ "typescript": "^5.3.3"
32
32
  }
33
33
  }