astro-tractstack 2.0.0-rc.8 → 2.0.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.
Files changed (141) hide show
  1. package/LICENSE +8 -97
  2. package/README.md +7 -5
  3. package/bin/create-tractstack.js +35 -11
  4. package/dist/index.js +106 -29
  5. package/package.json +10 -5
  6. package/templates/css/frontend.css +1 -1
  7. package/templates/custom/minimal/CodeHook.astro +13 -12
  8. package/templates/custom/minimal/CustomRoutes.astro +25 -31
  9. package/templates/custom/with-examples/CodeHook.astro +22 -11
  10. package/templates/custom/with-examples/CustomRoutes.astro +4 -8
  11. package/templates/custom/with-examples/ProductCard.astro +29 -0
  12. package/templates/custom/with-examples/ProductCardWrapper.astro +43 -0
  13. package/templates/custom/with-examples/ProductGrid.astro +64 -0
  14. package/templates/custom/with-examples/pages/Collections.astro +58 -98
  15. package/templates/gitignore +42 -0
  16. package/templates/prettierignore +5 -0
  17. package/templates/prettierrc +19 -0
  18. package/templates/src/client/app.js +127 -0
  19. package/templates/src/client/htmx.min.js +3519 -0
  20. package/templates/src/client/view.js +429 -0
  21. package/templates/src/components/Footer.astro +4 -9
  22. package/templates/src/components/Header.astro +67 -60
  23. package/templates/src/components/Menu.tsx +188 -52
  24. package/templates/src/components/codehooks/BunnyVideoSetup.tsx +2 -2
  25. package/templates/src/components/codehooks/EpinetDurationSelector.tsx +9 -13
  26. package/templates/src/components/codehooks/EpinetTableView.tsx +11 -7
  27. package/templates/src/components/codehooks/EpinetWrapper.tsx +1 -0
  28. package/templates/src/components/codehooks/FeaturedArticle.astro +105 -0
  29. package/templates/src/components/codehooks/FeaturedArticleSetup.tsx +318 -0
  30. package/templates/src/components/codehooks/ListContent.astro +32 -162
  31. package/templates/src/components/codehooks/ListContentSetup.tsx +43 -138
  32. package/templates/src/components/codehooks/ProductCardSetup.tsx +152 -0
  33. package/templates/src/components/codehooks/ProductGridSetup.tsx +274 -0
  34. package/templates/src/components/codehooks/SearchWidget.tsx +453 -0
  35. package/templates/src/components/compositor/Node.tsx +3 -6
  36. package/templates/src/components/compositor/PanelVisibilityWrapper.tsx +21 -11
  37. package/templates/src/components/compositor/elements/BunnyVideo.tsx +21 -20
  38. package/templates/src/components/compositor/nodes/Pane.tsx +51 -21
  39. package/templates/src/components/compositor/nodes/RenderChildren.tsx +6 -1
  40. package/templates/src/components/compositor/nodes/Widget.tsx +16 -2
  41. package/templates/src/components/compositor/preview/FeaturedArticlePreview.tsx +155 -0
  42. package/templates/src/components/compositor/preview/PaneSnapshotGenerator.tsx +20 -1
  43. package/templates/src/components/edit/Header.tsx +10 -4
  44. package/templates/src/components/edit/PanelSwitch.tsx +11 -7
  45. package/templates/src/components/edit/SettingsPanel.tsx +29 -18
  46. package/templates/src/components/edit/ToolBar.tsx +1 -28
  47. package/templates/src/components/edit/ToolMode.tsx +45 -32
  48. package/templates/src/components/edit/pane/AddPanePanel_break.tsx +12 -2
  49. package/templates/src/components/edit/pane/AddPanePanel_codehook.tsx +8 -2
  50. package/templates/src/components/edit/pane/AddPanePanel_newAICopy_modal.tsx +1 -1
  51. package/templates/src/components/edit/pane/ConfigPanePanel.tsx +17 -27
  52. package/templates/src/components/edit/pane/PageGenSelector.tsx +16 -16
  53. package/templates/src/components/edit/pane/PageGenSpecial.tsx +26 -49
  54. package/templates/src/components/edit/pane/PageGen_preview.tsx +17 -2
  55. package/templates/src/components/edit/pane/PanePanel_path.tsx +2 -4
  56. package/templates/src/components/edit/pane/PanePanel_title.tsx +243 -76
  57. package/templates/src/components/edit/panels/StyleBreakPanel.tsx +17 -19
  58. package/templates/src/components/edit/panels/StyleCodeHookPanel.tsx +48 -37
  59. package/templates/src/components/edit/panels/StyleElementPanel_add.tsx +60 -55
  60. package/templates/src/components/edit/panels/StyleImagePanel_add.tsx +56 -50
  61. package/templates/src/components/edit/panels/StyleLiElementPanel_add.tsx +54 -47
  62. package/templates/src/components/edit/panels/StyleLinkPanel_add.tsx +54 -44
  63. package/templates/src/components/edit/panels/StyleLinkPanel_config.tsx +113 -138
  64. package/templates/src/components/edit/panels/StyleParentPanel_add.tsx +54 -40
  65. package/templates/src/components/edit/panels/StyleWidgetPanel.tsx +3 -3
  66. package/templates/src/components/edit/panels/StyleWidgetPanel_add.tsx +56 -49
  67. package/templates/src/components/edit/panels/StyleWidgetPanel_config.tsx +14 -5
  68. package/templates/src/components/edit/state/SaveModal.tsx +316 -169
  69. package/templates/src/components/edit/storyfragment/StoryFragmentPanel_og.tsx +1 -1
  70. package/templates/src/components/edit/storyfragment/StoryFragmentPanel_slug.tsx +56 -55
  71. package/templates/src/components/edit/widgets/BunnyWidget.tsx +538 -59
  72. package/templates/src/components/edit/widgets/InteractiveDisclosureWidget.tsx +656 -0
  73. package/templates/src/components/edit/widgets/ToggleWidget.tsx +9 -16
  74. package/templates/src/components/fields/ArtpackImage.tsx +4 -1
  75. package/templates/src/components/fields/BackgroundImage.tsx +1 -1
  76. package/templates/src/components/fields/BackgroundImageWrapper.tsx +127 -35
  77. package/templates/src/components/fields/ColorPickerCombo.tsx +66 -62
  78. package/templates/src/components/fields/ImageUpload.tsx +1 -1
  79. package/templates/src/components/fields/ViewportComboBox.tsx +59 -42
  80. package/templates/src/components/form/ActionBuilderBeliefSelector.tsx +117 -0
  81. package/templates/src/components/form/ActionBuilderField.tsx +306 -87
  82. package/templates/src/components/search/SearchModal.tsx +420 -0
  83. package/templates/src/components/search/SearchResults.tsx +367 -0
  84. package/templates/src/components/search/SearchWrapper.tsx +46 -0
  85. package/templates/src/components/storykeep/Dashboard_Advanced.tsx +1 -1
  86. package/templates/src/components/storykeep/Dashboard_Analytics.tsx +34 -8
  87. package/templates/src/components/storykeep/Dashboard_Content.tsx +6 -0
  88. package/templates/src/components/storykeep/StoryKeepBackdrop.astro +87 -0
  89. package/templates/src/components/storykeep/controls/content/BeliefForm.tsx +37 -33
  90. package/templates/src/components/storykeep/controls/content/MenuForm.tsx +55 -7
  91. package/templates/src/components/storykeep/controls/content/ResourceForm.tsx +17 -2
  92. package/templates/src/components/storykeep/controls/content/StoryFragmentTable.tsx +5 -8
  93. package/templates/src/components/storykeep/state/FetchAnalytics.tsx +274 -228
  94. package/templates/src/components/storykeep/widgets/Wizard.tsx +14 -7
  95. package/templates/src/components/tenant/RegistrationForm.tsx +1 -1
  96. package/templates/src/components/widgets/ImpressionWrapper.tsx +0 -1
  97. package/templates/src/constants/shapes.ts +9 -0
  98. package/templates/src/constants.ts +2121 -16
  99. package/templates/src/hooks/useSearch.ts +228 -0
  100. package/templates/src/layouts/Layout.astro +213 -104
  101. package/templates/src/lib/storyData.ts +4 -1
  102. package/templates/src/pages/[...slug]/edit.astro +14 -14
  103. package/templates/src/pages/[...slug].astro +82 -21
  104. package/templates/src/pages/api/orphan-analysis.ts +0 -1
  105. package/templates/src/pages/api/tailwind.ts +23 -21
  106. package/templates/src/pages/context/[...contextSlug]/edit.astro +14 -14
  107. package/templates/src/pages/context/[...contextSlug].astro +7 -2
  108. package/templates/src/pages/storykeep/advanced.astro +5 -4
  109. package/templates/src/pages/storykeep/branding.astro +5 -4
  110. package/templates/src/pages/storykeep/content.astro +5 -4
  111. package/templates/src/pages/storykeep/init.astro +40 -1
  112. package/templates/src/pages/storykeep/login.astro +1 -1
  113. package/templates/src/pages/storykeep.astro +5 -4
  114. package/templates/src/stores/nodes.ts +59 -88
  115. package/templates/src/stores/orphanAnalysis.ts +19 -21
  116. package/templates/src/stores/storykeep.ts +7 -0
  117. package/templates/src/types/compositorTypes.ts +6 -0
  118. package/templates/src/types/tractstack.ts +17 -0
  119. package/templates/src/utils/actions/lispLexer.ts +2 -2
  120. package/templates/src/utils/actions/preParse_Action.ts +3 -0
  121. package/templates/src/utils/api/beliefHelpers.ts +12 -36
  122. package/templates/src/utils/api/menuHelpers.ts +2 -2
  123. package/templates/src/utils/api.ts +26 -0
  124. package/templates/src/utils/compositor/TemplateNodes.ts +7 -0
  125. package/templates/src/utils/compositor/allowInsert.ts +5 -3
  126. package/templates/src/utils/compositor/nodesHelper.ts +4 -0
  127. package/templates/src/utils/compositor/processMarkdown.ts +16 -2
  128. package/templates/src/utils/compositor/reduceNodesClassNames.ts +4 -0
  129. package/templates/src/utils/compositor/templateMarkdownStyles.ts +13 -13
  130. package/templates/src/utils/compositor/typeGuards.ts +1 -0
  131. package/templates/src/utils/customHelpers.ts +38 -0
  132. package/templates/src/utils/helpers.ts +2 -2
  133. package/templates/src/utils/layout.ts +65 -144
  134. package/utils/inject-files.ts +95 -18
  135. package/templates/src/client/analytics-events.js +0 -207
  136. package/templates/src/client/belief-events.js +0 -191
  137. package/templates/src/client/sse.js +0 -613
  138. package/templates/src/components/codehooks/FeaturedContent.astro +0 -273
  139. package/templates/src/components/codehooks/FeaturedContentSetup.tsx +0 -738
  140. package/templates/src/components/compositor/preview/FeaturedContentPreview.tsx +0 -128
  141. package/templates/src/components/edit/pane/PanePanel_slug.tsx +0 -219
