astro-tractstack 2.3.2 → 2.3.4
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.
- package/bin/create-tractstack.js +7 -4
- package/dist/index.js +51 -8
- package/package.json +1 -1
- package/templates/custom/shopify/Cart.tsx +279 -118
- package/templates/custom/shopify/CartIcon.tsx +8 -8
- package/templates/custom/shopify/CheckoutModal.tsx +328 -65
- package/templates/custom/shopify/ShopifyCartManager.tsx +117 -60
- package/templates/custom/shopify/ShopifyCheckout.tsx +2 -26
- package/templates/custom/shopify/ShopifyProductGrid.tsx +8 -0
- package/templates/custom/shopify/ShopifyServiceList.tsx +25 -37
- package/templates/custom/shopify/cart.astro +7 -1
- package/templates/src/components/Header.astro +4 -2
- package/templates/src/components/compositor/Node.tsx +39 -9
- package/templates/src/components/compositor/nodes/CreativePane.tsx +175 -88
- package/templates/src/components/edit/pane/AddPanePanel.tsx +2 -2
- package/templates/src/components/edit/pane/AddPanePanel_new.tsx +6 -5
- package/templates/src/components/edit/pane/AddPanePanel_reuse.tsx +9 -15
- package/templates/src/components/edit/pane/ConfigPanePanel.tsx +1 -1
- package/templates/src/components/form/advanced/APIConfigSection.tsx +249 -4
- package/templates/src/components/form/brand/SiteConfigSection.tsx +9 -0
- package/templates/src/components/form/shopify/SchedulingSection.tsx +44 -0
- package/templates/src/components/storykeep/Dashboard_Advanced.tsx +66 -21
- package/templates/src/components/storykeep/Dashboard_Shopify.tsx +266 -18
- package/templates/src/components/storykeep/controls/content/ManageContent.tsx +1 -0
- package/templates/src/components/storykeep/controls/content/ProductTable.tsx +38 -24
- package/templates/src/components/storykeep/controls/content/ResourceForm.tsx +240 -65
- package/templates/src/components/storykeep/shopify/ShopifyDashboard.tsx +175 -48
- package/templates/src/components/storykeep/shopify/ShopifyDashboard_Bookings.tsx +91 -10
- package/templates/src/components/storykeep/shopify/ShopifyDashboard_Sales.tsx +479 -0
- package/templates/src/components/storykeep/shopify/ShopifyDashboard_Search.tsx +7 -3
- package/templates/src/constants.ts +2 -0
- package/templates/src/layouts/Layout.astro +26 -0
- package/templates/src/pages/api/auth/logout.ts +35 -2
- package/templates/src/pages/api/google/oauth/callback.ts +50 -0
- package/templates/src/pages/api/google/oauth/disconnect.ts +32 -0
- package/templates/src/pages/api/google/oauth/start.ts +32 -0
- package/templates/src/pages/api/google/oauth/status.ts +32 -0
- package/templates/src/pages/api/sales/list.ts +66 -0
- package/templates/src/pages/api/sales/metrics.ts +60 -0
- package/templates/src/pages/context/[...contextSlug].astro +50 -31
- package/templates/src/pages/privacy.astro +84 -0
- package/templates/src/pages/storykeep/advanced.astro +4 -1
- package/templates/src/pages/terms.astro +47 -0
- package/templates/src/stores/nodes.ts +8 -0
- package/templates/src/stores/shopify.ts +5 -0
- package/templates/src/types/tractstack.ts +87 -0
- package/templates/src/utils/api/advancedConfig.ts +2 -1
- package/templates/src/utils/api/advancedHelpers.ts +20 -0
- package/templates/src/utils/api/bookingHelpers.ts +3 -1
- package/templates/src/utils/api/brandConfig.ts +2 -0
- package/templates/src/utils/api/brandHelpers.ts +14 -1
- package/templates/src/utils/api/salesHelpers.ts +21 -0
- package/templates/src/utils/booking/appointmentMode.ts +135 -0
- package/templates/src/utils/customHelpers.ts +287 -2
- package/utils/inject-files.ts +47 -4
- package/templates/src/components/codehooks/SandboxAuthWrapper.tsx +0 -101
- package/templates/src/utils/actions/actionButton.ts +0 -103
- package/templates/src/utils/actions/preParse_Clicked.ts +0 -87
package/bin/create-tractstack.js
CHANGED
|
@@ -13,6 +13,9 @@ import { execSync } from 'child_process';
|
|
|
13
13
|
import prompts from 'prompts';
|
|
14
14
|
import kleur from 'kleur';
|
|
15
15
|
|
|
16
|
+
// Keep in sync with package.json pnpm.overrides["@internationalized/date"]
|
|
17
|
+
const INTL_DATE_VERSION = '3.10.1';
|
|
18
|
+
|
|
16
19
|
// Detect package manager
|
|
17
20
|
function detectPackageManager() {
|
|
18
21
|
if (existsSync('pnpm-lock.yaml')) return 'pnpm';
|
|
@@ -154,7 +157,7 @@ ${kleur.bold('Examples:')}
|
|
|
154
157
|
console.log(kleur.red("❌ This doesn't appear to be an Astro project."));
|
|
155
158
|
console.log('Please run this command in the root of your Astro project.\n');
|
|
156
159
|
console.log('To create a new Astro project with TractStack:');
|
|
157
|
-
console.log(kleur.cyan('pnpm create astro@
|
|
160
|
+
console.log(kleur.cyan('pnpm create astro@5 my-tractstack-site'));
|
|
158
161
|
console.log(kleur.cyan('cd my-tractstack-site'));
|
|
159
162
|
console.log(kleur.cyan('npx create-tractstack'));
|
|
160
163
|
process.exit(1);
|
|
@@ -332,7 +335,7 @@ PUBLIC_ENABLE_BUNNY="${finalResponses.enableBunny ? 'true' : 'false'}"
|
|
|
332
335
|
try {
|
|
333
336
|
// Install React and Node adapter
|
|
334
337
|
execSync(
|
|
335
|
-
`${addCommand} react@^19.0.0 react-dom@^19.0.0 @astrojs/react@^4.4.2 @astrojs/node@^9.4.3`,
|
|
338
|
+
`${addCommand} react@^19.0.0 react-dom@^19.0.0 astro@^5.16.6 @astrojs/react@^4.4.2 @astrojs/node@^9.4.3`,
|
|
336
339
|
{ stdio: 'inherit' }
|
|
337
340
|
);
|
|
338
341
|
console.log(kleur.green('✅ React and Node adapter installed'));
|
|
@@ -348,7 +351,7 @@ PUBLIC_ENABLE_BUNNY="${finalResponses.enableBunny ? 'true' : 'false'}"
|
|
|
348
351
|
|
|
349
352
|
// Install UI components
|
|
350
353
|
execSync(
|
|
351
|
-
`${addCommand} @ark-ui/react@^5.30.0 @heroicons/react@^2.1.1 @internationalized/date
|
|
354
|
+
`${addCommand} @ark-ui/react@^5.30.0 @heroicons/react@^2.1.1 @internationalized/date@${INTL_DATE_VERSION}`,
|
|
352
355
|
{
|
|
353
356
|
stdio: 'inherit',
|
|
354
357
|
}
|
|
@@ -382,7 +385,7 @@ PUBLIC_ENABLE_BUNNY="${finalResponses.enableBunny ? 'true' : 'false'}"
|
|
|
382
385
|
console.log('Please run manually:');
|
|
383
386
|
console.log(
|
|
384
387
|
kleur.cyan(
|
|
385
|
-
`${addCommand} react@^19.0.0 react-dom@^19.0.0 @astrojs/react@^4.4.2 @astrojs/node@^9.4.3 @nanostores/react@^1.0.0 nanostores@^1.0.1 @nanostores/persistent ulid@^3.0.1 @ark-ui/react@^5.30.0 @heroicons/react@^2.1.1 @internationalized/date
|
|
388
|
+
`${addCommand} react@^19.0.0 react-dom@^19.0.0 astro@^5.16.6 @astrojs/react@^4.4.2 @astrojs/node@^9.4.3 @nanostores/react@^1.0.0 nanostores@^1.0.1 @nanostores/persistent ulid@^3.0.1 @ark-ui/react@^5.30.0 @heroicons/react@^2.1.1 @internationalized/date@${INTL_DATE_VERSION} d3@^7.9.0 d3-sankey@^0.12.3 recharts@^3.1.2 player.js@^0.1.0 tinycolor2@1.6.0 html-to-image@^1.11.13 path-to-regexp@^8.0.0 postcss postcss-selector-parser`
|
|
386
389
|
)
|
|
387
390
|
);
|
|
388
391
|
console.log(
|
package/dist/index.js
CHANGED
|
@@ -2,13 +2,13 @@ import { fileURLToPath as d } from "node:url";
|
|
|
2
2
|
import { dirname as i, resolve as l } from "node:path";
|
|
3
3
|
import { existsSync as n, mkdirSync as x, copyFileSync as k, writeFileSync as u } from "node:fs";
|
|
4
4
|
import { resolve as a } from "path";
|
|
5
|
-
function
|
|
5
|
+
function g(t) {
|
|
6
6
|
const e = i(d(t));
|
|
7
7
|
return {
|
|
8
8
|
resolve: (...c) => l(e, ...c)
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function b(t, e) {
|
|
12
12
|
e.info("TractStack configuration applied"), t.enableMultiTenant && e.info("Multi-tenant mode enabled"), t.includeExamples && e.info("Example components will be included");
|
|
13
13
|
const c = process.env.PUBLIC_GO_BACKEND, o = process.env.PUBLIC_TENANTID;
|
|
14
14
|
if (!c)
|
|
@@ -747,10 +747,6 @@ async function y(t, e, c) {
|
|
|
747
747
|
src: t("../templates/src/utils/actions/preParse_Action.ts"),
|
|
748
748
|
dest: "src/utils/actions/preParse_Action.ts"
|
|
749
749
|
},
|
|
750
|
-
{
|
|
751
|
-
src: t("../templates/src/utils/actions/preParse_Clicked.ts"),
|
|
752
|
-
dest: "src/utils/actions/preParse_Clicked.ts"
|
|
753
|
-
},
|
|
754
750
|
{
|
|
755
751
|
src: t("../templates/src/utils/actions/preParse_Impression.ts"),
|
|
756
752
|
dest: "src/utils/actions/preParse_Impression.ts"
|
|
@@ -819,6 +815,10 @@ async function y(t, e, c) {
|
|
|
819
815
|
src: t("../templates/src/utils/api/bookingHelpers.ts"),
|
|
820
816
|
dest: "src/utils/api/bookingHelpers.ts"
|
|
821
817
|
},
|
|
818
|
+
{
|
|
819
|
+
src: t("../templates/src/utils/api/salesHelpers.ts"),
|
|
820
|
+
dest: "src/utils/api/salesHelpers.ts"
|
|
821
|
+
},
|
|
822
822
|
{
|
|
823
823
|
src: t("../templates/src/utils/api/menuHelpers.ts"),
|
|
824
824
|
dest: "src/utils/api/menuHelpers.ts"
|
|
@@ -891,6 +891,14 @@ async function y(t, e, c) {
|
|
|
891
891
|
src: t("../templates/custom/shopify/cart.astro"),
|
|
892
892
|
dest: "src/pages/cart.astro"
|
|
893
893
|
},
|
|
894
|
+
{
|
|
895
|
+
src: t("../templates/src/pages/privacy.astro"),
|
|
896
|
+
dest: "src/pages/privacy.astro"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
src: t("../templates/src/pages/terms.astro"),
|
|
900
|
+
dest: "src/pages/terms.astro"
|
|
901
|
+
},
|
|
894
902
|
{
|
|
895
903
|
src: t("../templates/src/pages/404.astro"),
|
|
896
904
|
dest: "src/pages/404.astro"
|
|
@@ -945,6 +953,14 @@ async function y(t, e, c) {
|
|
|
945
953
|
src: t("../templates/src/pages/api/booking/list.ts"),
|
|
946
954
|
dest: "src/pages/api/booking/list.ts"
|
|
947
955
|
},
|
|
956
|
+
{
|
|
957
|
+
src: t("../templates/src/pages/api/sales/list.ts"),
|
|
958
|
+
dest: "src/pages/api/sales/list.ts"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
src: t("../templates/src/pages/api/sales/metrics.ts"),
|
|
962
|
+
dest: "src/pages/api/sales/metrics.ts"
|
|
963
|
+
},
|
|
948
964
|
{
|
|
949
965
|
src: t("../templates/src/pages/api/booking/metrics.ts"),
|
|
950
966
|
dest: "src/pages/api/booking/metrics.ts"
|
|
@@ -989,6 +1005,22 @@ async function y(t, e, c) {
|
|
|
989
1005
|
src: t("../templates/src/pages/api/auth/logout.ts"),
|
|
990
1006
|
dest: "src/pages/api/auth/logout.ts"
|
|
991
1007
|
},
|
|
1008
|
+
{
|
|
1009
|
+
src: t("../templates/src/pages/api/google/oauth/start.ts"),
|
|
1010
|
+
dest: "src/pages/api/google/oauth/start.ts"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
src: t("../templates/src/pages/api/google/oauth/status.ts"),
|
|
1014
|
+
dest: "src/pages/api/google/oauth/status.ts"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
src: t("../templates/src/pages/api/google/oauth/disconnect.ts"),
|
|
1018
|
+
dest: "src/pages/api/google/oauth/disconnect.ts"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
src: t("../templates/src/pages/api/google/oauth/callback.ts"),
|
|
1022
|
+
dest: "src/pages/api/google/oauth/callback.ts"
|
|
1023
|
+
},
|
|
992
1024
|
{
|
|
993
1025
|
src: t("../templates/src/pages/api/orphan-analysis.ts"),
|
|
994
1026
|
dest: "src/pages/api/orphan-analysis.ts"
|
|
@@ -1248,6 +1280,12 @@ async function y(t, e, c) {
|
|
|
1248
1280
|
),
|
|
1249
1281
|
dest: "src/components/storykeep/shopify/ShopifyDashboard_Emails.tsx"
|
|
1250
1282
|
},
|
|
1283
|
+
{
|
|
1284
|
+
src: t(
|
|
1285
|
+
"../templates/src/components/storykeep/shopify/ShopifyDashboard_Sales.tsx"
|
|
1286
|
+
),
|
|
1287
|
+
dest: "src/components/storykeep/shopify/ShopifyDashboard_Sales.tsx"
|
|
1288
|
+
},
|
|
1251
1289
|
{
|
|
1252
1290
|
src: t(
|
|
1253
1291
|
"../templates/src/components/storykeep/email-builder/EmailBuilder.tsx"
|
|
@@ -2307,6 +2345,11 @@ async function y(t, e, c) {
|
|
|
2307
2345
|
dest: "src/utils/customHelpers.ts",
|
|
2308
2346
|
protected: !0
|
|
2309
2347
|
},
|
|
2348
|
+
{
|
|
2349
|
+
src: t("../templates/src/utils/booking/appointmentMode.ts"),
|
|
2350
|
+
dest: "src/utils/booking/appointmentMode.ts",
|
|
2351
|
+
protected: !0
|
|
2352
|
+
},
|
|
2310
2353
|
{
|
|
2311
2354
|
src: t("../templates/custom/shopify/ShopifyProductGrid.tsx"),
|
|
2312
2355
|
dest: "src/custom/shopify/ShopifyProductGrid.tsx",
|
|
@@ -2426,12 +2469,12 @@ export default function Placeholder() {
|
|
|
2426
2469
|
export const placeholder = "${t}";` : `# TractStack placeholder: ${t}`;
|
|
2427
2470
|
}
|
|
2428
2471
|
function P(t = {}) {
|
|
2429
|
-
const { resolve: e } =
|
|
2472
|
+
const { resolve: e } = g(import.meta.url);
|
|
2430
2473
|
return {
|
|
2431
2474
|
name: "astro-tractstack",
|
|
2432
2475
|
hooks: {
|
|
2433
2476
|
"astro:config:setup": async ({ config: c, updateConfig: o, logger: s }) => {
|
|
2434
|
-
|
|
2477
|
+
b(t, s);
|
|
2435
2478
|
const p = t.enableMultiTenant || !1;
|
|
2436
2479
|
if (s.info(
|
|
2437
2480
|
`DEBUG: enableMultiTenant = ${p}, process.env.PUBLIC_ENABLE_MULTI_TENANT = ${process.env.PUBLIC_ENABLE_MULTI_TENANT}`
|