@perkyzz/emvb 0.9.0 → 1.1.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 (187) hide show
  1. package/README.md +10 -1
  2. package/package.json +2 -2
  3. package/src/admin/agents-api.ts +45 -0
  4. package/src/admin/bulk-api.ts +67 -0
  5. package/src/admin/content-api.ts +10 -6
  6. package/src/admin/copy-rich-text.ts +119 -0
  7. package/src/admin/dialog-tab-wrap.ts +78 -0
  8. package/src/admin/editor/A11yCopilot.tsx +3 -1
  9. package/src/admin/editor/Editor.tsx +311 -250
  10. package/src/admin/editor/Timeline.tsx +8 -3
  11. package/src/admin/editor/TopBar.tsx +29 -7
  12. package/src/admin/editor/canvas/CanvasFrame.tsx +7 -2
  13. package/src/admin/editor/canvas/DeviceBar.tsx +31 -10
  14. package/src/admin/editor/canvas/canvas-scale.ts +3 -3
  15. package/src/admin/editor/canvas/use-canvas-session.ts +2 -2
  16. package/src/admin/editor/co-design.ts +190 -0
  17. package/src/admin/editor/dnd/new-element.ts +48 -4
  18. package/src/admin/editor/editor-chrome.tsx +8 -6
  19. package/src/admin/editor/editor-commands.ts +15 -4
  20. package/src/admin/editor/editor-css.ts +2 -1
  21. package/src/admin/editor/element-chrome.ts +3 -1
  22. package/src/admin/editor/extension-manifests.ts +20 -0
  23. package/src/admin/editor/extensions/ExtensionPanels.tsx +26 -0
  24. package/src/admin/editor/extensions-context.tsx +27 -0
  25. package/src/admin/editor/feature-css.ts +17 -0
  26. package/src/admin/editor/palette-items.ts +2 -2
  27. package/src/admin/editor/panels/AddPanel.tsx +31 -1
  28. package/src/admin/editor/panels/AgentRequestBox.tsx +116 -0
  29. package/src/admin/editor/panels/ClassesSection.tsx +9 -6
  30. package/src/admin/editor/panels/CoDesignPanel.tsx +170 -0
  31. package/src/admin/editor/panels/ColorControl.tsx +2 -2
  32. package/src/admin/editor/panels/ElementPanel.tsx +68 -20
  33. package/src/admin/editor/panels/LanguagesSection.tsx +152 -0
  34. package/src/admin/editor/panels/LayersPanel.tsx +10 -6
  35. package/src/admin/editor/panels/LeftPanel.tsx +33 -5
  36. package/src/admin/editor/panels/PageSettings.tsx +4 -0
  37. package/src/admin/editor/panels/SettingsPanel.tsx +21 -2
  38. package/src/admin/editor/panels/SiteStylesDrawer.tsx +7 -7
  39. package/src/admin/editor/panels/settings/BackgroundControls.tsx +72 -15
  40. package/src/admin/editor/panels/settings/BackgroundFill.tsx +8 -6
  41. package/src/admin/editor/panels/settings/BoxControl.tsx +5 -5
  42. package/src/admin/editor/panels/settings/EffectsControls.tsx +183 -10
  43. package/src/admin/editor/panels/settings/FieldControl.tsx +9 -3
  44. package/src/admin/editor/panels/settings/IconControls.tsx +25 -11
  45. package/src/admin/editor/panels/settings/LengthRow.tsx +63 -19
  46. package/src/admin/editor/panels/settings/LoopControl.tsx +269 -0
  47. package/src/admin/editor/panels/settings/LoopItemBindControl.tsx +19 -1
  48. package/src/admin/editor/panels/settings/MotionControl.tsx +12 -11
  49. package/src/admin/editor/panels/settings/QueryStyleRows.tsx +7 -4
  50. package/src/admin/editor/panels/settings/StyleRow.tsx +120 -13
  51. package/src/admin/editor/panels/settings/TextMarksControl.tsx +247 -0
  52. package/src/admin/editor/panels/settings/VariableBinding.tsx +2 -2
  53. package/src/admin/editor/panels/settings/background-mode.ts +14 -11
  54. package/src/admin/editor/panels/settings/box-link-name.ts +1 -1
  55. package/src/admin/editor/panels/settings/box-sides.ts +22 -14
  56. package/src/admin/editor/panels/settings/heading-warning.ts +5 -1
  57. package/src/admin/editor/panels/settings/length-units.ts +68 -4
  58. package/src/admin/editor/panels/settings/query-style.ts +3 -3
  59. package/src/admin/editor/panels/settings/style-sections.ts +52 -10
  60. package/src/admin/editor/panels/style-target.ts +22 -7
  61. package/src/admin/editor/presence.ts +60 -0
  62. package/src/admin/editor/section-templates.ts +26 -4
  63. package/src/admin/editor/store.ts +14 -4
  64. package/src/admin/editor/useCoDesign.ts +177 -0
  65. package/src/admin/editor/useEditorCommands.ts +7 -5
  66. package/src/admin/editor/useExtensions.ts +45 -0
  67. package/src/admin/editor/useNodeActions.ts +18 -7
  68. package/src/admin/editor/useProposals.ts +81 -0
  69. package/src/admin/export-api.ts +221 -0
  70. package/src/admin/index.tsx +6 -1
  71. package/src/admin/languages-api.ts +61 -0
  72. package/src/admin/pages/AgentSetup.tsx +148 -0
  73. package/src/admin/pages/AgentsPage.tsx +9 -26
  74. package/src/admin/pages/CreateDialog.tsx +15 -0
  75. package/src/admin/pages/ExportDialog.tsx +395 -0
  76. package/src/admin/pages/ImportButton.tsx +18 -0
  77. package/src/admin/pages/ImportElementorDialog.tsx +669 -0
  78. package/src/admin/pages/ImportPageLinks.tsx +86 -0
  79. package/src/admin/pages/PageList.tsx +82 -3
  80. package/src/admin/pages/ThemePartList.tsx +52 -2
  81. package/src/admin/pages/bulk.tsx +303 -0
  82. package/src/admin/pages/section-head.tsx +27 -0
  83. package/src/admin/proposals-api.ts +91 -0
  84. package/src/admin/search.ts +20 -0
  85. package/src/admin/theme-api.ts +4 -0
  86. package/src/admin/ui.ts +50 -4
  87. package/src/admin/widgets/CanvasField.tsx +8 -0
  88. package/src/admin/widgets/ConvertToRichText.tsx +136 -0
  89. package/src/admin/widgets/ExportEntryHtml.tsx +92 -0
  90. package/src/admin/widgets/convert-body.ts +73 -2
  91. package/src/astro/content-port.ts +14 -1
  92. package/src/astro/render.ts +6 -6
  93. package/src/astro/resolve-theme.ts +25 -8
  94. package/src/astro/resolve.ts +89 -2
  95. package/src/astro/tabs/runtime.ts +16 -6
  96. package/src/constants.ts +1 -1
  97. package/src/core/a11y/audit.ts +45 -14
  98. package/src/core/arrange.ts +5 -1
  99. package/src/core/bounded-array.ts +31 -0
  100. package/src/core/clipboard.ts +9 -0
  101. package/src/core/contract.ts +305 -0
  102. package/src/core/css/generate.ts +151 -20
  103. package/src/core/css/scope.ts +10 -2
  104. package/src/core/css/trace.ts +47 -13
  105. package/src/core/css-keywords.ts +51 -1
  106. package/src/core/design/cascade.ts +12 -9
  107. package/src/core/design/classes.ts +28 -9
  108. package/src/core/design/devices.ts +89 -13
  109. package/src/core/design/states.ts +5 -3
  110. package/src/core/design/transfer.ts +5 -0
  111. package/src/core/design/variables.ts +31 -5
  112. package/src/core/elements/dynamic-elements.ts +3 -3
  113. package/src/core/elements/index.ts +73 -9
  114. package/src/core/export/runtimes.generated.ts +9 -0
  115. package/src/core/export/site.ts +562 -0
  116. package/src/core/export/zip.ts +95 -0
  117. package/src/core/extensions/define.ts +13 -0
  118. package/src/core/extensions/index.ts +41 -0
  119. package/src/core/extensions/namespace.ts +82 -0
  120. package/src/core/extensions/normalize.ts +141 -0
  121. package/src/core/extensions/placeholder.ts +41 -0
  122. package/src/core/extensions/registry.ts +94 -0
  123. package/src/core/extensions/render-ext.ts +118 -0
  124. package/src/core/extensions/safe-nodes.ts +93 -0
  125. package/src/core/extensions/schema.ts +112 -0
  126. package/src/core/extensions/types.ts +159 -0
  127. package/src/core/forms/binding.ts +1 -1
  128. package/src/core/history/diff.ts +26 -1
  129. package/src/core/import/elementor/atomic.ts +1608 -0
  130. package/src/core/import/elementor/classes.ts +127 -0
  131. package/src/core/import/elementor/context.ts +429 -0
  132. package/src/core/import/elementor/counter-steps.ts +72 -0
  133. package/src/core/import/elementor/css.ts +445 -0
  134. package/src/core/import/elementor/html.ts +500 -0
  135. package/src/core/import/elementor/index.ts +967 -0
  136. package/src/core/import/elementor/inline-marks.ts +81 -0
  137. package/src/core/import/elementor/snapshots.ts +48 -0
  138. package/src/core/import/elementor/style.ts +429 -0
  139. package/src/core/import/elementor/values.ts +241 -0
  140. package/src/core/import/elementor/widgets.ts +1897 -0
  141. package/src/core/index.ts +96 -0
  142. package/src/core/json-schema.ts +114 -0
  143. package/src/core/limits.ts +19 -0
  144. package/src/core/migrate/index.ts +6 -1
  145. package/src/core/migrate/v18.ts +222 -0
  146. package/src/core/perf/meter.ts +42 -24
  147. package/src/core/portable-text-export.ts +243 -0
  148. package/src/core/proposals-safety.ts +102 -0
  149. package/src/core/proposals.ts +357 -0
  150. package/src/core/public-attributes.ts +30 -0
  151. package/src/core/recipes/index.ts +2 -2
  152. package/src/core/render/extras.ts +3 -3
  153. package/src/core/render/index.ts +222 -23
  154. package/src/core/render/loop.ts +1 -1
  155. package/src/core/render/section.ts +4 -4
  156. package/src/core/render/tabs.ts +18 -11
  157. package/src/core/render/vnode.ts +1 -1
  158. package/src/core/sanitize/css.ts +151 -10
  159. package/src/core/sanitize/motion.ts +116 -0
  160. package/src/core/saved-sections.ts +6 -0
  161. package/src/core/schema/descriptors.ts +3 -1
  162. package/src/core/schema/design.ts +4 -3
  163. package/src/core/schema/layout.ts +92 -16
  164. package/src/core/schema/style.ts +296 -112
  165. package/src/core/search-text.ts +70 -0
  166. package/src/core/text-marks.ts +227 -0
  167. package/src/core/theme/dynamic.ts +9 -4
  168. package/src/core/theme/float.ts +2 -0
  169. package/src/core/theme/popup-rules.ts +33 -1
  170. package/src/core/translatable.ts +34 -0
  171. package/src/core/validate.ts +13 -1
  172. package/src/index.ts +24 -0
  173. package/src/mcp/errors.ts +3 -1
  174. package/src/mcp/ports.ts +67 -0
  175. package/src/mcp/prompts.ts +1 -11
  176. package/src/mcp/proposals.ts +281 -0
  177. package/src/mcp/read.ts +10 -10
  178. package/src/mcp/tools.ts +71 -3
  179. package/src/mcp/write.ts +66 -11
  180. package/src/server/agent-settings.ts +5 -1
  181. package/src/server/icon-routes.ts +52 -12
  182. package/src/server/mcp-routes.ts +15 -0
  183. package/src/server/plugin.ts +35 -2
  184. package/src/server/presence.ts +78 -0
  185. package/src/server/proposals.ts +261 -0
  186. package/src/server/requests.ts +196 -0
  187. package/src/server/tools-served.ts +45 -0