package/LICENSE CHANGED
@@ -1,102 +1,13 @@
1
- # Functional Source License, Version 1.1, MIT Future License
1
+ MIT License
2
2
 
3
- ## Abbreviation
3
+ Copyright (c) 2025 At Risk Media
4
4
 
5
- FSL-1.1-MIT
6
-
7
- ## Notice
8
-
9
- Copyright 2025 At Risk Media
10
-
11
- ## Terms and Conditions
12
-
13
- ### Licensor ("We")
14
-
15
- The party offering the Software under these Terms and Conditions.
16
-
17
- ### The Software
18
-
19
- The "Software" is each version of the software that we make available under
20
- these Terms and Conditions, as indicated by our inclusion of these Terms and
21
- Conditions with the Software.
22
-
23
- ### License Grant
24
-
25
- Subject to your compliance with this License Grant and the Patents,
26
- Redistribution and Trademark clauses below, we hereby grant you the right to
27
- use, copy, modify, create derivative works, publicly perform, publicly display
28
- and redistribute the Software for any Permitted Purpose identified below.
29
-
30
- ### Permitted Purpose
31
-
32
- A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
- means making the Software available to others in a commercial product or
34
- service that:
35
-
36
- 1. substitutes for the Software;
37
-
38
- 2. substitutes for any other product or service we offer using the Software
39
- that exists as of the date we make the Software available; or
40
-
41
- 3. offers the same or substantially similar functionality as the Software.
42
-
43
- Permitted Purposes specifically include using the Software:
44
-
45
- 1. for your internal use and access;
46
-
47
- 2. for non-commercial education;
48
-
49
- 3. for non-commercial research; and
50
-
51
- 4. in connection with professional services that you provide to a licensee
52
- using the Software in accordance with these Terms and Conditions.
53
-
54
- ### Patents
55
-
56
- To the extent your use for a Permitted Purpose would necessarily infringe our
57
- patents, the license grant above includes a license under our patents. If you
58
- make a claim against any party that the Software infringes or contributes to
59
- the infringement of any patent, then your patent license to the Software ends
60
- immediately.
61
-
62
- ### Redistribution
63
-
64
- The Terms and Conditions apply to all copies, modifications and derivatives of
65
- the Software.
66
-
67
- If you redistribute any copies, modifications or derivatives of the Software,
68
- you must include a copy of or a link to these Terms and Conditions and not
69
- remove any copyright notices provided in or with the Software.
70
-
71
- ### Disclaimer
72
-
73
- THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
- IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
- PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
-
77
- IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
- SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
- EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
-
81
- ### Trademarks
82
-
83
- Except for displaying the License Details and identifying us as the origin of
84
- the Software, you have no right under these Terms and Conditions to use our
85
- trademarks, trade names, service marks or product names.
86
-
87
- ## Grant of Future License
88
-
89
- We hereby irrevocably grant you an additional license to use the Software under
90
- the MIT license that is effective on the second anniversary of the date we make
91
- the Software available. On or after that date, you may use the Software under
92
- the MIT license, in which case the following will apply:
93
-
94
- Permission is hereby granted, free of charge, to any person obtaining a copy of
95
- this software and associated documentation files (the "Software"), to deal in
96
- the Software without restriction, including without limitation the rights to
97
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
98
- of the Software, and to permit persons to whom the Software is furnished to do
99
- so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
100
11
 
