pagiera 0.2.0-alpha.46 → 0.2.0-alpha.47
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 +21 -3
- package/dist/full-editor.js.map +2 -2
- package/dist/internal/app/api/ai-design/route.d.ts +24 -0
- package/dist/internal/app/api/ai-design/route.d.ts.map +1 -1
- package/dist/internal/app/api/ai-design/route.js +697 -125
- package/dist/internal/app/api/ai-design/route.js.map +1 -1
- package/dist/internal/app/p/editor/ai-panel.d.ts.map +1 -1
- package/dist/internal/app/p/editor/ai-panel.js +6 -1
- package/dist/internal/app/p/editor/ai-panel.js.map +1 -1
- package/dist/internal/app/p/editor/editor.d.ts.map +1 -1
- package/dist/internal/app/p/editor/editor.js +8 -3
- package/dist/internal/app/p/editor/editor.js.map +1 -1
- package/dist/internal/lib/editor/ai/compose.d.ts +34 -0
- package/dist/internal/lib/editor/ai/compose.d.ts.map +1 -0
- package/dist/internal/lib/editor/ai/compose.js +569 -0
- package/dist/internal/lib/editor/ai/compose.js.map +1 -0
- package/dist/internal/lib/editor/ai/dsl.d.ts +162 -0
- package/dist/internal/lib/editor/ai/dsl.d.ts.map +1 -0
- package/dist/internal/lib/editor/ai/dsl.js +278 -0
- package/dist/internal/lib/editor/ai/dsl.js.map +1 -0
- package/dist/internal/lib/editor/ai/ops.d.ts +0 -2
- package/dist/internal/lib/editor/ai/ops.d.ts.map +1 -1
- package/dist/internal/lib/editor/ai/ops.js +0 -12
- package/dist/internal/lib/editor/ai/ops.js.map +1 -1
- package/dist/internal/lib/editor/ai/theme.d.ts +112 -1
- package/dist/internal/lib/editor/ai/theme.d.ts.map +1 -1
- package/dist/internal/lib/editor/ai/theme.js +296 -1
- package/dist/internal/lib/editor/ai/theme.js.map +1 -1
- package/dist/internal/lib/render/css.d.ts.map +1 -1
- package/dist/internal/lib/render/css.js +8 -0
- package/dist/internal/lib/render/css.js.map +1 -1
- package/dist/internal/lib/render/page-render.d.ts.map +1 -1
- package/dist/internal/lib/render/page-render.js +13 -0
- package/dist/internal/lib/render/page-render.js.map +1 -1
- package/dist/runtime.js +14 -1
- package/dist/runtime.js.map +2 -2
- package/dist/server.js +1393 -1351
- package/dist/server.js.map +4 -4
- package/package.json +1 -1
- package/dist/internal/lib/editor/ai/blocks.d.ts +0 -58
- package/dist/internal/lib/editor/ai/blocks.d.ts.map +0 -1
- package/dist/internal/lib/editor/ai/blocks.js +0 -815
- package/dist/internal/lib/editor/ai/blocks.js.map +0 -1
- package/dist/internal/lib/editor/ai/build.d.ts +0 -78
- package/dist/internal/lib/editor/ai/build.d.ts.map +0 -1
- package/dist/internal/lib/editor/ai/build.js +0 -337
- package/dist/internal/lib/editor/ai/build.js.map +0 -1
- package/dist/internal/lib/editor/ai/plan.d.ts +0 -44
- package/dist/internal/lib/editor/ai/plan.d.ts.map +0 -1
- package/dist/internal/lib/editor/ai/plan.js +0 -217
- package/dist/internal/lib/editor/ai/plan.js.map +0 -1
package/dist/full-editor.js
CHANGED
|
@@ -4980,7 +4980,7 @@ function stylesheetFor(elements, rootStyle) {
|
|
|
4980
4980
|
// element selector and leak the editor's typeface into the site.
|
|
4981
4981
|
// The shell spans the viewport; the content width is applied by each
|
|
4982
4982
|
// band's inner box, so section backgrounds reach both edges.
|
|
4983
|
-
`.pg-root{font-family:${resolveFont(rootStyle.fontFamily)}}.pg-node{box-sizing:border-box}.pg-node:is(input,textarea,button){font:inherit}.pg-node:is(input,textarea){outline:none}.pg-node:is(select){outline:none;appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23888%27 stroke-width=%271.6%27><path d=%27M4 6.5 8 10.5 12 6.5%27/></svg>");background-repeat:no-repeat;background-position:right 12px center;padding-right:34px}.pg-node[role=radiogroup]{display:flex;flex-direction:column;gap:8px}.pg-choice{display:flex;align-items:center;gap:8px;cursor:pointer}.pg-choice input{accent-color:currentColor;margin:0}.pg-node:is(input[type=checkbox],input[type=radio]){accent-color:currentColor}.pg-node:is(textarea){resize:none}.pg-form-status:empty{display:none}.pg-form-status{font-size:12px;line-height:1.4}.pg-node[data-pg-state=success] .pg-form-status{color:#22c55e}.pg-node[data-pg-state=error] .pg-form-status{color:#ef4444}.pg-node img{display:block;width:100%;height:100%}.pg-node:is(ul,ol){list-style:none}.pg-list{counter-reset:pg-list}.pg-list>li{position:relative}.pg-list-bullet>li::before{content:'\\2022';position:absolute;left:-1em;opacity:.65}.pg-list-number>li::before{counter-increment:pg-list;content:counter(pg-list) '.';position:absolute;left:-1.6em;opacity:.65;font-variant-numeric:tabular-nums}.pg-node hr{border:0;width:100%;height:100%}.pg-node iframe{display:block;width:100%;height:100%;border:0}.pg-svg-glyph>svg{display:block;width:100%;height:100%}.pg-link{text-decoration:none;color:inherit}`
|
|
4983
|
+
`.pg-root{font-family:${resolveFont(rootStyle.fontFamily)}}.pg-node{box-sizing:border-box}.pg-node:is(input,textarea,button){font:inherit}.pg-node:where(button){appearance:none;background-color:transparent;border-width:0;color:inherit;text-align:inherit}.pg-node:is(input,textarea){outline:none}.pg-node:is(select){outline:none;appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23888%27 stroke-width=%271.6%27><path d=%27M4 6.5 8 10.5 12 6.5%27/></svg>");background-repeat:no-repeat;background-position:right 12px center;padding-right:34px}.pg-node[role=radiogroup]{display:flex;flex-direction:column;gap:8px}.pg-choice{display:flex;align-items:center;gap:8px;cursor:pointer}.pg-choice input{accent-color:currentColor;margin:0}.pg-node:is(input[type=checkbox],input[type=radio]){accent-color:currentColor}.pg-node:is(textarea){resize:none}.pg-form-status:empty{display:none}.pg-form-status{font-size:12px;line-height:1.4}.pg-node[data-pg-state=success] .pg-form-status{color:#22c55e}.pg-node[data-pg-state=error] .pg-form-status{color:#ef4444}.pg-node img{display:block;width:100%;height:100%}.pg-node:is(ul,ol){list-style:none}.pg-list{counter-reset:pg-list}.pg-list>li{position:relative}.pg-list-bullet>li::before{content:'\\2022';position:absolute;left:-1em;opacity:.65}.pg-list-number>li::before{counter-increment:pg-list;content:counter(pg-list) '.';position:absolute;left:-1.6em;opacity:.65;font-variant-numeric:tabular-nums}.pg-node hr{border:0;width:100%;height:100%}.pg-node iframe{display:block;width:100%;height:100%;border:0}.pg-svg-glyph>svg{display:block;width:100%;height:100%}.pg-link{text-decoration:none;color:inherit}`
|
|
4984
4984
|
);
|
|
4985
4985
|
for (const element of elements) {
|
|
4986
4986
|
const emitted = rulesFor(element, byId, baseId, rootStyle, cascade).map(([suffix, decl]) => `.${classFor(element.id)}${suffix}{${decl}}`).join("");
|
|
@@ -9908,7 +9908,20 @@ function RenderedNode({
|
|
|
9908
9908
|
);
|
|
9909
9909
|
}
|
|
9910
9910
|
const tag = customTagOf(element) ?? semanticTag(element);
|
|
9911
|
+
const animates = style.entrance !== "none";
|
|
9911
9912
|
return React2.createElement(tag, withCustom(element, {
|
|
9913
|
+
/**
|
|
9914
|
+
* The entrance script runs while the document is still parsing, which
|
|
9915
|
+
* is before React hydrates, and it reveals whatever is already on
|
|
9916
|
+
* screen by adding `pg-in` to the element's class list. React then
|
|
9917
|
+
* finds a `class` it did not write and reports a hydration mismatch on
|
|
9918
|
+
* every visible animated node.
|
|
9919
|
+
*
|
|
9920
|
+
* The difference is intentional and client-only, so it is declared as
|
|
9921
|
+
* such. Only animated elements are excused: a mismatch anywhere else is
|
|
9922
|
+
* a real bug and must keep surfacing.
|
|
9923
|
+
*/
|
|
9924
|
+
suppressHydrationWarning: animates || void 0,
|
|
9912
9925
|
id: classFor(element.id),
|
|
9913
9926
|
htmlFor: tag === "label" && element.labelFor ? classFor(element.labelFor) : void 0,
|
|
9914
9927
|
type: tag === "button" ? element.buttonType ?? "button" : void 0,
|
|
@@ -12280,7 +12293,12 @@ function AiPanel({
|
|
|
12280
12293
|
id: event.id,
|
|
12281
12294
|
label: event.label,
|
|
12282
12295
|
status: event.status === "start" ? "running" : event.status,
|
|
12283
|
-
|
|
12296
|
+
// A second "start" for the same section is a retry,
|
|
12297
|
+
// and it carries the reason the last attempt was
|
|
12298
|
+
// discarded. Facts sent with a start are therefore
|
|
12299
|
+
// kept; only a start with nothing to say leaves the
|
|
12300
|
+
// section's existing facts alone.
|
|
12301
|
+
facts: event.facts ?? (event.status === "start" ? turn.sections[at]?.facts : void 0)
|
|
12284
12302
|
};
|
|
12285
12303
|
const sections = at >= 0 ? turn.sections.slice() : [...turn.sections, next];
|
|
12286
12304
|
if (at >= 0) sections[at] = next;
|
|
@@ -13800,7 +13818,7 @@ function Editor({
|
|
|
13800
13818
|
const selectedId = selectedIds.length === 1 ? selectedIds[0] : null;
|
|
13801
13819
|
const selectedElement = selectedId ? byId.get(selectedId) : void 0;
|
|
13802
13820
|
const deviceWidth = frameWidthForBreakpoint;
|
|
13803
|
-
const frameWidth = rootStyle.fullWidth ?
|
|
13821
|
+
const frameWidth = rootStyle.layout === "absolute" && !rootStyle.fullWidth ? Math.min(deviceWidth, rootStyle.maxWidth) : deviceWidth;
|
|
13804
13822
|
useEffect12(() => setCanvasHeight(rootStyle.canvasHeight), [rootStyle.canvasHeight]);
|
|
13805
13823
|
useEffect12(() => {
|
|
13806
13824
|
if (!componentMode || !activeComponentMaster) return;
|