astro-tractstack 2.0.14 → 2.0.16
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/dist/index.js +41 -9
- package/package.json +1 -1
- package/templates/custom/with-examples/CodeHook.astro +4 -0
- package/templates/custom/with-examples/SandboxLauncher.tsx +65 -0
- package/templates/env.example +3 -0
- package/templates/src/components/codehooks/SandboxAuthWrapper.tsx +75 -0
- package/templates/src/components/codehooks/SandboxRegisterForm.tsx +202 -0
- package/templates/src/components/compositor/Compositor.tsx +2 -0
- package/templates/src/components/compositor/Node.tsx +27 -9
- package/templates/src/components/compositor/nodes/Pane_DesignLibrary.tsx +13 -11
- package/templates/src/components/compositor/nodes/Pane_layout.tsx +16 -14
- package/templates/src/components/edit/Header.tsx +8 -2
- package/templates/src/components/edit/PanelSwitch.tsx +4 -4
- package/templates/src/components/edit/pane/AddPanePanel.tsx +3 -0
- package/templates/src/components/edit/pane/AddPanePanel_new.tsx +463 -561
- package/templates/src/components/edit/pane/steps/AiDesignStep.tsx +140 -0
- package/templates/src/components/edit/pane/steps/CopyInputStep.tsx +105 -0
- package/templates/src/components/edit/pane/steps/DesignLibraryStep.tsx +395 -0
- package/templates/src/components/edit/panels/StyleImagePanel.tsx +10 -8
- package/templates/src/components/edit/state/SaveModal.tsx +41 -0
- package/templates/src/constants/prompts.json +3 -1
- package/templates/src/pages/api/sandbox.ts +86 -0
- package/templates/src/pages/sandbox.astro +137 -0
- package/templates/src/types/nodeProps.ts +1 -0
- package/templates/src/utils/compositor/aiPaneParser.ts +32 -84
- package/templates/src/utils/compositor/designLibraryHelper.ts +87 -2
- package/templates/src/utils/profileStorage.ts +13 -0
- package/utils/inject-files.ts +41 -10
- package/templates/src/components/edit/pane/AiPaneGenerator.tsx +0 -575
- package/templates/src/components/edit/pane/AiPanePreview.tsx +0 -107
- package/templates/src/components/edit/pane/PageGen.tsx +0 -485
- package/templates/src/components/edit/pane/PageGenSelector.tsx +0 -245
- package/templates/src/components/edit/pane/PageGenSpecial.tsx +0 -339
- package/templates/src/utils/aai/getTitleSlug.ts +0 -72
|
@@ -52,10 +52,6 @@ const PanelSwitch = ({
|
|
|
52
52
|
}: SettingsPanelProps) => {
|
|
53
53
|
const signal = useStore(settingsPanelStore);
|
|
54
54
|
|
|
55
|
-
if (!signal) {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
55
|
useEffect(() => {
|
|
60
56
|
if (signal?.action && onTitleChange) {
|
|
61
57
|
const title = getSettingsPanelTitle(signal.action);
|
|
@@ -63,6 +59,10 @@ const PanelSwitch = ({
|
|
|
63
59
|
}
|
|
64
60
|
}, [signal?.action, onTitleChange]);
|
|
65
61
|
|
|
62
|
+
if (!signal) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
const ctx = getCtx();
|
|
67
67
|
const allNodes = ctx.allNodes.get();
|
|
68
68
|
const clickedNode = allNodes.get(signal.nodeId) as FlatNode | undefined;
|
|
@@ -16,6 +16,7 @@ interface AddPanePanelProps {
|
|
|
16
16
|
isStoryFragment?: boolean;
|
|
17
17
|
isContextPane?: boolean;
|
|
18
18
|
config?: BrandConfig;
|
|
19
|
+
isSandboxMode?: boolean;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
const AddPanePanel = ({
|
|
@@ -25,6 +26,7 @@ const AddPanePanel = ({
|
|
|
25
26
|
isStoryFragment = false,
|
|
26
27
|
isContextPane = false,
|
|
27
28
|
config,
|
|
29
|
+
isSandboxMode = false,
|
|
28
30
|
}: AddPanePanelProps) => {
|
|
29
31
|
const [reset, setReset] = useState(false);
|
|
30
32
|
const lookup = first ? `${nodeId}-0` : nodeId;
|
|
@@ -66,6 +68,7 @@ const AddPanePanel = ({
|
|
|
66
68
|
isStoryFragment={isStoryFragment}
|
|
67
69
|
isContextPane={isContextPane}
|
|
68
70
|
config={config!}
|
|
71
|
+
isSandboxMode={isSandboxMode}
|
|
69
72
|
/>
|
|
70
73
|
) : mode === PaneAddMode.BREAK && !isContextPane ? (
|
|
71
74
|
<AddPaneBreakPanel
|