@@ -0,0 +1,61 @@
1
+ import type { Layout } from "../core/schema/layout.ts";
2
+ import { requestJson, type Fetcher } from "./api.ts";
3
+
4
+ /** W-936: the site's languages, from EmDash's manifest; null when the site has no i18n. */
5
+ export async function siteLocales(
6
+ fetcher: Fetcher,
7
+ ): Promise<{ defaultLocale: string; locales: string[] } | null> {
8
+ const data = await requestJson<{ i18n?: { defaultLocale?: string; locales?: string[] } }>(
9
+ fetcher,
10
+ "/_emdash/api/manifest",
11
+ );
12
+ const locales = data.i18n?.locales ?? [];
13
+ if (locales.length < 2 || !data.i18n?.defaultLocale) return null;
14
+ return { defaultLocale: data.i18n.defaultLocale, locales };
15
+ }
16
+
17
+ export type Translation = { id: string; locale: string; slug: string; status: string };
18
+
19
+ /** Every language of an entry (EmDash's translation group), this one included. */
20
+ export async function listTranslations(
21
+ fetcher: Fetcher,
22
+ collection: string,
23
+ id: string,
24
+ ): Promise<Translation[]> {
25
+ const data = await requestJson<{ translations?: Translation[] }>(
26
+ fetcher,
27
+ `/_emdash/api/content/${collection}/${encodeURIComponent(id)}/translations`,
28
+ );
29
+ return data.translations ?? [];
30
+ }
31
+
32
+ /**
33
+ * Creates the `locale` draft of an entry (D-068: a row per locale, linked by `translationOf`)
34
+ * holding a copy of the layout to translate. Returns the new entry's id.
35
+ */
36
+ export async function createTranslation(
37
+ fetcher: Fetcher,
38
+ input: {
39
+ collection: string;
40
+ sourceId: string;
41
+ locale: string;
42
+ title: string;
43
+ slug: string;
44
+ layout: Layout;
45
+ },
46
+ ): Promise<string> {
47
+ const data = await requestJson<{ item: { id: string } }>(
48
+ fetcher,
49
+ `/_emdash/api/content/${input.collection}`,
50
+ {
51
+ method: "POST",
52
+ body: {
53
+ data: { title: input.title, layout: input.layout },
54
+ slug: input.slug,
55
+ locale: input.locale,
56
+ translationOf: input.sourceId,
57
+ },
58
+ },
59
+ );
60
+ return data.item.id;
61
+ }
@@ -0,0 +1,148 @@
1
+ import { Button } from "@cloudflare/kumo";
2
+ import {
3
+ ArrowsClockwiseIcon,
4
+ CheckCircleIcon,
5
+ ListChecksIcon,
6
+ QuestionIcon,
7
+ WarningCircleIcon,
8
+ } from "@phosphor-icons/react";
9
+ import type { ReactNode } from "react";
10
+ import { useEffect, useState } from "react";
11
+ import type { Fetcher } from "../api.ts";
12
+ import { checkAgentSetup, type AgentSetup } from "../agents-api.ts";
13
+ import { SectionHead } from "./section-head.tsx";
14
+
15
+ type Step = { key: string; state: "done" | "todo" | "unknown"; title: string; detail: ReactNode };
16
+
17
+ const ICONS = {
18
+ done: <CheckCircleIcon size={18} weight="fill" aria-hidden="true" />,
19
+ todo: <WarningCircleIcon size={18} weight="fill" aria-hidden="true" />,
20
+ unknown: <QuestionIcon size={18} aria-hidden="true" />,
21
+ };
22
+ const STATUS = { done: "Done", todo: "To do", unknown: "Couldn't check" };
23
+
24
+ /** W-932: the steps a site needs before an agent can connect, each checked where it can be. */
25
+ function setupSteps(setup: AgentSetup | null, agentsOn: boolean): Step[] {
26
+ const endpoint = setup?.endpoint ?? "unknown";
27
+ const tools = setup?.tools ?? "unknown";
28
+ return [
29
+ {
30
+ key: "endpoint",
31
+ state: endpoint === "on" ? "done" : endpoint === "off" ? "todo" : "unknown",
32
+ title: "EmDash's MCP endpoint is on",
33
+ detail:
34
+ endpoint === "off" ? (
35
+ <>
36
+ Add <code>mcp: true</code> to <code>emdash()</code> in <code>astro.config.mjs</code> and
37
+ redeploy.
38
+ </>
39
+ ) : (
40
+ "Agents connect to EmDash's own endpoint; EmVB adds its tools there."
41
+ ),
42
+ },
43
+ {
44
+ key: "tools",
45
+ state: tools === "served" ? "done" : tools === "off" ? "todo" : "unknown",
46
+ title: "EmVB's tools are approved",
47
+ detail:
48
+ tools === "approved" ? (
49
+ <>
50
+ Approved, but no agent has used this version's tools yet. EmDash hides them again
51
+ whenever an EmVB update changes them: if your agent doesn't see EmVB's tools, approve
52
+ them again in <a href="/_emdash/admin/plugins-manager">Plugins</a>.
53
+ </>
54
+ ) : tools === "off" ? (
55
+ <>
56
+ Approve them for Pages VisualBuilder in{" "}
57
+ <a href="/_emdash/admin/plugins-manager">Plugins</a>.
58
+ </>
59
+ ) : tools === "served" ? (
60
+ "An agent has used this version's tools."
61
+ ) : (
62
+ "EmDash lists EmVB's tools to agents only after an admin approves them."
63
+ ),
64
+ },
65
+ {
66
+ key: "access",
67
+ state: agentsOn ? "done" : "todo",
68
+ title: "Agent access is on",
69
+ detail: agentsOn
70
+ ? "Turn it off below to refuse every agent call at once."
71
+ : "Turn on “Let AI agents edit EmVB pages” below.",
72
+ },
73
+ {
74
+ key: "token",
75
+ state: "unknown",
76
+ title: "A token for the agent",
77
+ detail: (
78
+ <>
79
+ In <a href="/_emdash/admin/settings/api-tokens">API tokens</a>, create one with the scope{" "}
80
+ <code>mcp:tools:emvb</code> for an editor, not an admin. EmVB never sees or stores it.
81
+ </>
82
+ ),
83
+ },
84
+ ];
85
+ }
86
+
87
+ export function AgentSetupCard({
88
+ fetcher,
89
+ agentsOn,
90
+ toolsServed = false,
91
+ }: {
92
+ fetcher: Fetcher;
93
+ agentsOn: boolean;
94
+ toolsServed?: boolean;
95
+ }) {
96
+ const [setup, setSetup] = useState<AgentSetup | null>(null);
97
+ const [attempt, setAttempt] = useState(0);
98
+ useEffect(() => {
99
+ let cancelled = false;
100
+ setSetup(null);
101
+ checkAgentSetup(fetcher, toolsServed).then(
102
+ (next) => !cancelled && setSetup(next),
103
+ () => !cancelled && setSetup({ endpoint: "unknown", tools: "unknown" }),
104
+ );
105
+ return () => {
106
+ cancelled = true;
107
+ };
108
+ }, [fetcher, toolsServed, attempt]);
109
+ const steps = setupSteps(setup, agentsOn);
110
+ return (
111
+ <section
112
+ className="emvb-surface-card emvb-agents-section"
113
+ aria-labelledby="emvb-agents-setup"
114
+ aria-busy={setup === null || undefined}
115
+ data-emvb-agent-setup={setup === null ? "checking" : "ready"}
116
+ >
117
+ <SectionHead id="emvb-agents-setup" icon={ListChecksIcon} title="Setup">
118
+ What this site needs before an agent can connect. People then ask their agent from the
119
+ editor's Agent tab and review what it proposes.
120
+ </SectionHead>
121
+ <ol className="emvb-agents-steps">
122
+ {steps.map((step) => (
123
+ <li key={step.key} data-emvb-setup-step={step.key} data-state={step.state}>
124
+ <span className="emvb-agents-step-icon">{ICONS[step.state]}</span>
125
+ <div>
126
+ <h3>
127
+ {step.title}
128
+ <span className="emvb-sr-only">: {STATUS[step.state]}</span>
129
+ </h3>
130
+ <p>{step.detail}</p>
131
+ </div>
132
+ </li>
133
+ ))}
134
+ </ol>
135
+ <div>
136
+ <Button
137
+ size="sm"
138
+ variant="secondary"
139
+ icon={<ArrowsClockwiseIcon aria-hidden="true" />}
140
+ onClick={() => setAttempt((n) => n + 1)}
141
+ data-emvb-setup-recheck=""
142
+ >
143
+ Check again
144
+ </Button>
145
+ </div>
146
+ </section>
147
+ );
148
+ }
@@ -11,7 +11,6 @@ import {
11
11
  TerminalWindowIcon,
12
12
  UploadSimpleIcon,
13
13
  WarningCircleIcon,
14
- type Icon,
15
14
  } from "@phosphor-icons/react";