101
12
  The above copyright notice and this permission notice shall be included in all
102
13
  copies or substantial portions of the Software.
package/README.md CHANGED
@@ -80,7 +80,7 @@ cd ~/t8k/src/my-tractstack
80
80
  pnpm dev
81
81
  ```
82
82
 
83
- Visit https://127.0.0.1:4321 to access your site and activate your Story Keep (CMS).
83
+ Visit <https://127.0.0.1:4321> to access your site and activate your Story Keep (CMS).
84
84
 
85
85
  ## Installation Types
86
86
 
@@ -283,14 +283,16 @@ sudo ~/t8k/src/tractstack-go/pkg/scripts/t8k-uninstall.sh
283
283
 
284
284
  ## Support & Documentation
285
285
 
286
- - **Documentation**: https://tractstack.org
287
- - **GitHub Issues**: https://github.com/AtRiskMedia/tractstack-go/issues
288
- - **Email Support**: hello@tractstack.com
286
+ - **Documentation**: <https://tractstack.org>
287
+ - **GitHub Issues**: <https://github.com/AtRiskMedia/tractstack-go/issues>
288
+ - **Email Support**: <hello@tractstack.com>
289
289
  - **Community**: Join discussions about adaptive web experiences
290
290
 
291
291
  ## License
292
292
 
293
- **Functional Source License (FSL)** - Commercial use encouraged!
293
+ The frontend Astro integration is available via the MIT license.
294
+
295
+ The backend epistemic hypermedia server is available via the **Functional Source License (FSL)** - Commercial use encouraged!
294
296
 
295
297
  The only restriction is no re-selling TractStack as-a-service. Perfect for:
296
298
 
@@ -35,6 +35,7 @@ function getEnvState() {
35
35
  tenantId: 'default',
36
36
  goBackendPath: `${homedir()}/t8k-go-server/`,
37
37
  enableMultiTenant: false,
38
+ enableBunny: false,
38
39
  };
39
40
 
40
41
  const found = {
@@ -42,6 +43,7 @@ function getEnvState() {
42
43
  tenantId: false,
43
44
  goBackendPath: false,
44
45
  enableMultiTenant: false,
46
+ enableBunny: false,
45
47
  };
46
48
 
47
49
  if (!existsSync('.env')) {
@@ -76,13 +78,17 @@ function getEnvState() {
76
78
  goBackendPath:
77
79
  envVars.PRIVATE_GO_BACKEND_PATH || defaults.goBackendPath,
78
80
  enableMultiTenant:
79
- envVars.ENABLE_MULTI_TENANT === 'true' || defaults.enableMultiTenant,
81
+ envVars.PUBLIC_ENABLE_MULTI_TENANT === 'true' ||
82
+ defaults.enableMultiTenant,
83
+ enableBunny:
84
+ envVars.PUBLIC_ENABLE_BUNNY === 'true' || defaults.enableBunny,
80
85
  },
81
86
  envState: {
82
87
  goBackend: !!envVars.PUBLIC_GO_BACKEND,
83
88
  tenantId: !!envVars.PUBLIC_TENANTID,
84
89
  goBackendPath: !!envVars.PRIVATE_GO_BACKEND_PATH,
85
- enableMultiTenant: !!envVars.ENABLE_MULTI_TENANT,
90
+ enableMultiTenant: envVars.PUBLIC_ENABLE_MULTI_TENANT !== undefined,
91
+ enableBunny: envVars.PUBLIC_ENABLE_BUNNY !== undefined,
86
92
  },
87
93
  };
88
94
  } catch (error) {
@@ -206,6 +212,21 @@ ${kleur.bold('Examples:')}
206
212
  );
207
213
  }
208
214
 
215
+ if (!envState.enableBunny) {
216
+ promptQuestions.push({
217
+ type: 'confirm',
218
+ name: 'enableBunny',
219
+ message: 'Enable Bunny Video Player?',
220
+ initial: envDefaults.enableBunny,
221
+ });
222
+ } else {
223
+ console.log(
224
+ kleur.green(
225
+ `✓ Bunny Video Player: ${envDefaults.enableBunny ? 'enabled' : 'disabled'}`
226
+ )
227
+ );
228
+ }
229
+
209
230
  // Only prompt for tenantId if multi-tenant will be enabled and tenantId not in .env
210
231
  const willEnableMultiTenant =
211
232
  enableMultiTenant || envDefaults.enableMultiTenant;
@@ -257,8 +278,10 @@ ${kleur.bold('Examples:')}
257
278
  const finalResponses = {
258
279
  goBackend: responses.goBackend || envDefaults.goBackend,
259
280
  enableMultiTenant:
260
- responses.enableMultiTenant ??
261
- (enableMultiTenant || envDefaults.enableMultiTenant),
281
+ responses.enableMultiTenant === true || // explicit true from prompt
282
+ enableMultiTenant || // CLI flag --multi-tenant
283
+ envDefaults.enableMultiTenant === true, // existing .env value was "true"
284
+ enableBunny: responses.enableBunny ?? envDefaults.enableBunny,
262
285
  tenantId: responses.tenantId || envDefaults.tenantId,
263
286
  goBackendPath: responses.goBackendPath || envDefaults.goBackendPath,
264
287
  includeExamples: responses.includeExamples ?? includeExamples,
@@ -284,7 +307,8 @@ ${kleur.bold('Examples:')}
284
307
  PUBLIC_GO_BACKEND="${finalResponses.goBackend}"
285
308
  PUBLIC_TENANTID="${finalTenantId}"
286
309
  PRIVATE_GO_BACKEND_PATH="${finalResponses.goBackendPath.endsWith('/') ? finalResponses.goBackendPath : finalResponses.goBackendPath + '/'}"
287
- ENABLE_MULTI_TENANT="${finalResponses.enableMultiTenant ? 'true' : 'false'}"
310
+ PUBLIC_ENABLE_MULTI_TENANT="${finalResponses.enableMultiTenant ? 'true' : 'false'}"
311
+ PUBLIC_ENABLE_BUNNY="${finalResponses.enableBunny ? 'true' : 'false'}"
288
312
  `;
