@drawnagency/primitives 0.1.74 → 0.1.75

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.
@@ -376,7 +376,7 @@ function Tabs({ tabs, defaultTabId, activeTabId, onTabChange, fullBleedTabBar })
376
376
  },
377
377
  tab.id
378
378
  )) }) }),
379
- /* @__PURE__ */ jsx8("div", { role: "tabpanel", className: cn(fullBleedTabBar && "pt-4"), children: activeTab?.content })
379
+ /* @__PURE__ */ jsx8("div", { role: "tabpanel", className: cn("px-px", fullBleedTabBar && "pt-4"), children: activeTab?.content })
380
380
  ] });
381
381
  }
382
382
 
@@ -31,7 +31,7 @@ import {
31
31
  buildBlockDropData,
32
32
  canDropBlock,
33
33
  isBlockDragData
34
- } from "./chunk-RIVBCL6U.js";
34
+ } from "./chunk-Q3T23HVW.js";
35
35
  import {
36
36
  useMediaLibrary,
37
37
  useResolvedMedia
@@ -858,7 +858,12 @@ function Container({ content, isEditMode, onChange, openModal }) {
858
858
  };
859
859
  const emit = (nextSection) => onChange?.({ ...content, content: nextSection.content });
860
860
  const updateChild = (index, childContent) => {
861
- const next = children.map((c, i) => i === index ? childContent : c);
861
+ const next = children.map((c, i) => {
862
+ if (i !== index) return c;
863
+ const merged = { ...childContent, id: c.id ?? newId() };
864
+ if (c.layout !== void 0) merged.layout = c.layout;
865
+ return merged;
866
+ });
862
867
  onChange?.({ ...content, content: { ...content.content, children: next } });
863
868
  };
864
869
  const gridClass = cn(
@@ -964,7 +969,7 @@ function Container({ content, isEditMode, onChange, openModal }) {
964
969
  }
965
970
  const occupied = occupiedColumns(children, columns);
966
971
  const emptyCols = occupied < columns ? columns - occupied : 0;
967
- return /* @__PURE__ */ jsx13("div", { className: "@container", children: /* @__PURE__ */ jsxs5("div", { className: gridClass, children: [
972
+ return /* @__PURE__ */ jsx13("div", { className: "@container", children: /* @__PURE__ */ jsxs5("div", { className: cn(gridClass, "pt-8 xl:pt-0"), children: [
968
973
  children.map(renderEditChild),
969
974
  Array.from({ length: emptyCols }, (_, i) => /* @__PURE__ */ jsx13(
970
975
  EmptyColumnCell,
@@ -1 +1 @@
1
- {"version":3,"file":"SectionWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/editor/SectionWrapper.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,WAAW,EACX,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,SAAS,EACT,MAAM,EACN,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,QAAQ,EACR,aAAa,EACb,UAAU,EACV,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,QAAQ,GACT,EAAE,YAAY,2CAgTd"}
1
+ {"version":3,"file":"SectionWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/editor/SectionWrapper.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,WAAW,EACX,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,SAAS,EACT,MAAM,EACN,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,eAAe,EACf,QAAQ,EACR,aAAa,EACb,UAAU,EACV,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,QAAQ,GACT,EAAE,YAAY,2CAqTd"}
@@ -11,7 +11,7 @@ import {
11
11
  buildBlockDropData,
12
12
  canDropBlock,
13
13
  isBlockDragData
14
- } from "../../chunk-RIVBCL6U.js";
14
+ } from "../../chunk-Q3T23HVW.js";
15
15
  import "../../chunk-ZSPCE6MZ.js";
16
16
  import "../../chunk-5THS4K5D.js";
17
17
  import {
@@ -540,7 +540,7 @@ function SectionWrapper({
540
540
  "div",
541
541
  {
542
542
  className: cn(
543
- "absolute -left-16 bottom-full z-30 mb-1 hidden xl:block transition-opacity",
543
+ "absolute -left-16 bottom-full z-30 hover:z-[60] mb-1 hidden xl:block transition-opacity",
544
544
  alwaysShow ? "opacity-100" : "opacity-0 group-hover:opacity-100"
545
545
  ),
546
546
  children: /* @__PURE__ */ jsx7(InsertButton, { index, onInsert: onRequestInsert })
@@ -550,13 +550,16 @@ function SectionWrapper({
550
550
  "div",
551
551
  {
552
552
  className: cn(
553
- "absolute left-0 bottom-full z-30 mb-1 flex items-center gap-1.5 transition-opacity",
553
+ "absolute left-0 bottom-full z-30 hover:z-[60] mb-1 flex items-center gap-1.5 transition-opacity",
554
554
  alwaysShow ? "opacity-100" : "opacity-0 group-hover:opacity-100"
555
555
  ),
556
556
  children: [
557
- /* @__PURE__ */ jsxs5("div", { className: "-ml-[34px] flex flex-col items-center", children: [
557
+ /* @__PURE__ */ jsxs5("div", { className: "relative -ml-[34px] flex flex-col items-center", children: [
558
558
  /* @__PURE__ */ jsx7(DragHandle, { ref: handleRef }),
559
- onRequestInsert && !isDragging && chromeReady && /* @__PURE__ */ jsx7("div", { className: "xl:hidden -mt-1", children: /* @__PURE__ */ jsx7(InsertButton, { index, onInsert: onRequestInsert }) })
559
+ onRequestInsert && !isDragging && chromeReady && // Below xl the gutter can't fit the plus beside the handle, so it
560
+ // hangs below it (absolute → no row-height contribution: the handle
561
+ // stays put and the pair stacks DOWN instead of centering).
562
+ /* @__PURE__ */ jsx7("div", { className: "absolute top-full xl:hidden", children: /* @__PURE__ */ jsx7(InsertButton, { index, onInsert: onRequestInsert }) })
560
563
  ] }),
561
564
  /* @__PURE__ */ jsx7("span", { className: "pointer-events-none select-none whitespace-nowrap text-sm capitalize text-base-contrast-light/80", children: definition.label })
562
565
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Container/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgB3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAqGzD,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,gBAAgB,CAAA;KAAE,CAAC;IACpD,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;CACzD;AAkDD,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,2CA8KrF"}
1
+ {"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../../src/components/sections/Container/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgB3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAqGzD,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,gBAAgB,CAAA;KAAE,CAAC;IACpD,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;CACzD;AAkDD,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,2CA2LrF"}
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  allSectionDefs
3
- } from "../../chunk-YYDQGA2N.js";
3
+ } from "../../chunk-U4E6S4PX.js";
4
4
  import "../../chunk-NKVZGPR6.js";
5
5
  import "../../chunk-Y4JQGO6G.js";
6
6
  import "../../chunk-7T2WQSWF.js";
7
7
  import "../../chunk-T7MP7ANP.js";
8
- import "../../chunk-RIVBCL6U.js";
8
+ import "../../chunk-Q3T23HVW.js";
9
9
  import "../../chunk-ZSPCE6MZ.js";
10
10
  import "../../chunk-5THS4K5D.js";
11
11
  import "../../chunk-IFHRHV7S.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  allSectionDefs
3
- } from "../../chunk-YYDQGA2N.js";
3
+ } from "../../chunk-U4E6S4PX.js";
4
4
  import "../../chunk-NKVZGPR6.js";
5
5
  import "../../chunk-Y4JQGO6G.js";
6
6
  import "../../chunk-7T2WQSWF.js";
7
7
  import "../../chunk-T7MP7ANP.js";
8
- import "../../chunk-RIVBCL6U.js";
8
+ import "../../chunk-Q3T23HVW.js";
9
9
  import "../../chunk-ZSPCE6MZ.js";
10
10
  import "../../chunk-5THS4K5D.js";
11
11
  import "../../chunk-IFHRHV7S.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,UAAU,SAAS;IACjB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,SAAS,2CAqChG"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/shared/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,UAAU,SAAS;IACjB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,EAAE,SAAS,2CAwChG"}
@@ -1 +1 @@
1
- {"version":3,"file":"useEditorPublish.d.ts","sourceRoot":"","sources":["../../src/hooks/useEdit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AAE,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACtF,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzE,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAI/B,cAAc,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpC,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAQD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE7D,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,eAAe,GAChB,EAAE,WAAW;;;;;;;EAoXb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawnagency/primitives",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -239,11 +239,13 @@ export function SectionWrapper({
239
239
  data-section-id={sectionId}
240
240
  data-section-type={sectionType}
241
241
  >
242
- {/* Plus button — left gutter on xl+, hidden below */}
242
+ {/* Plus button — left gutter on xl+, hidden below. hover:z-[60] lifts the
243
+ whole slot (a z-30 stacking context the tooltip can't escape) above the
244
+ inline section-type picker (z-50) while the tooltip is showing. */}
243
245
  {onRequestInsert && !isDragging && chromeReady && (
244
246
  <div
245
247
  className={cn(
246
- "absolute -left-16 bottom-full z-30 mb-1 hidden xl:block transition-opacity",
248
+ "absolute -left-16 bottom-full z-30 hover:z-[60] mb-1 hidden xl:block transition-opacity",
247
249
  alwaysShow ? "opacity-100" : "opacity-0 group-hover:opacity-100",
248
250
  )}
249
251
  >
@@ -254,14 +256,17 @@ export function SectionWrapper({
254
256
  {/* Drag handle + section label */}
255
257
  <div
256
258
  className={cn(
257
- "absolute left-0 bottom-full z-30 mb-1 flex items-center gap-1.5 transition-opacity",
259
+ "absolute left-0 bottom-full z-30 hover:z-[60] mb-1 flex items-center gap-1.5 transition-opacity",
258
260
  alwaysShow ? "opacity-100" : "opacity-0 group-hover:opacity-100",
259
261
  )}
260
262
  >
261
- <div className="-ml-[34px] flex flex-col items-center">
263
+ <div className="relative -ml-[34px] flex flex-col items-center">
262
264
  <DragHandle ref={handleRef} />
263
265
  {onRequestInsert && !isDragging && chromeReady && (
264
- <div className="xl:hidden -mt-1">
266
+ // Below xl the gutter can't fit the plus beside the handle, so it
267
+ // hangs below it (absolute → no row-height contribution: the handle
268
+ // stays put and the pair stacks DOWN instead of centering).
269
+ <div className="absolute top-full xl:hidden">
265
270
  <InsertButton index={index} onInsert={onRequestInsert} />
266
271
  </div>
267
272
  )}
@@ -192,8 +192,18 @@ export function Container({ content, isEditMode, onChange, openModal }: Containe
192
192
  onChange?.({ ...content, content: nextSection.content });
193
193
 
194
194
  // Per-child inline content edits (e.g. prose/media bubble their own onChange).
195
+ // Section components emit id-less SectionContent (EditorShell re-attaches the id
196
+ // at the root) and know nothing of the layout envelope, so preserve both from
197
+ // the existing child — an id-less child fails save validation for the whole
198
+ // container. Minting when the existing child has no id self-heals drafts saved
199
+ // by the pre-fix path.
195
200
  const updateChild = (index: number, childContent: unknown) => {
196
- const next = children.map((c, i) => (i === index ? (childContent as Section) : c));
201
+ const next = children.map((c, i) => {
202
+ if (i !== index) return c;
203
+ const merged = { ...(childContent as Section), id: c.id ?? newId() };
204
+ if (c.layout !== undefined) merged.layout = c.layout;
205
+ return merged;
206
+ });
197
207
  onChange?.({ ...content, content: { ...content.content, children: next } });
198
208
  };
199
209
 
@@ -338,7 +348,10 @@ export function Container({ content, isEditMode, onChange, openModal }: Containe
338
348
  const emptyCols = occupied < columns ? columns - occupied : 0;
339
349
  return (
340
350
  <div className="@container">
341
- <div className={gridClass}>
351
+ {/* Below xl the section's "+" stacks under the drag handle and hangs down
352
+ into the left gutter, where the first child's control rail would collide
353
+ with it — push children down until the gutter is side-by-side again. */}
354
+ <div className={cn(gridClass, "pt-8 xl:pt-0")}>
342
355
  {children.map(renderEditChild)}
343
356
  {Array.from({ length: emptyCols }, (_, i) => (
344
357
  <EmptyColumnCell
@@ -57,7 +57,10 @@ export function Tabs({ tabs, defaultTabId, activeTabId, onTabChange, fullBleedTa
57
57
  ))}
58
58
  </div>
59
59
  </div>
60
- <div role="tabpanel" className={cn(fullBleedTabBar && "pt-4")}>{activeTab?.content}</div>
60
+ {/* px-px: the root's overflow-hidden would clip the 1px focus ring of
61
+ inputs that span the full panel width (rings are box-shadows drawn
62
+ outside the border box) — give them 1px to paint into. */}
63
+ <div role="tabpanel" className={cn("px-px", fullBleedTabBar && "pt-4")}>{activeTab?.content}</div>
61
64
  </div>
62
65
  );
63
66
  }
@@ -34,8 +34,11 @@ async function postSave(payload: object): Promise<{ sha: string }> {
34
34
  throw new Error("Network error while saving — check your connection and try again.");
35
35
  }
36
36
  if (!response.ok) {
37
- const errorBody = await response.json().catch(() => null) as { message?: string; error?: string } | null;
38
- const serverMessage = errorBody?.message || errorBody?.error;
37
+ const errorBody = await response.json().catch(() => null) as { message?: string; error?: string; details?: string } | null;
38
+ // `details` carries the field-level cause (e.g. the Zod path inside a failing
39
+ // container child) — without it a validation failure only names the section.
40
+ const baseMessage = errorBody?.message || errorBody?.error;
41
+ const serverMessage = baseMessage && errorBody?.details ? `${baseMessage} — ${errorBody.details}` : baseMessage;
39
42
  const fallback = !errorBody && body.length > 5_500_000
40
43
  ? "This save is too large to send in one request — remove some images from the media library and try again."
41
44
  : `Save failed (HTTP ${response.status})`;