astro-tractstack 2.2.10 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create-tractstack.js +2 -2
- package/dist/index.js +89 -8
- package/package.json +3 -1
- package/templates/custom/minimal/CodeHook.astro +14 -5
- package/templates/custom/shopify/CalDotComBooking.tsx +44 -0
- package/templates/custom/shopify/Cart.tsx +345 -0
- package/templates/custom/shopify/CartIcon.tsx +47 -0
- package/templates/custom/shopify/CartModal.tsx +63 -0
- package/templates/custom/shopify/CheckoutModal.tsx +187 -0
- package/templates/custom/shopify/ShopifyCartManager.tsx +145 -0
- package/templates/custom/shopify/ShopifyCheckout.tsx +167 -0
- package/templates/custom/shopify/ShopifyProductGrid.tsx +281 -0
- package/templates/custom/shopify/ShopifyServiceList.tsx +118 -0
- package/templates/custom/shopify/cart.astro +23 -0
- package/templates/custom/with-examples/CodeHook.astro +9 -1
- package/templates/custom/with-examples/ProductGrid.astro +1 -1
- package/templates/src/client/app.js +4 -2
- package/templates/src/components/Header.astro +37 -11
- package/templates/src/components/form/advanced/APIConfigSection.tsx +165 -38
- package/templates/src/components/storykeep/Dashboard.tsx +17 -3
- package/templates/src/components/storykeep/Dashboard_Advanced.tsx +1 -0
- package/templates/src/components/storykeep/Dashboard_Content.tsx +5 -96
- package/templates/src/components/storykeep/Dashboard_Shopify.tsx +525 -0
- package/templates/src/components/storykeep/StoryKeepBackdrop.astro +43 -23
- package/templates/src/components/storykeep/controls/content/ContentBrowser.tsx +0 -14
- package/templates/src/components/storykeep/controls/content/KnownResourceForm.tsx +36 -13
- package/templates/src/components/storykeep/controls/content/ManageContent.tsx +4 -11
- package/templates/src/components/storykeep/controls/content/ProductTable.tsx +254 -0
- package/templates/src/components/storykeep/controls/content/ResourceForm.tsx +108 -8
- package/templates/src/lib/resources.ts +11 -21
- package/templates/src/pages/api/shopify/createCart.ts +73 -0
- package/templates/src/pages/api/shopify/getProducts.ts +64 -0
- package/templates/src/pages/storykeep/login.astro +5 -10
- package/templates/src/pages/storykeep/logout.astro +1 -10
- package/templates/src/pages/storykeep/manage.astro +69 -0
- package/templates/src/pages/storykeep/{content.astro → pages.astro} +4 -8
- package/templates/src/pages/storykeep/shopify.astro +101 -0
- package/templates/src/stores/navigation.ts +3 -42
- package/templates/src/stores/nodes.ts +3 -1
- package/templates/src/stores/resources.ts +7 -10
- package/templates/src/stores/shopify.ts +210 -0
- package/templates/src/types/tractstack.ts +21 -0
- package/templates/src/utils/api/advancedConfig.ts +5 -1
- package/templates/src/utils/api/advancedHelpers.ts +48 -5
- package/templates/src/utils/api/brandHelpers.ts +4 -0
- package/templates/src/utils/api/resourceConfig.ts +13 -5
- package/templates/src/utils/customHelpers.ts +70 -0
- package/templates/src/utils/helpers.ts +59 -0
- package/utils/inject-files.ts +83 -2
package/utils/inject-files.ts
CHANGED
|
@@ -588,6 +588,10 @@ export async function injectTemplateFiles(
|
|
|
588
588
|
src: resolve('../templates/src/stores/resources.ts'),
|
|
589
589
|
dest: 'src/stores/resources.ts',
|
|
590
590
|
},
|
|
591
|
+
{
|
|
592
|
+
src: resolve('../templates/src/stores/shopify.ts'),
|
|
593
|
+
dest: 'src/stores/shopify.ts',
|
|
594
|
+
},
|
|
591
595
|
|
|
592
596
|
// Compositor stores
|
|
593
597
|
{
|
|
@@ -865,8 +869,12 @@ export async function injectTemplateFiles(
|
|
|
865
869
|
dest: 'src/pages/storykeep.astro',
|
|
866
870
|
},
|
|
867
871
|
{
|
|
868
|
-
src: resolve('../templates/src/pages/storykeep/
|
|
869
|
-
dest: 'src/pages/storykeep/
|
|
872
|
+
src: resolve('../templates/src/pages/storykeep/pages.astro'),
|
|
873
|
+
dest: 'src/pages/storykeep/pages.astro',
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
src: resolve('../templates/src/pages/storykeep/manage.astro'),
|
|
877
|
+
dest: 'src/pages/storykeep/manage.astro',
|
|
870
878
|
},
|
|
871
879
|
{
|
|
872
880
|
src: resolve('../templates/src/pages/storykeep/branding.astro'),
|
|
@@ -876,10 +884,18 @@ export async function injectTemplateFiles(
|
|
|
876
884
|
src: resolve('../templates/src/pages/storykeep/advanced.astro'),
|
|
877
885
|
dest: 'src/pages/storykeep/advanced.astro',
|
|
878
886
|
},
|
|
887
|
+
{
|
|
888
|
+
src: resolve('../templates/src/pages/storykeep/shopify.astro'),
|
|
889
|
+
dest: 'src/pages/storykeep/shopify.astro',
|
|
890
|
+
},
|
|
879
891
|
{
|
|
880
892
|
src: resolve('../templates/src/pages/maint.astro'),
|
|
881
893
|
dest: 'src/pages/maint.astro',
|
|
882
894
|
},
|
|
895
|
+
{
|
|
896
|
+
src: resolve('../templates/custom/shopify/cart.astro'),
|
|
897
|
+
dest: 'src/pages/cart.astro',
|
|
898
|
+
},
|
|
883
899
|
{
|
|
884
900
|
src: resolve('../templates/src/pages/404.astro'),
|
|
885
901
|
dest: 'src/pages/404.astro',
|
|
@@ -896,6 +912,14 @@ export async function injectTemplateFiles(
|
|
|
896
912
|
src: resolve('../templates/src/pages/sitemap.xml.ts'),
|
|
897
913
|
dest: 'src/pages/sitemap.xml.ts',
|
|
898
914
|
},
|
|
915
|
+
{
|
|
916
|
+
src: resolve('../templates/src/pages/api/shopify/getProducts.ts'),
|
|
917
|
+
dest: 'src/pages/api/shopify/getProducts.ts',
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
src: resolve('../templates/src/pages/api/shopify/createCart.ts'),
|
|
921
|
+
dest: 'src/pages/api/shopify/createCart.ts',
|
|
922
|
+
},
|
|
899
923
|
{
|
|
900
924
|
src: resolve('../templates/src/pages/api/tailwind.ts'),
|
|
901
925
|
dest: 'src/pages/api/tailwind.ts',
|
|
@@ -1156,6 +1180,12 @@ export async function injectTemplateFiles(
|
|
|
1156
1180
|
),
|
|
1157
1181
|
dest: 'src/components/storykeep/Dashboard_Advanced.tsx',
|
|
1158
1182
|
},
|
|
1183
|
+
{
|
|
1184
|
+
src: resolve(
|
|
1185
|
+
'../templates/src/components/storykeep/Dashboard_Shopify.tsx'
|
|
1186
|
+
),
|
|
1187
|
+
dest: 'src/components/storykeep/Dashboard_Shopify.tsx',
|
|
1188
|
+
},
|
|
1159
1189
|
{
|
|
1160
1190
|
src: resolve(
|
|
1161
1191
|
'../templates/src/components/storykeep/Dashboard_Analytics.tsx'
|
|
@@ -1212,6 +1242,12 @@ export async function injectTemplateFiles(
|
|
|
1212
1242
|
),
|
|
1213
1243
|
dest: 'src/components/storykeep/controls/content/PaneTable.tsx',
|
|
1214
1244
|
},
|
|
1245
|
+
{
|
|
1246
|
+
src: resolve(
|
|
1247
|
+
'../templates/src/components/storykeep/controls/content/ProductTable.tsx'
|
|
1248
|
+
),
|
|
1249
|
+
dest: 'src/components/storykeep/controls/content/ProductTable.tsx',
|
|
1250
|
+
},
|
|
1215
1251
|
{
|
|
1216
1252
|
src: resolve(
|
|
1217
1253
|
'../templates/src/components/storykeep/controls/content/ContentBrowser.tsx'
|
|
@@ -2203,6 +2239,51 @@ export async function injectTemplateFiles(
|
|
|
2203
2239
|
dest: 'src/utils/customHelpers.ts',
|
|
2204
2240
|
protected: true,
|
|
2205
2241
|
},
|
|
2242
|
+
{
|
|
2243
|
+
src: resolve('../templates/custom/shopify/ShopifyProductGrid.tsx'),
|
|
2244
|
+
dest: 'src/custom/shopify/ShopifyProductGrid.tsx',
|
|
2245
|
+
protected: true,
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
src: resolve('../templates/custom/shopify/ShopifyServiceList.tsx'),
|
|
2249
|
+
dest: 'src/custom/shopify/ShopifyServiceList.tsx',
|
|
2250
|
+
protected: true,
|
|
2251
|
+
},
|
|
2252
|
+
{
|
|
2253
|
+
src: resolve('../templates/custom/shopify/CartIcon.tsx'),
|
|
2254
|
+
dest: 'src/custom/shopify/CartIcon.tsx',
|
|
2255
|
+
protected: true,
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
src: resolve('../templates/custom/shopify/ShopifyCartManager.tsx'),
|
|
2259
|
+
dest: 'src/custom/shopify/ShopifyCartManager.tsx',
|
|
2260
|
+
protected: true,
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
src: resolve('../templates/custom/shopify/CartModal.tsx'),
|
|
2264
|
+
dest: 'src/custom/shopify/CartModal.tsx',
|
|
2265
|
+
protected: true,
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
src: resolve('../templates/custom/shopify/CheckoutModal.tsx'),
|
|
2269
|
+
dest: 'src/custom/shopify/CheckoutModal.tsx',
|
|
2270
|
+
protected: true,
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
src: resolve('../templates/custom/shopify/Cart.tsx'),
|
|
2274
|
+
dest: 'src/custom/shopify/Cart.tsx',
|
|
2275
|
+
protected: true,
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
src: resolve('../templates/custom/shopify/CalDotComBooking.tsx'),
|
|
2279
|
+
dest: 'src/custom/shopify/CalDotComBooking.tsx',
|
|
2280
|
+
protected: true,
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
src: resolve('../templates/custom/shopify/ShopifyCheckout.tsx'),
|
|
2284
|
+
dest: 'src/custom/shopify/ShopifyCheckout.tsx',
|
|
2285
|
+
protected: true,
|
|
2286
|
+
},
|
|
2206
2287
|
|
|
2207
2288
|
// Example Components (Conditional)
|
|
2208
2289
|
...(config?.includeExamples
|