@nodehive/nextjs 0.6.1 → 0.7.1
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/README.md +9 -0
- package/dist/puck-editor/index.d.ts +1 -1
- package/dist/puck-editor/index.js +1 -1
- package/dist/puck-editor/index.js.map +1 -1
- package/dist/puck-editor/internal/api/client.d.ts +4 -4
- package/dist/puck-editor/internal/api/client.js +14 -6
- package/dist/puck-editor/internal/api/client.js.map +1 -1
- package/dist/puck-editor/internal/api/create-puck-api.js +1 -1
- package/dist/puck-editor/internal/api/create-puck-api.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/template.d.ts +1 -1
- package/dist/puck-editor/internal/api/handlers/template.js +16 -4
- package/dist/puck-editor/internal/api/handlers/template.js.map +1 -1
- package/dist/puck-editor/internal/api/handlers/upload.js +6 -3
- package/dist/puck-editor/internal/api/handlers/upload.js.map +1 -1
- package/dist/puck-editor/internal/api/media-upload.d.ts +2 -2
- package/dist/puck-editor/internal/api/media-upload.js +6 -1
- package/dist/puck-editor/internal/api/media-upload.js.map +1 -1
- package/dist/puck-editor/internal/editor/puck-editor.js +2 -3
- package/dist/puck-editor/internal/editor/puck-editor.js.map +1 -1
- package/dist/puck-editor/internal/editor-config.d.ts +5 -2
- package/dist/puck-editor/internal/editor-config.js +32 -26
- package/dist/puck-editor/internal/editor-config.js.map +1 -1
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js +323 -290
- package/dist/puck-editor/internal/fields/link-picker/link-picker-control.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js +3 -2
- package/dist/puck-editor/internal/fields/media-selector/image-upload-form.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js +3 -4
- package/dist/puck-editor/internal/fields/media-selector/media-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js +118 -101
- package/dist/puck-editor/internal/fields/media-selector/use-media-library.js.map +1 -1
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js +3 -2
- package/dist/puck-editor/internal/fields/media-selector/video-upload-form.js.map +1 -1
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.d.ts +21 -13
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js +9 -35
- package/dist/puck-editor/internal/fields/node-selector/create-node-selector-field.js.map +1 -1
- package/dist/puck-editor/internal/fields/node-selector/node-selector-field.d.ts +12 -0
- package/dist/puck-editor/internal/fields/node-selector/node-selector-field.js +56 -0
- package/dist/puck-editor/internal/fields/node-selector/node-selector-field.js.map +1 -0
- package/dist/puck-editor/internal/locale.d.ts +2 -6
- package/dist/puck-editor/internal/locale.js +6 -8
- package/dist/puck-editor/internal/locale.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js +4 -4
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-bridge.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.d.ts +1 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js +0 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/agent-plugin.js.map +1 -1
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.d.ts +2 -2
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js +7 -7
- package/dist/puck-editor/internal/plugins/agent-plugin/templates.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js +3 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/template-form.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.d.ts +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js +3 -3
- package/dist/puck-editor/internal/plugins/templates-plugin/templates.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js +32 -37
- package/dist/puck-editor/internal/plugins/templates-plugin/use-template-dnd.js.map +1 -1
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js +95 -72
- package/dist/puck-editor/internal/plugins/templates-plugin/use-templates.js.map +1 -1
- package/dist/puck-editor/internal/puck-wrapper.d.ts +1 -1
- package/dist/puck-editor/internal/puck-wrapper.js +89 -83
- package/dist/puck-editor/internal/puck-wrapper.js.map +1 -1
- package/dist/puck-editor/internal/use-puck-overlay.d.ts +3 -2
- package/dist/puck-editor/internal/use-puck-overlay.js +67 -56
- package/dist/puck-editor/internal/use-puck-overlay.js.map +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
4
4
|
import { useRef } from 'react';
|
|
5
5
|
import { useQuery } from '@tanstack/react-query';
|
|
6
6
|
import { toast } from 'sonner';
|
|
7
|
-
import { useBuiltinTemplates, usePuckContentModel, usePuckPropTransforms } from "../../editor-config.js";
|
|
7
|
+
import { useBuiltinTemplates, usePuckContentLocale, usePuckContentModel, usePuckPropTransforms } from "../../editor-config.js";
|
|
8
8
|
import { TEMPLATES_QUERY_KEY } from "../../editor-query-client.js";
|
|
9
9
|
import { usePuckDictionary, usePuckLocale } from "../../i18n.js";
|
|
10
10
|
import { appendComponents } from "../../utils.js";
|
|
@@ -17,30 +17,25 @@ export function useTemplateDnd(config) {
|
|
|
17
17
|
const t = usePuckDictionary().templates;
|
|
18
18
|
const locale = usePuckLocale();
|
|
19
19
|
const templatesConfig = usePuckContentModel().templates;
|
|
20
|
+
const contentLocale = usePuckContentLocale();
|
|
20
21
|
const builtins = useBuiltinTemplates();
|
|
21
22
|
const propTransforms = usePuckPropTransforms();
|
|
22
23
|
let t0;
|
|
23
|
-
if ($[0]
|
|
24
|
-
t0 =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
t0 = $[0];
|
|
28
|
-
}
|
|
29
|
-
let t1;
|
|
30
|
-
if ($[1] !== templatesConfig) {
|
|
31
|
-
t1 = {
|
|
32
|
-
queryKey: t0,
|
|
33
|
-
queryFn: () => fetchTemplates(templatesConfig)
|
|
24
|
+
if ($[0] !== contentLocale || $[1] !== templatesConfig) {
|
|
25
|
+
t0 = {
|
|
26
|
+
queryKey: [...TEMPLATES_QUERY_KEY, contentLocale, templatesConfig],
|
|
27
|
+
queryFn: () => fetchTemplates(templatesConfig, contentLocale)
|
|
34
28
|
};
|
|
29
|
+
$[0] = contentLocale;
|
|
35
30
|
$[1] = templatesConfig;
|
|
36
|
-
$[2] =
|
|
31
|
+
$[2] = t0;
|
|
37
32
|
} else {
|
|
38
|
-
|
|
33
|
+
t0 = $[2];
|
|
39
34
|
}
|
|
40
35
|
const {
|
|
41
36
|
data
|
|
42
|
-
} = useQuery(
|
|
43
|
-
let
|
|
37
|
+
} = useQuery(t0);
|
|
38
|
+
let t1;
|
|
44
39
|
let templates;
|
|
45
40
|
if ($[3] !== builtins || $[4] !== config || $[5] !== data?.valid || $[6] !== locale) {
|
|
46
41
|
templates = mergeTemplates(builtins, data?.valid ?? []);
|
|
@@ -51,32 +46,32 @@ export function useTemplateDnd(config) {
|
|
|
51
46
|
...buildTemplateVehicles(templates, locale)
|
|
52
47
|
}
|
|
53
48
|
};
|
|
54
|
-
|
|
49
|
+
t1 = applyVehicleSlotConstraints(withVehicles, rootLevelVehicleTypes(templates));
|
|
55
50
|
$[3] = builtins;
|
|
56
51
|
$[4] = config;
|
|
57
52
|
$[5] = data?.valid;
|
|
58
53
|
$[6] = locale;
|
|
59
|
-
$[7] =
|
|
54
|
+
$[7] = t1;
|
|
60
55
|
$[8] = templates;
|
|
61
56
|
} else {
|
|
62
|
-
|
|
57
|
+
t1 = $[7];
|
|
63
58
|
templates = $[8];
|
|
64
59
|
}
|
|
65
|
-
const configWithTemplates =
|
|
60
|
+
const configWithTemplates = t1;
|
|
66
61
|
const dispatchRef = useRef(null);
|
|
67
|
-
let
|
|
62
|
+
let t2;
|
|
68
63
|
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
|
-
|
|
64
|
+
t2 = dispatch => {
|
|
70
65
|
dispatchRef.current = dispatch;
|
|
71
66
|
};
|
|
72
|
-
$[9] =
|
|
67
|
+
$[9] = t2;
|
|
73
68
|
} else {
|
|
74
|
-
|
|
69
|
+
t2 = $[9];
|
|
75
70
|
}
|
|
76
|
-
const captureDispatch =
|
|
77
|
-
let
|
|
71
|
+
const captureDispatch = t2;
|
|
72
|
+
let t3;
|
|
78
73
|
if ($[10] !== config || $[11] !== locale || $[12] !== propTransforms || $[13] !== t || $[14] !== templates) {
|
|
79
|
-
|
|
74
|
+
t3 = action => {
|
|
80
75
|
if (action.type !== "insert") {
|
|
81
76
|
return;
|
|
82
77
|
}
|
|
@@ -112,8 +107,8 @@ export function useTemplateDnd(config) {
|
|
|
112
107
|
;
|
|
113
108
|
try {
|
|
114
109
|
expanded = expandTemplate(template, config, templateLabel(template, locale), propTransforms);
|
|
115
|
-
} catch (
|
|
116
|
-
const error =
|
|
110
|
+
} catch (t4) {
|
|
111
|
+
const error = t4;
|
|
117
112
|
console.error("Failed to expand template:", error);
|
|
118
113
|
removeVehicle();
|
|
119
114
|
toast.error(t.insertFailed);
|
|
@@ -131,24 +126,24 @@ export function useTemplateDnd(config) {
|
|
|
131
126
|
$[12] = propTransforms;
|
|
132
127
|
$[13] = t;
|
|
133
128
|
$[14] = templates;
|
|
134
|
-
$[15] =
|
|
129
|
+
$[15] = t3;
|
|
135
130
|
} else {
|
|
136
|
-
|
|
131
|
+
t3 = $[15];
|
|
137
132
|
}
|
|
138
|
-
const onAction =
|
|
139
|
-
let
|
|
133
|
+
const onAction = t3;
|
|
134
|
+
let t4;
|
|
140
135
|
if ($[16] !== configWithTemplates || $[17] !== onAction) {
|
|
141
|
-
|
|
136
|
+
t4 = {
|
|
142
137
|
configWithTemplates,
|
|
143
138
|
onAction,
|
|
144
139
|
captureDispatch
|
|
145
140
|
};
|
|
146
141
|
$[16] = configWithTemplates;
|
|
147
142
|
$[17] = onAction;
|
|
148
|
-
$[18] =
|
|
143
|
+
$[18] = t4;
|
|
149
144
|
} else {
|
|
150
|
-
|
|
145
|
+
t4 = $[18];
|
|
151
146
|
}
|
|
152
|
-
return
|
|
147
|
+
return t4;
|
|
153
148
|
}
|
|
154
149
|
//# sourceMappingURL=use-template-dnd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-template-dnd.js","names":["c","_c","useRef","useQuery","toast","useBuiltinTemplates","usePuckContentModel","usePuckPropTransforms","TEMPLATES_QUERY_KEY","usePuckDictionary","usePuckLocale","appendComponents","ROOT_ZONE","applyVehicleSlotConstraints","buildTemplateVehicles","rootLevelVehicleTypes","TEMPLATE_PREFIX","expandTemplate","fetchTemplates","isRootLevelTemplate","mergeTemplates","templateKey","templateLabel","useTemplateDnd","config","$","t","templates","locale","templatesConfig","builtins","propTransforms","t0","
|
|
1
|
+
{"version":3,"file":"use-template-dnd.js","names":["c","_c","useRef","useQuery","toast","useBuiltinTemplates","usePuckContentLocale","usePuckContentModel","usePuckPropTransforms","TEMPLATES_QUERY_KEY","usePuckDictionary","usePuckLocale","appendComponents","ROOT_ZONE","applyVehicleSlotConstraints","buildTemplateVehicles","rootLevelVehicleTypes","TEMPLATE_PREFIX","expandTemplate","fetchTemplates","isRootLevelTemplate","mergeTemplates","templateKey","templateLabel","useTemplateDnd","config","$","t","templates","locale","templatesConfig","contentLocale","builtins","propTransforms","t0","queryKey","queryFn","data","t1","valid","withVehicles","components","configWithTemplates","dispatchRef","t2","Symbol","for","dispatch","current","captureDispatch","t3","action","type","componentType","startsWith","dispatch_0","zone","destinationZone","index","destinationIndex","key","slice","length","setTimeout","removeVehicle","template","find","tpl","error","unavailable","isRootZone","wrongZone","expanded","t4","console","insertFailed","content","skipped","warning","partiallyInserted","replace","String","onAction"],"sources":["../../../../../src/puck-editor/internal/plugins/templates-plugin/use-template-dnd.ts"],"sourcesContent":["'use client';\n\nimport { useRef } from 'react';\nimport { Config, PuckAction } from '@puckeditor/core';\nimport { useQuery } from '@tanstack/react-query';\nimport { toast } from 'sonner';\n\nimport {\n useBuiltinTemplates,\n usePuckContentLocale,\n usePuckContentModel,\n usePuckPropTransforms,\n} from '../../editor-config.tsx';\nimport { TEMPLATES_QUERY_KEY } from '../../editor-query-client.ts';\nimport { usePuckDictionary, usePuckLocale } from '../../i18n.tsx';\nimport { appendComponents } from '../../utils.ts';\nimport { ROOT_ZONE } from '../outline-plugin/outline-tree.ts';\nimport { applyVehicleSlotConstraints } from './apply-vehicle-slot-constraints.ts';\nimport {\n buildTemplateVehicles,\n rootLevelVehicleTypes,\n TEMPLATE_PREFIX,\n} from './template-vehicles.ts';\nimport {\n expandTemplate,\n fetchTemplates,\n isRootLevelTemplate,\n mergeTemplates,\n templateKey,\n templateLabel,\n} from './templates.ts';\n\ntype Dispatch = (action: PuckAction) => void;\n\nexport function useTemplateDnd(config: Config) {\n const t = usePuckDictionary().templates;\n const locale = usePuckLocale();\n const templatesConfig = usePuckContentModel().templates;\n const contentLocale = usePuckContentLocale();\n const builtins = useBuiltinTemplates();\n const propTransforms = usePuckPropTransforms();\n const { data } = useQuery({\n queryKey: [...TEMPLATES_QUERY_KEY, contentLocale, templatesConfig],\n queryFn: () => fetchTemplates(templatesConfig, contentLocale),\n });\n const templates = mergeTemplates(builtins, data?.valid ?? []);\n\n const withVehicles = {\n ...config,\n components: {\n ...config.components,\n ...buildTemplateVehicles(templates, locale),\n },\n };\n const configWithTemplates = applyVehicleSlotConstraints(\n withVehicles,\n rootLevelVehicleTypes(templates)\n );\n\n const dispatchRef = useRef<Dispatch | null>(null);\n const captureDispatch = (dispatch: Dispatch) => {\n dispatchRef.current = dispatch;\n };\n\n const onAction = (action: PuckAction) => {\n if (action.type !== 'insert') return;\n if (!action.componentType.startsWith(TEMPLATE_PREFIX)) return;\n\n const dispatch = dispatchRef.current;\n if (!dispatch) return;\n\n const zone = action.destinationZone;\n const index = action.destinationIndex;\n const key = action.componentType.slice(TEMPLATE_PREFIX.length);\n\n // onAction runs inside Puck's dispatch cycle; re-entrant dispatch is\n // swallowed, so defer the swap to the next tick.\n setTimeout(() => {\n const removeVehicle = () => dispatch({ type: 'remove', zone, index });\n const template = templates.find((tpl) => templateKey(tpl) === key);\n\n if (!template) {\n removeVehicle();\n toast.error(t.unavailable);\n return;\n }\n\n const isRootZone = zone === ROOT_ZONE;\n if (isRootLevelTemplate(template) !== isRootZone) {\n removeVehicle();\n toast.error(t.wrongZone);\n return;\n }\n\n let expanded;\n try {\n expanded = expandTemplate(\n template,\n config,\n templateLabel(template, locale),\n propTransforms\n );\n } catch (error) {\n console.error('Failed to expand template:', error);\n removeVehicle();\n toast.error(t.insertFailed);\n return;\n }\n\n removeVehicle();\n appendComponents(dispatch, zone, index, expanded.content);\n\n if (expanded.skipped > 0) {\n toast.warning(\n t.partiallyInserted\n .replace('{skipped}', String(expanded.skipped))\n .replace(\n '{total}',\n String(expanded.content.length + expanded.skipped)\n )\n );\n }\n }, 0);\n };\n\n return { configWithTemplates, onAction, captureDispatch };\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,MAAM,QAAQ,OAAO;AAE9B,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,KAAK,QAAQ,QAAQ;AAE9B,SACEC,mBAAmB,EACnBC,oBAAoB,EACpBC,mBAAmB,EACnBC,qBAAqB,QAChB,wBAAyB;AAChC,SAASC,mBAAmB,QAAQ,8BAA8B;AAClE,SAASC,iBAAiB,EAAEC,aAAa,QAAQ,eAAgB;AACjE,SAASC,gBAAgB,QAAQ,gBAAgB;AACjD,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,SAASC,2BAA2B,QAAQ,qCAAqC;AACjF,SACEC,qBAAqB,EACrBC,qBAAqB,EACrBC,eAAe,QACV,wBAAwB;AAC/B,SACEC,cAAc,EACdC,cAAc,EACdC,mBAAmB,EACnBC,cAAc,EACdC,WAAW,EACXC,aAAa,QACR,gBAAgB;AAIvB,OAAO,SAAAC,eAAAC,MAAA;EAAA,MA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W,EAAEC,MAAM,CAACT,QAAQ,CAAAK,OAAQ,CAAC,CAAC,CAAAG,OACvC,CACN,SAAS,EACTC,MAAM,CAACT,QAAQ,CAAAI,OAAQ,CAAAd,MAAO,GAAGU,QAAQ,CAAAK,OAAQ,CACnD,CACJ,CAAC;QAAA;MACF,CACF,EAAE,CAAC,CAAC;IAAA,CACN;IAAAnD,CAAA,OAAAD,MAAA;IAAAC,CAAA,OAAAG,MAAA;IAAAH,CAAA,OAAAO,cAAA;IAAAP,CAAA,OAAAC,CAAA;IAAAD,CAAA,OAAAE,SAAA;IAAAF,CAAA,OAAAwB,EAAA;EAAA;IAAAA,EAAA,GAAAxB,CAAA;EAAA;EA3DD,MAAAwD,QAAA,GAAiBhC,EA2DhB;EAAC,IAAAuB,EAAA;EAAA,IAAA/C,CAAA,SAAAgB,mBAAA,IAAAhB,CAAA,SAAAwD,QAAA;IAEKT,EAAA;MAAA/B,mBAAA;MAAAwC,QAAA;MAAAjC;IAAiD,CAAC;IAAAvB,CAAA,OAAAgB,mBAAA;IAAAhB,CAAA,OAAAwD,QAAA;IAAAxD,CAAA,OAAA+C,EAAA;EAAA;IAAAA,EAAA,GAAA/C,CAAA;EAAA;EAAA,OAAlD+C,EAAkD;AAAA","ignoreList":[]}
|
|
@@ -3,73 +3,94 @@
|
|
|
3
3
|
import { c as _c } from "react/compiler-runtime";
|
|
4
4
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
5
5
|
import { deleteTemplate, updateTemplate } from "../../api/client.js";
|
|
6
|
-
import { useBuiltinTemplates, usePuckContentModel } from "../../editor-config.js";
|
|
6
|
+
import { useBuiltinTemplates, usePuckContentLocale, usePuckContentModel } from "../../editor-config.js";
|
|
7
7
|
import { TEMPLATES_QUERY_KEY } from "../../editor-query-client.js";
|
|
8
8
|
import { fetchTemplates, mergeTemplates } from "./templates.js";
|
|
9
|
-
const QUERY_KEY = [...TEMPLATES_QUERY_KEY];
|
|
10
9
|
export function useTemplates() {
|
|
11
|
-
const $ = _c(
|
|
10
|
+
const $ = _c(36);
|
|
12
11
|
const queryClient = useQueryClient();
|
|
12
|
+
const contentLocale = usePuckContentLocale();
|
|
13
13
|
const templatesConfig = usePuckContentModel().templates;
|
|
14
14
|
const builtins = useBuiltinTemplates();
|
|
15
15
|
let t0;
|
|
16
|
-
if ($[0] !== templatesConfig) {
|
|
17
|
-
t0 =
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
if ($[0] !== contentLocale || $[1] !== templatesConfig) {
|
|
17
|
+
t0 = [...TEMPLATES_QUERY_KEY, contentLocale, templatesConfig];
|
|
18
|
+
$[0] = contentLocale;
|
|
19
|
+
$[1] = templatesConfig;
|
|
20
|
+
$[2] = t0;
|
|
21
|
+
} else {
|
|
22
|
+
t0 = $[2];
|
|
23
|
+
}
|
|
24
|
+
const queryKey = t0;
|
|
25
|
+
let t1;
|
|
26
|
+
if ($[3] !== contentLocale || $[4] !== templatesConfig) {
|
|
27
|
+
t1 = () => fetchTemplates(templatesConfig, contentLocale);
|
|
28
|
+
$[3] = contentLocale;
|
|
29
|
+
$[4] = templatesConfig;
|
|
30
|
+
$[5] = t1;
|
|
31
|
+
} else {
|
|
32
|
+
t1 = $[5];
|
|
33
|
+
}
|
|
34
|
+
let t2;
|
|
35
|
+
if ($[6] !== queryKey || $[7] !== t1) {
|
|
36
|
+
t2 = {
|
|
37
|
+
queryKey,
|
|
38
|
+
queryFn: t1
|
|
20
39
|
};
|
|
21
|
-
$[
|
|
22
|
-
$[
|
|
40
|
+
$[6] = queryKey;
|
|
41
|
+
$[7] = t1;
|
|
42
|
+
$[8] = t2;
|
|
23
43
|
} else {
|
|
24
|
-
|
|
44
|
+
t2 = $[8];
|
|
25
45
|
}
|
|
26
46
|
const {
|
|
27
47
|
data,
|
|
28
48
|
isLoading,
|
|
29
49
|
isError,
|
|
30
50
|
refetch
|
|
31
|
-
} = useQuery(
|
|
32
|
-
let
|
|
33
|
-
if ($[
|
|
34
|
-
|
|
35
|
-
$[
|
|
36
|
-
$[
|
|
51
|
+
} = useQuery(t2);
|
|
52
|
+
let t3;
|
|
53
|
+
if ($[9] !== data?.valid) {
|
|
54
|
+
t3 = data?.valid ?? [];
|
|
55
|
+
$[9] = data?.valid;
|
|
56
|
+
$[10] = t3;
|
|
37
57
|
} else {
|
|
38
|
-
|
|
58
|
+
t3 = $[10];
|
|
39
59
|
}
|
|
40
|
-
let
|
|
41
|
-
if ($[
|
|
42
|
-
|
|
43
|
-
$[
|
|
44
|
-
$[
|
|
45
|
-
$[
|
|
60
|
+
let t4;
|
|
61
|
+
if ($[11] !== builtins || $[12] !== t3) {
|
|
62
|
+
t4 = mergeTemplates(builtins, t3);
|
|
63
|
+
$[11] = builtins;
|
|
64
|
+
$[12] = t3;
|
|
65
|
+
$[13] = t4;
|
|
46
66
|
} else {
|
|
47
|
-
|
|
67
|
+
t4 = $[13];
|
|
48
68
|
}
|
|
49
|
-
const templates =
|
|
50
|
-
let
|
|
51
|
-
if ($[
|
|
52
|
-
|
|
53
|
-
$[
|
|
54
|
-
$[
|
|
69
|
+
const templates = t4;
|
|
70
|
+
let t5;
|
|
71
|
+
if ($[14] !== data?.broken) {
|
|
72
|
+
t5 = data?.broken ?? [];
|
|
73
|
+
$[14] = data?.broken;
|
|
74
|
+
$[15] = t5;
|
|
55
75
|
} else {
|
|
56
|
-
|
|
76
|
+
t5 = $[15];
|
|
57
77
|
}
|
|
58
|
-
const brokenTemplates =
|
|
59
|
-
let
|
|
60
|
-
if ($[
|
|
61
|
-
|
|
62
|
-
queryKey
|
|
78
|
+
const brokenTemplates = t5;
|
|
79
|
+
let t6;
|
|
80
|
+
if ($[16] !== queryClient || $[17] !== queryKey) {
|
|
81
|
+
t6 = () => queryClient.invalidateQueries({
|
|
82
|
+
queryKey
|
|
63
83
|
});
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
84
|
+
$[16] = queryClient;
|
|
85
|
+
$[17] = queryKey;
|
|
86
|
+
$[18] = t6;
|
|
66
87
|
} else {
|
|
67
|
-
|
|
88
|
+
t6 = $[18];
|
|
68
89
|
}
|
|
69
|
-
const invalidate =
|
|
70
|
-
let
|
|
71
|
-
if ($[
|
|
72
|
-
|
|
90
|
+
const invalidate = t6;
|
|
91
|
+
let t7;
|
|
92
|
+
if ($[19] !== contentLocale || $[20] !== invalidate || $[21] !== templatesConfig) {
|
|
93
|
+
t7 = async (template, fields) => {
|
|
73
94
|
if (template.source !== "custom" || !template.id) {
|
|
74
95
|
return {
|
|
75
96
|
success: false,
|
|
@@ -77,22 +98,23 @@ export function useTemplates() {
|
|
|
77
98
|
code: "builtinNotEditable"
|
|
78
99
|
};
|
|
79
100
|
}
|
|
80
|
-
const result = await updateTemplate(templatesConfig.fragmentType, template.id, fields);
|
|
101
|
+
const result = await updateTemplate(templatesConfig.fragmentType, template.id, fields, contentLocale);
|
|
81
102
|
if (result.success) {
|
|
82
103
|
invalidate();
|
|
83
104
|
}
|
|
84
105
|
return result;
|
|
85
106
|
};
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
107
|
+
$[19] = contentLocale;
|
|
108
|
+
$[20] = invalidate;
|
|
109
|
+
$[21] = templatesConfig;
|
|
110
|
+
$[22] = t7;
|
|
89
111
|
} else {
|
|
90
|
-
|
|
112
|
+
t7 = $[22];
|
|
91
113
|
}
|
|
92
|
-
const update =
|
|
93
|
-
let
|
|
94
|
-
if ($[
|
|
95
|
-
|
|
114
|
+
const update = t7;
|
|
115
|
+
let t8;
|
|
116
|
+
if ($[23] !== contentLocale || $[24] !== invalidate || $[25] !== templatesConfig) {
|
|
117
|
+
t8 = async template_0 => {
|
|
96
118
|
if (template_0.source !== "custom" || !template_0.id) {
|
|
97
119
|
return {
|
|
98
120
|
success: false,
|
|
@@ -100,22 +122,23 @@ export function useTemplates() {
|
|
|
100
122
|
code: "builtinNotDeletable"
|
|
101
123
|
};
|
|
102
124
|
}
|
|
103
|
-
const result_0 = await deleteTemplate(templatesConfig.fragmentType, template_0.id);
|
|
125
|
+
const result_0 = await deleteTemplate(templatesConfig.fragmentType, template_0.id, contentLocale);
|
|
104
126
|
if (result_0.success) {
|
|
105
127
|
invalidate();
|
|
106
128
|
}
|
|
107
129
|
return result_0;
|
|
108
130
|
};
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
131
|
+
$[23] = contentLocale;
|
|
132
|
+
$[24] = invalidate;
|
|
133
|
+
$[25] = templatesConfig;
|
|
134
|
+
$[26] = t8;
|
|
112
135
|
} else {
|
|
113
|
-
|
|
136
|
+
t8 = $[26];
|
|
114
137
|
}
|
|
115
|
-
const remove =
|
|
116
|
-
let
|
|
117
|
-
if ($[
|
|
118
|
-
|
|
138
|
+
const remove = t8;
|
|
139
|
+
let t9;
|
|
140
|
+
if ($[27] !== brokenTemplates || $[28] !== invalidate || $[29] !== isError || $[30] !== isLoading || $[31] !== refetch || $[32] !== remove || $[33] !== templates || $[34] !== update) {
|
|
141
|
+
t9 = {
|
|
119
142
|
templates,
|
|
120
143
|
brokenTemplates,
|
|
121
144
|
isLoading,
|
|
@@ -125,18 +148,18 @@ export function useTemplates() {
|
|
|
125
148
|
update,
|
|
126
149
|
remove
|
|
127
150
|
};
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
151
|
+
$[27] = brokenTemplates;
|
|
152
|
+
$[28] = invalidate;
|
|
153
|
+
$[29] = isError;
|
|
154
|
+
$[30] = isLoading;
|
|
155
|
+
$[31] = refetch;
|
|
156
|
+
$[32] = remove;
|
|
157
|
+
$[33] = templates;
|
|
158
|
+
$[34] = update;
|
|
159
|
+
$[35] = t9;
|
|
137
160
|
} else {
|
|
138
|
-
|
|
161
|
+
t9 = $[35];
|
|
139
162
|
}
|
|
140
|
-
return
|
|
163
|
+
return t9;
|
|
141
164
|
}
|
|
142
165
|
//# sourceMappingURL=use-templates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-templates.js","names":["c","_c","useQuery","useQueryClient","deleteTemplate","updateTemplate","useBuiltinTemplates","usePuckContentModel","TEMPLATES_QUERY_KEY","fetchTemplates","mergeTemplates","
|
|
1
|
+
{"version":3,"file":"use-templates.js","names":["c","_c","useQuery","useQueryClient","deleteTemplate","updateTemplate","useBuiltinTemplates","usePuckContentLocale","usePuckContentModel","TEMPLATES_QUERY_KEY","fetchTemplates","mergeTemplates","useTemplates","$","queryClient","contentLocale","templatesConfig","templates","builtins","t0","queryKey","t1","t2","queryFn","data","isLoading","isError","refetch","t3","valid","t4","t5","broken","brokenTemplates","t6","invalidateQueries","invalidate","t7","template","fields","source","id","success","message","code","result","fragmentType","update","t8","template_0","result_0","remove","t9"],"sources":["../../../../../src/puck-editor/internal/plugins/templates-plugin/use-templates.ts"],"sourcesContent":["'use client';\n\nimport { useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport {\n deleteTemplate,\n updateTemplate,\n type TemplateUpdate,\n} from '../../api/client.ts';\nimport {\n useBuiltinTemplates,\n usePuckContentLocale,\n usePuckContentModel,\n} from '../../editor-config.tsx';\nimport { TEMPLATES_QUERY_KEY } from '../../editor-query-client.ts';\nimport {\n BrokenTemplate,\n fetchTemplates,\n mergeTemplates,\n Template,\n} from './templates.ts';\n\ntype RemovableTemplate = { source: 'builtin' | 'custom'; id?: string };\n\nexport function useTemplates() {\n const queryClient = useQueryClient();\n const contentLocale = usePuckContentLocale();\n const templatesConfig = usePuckContentModel().templates;\n const builtins = useBuiltinTemplates();\n const queryKey = [...TEMPLATES_QUERY_KEY, contentLocale, templatesConfig];\n const { data, isLoading, isError, refetch } = useQuery({\n queryKey,\n queryFn: () => fetchTemplates(templatesConfig, contentLocale),\n });\n\n const templates = mergeTemplates(builtins, data?.valid ?? []);\n const brokenTemplates: BrokenTemplate[] = data?.broken ?? [];\n\n const invalidate = () => queryClient.invalidateQueries({ queryKey });\n\n const update = async (\n template: RemovableTemplate,\n fields: TemplateUpdate\n ) => {\n if (template.source !== 'custom' || !template.id) {\n return {\n success: false,\n message: 'Built-in templates cannot be edited',\n code: 'builtinNotEditable',\n };\n }\n const result = await updateTemplate(\n templatesConfig.fragmentType,\n template.id,\n fields,\n contentLocale\n );\n if (result.success) invalidate();\n return result;\n };\n\n const remove = async (template: RemovableTemplate) => {\n if (template.source !== 'custom' || !template.id) {\n return {\n success: false,\n message: 'Built-in templates cannot be deleted',\n code: 'builtinNotDeletable',\n };\n }\n const result = await deleteTemplate(\n templatesConfig.fragmentType,\n template.id,\n contentLocale\n );\n if (result.success) invalidate();\n return result;\n };\n\n return {\n templates,\n brokenTemplates,\n isLoading,\n isError,\n refetch,\n invalidate,\n update,\n remove,\n };\n}\n\nexport type { Template };\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,CAAA,IAAAC,EAAA;AAEb,SAASC,QAAQ,EAAEC,cAAc,QAAQ,uBAAuB;AAEhE,SACEC,cAAc,EACdC,cAAc,QAET,qBAAqB;AAC5B,SACEC,mBAAmB,EACnBC,oBAAoB,EACpBC,mBAAmB,QACd,wBAAyB;AAChC,SAASC,mBAAmB,QAAQ,8BAA8B;AAClE,SAEEC,cAAc,EACdC,cAAc,QAET,gBAAgB;AAIvB,OAAO,SAAAC,aAAA;EAAA,MAAAC,CAAA,GAAAZ,EAAA;EACL,MAAAa,WAAA,GAAoBX,cAAc,CAAC,CAAC;EACpC,MAAAY,aAAA,GAAsBR,oBAAoB,CAAC,CAAC;EAC5C,MAAAS,eAAA,GAAwBR,mBAAmB,CAAC,CAAC,CAAAS,SAAU;EACvD,MAAAC,QAAA,GAAiBZ,mBAAmB,CAAC,CAAC;EAAC,IAAAa,EAAA;EAAA,IAAAN,CAAA,QAAAE,aAAA,IAAAF,CAAA,QAAAG,eAAA;IACtBG,EAAA,OAAIV,mBAAmB,EAAEM,aAAa,EAAEC,eAAe,CAAC;IAAAH,CAAA,MAAAE,aAAA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P,CAAC;IAAAtC,CAAA,OAAAoB,eAAA;IAAApB,CAAA,OAAAuB,UAAA;IAAAvB,CAAA,OAAAa,OAAA;IAAAb,CAAA,OAAAY,SAAA;IAAAZ,CAAA,OAAAc,OAAA;IAAAd,CAAA,OAAAsC,MAAA;IAAAtC,CAAA,OAAAI,SAAA;IAAAJ,CAAA,OAAAkC,MAAA;IAAAlC,CAAA,OAAAuC,EAAA;EAAA;IAAAA,EAAA,GAAAvC,CAAA;EAAA;EAAA,OATMuC,EASN;AAAA","ignoreList":[]}
|
|
@@ -34,5 +34,5 @@ type PuckWrapperProps = {
|
|
|
34
34
|
* Requires the `sonner` (save/upload/template toasts) and `motion` (overlay
|
|
35
35
|
* animation) peers, alongside `@puckeditor/core`; see the module README.
|
|
36
36
|
*/
|
|
37
|
-
export default function PuckWrapper({ node, config, isLoggedIn, editorLocale, dictionaryOverrides, plugins, overrides, onAction, validate, puckProps, drupalBaseUrl, contentModel, builtinTemplates, propTransforms, api, children, }: PuckWrapperProps): import("react").JSX.Element;
|
|
37
|
+
export default function PuckWrapper({ node, config, isLoggedIn, editorLocale, dictionaryOverrides, plugins, overrides, onAction, validate, puckProps, drupalBaseUrl, contentLocale, contentModel, builtinTemplates, propTransforms, api, children, }: PuckWrapperProps): import("react").JSX.Element;
|
|
38
38
|
export {};
|