astro-tractstack 2.0.32 → 2.0.33
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/package.json
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
setViewportMode,
|
|
15
15
|
settingsPanelStore,
|
|
16
16
|
pendingHomePageSlugStore,
|
|
17
|
+
saasModalOpenStore,
|
|
17
18
|
} from '@/stores/storykeep';
|
|
18
19
|
import { getCtx, ROOT_NODE_NAME } from '@/stores/nodes';
|
|
19
20
|
import SaveModal from '@/components/edit/state/SaveModal';
|
|
@@ -48,7 +49,11 @@ const StoryKeepHeader = ({
|
|
|
48
49
|
}, [ctx.history]);
|
|
49
50
|
|
|
50
51
|
const handleSave = () => {
|
|
51
|
-
|
|
52
|
+
if (isSandboxMode) {
|
|
53
|
+
saasModalOpenStore.set(true);
|
|
54
|
+
} else {
|
|
55
|
+
setShowSaveModal(true);
|
|
56
|
+
}
|
|
52
57
|
};
|
|
53
58
|
|
|
54
59
|
const handleCloseSaveModal = () => {
|
|
@@ -167,7 +172,7 @@ const StoryKeepHeader = ({
|
|
|
167
172
|
</div>
|
|
168
173
|
)}
|
|
169
174
|
|
|
170
|
-
{shouldShowSave &&
|
|
175
|
+
{shouldShowSave && (
|
|
171
176
|
<div className="flex flex-wrap items-center justify-center gap-2 text-sm">
|
|
172
177
|
<button
|
|
173
178
|
onClick={handleSave}
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
import { DirectInjectStep } from './steps/DirectInjectStep';
|
|
24
24
|
import BooleanToggle from '@/components/form/BooleanToggle';
|
|
25
25
|
import EnumSelect from '@/components/form/EnumSelect';
|
|
26
|
+
import type { StoryFragmentNode } from '@/types/compositorTypes';
|
|
26
27
|
|
|
27
28
|
type Step =
|
|
28
29
|
| 'initial'
|
|
@@ -306,8 +307,12 @@ const AddPaneNewPanel = ({
|
|
|
306
307
|
first ? 'before' : 'after'
|
|
307
308
|
);
|
|
308
309
|
});
|
|
309
|
-
|
|
310
|
+
const storyFragment = cloneDeep(
|
|
311
|
+
ctx.allNodes.get().get(ownerId)
|
|
312
|
+
) as StoryFragmentNode;
|
|
313
|
+
ctx.modifyNodes([{ ...storyFragment, isChanged: true }]);
|
|
310
314
|
}
|
|
315
|
+
ctx.notifyNode(`root`);
|
|
311
316
|
setParentMode(PaneAddMode.DEFAULT, false);
|
|
312
317
|
} catch (err) {
|
|
313
318
|
console.error('Error inserting template:', err);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { APIRoute } from '@/types/astro';
|
|
2
2
|
|
|
3
3
|
export const POST: APIRoute = async ({ request }) => {
|
|
4
|
-
console.log(1);
|
|
5
4
|
const goBackend =
|
|
6
5
|
import.meta.env.PUBLIC_GO_BACKEND || 'http://localhost:8080';
|
|
7
6
|
const sharedSecret = import.meta.env.PRIVATE_SANDBOX_SECRET;
|
|
@@ -9,9 +8,6 @@ export const POST: APIRoute = async ({ request }) => {
|
|
|
9
8
|
request.headers.get('X-Tenant-ID') ||
|
|
10
9
|
import.meta.env.PUBLIC_TENANTID ||
|
|
11
10
|
'default';
|
|
12
|
-
console.log(goBackend);
|
|
13
|
-
console.log(sharedSecret);
|
|
14
|
-
console.log(tenantId);
|
|
15
11
|
|
|
16
12
|
if (!sharedSecret || sharedSecret === 'false' || sharedSecret === 'true') {
|
|
17
13
|
return new Response(
|
|
@@ -35,12 +31,10 @@ export const POST: APIRoute = async ({ request }) => {
|
|
|
35
31
|
{ status: 403, headers: { 'Content-Type': 'application/json' } }
|
|
36
32
|
);
|
|
37
33
|
}
|
|
38
|
-
console.log(profileCookie);
|
|
39
34
|
|
|
40
35
|
try {
|
|
41
36
|
const body = await request.json();
|
|
42
37
|
const { action, payload } = body;
|
|
43
|
-
console.log(action, payload);
|
|
44
38
|
|
|
45
39
|
if (action !== 'askLemur') {
|
|
46
40
|
return new Response(
|
|
@@ -4,7 +4,9 @@ import Layout from '@/layouts/Layout.astro';
|
|
|
4
4
|
import Header from '@/components/Header.astro';
|
|
5
5
|
import { getFullContentMap } from '@/stores/analytics';
|
|
6
6
|
import { getBrandConfig } from '@/utils/api/brandConfig';
|
|
7
|
-
import {
|
|
7
|
+
import CodeHook, {
|
|
8
|
+
components as codeHookComponents,
|
|
9
|
+
} from '@/custom/CodeHook.astro';
|
|
8
10
|
import StoryKeepHeader from '@/components/edit/Header';
|
|
9
11
|
import StoryKeepToolBar from '@/components/edit/ToolBar';
|
|
10
12
|
import StoryKeepToolMode from '@/components/edit/ToolMode';
|
|
@@ -62,6 +64,16 @@ const hasProfile = Astro.request.headers
|
|
|
62
64
|
isEditor={true}
|
|
63
65
|
>
|
|
64
66
|
<SandboxAuthWrapper client:load isServerSideAuthenticated={!!hasProfile} />
|
|
67
|
+
|
|
68
|
+
<CodeHook
|
|
69
|
+
target="get-tractstack"
|
|
70
|
+
options={{
|
|
71
|
+
params: {
|
|
72
|
+
options: JSON.stringify({ isEmbedded: false }),
|
|
73
|
+
},
|
|
74
|
+
}}
|
|
75
|
+
/>
|
|
76
|
+
|
|
65
77
|
<Header
|
|
66
78
|
title={title}
|
|
67
79
|
slug="sandbox"
|