289
313
 
290
314
  try {
@@ -315,7 +339,7 @@ ENABLE_MULTI_TENANT="${finalResponses.enableMultiTenant ? 'true' : 'false'}"
315
339
 
316
340
  // Install core dependencies
317
341
  execSync(
318
- `${addCommand} @nanostores/react@^1.0.0 nanostores@^1.0.1 @nanostores/persistent ulid`,
342
+ `${addCommand} @nanostores/react@^1.0.0 nanostores@^1.0.1 @nanostores/persistent ulid@^3.0.1`,
319
343
  {
320
344
  stdio: 'inherit',
321
345
  }
@@ -324,7 +348,7 @@ ENABLE_MULTI_TENANT="${finalResponses.enableMultiTenant ? 'true' : 'false'}"
324
348
 
325
349
  // Install UI components
326
350
  execSync(
327
- `${addCommand} @ark-ui/react@^5.21.0 @heroicons/react@^2.1.1 @internationalized/date@3.8.2`,
351
+ `${addCommand} @ark-ui/react@^5.26.0 @heroicons/react@^2.1.1 @internationalized/date@3.10.0`,
328
352
  {
329
353
  stdio: 'inherit',
330
354
  }
@@ -333,7 +357,7 @@ ENABLE_MULTI_TENANT="${finalResponses.enableMultiTenant ? 'true' : 'false'}"
333
357
 
334
358
  // Install visualization dependencies
335
359
  execSync(
336
- `${addCommand} d3@^7.9.0 d3-sankey@^0.12.3 recharts@^3.1.2 player.js@^0.1.0 tinycolor2 html-to-image`,
360
+ `${addCommand} 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`,
337
361
  {
338
362
  stdio: 'inherit',
339
363
  }
@@ -346,7 +370,7 @@ ENABLE_MULTI_TENANT="${finalResponses.enableMultiTenant ? 'true' : 'false'}"
346
370
 
347
371
  // Install dev dependencies
348
372
  execSync(
349
- `${addCommand} -D @types/node@^22.18.0 @types/react@^18.3.11 @types/react-dom@^18.3.0 @types/d3@^7.4.3 @types/d3-sankey@^0.12.3 prettier@^3.3.3 prettier-plugin-astro@^0.14.1 prettier-plugin-tailwindcss@^0.6.8 typescript@^5.9.2 @types/tinycolor2 @mhsdesign/jit-browser-tailwindcss`,
373
+ `${addCommand} -D @types/node@^22.18.0 @types/react@^18.3.11 @types/react-dom@^18.3.0 @types/d3@^7.4.3 @types/d3-sankey@^0.12.3 prettier@^3.3.3 prettier-plugin-astro@^0.14.1 prettier-plugin-tailwindcss@^0.6.8 typescript@^5.9.2 @types/tinycolor2@^1.4.6 @mhsdesign/jit-browser-tailwindcss@^0.4.2`,
350
374
  { stdio: 'inherit' }
351
375
  );
352
376
  console.log(kleur.green('✅ Dev dependencies installed'));
@@ -355,12 +379,12 @@ ENABLE_MULTI_TENANT="${finalResponses.enableMultiTenant ? 'true' : 'false'}"
355
379
  console.log('Please run manually:');
356
380
  console.log(
357
381
  kleur.cyan(
358
- `${addCommand} react@^18.3.1 react-dom@^18.3.1 @astrojs/react@^4.0.0 @astrojs/node@^9.4.3 @nanostores/react@^1.0.0 nanostores@^1.0.1 @nanostores/persistent ulid @ark-ui/react@^5.21.0 @heroicons/react@^2.1.1 @internationalized/date@3.8.2 d3@^7.9.0 d3-sankey@^0.12.3 recharts@^3.1.2 player.js@^0.1.0 tinycolor2 html-to-image path-to-regexp@^8.0.0`
382
+ `${addCommand} react@^18.3.1 react-dom@^18.3.1 @astrojs/react@^4.0.0 @astrojs/node@^9.4.3 @nanostores/react@^1.0.0 nanostores@^1.0.1 @nanostores/persistent ulid@^3.0.1 @ark-ui/react@^5.26.0 @heroicons/react@^2.1.1 @internationalized/date@3.10.0 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`
359
383
  )
360
384
  );
361
385
  console.log(
362
386
  kleur.cyan(
363
- `${addCommand} -D @types/node@^22.18.0 @types/react@^18.3.11 @types/react-dom@^18.3.0 @types/d3@^7.4.3 @types/d3-sankey@^0.12.3 prettier@^3.3.3 prettier-plugin-astro@^0.14.1 prettier-plugin-tailwindcss@^0.6.8 typescript@^5.9.2 @types/tinycolor2 @mhsdesign/jit-browser-tailwindcss`
387
+ `${addCommand} -D @types/node@^22.18.0 @types/react@^18.3.11 @types/react-dom@^18.3.0 @types/d3@^7.4.3 @types/d3-sankey@^0.12.3 prettier@^3.3.3 prettier-plugin-astro@^0.14.1 prettier-plugin-tailwindcss@^0.6.8 typescript@^5.9.2 @types/tinycolor2@^1.4.6 @mhsdesign/jit-browser-tailwindcss@^0.4.2`
364
388
  )
365
389
  );
366
390
  process.exit(1);
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ function b(t) {
10
10
  }
11
11
  function g(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
- const c = process.env.PUBLIC_GO_BACKEND, n = process.env.PUBLIC_TENANTID;
13
+ const c = process.env.PUBLIC_GO_BACKEND, o = process.env.PUBLIC_TENANTID;
14
14
  if (!c)
15
15
  e.warn("PUBLIC_GO_BACKEND not set - this will be required at runtime");
16
16
  else
@@ -19,18 +19,26 @@ function g(t, e) {
19
19
  } catch {
20
20
  e.error(`PUBLIC_GO_BACKEND is not a valid URL: ${c}`);
21
21
  }
22
- return n ? /^[a-zA-Z0-9_-]+$/.test(n) ? e.info(`Tenant ID validated: ${n}`) : e.error(`PUBLIC_TENANTID contains invalid characters: ${n}`) : e.warn("PUBLIC_TENANTID not set - this will be required at runtime"), t;
22
+ return o ? /^[a-zA-Z0-9_-]+$/.test(o) ? e.info(`Tenant ID validated: ${o}`) : e.error(`PUBLIC_TENANTID contains invalid characters: ${o}`) : e.warn("PUBLIC_TENANTID not set - this will be required at runtime"), t;
23
23
  }
24
24
  async function w(t, e, c) {
25
25
  e.info("TractStack: Injecting template files");
26
- const n = [
26
+ const o = [
27
27
  // Core Configuration
28
28
  {
29
29
  src: t("../templates/env.example"),
30
30
  dest: "env.example"
31
31
  },
32
32
  {
33
- src: t("../templates/.gitignore"),
33
+ src: t("../templates/prettierrc"),
34
+ dest: ".prettierrc"
35
+ },
36
+ {
37
+ src: t("../templates/prettierignore"),
38
+ dest: ".prettierignore"
39
+ },
40
+ {
41
+ src: t("../templates/gitignore"),
34
42
  dest: ".gitignore"
35
43
  },
36
44
  {
@@ -221,6 +229,12 @@ async function w(t, e, c) {
221
229
  src: t("../templates/src/components/edit/widgets/BeliefWidget.tsx"),
222
230
  dest: "src/components/edit/widgets/BeliefWidget.tsx"
223
231
  },
232
+ {
233
+ src: t(
234
+ "../templates/src/components/edit/widgets/InteractiveDisclosureWidget.tsx"
235
+ ),
236
+ dest: "src/components/edit/widgets/InteractiveDisclosureWidget.tsx"
237
+ },
224
238
  {
225
239
  src: t(
226
240
  "../templates/src/components/edit/widgets/IdentifyAsWidget.tsx"
@@ -470,10 +484,6 @@ async function w(t, e, c) {
470
484
  src: t("../templates/src/components/edit/pane/PanePanel_path.tsx"),
471
485
  dest: "src/components/edit/pane/PanePanel_path.tsx"
472
486
  },
473
- {
474
- src: t("../templates/src/components/edit/pane/PanePanel_slug.tsx"),
475
- dest: "src/components/edit/pane/PanePanel_slug.tsx"
476
- },
477
487
  {
478
488
  src: t("../templates/src/components/edit/pane/PanePanel_title.tsx"),
479
489
  dest: "src/components/edit/pane/PanePanel_title.tsx"
@@ -545,9 +555,9 @@ async function w(t, e, c) {
545
555
  },
546
556
  {
547
557
  src: t(
548
- "../templates/src/components/compositor/preview/FeaturedContentPreview.tsx"
558
+ "../templates/src/components/compositor/preview/FeaturedArticlePreview.tsx"
549
559
  ),
550
- dest: "src/components/compositor/preview/FeaturedContentPreview.tsx"
560
+ dest: "src/components/compositor/preview/FeaturedArticlePreview.tsx"
551
561
  },
552
562
  // Server side stores
553
563
  {
@@ -889,6 +899,23 @@ async function w(t, e, c) {
889
899
  src: t("../templates/src/components/Fragment.astro"),
890
900
  dest: "src/components/Fragment.astro"
891
901
  },
902
+ // Search Components
903
+ {
904
+ src: t("../templates/src/components/search/SearchWrapper.tsx"),
905
+ dest: "src/components/search/SearchWrapper.tsx"
906
+ },
907
+ {
908
+ src: t("../templates/src/components/search/SearchModal.tsx"),
909
+ dest: "src/components/search/SearchModal.tsx"
910
+ },
911
+ {
912
+ src: t("../templates/src/components/search/SearchResults.tsx"),
913
+ dest: "src/components/search/SearchResults.tsx"
914
+ },
915
+ {
916
+ src: t("../templates/src/hooks/useSearch.ts"),
917
+ dest: "src/hooks/useSearch.ts"
918
+ },
892
919
  // Profile Components
893
920
  {
894
921
  src: t("../templates/src/components/profile/ProfileConsent.tsx"),
@@ -967,6 +994,12 @@ async function w(t, e, c) {
967
994
  src: t("../templates/src/components/form/ActionBuilderField.tsx"),
968
995
  dest: "src/components/form/ActionBuilderField.tsx"
969
996
  },
997
+ {
998
+ src: t(
999
+ "../templates/src/components/form/ActionBuilderBeliefSelector.tsx"
1000
+ ),
1001
+ dest: "src/components/form/ActionBuilderBeliefSelector.tsx"
1002
+ },
970
1003
  {
971
1004
  src: t("../templates/src/components/form/MagicPathBuilder.tsx"),
972
1005
  dest: "src/components/form/MagicPathBuilder.tsx"
@@ -1020,6 +1053,12 @@ async function w(t, e, c) {
1020
1053
  dest: "src/components/form/advanced/APIConfigSection.tsx"
1021
1054
  },
1022
1055
  // StoryKeep Dashboard Components
1056
+ {
1057
+ src: t(
1058
+ "../templates/src/components/storykeep/StoryKeepBackdrop.astro"
1059
+ ),
1060
+ dest: "src/components/storykeep/StoryKeepBackdrop.astro"
1061
+ },
1023
1062
  {
1024
1063
  src: t("../templates/src/components/storykeep/Dashboard.tsx"),
1025
1064
  dest: "src/components/storykeep/Dashboard.tsx"
@@ -1189,17 +1228,21 @@ async function w(t, e, c) {
1189
1228
  src: t("../templates/src/components/codehooks/SankeyDiagram.tsx"),
1190
1229
  dest: "src/components/codehooks/SankeyDiagram.tsx"
1191
1230
  },
1231
+ {
1232
+ src: t("../templates/src/components/codehooks/SearchWidget.tsx"),
1233
+ dest: "src/components/codehooks/SearchWidget.tsx"
1234
+ },
1192
1235
  {
1193
1236
  src: t(
1194
- "../templates/src/components/codehooks/FeaturedContent.astro"
1237
+ "../templates/src/components/codehooks/FeaturedArticle.astro"
1195
1238
  ),
1196
- dest: "src/components/codehooks/FeaturedContent.astro"
1239
+ dest: "src/components/codehooks/FeaturedArticle.astro"
1197
1240
  },
1198
1241
  {
1199
1242
  src: t(
1200
- "../templates/src/components/codehooks/FeaturedContentSetup.tsx"
1243
+ "../templates/src/components/codehooks/FeaturedArticleSetup.tsx"
1201
1244
  ),
1202
- dest: "src/components/codehooks/FeaturedContentSetup.tsx"
1245
+ dest: "src/components/codehooks/FeaturedArticleSetup.tsx"
1203
1246
  },
1204
1247
  {
1205
1248
  src: t("../templates/src/components/codehooks/ListContent.astro"),
@@ -1211,6 +1254,18 @@ async function w(t, e, c) {
1211
1254
  ),
1212
1255
  dest: "src/components/codehooks/ListContentSetup.tsx"
1213
1256
  },
1257
+ {
1258
+ src: t(
1259
+ "../templates/src/components/codehooks/ProductCardSetup.tsx"
1260
+ ),
1261
+ dest: "src/components/codehooks/ProductCardSetup.tsx"
1262
+ },
1263
+ {
1264
+ src: t(
1265
+ "../templates/src/components/codehooks/ProductGridSetup.tsx"
1266
+ ),
1267
+ dest: "src/components/codehooks/ProductGridSetup.tsx"
1268
+ },
1214
1269
  {
1215
1270
  src: t(
1216
1271
  "../templates/src/components/codehooks/BunnyVideoWrapper.astro"
@@ -1245,16 +1300,16 @@ async function w(t, e, c) {
1245
1300
  },
1246
1301
  // Client Scripts
1247
1302
  {
1248
- src: t("../templates/src/client/sse.js"),
1249
- dest: "public/client/sse.js"
1303
+ src: t("../templates/src/client/htmx.min.js"),
1304
+ dest: "public/client/htmx.min.js"
1250
1305
  },
1251
1306
  {
1252
- src: t("../templates/src/client/belief-events.js"),
1253
- dest: "public/client/belief-events.js"
1307
+ src: t("../templates/src/client/view.js"),
1308
+ dest: "public/client/view.js"
1254
1309
  },
1255
1310
  {
1256
- src: t("../templates/src/client/analytics-events.js"),
1257
- dest: "public/client/analytics-events.js"
1311
+ src: t("../templates/src/client/app.js"),
1312
+ dest: "public/client/app.js"
1258
1313
  },
1259
1314
  // StoryKeep Editor (add new section)
1260
1315
  {
@@ -2001,6 +2056,11 @@ async function w(t, e, c) {
2001
2056
  dest: "src/custom/CustomRoutes.astro",
2002
2057
  protected: !0
2003
2058
  },
2059
+ {
2060
+ src: t("../templates/src/utils/customHelpers.ts"),
2061
+ dest: "src/utils/customHelpers.ts",
2062
+ protected: !0
2063
+ },
2004
2064
  // Example Components (Conditional)
2005
2065
  ...c?.includeExamples ? [
2006
2066
  {
@@ -2008,6 +2068,23 @@ async function w(t, e, c) {
2008
2068
  dest: "src/custom/CustomHero.astro",
2009
2069
  protected: !0
2010
2070
  },
2071
+ {
2072
+ src: t("../templates/custom/with-examples/ProductGrid.astro"),
2073
+ dest: "src/custom/ProductGrid.astro",
2074
+ protected: !0
2075
+ },
2076
+ {
2077
+ src: t(
2078
+ "../templates/custom/with-examples/ProductCardWrapper.astro"
2079
+ ),
2080
+ dest: "src/custom/ProductCardWrapper.astro",
2081
+ protected: !0
2082
+ },
2083
+ {
2084
+ src: t("../templates/custom/with-examples/ProductCard.astro"),
2085
+ dest: "src/custom/ProductCard.astro",
2086
+ protected: !0
2087
+ },
2011
2088
  {
2012
2089
  src: t(
2013
2090
  "../templates/custom/with-examples/pages/Collections.astro"
@@ -2022,12 +2099,12 @@ async function w(t, e, c) {
2022
2099
  }
2023
2100
  ] : []
2024
2101
  ];
2025
- for (const s of n)
2102
+ for (const s of o)
2026
2103
  try {
2027
2104
  const p = i(s.dest);
2028
2105
  r(p) || x(p, { recursive: !0 });
2029
- const o = !s.protected && (s.dest === "tailwind.config.cjs" || s.dest.startsWith("src/components/codehooks/") || s.dest.startsWith("src/components/widgets/") || s.dest.startsWith("src/") || s.dest === ".gitignore");
2030
- if (!r(s.dest) || o)
2106
+ const n = !s.protected && (s.dest === "tailwind.config.cjs" || s.dest.startsWith("src/components/codehooks/") || s.dest.startsWith("src/components/widgets/") || s.dest.startsWith("src/") || s.dest.startsWith("public/client/") || s.dest === ".gitignore");
2107
+ if (!r(s.dest) || n)
2031
2108
  if (r(s.src))
2032
2109
  k(s.src, s.dest), e.info(`Updated ${s.dest}`);
2033
2110
  else {
@@ -2036,8 +2113,8 @@ async function w(t, e, c) {
2036
2113
  }
2037
2114
  else s.protected ? e.info(`Protected: ${s.dest} (skipped overwrite)`) : e.info(`Skipped existing ${s.dest}`);
2038
2115
  } catch (p) {
2039
- const o = p instanceof Error ? p.message : String(p);
2040
- e.error(`Failed to create ${s.dest}: ${o}`);
2116
+ const n = p instanceof Error ? p.message : String(p);
2117
+ e.error(`Failed to create ${s.dest}: ${n}`);
2041
2118
  }
2042
2119
  }
2043
2120
  function _(t) {
@@ -2051,12 +2128,12 @@ export default function Placeholder() {
2051
2128
  }` : t.endsWith(".ts") ? `// TractStack placeholder utility
2052
2129
  export const placeholder = "${t}";` : `# TractStack placeholder: ${t}`;
2053
2130
  }
2054
- function S(t = {}) {
2131
+ function C(t = {}) {
2055
2132
  const { resolve: e } = b(import.meta.url);
2056
2133
  return {
2057
2134
  name: "astro-tractstack",
2058
2135
  hooks: {
2059
- "astro:config:setup": async ({ config: c, updateConfig: n, logger: s }) => {
2136
+ "astro:config:setup": async ({ config: c, updateConfig: o, logger: s }) => {
2060
2137
  g(t, s);
2061
2138
  const p = t.enableMultiTenant || !1;
2062
2139
  if (s.info(
@@ -2076,7 +2153,7 @@ function S(t = {}) {
2076
2153
  ), new Error(
2077
2154
  "TractStack requires an SSR adapter. Please add @astrojs/node adapter to your astro.config.mjs"
2078
2155
  );
2079
- n({
2156
+ o({
2080
2157
  vite: {
2081
2158
  define: {
2082
2159
  __TRACTSTACK_VERSION__: JSON.stringify("2.0.0-alpha.1"),
@@ -2133,5 +2210,5 @@ function S(t = {}) {
2133
2210
  };
2134
2211
  }
2135
2212
  export {
2136
- S as default
2213
+ C as default
2137
2214
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-tractstack",
3
- "version": "2.0.0-rc.8",
3
+ "version": "2.0.0",
4
4
  "description": "Astro integration for TractStack - redeeming the web from boring experiences",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "go"
35
35
  ],
36
36
  "author": "AtRiskMedia",
37
- "license": "FSL-1.1-MIT",
37
+ "license": "MIT",
38
38
  "repository": {
39
39
  "type": "git",
40
40
  "url": "git+https://github.com/AtRiskMedia/astro-tractstack.git"
@@ -52,10 +52,10 @@
52
52
  "prompts": "^2.4.2"
53
53
  },
54
54
  "devDependencies": {
55
- "@ark-ui/react": "^5.21.0",
55
+ "@ark-ui/react": "^5.26.0",
56
56
  "@astrojs/react": "^3.6.3",
57
57
  "@heroicons/react": "^2.1.1",
58
- "@internationalized/date": "3.8.2",
58
+ "@internationalized/date": "^3.10.0",
59
59
  "@mhsdesign/jit-browser-tailwindcss": "^0.4.2",
60
60
  "@nanostores/persistent": "^1.1.0",
61
61
  "@nanostores/react": "^1.0.0",
@@ -85,5 +85,10 @@
85
85
  "engines": {
86
86
  "node": ">=18.14.1"
87
87
  },
88
- "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
88
+ "packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0",
89
+ "pnpm": {
90
+ "overrides": {
91
+ "esbuild@<=0.24.2": ">=0.25.0"
92
+ }
93
+ }
89
94
  }