pagiera 0.2.0-alpha.61 → 0.2.0-alpha.63
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/full-editor.js +49 -3
- package/dist/full-editor.js.map +2 -2
- package/dist/full.css +15 -0
- package/dist/internal/app/p/editor/editor.d.ts.map +1 -1
- package/dist/internal/app/p/editor/editor.js +43 -3
- package/dist/internal/app/p/editor/editor.js.map +1 -1
- package/dist/internal/app/p/editor/seo-settings.d.ts +21 -0
- package/dist/internal/app/p/editor/seo-settings.d.ts.map +1 -0
- package/dist/internal/app/p/editor/seo-settings.js +70 -0
- package/dist/internal/app/p/editor/seo-settings.js.map +1 -0
- package/dist/internal/app/p/editor/ui/shell.d.ts +7 -1
- package/dist/internal/app/p/editor/ui/shell.d.ts.map +1 -1
- package/dist/internal/app/p/editor/ui/shell.js +2 -2
- package/dist/internal/app/p/editor/ui/shell.js.map +1 -1
- package/dist/internal/lib/render/seo.d.ts +26 -0
- package/dist/internal/lib/render/seo.d.ts.map +1 -0
- package/dist/internal/lib/render/seo.js +64 -0
- package/dist/internal/lib/render/seo.js.map +1 -0
- package/package.json +1 -1
package/dist/full-editor.js
CHANGED
|
@@ -115,6 +115,8 @@ function AiSettings({ mcp, available, enterToSend, onEnterToSend }) {
|
|
|
115
115
|
import {
|
|
116
116
|
IconArrowBackUp,
|
|
117
117
|
IconArrowForwardUp,
|
|
118
|
+
IconArrowsMaximize,
|
|
119
|
+
IconArrowsMinimize,
|
|
118
120
|
IconCommand,
|
|
119
121
|
IconCode as IconCode2,
|
|
120
122
|
IconComponents as IconComponents4,
|
|
@@ -10250,13 +10252,14 @@ function EditorShell({
|
|
|
10250
10252
|
inspectorVisible = true,
|
|
10251
10253
|
overlays,
|
|
10252
10254
|
dock,
|
|
10253
|
-
page
|
|
10255
|
+
page,
|
|
10256
|
+
focused = false
|
|
10254
10257
|
}) {
|
|
10255
10258
|
const hidden = page ? "hidden" : "";
|
|
10256
10259
|
return (
|
|
10257
10260
|
// `pg-scope` is the box the editor's stylesheet is confined to (see
|
|
10258
10261
|
// scripts/build-full-css.mjs); it takes no space of its own.
|
|
10259
|
-
/* @__PURE__ */ jsx24("div", { className: "pg-scope", style: { display: "contents" }, children: /* @__PURE__ */ jsxs20("div", { className:
|
|
10262
|
+
/* @__PURE__ */ jsx24("div", { className: "pg-scope", style: { display: "contents" }, children: /* @__PURE__ */ jsxs20("div", { className: `pg-editor flex w-full flex-col overflow-hidden bg-ed-frame font-sans text-xs text-ed-text selection:bg-[var(--ed-accent-soft)] ${focused ? "fixed inset-0 z-[900] h-dvh" : "h-screen"}`, children: [
|
|
10260
10263
|
/* @__PURE__ */ jsxs20("header", { className: "relative z-40 grid h-12 shrink-0 grid-cols-[260px_minmax(0,1fr)_288px] items-center gap-2 bg-ed-frame px-2", children: [
|
|
10261
10264
|
/* @__PURE__ */ jsx24("div", { className: "flex min-w-0 items-center gap-1 px-1", children: toolbarLeft }),
|
|
10262
10265
|
/* @__PURE__ */ jsx24("div", { className: "scrollbar-none flex h-full min-w-0 items-end justify-start gap-1 overflow-x-auto px-1", children: toolbarCenter }),
|
|
@@ -19499,6 +19502,39 @@ function Editor({
|
|
|
19499
19502
|
}
|
|
19500
19503
|
return !current;
|
|
19501
19504
|
});
|
|
19505
|
+
const [focusMode, setFocusMode] = useState20(false);
|
|
19506
|
+
useEffect20(() => {
|
|
19507
|
+
try {
|
|
19508
|
+
setFocusMode(localStorage.getItem("pagiera:focus") === "1");
|
|
19509
|
+
} catch {
|
|
19510
|
+
}
|
|
19511
|
+
}, []);
|
|
19512
|
+
const toggleFocusMode = useCallback4(() => setFocusMode((current) => {
|
|
19513
|
+
try {
|
|
19514
|
+
localStorage.setItem("pagiera:focus", current ? "0" : "1");
|
|
19515
|
+
} catch {
|
|
19516
|
+
}
|
|
19517
|
+
return !current;
|
|
19518
|
+
}), []);
|
|
19519
|
+
useEffect20(() => {
|
|
19520
|
+
const onKey = (event) => {
|
|
19521
|
+
if (!(event.ctrlKey || event.metaKey) || !event.shiftKey || event.altKey) return;
|
|
19522
|
+
if (event.key.toLowerCase() !== "f") return;
|
|
19523
|
+
event.preventDefault();
|
|
19524
|
+
toggleFocusMode();
|
|
19525
|
+
};
|
|
19526
|
+
window.addEventListener("keydown", onKey);
|
|
19527
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
19528
|
+
}, [toggleFocusMode]);
|
|
19529
|
+
useEffect20(() => {
|
|
19530
|
+
if (!focusMode) return;
|
|
19531
|
+
const root = document.documentElement;
|
|
19532
|
+
const previous = root.style.overflow;
|
|
19533
|
+
root.style.overflow = "hidden";
|
|
19534
|
+
return () => {
|
|
19535
|
+
root.style.overflow = previous;
|
|
19536
|
+
};
|
|
19537
|
+
}, [focusMode]);
|
|
19502
19538
|
const frames = useMemo8(() => {
|
|
19503
19539
|
if (showAllBreakpoints) return allFrames;
|
|
19504
19540
|
const groups = /* @__PURE__ */ new Map();
|
|
@@ -22680,6 +22716,15 @@ function Editor({
|
|
|
22680
22716
|
/* @__PURE__ */ jsx47("span", { className: "hidden text-[10px] text-ed-faint lg:block", children: "Curated responsive starting points" }),
|
|
22681
22717
|
/* @__PURE__ */ jsx47(ChromeButton, { onClick: () => openLeftPanel("Layers"), children: "Back to canvas" })
|
|
22682
22718
|
] }) : /* @__PURE__ */ jsxs41(Fragment13, { children: [
|
|
22719
|
+
/* @__PURE__ */ jsx47(
|
|
22720
|
+
ToolButton,
|
|
22721
|
+
{
|
|
22722
|
+
label: focusMode ? "Exit focus mode (Ctrl+Shift+F)" : "Focus mode (Ctrl+Shift+F)",
|
|
22723
|
+
active: focusMode,
|
|
22724
|
+
onClick: toggleFocusMode,
|
|
22725
|
+
children: focusMode ? /* @__PURE__ */ jsx47(IconArrowsMinimize, { size: 15, stroke: 1.7 }) : /* @__PURE__ */ jsx47(IconArrowsMaximize, { size: 15, stroke: 1.7 })
|
|
22726
|
+
}
|
|
22727
|
+
),
|
|
22683
22728
|
/* @__PURE__ */ jsx47("span", { className: "hidden lg:block", children: /* @__PURE__ */ jsx47(SaveIndicator, { status: saveStatus, error: saveError }) }),
|
|
22684
22729
|
/* @__PURE__ */ jsx47("div", { className: "mx-0.5 hidden h-4 w-px bg-ed-border lg:block" }),
|
|
22685
22730
|
componentMode ? null : /* @__PURE__ */ jsx47(Fragment13, { children: /* @__PURE__ */ jsxs41("div", { className: "relative flex items-stretch", children: [
|
|
@@ -23855,7 +23900,8 @@ function Editor({
|
|
|
23855
23900
|
inspector,
|
|
23856
23901
|
inspectorVisible: !workspacePage,
|
|
23857
23902
|
page: workspacePage,
|
|
23858
|
-
overlays
|
|
23903
|
+
overlays,
|
|
23904
|
+
focused: focusMode
|
|
23859
23905
|
}
|
|
23860
23906
|
);
|
|
23861
23907
|
}
|