16
15
  import type { ReactNode } from "react";
17
16
  import { useEffect, useRef, useState } from "react";
@@ -22,6 +21,10 @@ import { editorUrl } from "../editor/exit.ts";
22
21
  import type { AgentSettings } from "../../mcp/settings.ts";
23
22
  import { ListError, ListLoading } from "./list-kit.tsx";
24
23
  import { UI_CSS } from "../ui.ts";
24
+ import { AgentSetupCard } from "./AgentSetup.tsx";
25
+ import { SectionHead } from "./section-head.tsx";
26
+
27
+ export { SectionHead };
25
28
 
26
29
  const ADMIN_ROLE = 50;
27
30
 
@@ -44,31 +47,6 @@ const stdioSnippet = (site: string) =>
44
47
  const remoteSnippet = (endpoint: string) =>
45
48
  JSON.stringify({ mcpServers: { emvb: { url: endpoint } } }, null, 2);
46
49
 
47
- /** A card's heading row: an icon tile, the title and one line on what the card is for (W-477). */
48
- export function SectionHead({
49
- id,
50
- icon: SectionIcon,
51
- title,
52
- children,
53
- }: {
54
- id: string;
55
- icon: Icon;
56
- title: string;
57
- children: ReactNode;
58
- }) {
59
- return (
60
- <div className="emvb-agents-head">
61
- <span className="emvb-agents-icon" aria-hidden="true">
62
- <SectionIcon size={18} />
63
- </span>
64
- <div>
65
- <h2 id={id}>{title}</h2>
66
- <p>{children}</p>
67
- </div>
68
- </div>
69
- );
70
- }
71
-
72
50
  /** AI agents (`/agents`, W-463): the master switch, publishing, how to connect, recent activity. */
73
51
  /**
74
52
  * W-756: on a phone the setup JSON scrolls sideways, and keyboard users could not reach it to
@@ -185,6 +163,11 @@ export function AgentsPage({ fetcher = defaultFetcher }: { fetcher?: Fetcher })
185
163
  description={saveError}
186
164
  />
187
165
  )}
166
+ <AgentSetupCard
167
+ fetcher={fetcher}
168
+ agentsOn={settings.mcpEnabled}
169
+ toolsServed={state.toolsServed === true}
170
+ />
188
171
  <section
189
172
  className="emvb-surface-card emvb-agents-section"
190
173
  aria-labelledby="emvb-agents-access"
@@ -26,6 +26,7 @@ function createFailure(failure: unknown, noun: string, slug: string): FieldError
26
26
  /**
27
27
  * The New page / New theme part form (IA): title, a slug that follows `slugPrefix` + title until
28
28
  * edited, then `create` returns the editor URL to open. `children` go above the title.
29
+ * `suggestedTitle` (W-945: an imported template's title) fills the title until the person types one.
29
30
  */
30
31
  export function CreateDialog({
31
32
  name,
@@ -39,6 +40,7 @@ export function CreateDialog({
39
40
  open,
40
41
  onOpenChange,
41
42
  children,
43
+ suggestedTitle,
42
44
  }: {
43
45
  name: string;
44
46
  heading: string;
@@ -51,6 +53,7 @@ export function CreateDialog({
51
53
  open: boolean;
52
54
  onOpenChange: (open: boolean) => void;
53
55
  children?: React.ReactNode;
56
+ suggestedTitle?: string;
54
57
  }) {
55
58
  const [title, setTitle] = React.useState("");
56
59
  const [slug, setSlug] = React.useState("");
@@ -82,6 +85,18 @@ export function CreateDialog({
82
85
  }
83
86
  }, [slugPrefix]);
84
87
 
88
+ // W-945: a new suggestion replaces the title only while it is empty or the last suggestion.
89
+ const lastSuggestion = React.useRef<string | undefined>(undefined);
90
+ React.useEffect(() => {
91
+ if (!suggestedTitle) return;
92
+ const current = titleRef.current;
93
+ const previous = lastSuggestion.current;
94
+ lastSuggestion.current = suggestedTitle;
95
+ if (current && current !== previous) return;
96
+ setTitle(suggestedTitle);
97
+ if (!slugEditedRef.current) setSlug(pageSlug(`${slugPrefix}${suggestedTitle}`));
98
+ }, [suggestedTitle, slugPrefix]);
99
+
85
100
  const submit = async () => {
86
101
  if (pending.current) return;
87
102
  const cleanTitle = title.trim();