@synopackageland/ui 0.23.8 → 0.25.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.
@@ -3,7 +3,7 @@
3
3
  "version": "2.11.0",
4
4
  "delivery": "bundled-patched-esm",
5
5
  "patchManifestSha256": "9c5b9c9a162fa584b4695a683368a4484b3ac6e70177fd063b77aa618c051627",
6
- "bundleSha256": "ac706c9e44fc2305ffd53c63450f924ed97151c0025cc77f0b7c1de5ce7968f4",
6
+ "bundleSha256": "7ce9aefba303f1b2c36f9340117065d1169ad83941eb936943cdd7443ee6d9a0",
7
7
  "sourceHashes": {
8
8
  "shared/useBodyScrollLock.js": "287bfb604318c4202769e4b5191896eaf0e52a952e1de898967cbe09467fcfda",
9
9
  "DismissableLayer/DismissableLayer.js": "3c8d248f0a32e01f89ca1f6202b1bb691bf5d0e4012a92535e161c35e69cdc32",
package/dist/rich-text.js CHANGED
@@ -32,7 +32,7 @@ function ba(a) {
32
32
  return ({ node: o }) => {
33
33
  let i = o;
34
34
  const u = document.createElement("div");
35
- u.className = "relative my-1 flex w-fit max-w-full overflow-hidden rounded-[var(--ui-radius-md)] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-subtle)] [&.ProseMirror-selectednode]:shadow-[var(--ui-shadow-focus)]", u.setAttribute("data-ui-rich-editor-image", ""), u.contentEditable = "false";
35
+ u.className = "relative my-1 flex w-fit max-w-full overflow-hidden rounded-[var(--ui-radius-container)] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-subtle)] [&.ProseMirror-selectednode]:shadow-[var(--ui-shadow-focus)]", u.setAttribute("data-ui-rich-editor-image", ""), u.contentEditable = "false";
36
36
  const n = () => {
37
37
  const { id: s, alt: S, upload: k, src: h } = i.attrs, m = s ? a.file(s) : void 0, v = i.attrs.progress < 0 ? "failed" : i.attrs.progress, c = h ?? m?.preview ?? m?.url ?? m?.thumb;
38
38
  if (u.replaceChildren(), u.style.background = m?.dominant ?? "", u.dataset.state = v === "failed" ? "failed" : k ? "uploading" : m?.state ?? (c ? "ready" : "missing"), c) {
@@ -637,20 +637,20 @@ const La = ["data-variant", "data-over"], Sa = ["aria-label"], Aa = ["aria-label
637
637
  he?.disconnect(), $.cancelAll(), clearTimeout(z), oe.value === me && (oe.value = null);
638
638
  for (const e of f) URL.revokeObjectURL(e);
639
639
  });
640
- const H = "relative flex size-8 shrink-0 items-center justify-center rounded-[var(--ui-radius-sm)] border-0 bg-transparent p-0 text-[var(--ui-text-secondary)] outline-none hover:bg-[var(--ui-surface-hover)] hover:text-[var(--ui-text)] focus-visible:shadow-[var(--ui-shadow-focus)] disabled:pointer-events-none disabled:text-[var(--ui-text-disabled)] aria-pressed:bg-[var(--ui-primary-soft)] aria-pressed:text-[var(--ui-primary)] [@media(pointer:coarse)]:size-11", St = [
640
+ const H = "relative flex size-8 shrink-0 items-center justify-center rounded-[var(--ui-radius-inner)] border-0 bg-transparent p-0 text-[var(--ui-text-secondary)] outline-none hover:bg-[var(--ui-surface-hover)] hover:text-[var(--ui-text)] focus-visible:shadow-[var(--ui-shadow-focus)] disabled:pointer-events-none disabled:text-[var(--ui-text-disabled)] aria-pressed:bg-[var(--ui-primary-soft)] aria-pressed:text-[var(--ui-primary)] [@media(pointer:coarse)]:size-11", St = [
641
641
  "min-w-0 text-[length:var(--ui-font-size)] leading-5 text-[var(--ui-text)] [overflow-wrap:anywhere]",
642
642
  "[&_.ProseMirror]:outline-none [&_.ProseMirror]:whitespace-pre-wrap [&_.ProseMirror_p]:m-0 [&_.ProseMirror>*+*]:mt-2",
643
643
  "[&_.ProseMirror_h2]:m-0 [&_.ProseMirror_h2]:text-[1.25em] [&_.ProseMirror_h2]:font-semibold [&_.ProseMirror_h3]:m-0 [&_.ProseMirror_h3]:text-[1.1em] [&_.ProseMirror_h3]:font-semibold",
644
644
  "[&_.ProseMirror_ul]:m-0 [&_.ProseMirror_ul]:list-disc [&_.ProseMirror_ul]:ps-5 [&_.ProseMirror_ol]:m-0 [&_.ProseMirror_ol]:list-decimal [&_.ProseMirror_ol]:ps-5",
645
645
  "[&_.ProseMirror_blockquote]:m-0 [&_.ProseMirror_blockquote]:border-s-[3px] [&_.ProseMirror_blockquote]:border-[var(--ui-border-strong)] [&_.ProseMirror_blockquote]:ps-3 [&_.ProseMirror_blockquote]:text-[var(--ui-text-secondary)]",
646
- "[&_.ProseMirror_pre]:m-0 [&_.ProseMirror_pre]:rounded-[var(--ui-radius-md)] [&_.ProseMirror_pre]:bg-[var(--ui-surface-subtle)] [&_.ProseMirror_pre]:px-3 [&_.ProseMirror_pre]:py-2 [&_.ProseMirror_pre]:font-[family-name:var(--ui-font-mono)] [&_.ProseMirror_pre]:text-[0.92em]",
647
- "[&_.ProseMirror_:not(pre)>code]:rounded-[var(--ui-radius-sm)] [&_.ProseMirror_:not(pre)>code]:bg-[var(--ui-surface-subtle)] [&_.ProseMirror_:not(pre)>code]:px-1 [&_.ProseMirror_:not(pre)>code]:font-[family-name:var(--ui-font-mono)] [&_.ProseMirror_:not(pre)>code]:text-[0.92em]",
646
+ "[&_.ProseMirror_pre]:m-0 [&_.ProseMirror_pre]:rounded-[var(--ui-radius-container)] [&_.ProseMirror_pre]:bg-[var(--ui-surface-subtle)] [&_.ProseMirror_pre]:px-3 [&_.ProseMirror_pre]:py-2 [&_.ProseMirror_pre]:font-[family-name:var(--ui-font-mono)] [&_.ProseMirror_pre]:text-[0.92em]",
647
+ "[&_.ProseMirror_:not(pre)>code]:rounded-[var(--ui-radius-inner)] [&_.ProseMirror_:not(pre)>code]:bg-[var(--ui-surface-subtle)] [&_.ProseMirror_:not(pre)>code]:px-1 [&_.ProseMirror_:not(pre)>code]:font-[family-name:var(--ui-font-mono)] [&_.ProseMirror_:not(pre)>code]:text-[0.92em]",
648
648
  "[&_.ProseMirror_a]:text-[var(--ui-primary)] [&_.ProseMirror_a]:underline [&_.ProseMirror_a]:underline-offset-2",
649
649
  "[&_.is-editor-empty:first-child]:before:pointer-events-none [&_.is-editor-empty:first-child]:before:float-start [&_.is-editor-empty:first-child]:before:h-0 [&_.is-editor-empty:first-child]:before:text-[var(--ui-text-muted)] [&_.is-editor-empty:first-child]:before:content-[attr(data-placeholder)]"
650
650
  ];
651
651
  return (e, t) => (p(), y("div", It(e.$attrs, {
652
652
  class: [
653
- "flex min-w-0 flex-col rounded-[var(--ui-radius-control)] border bg-[var(--ui-surface)] transition-[border-color,box-shadow] duration-[var(--ui-motion-fast)] focus-within:shadow-[var(--ui-shadow-focus)]",
653
+ "flex min-w-0 flex-col rounded-[var(--ui-radius-control)] border bg-[var(--ui-surface)] transition-[border-color,box-shadow] duration-[var(--ui-motion-fast)] focus-within:shadow-[var(--ui-shadow-focus-field)]",
654
654
  a.invalid || R.value ? "border-[var(--ui-danger)]" : "border-[var(--ui-border)] focus-within:border-[var(--ui-primary)]",
655
655
  a.disabled && "bg-[var(--ui-surface-subtle)] text-[var(--ui-text-disabled)]"
656
656
  ],
@@ -803,7 +803,7 @@ const La = ["data-variant", "data-over"], Sa = ["aria-label"], Aa = ["aria-label
803
803
  B("div", {
804
804
  role: "toolbar",
805
805
  "aria-label": l(n)("Formatting"),
806
- class: "flex items-center gap-0.5 rounded-[var(--ui-radius-md)] border border-[var(--ui-border)] bg-[var(--ui-surface-raised)] p-0.5 shadow-[var(--ui-shadow-menu)]",
806
+ class: "flex items-center gap-0.5 rounded-[var(--ui-radius-popover)] border border-[var(--ui-border)] bg-[var(--ui-surface-raised)] p-0.5 shadow-[var(--ui-shadow-menu)]",
807
807
  "data-ui-rich-bubble": ""
808
808
  }, [
809
809
  (p(!0), y(Q, null, Z(xt.value, (r) => (p(), y("button", {
@@ -838,7 +838,7 @@ const La = ["data-variant", "data-over"], Sa = ["aria-label"], Aa = ["aria-label
838
838
  "data-ui-rich-attachment": r.id ?? ""
839
839
  }, [
840
840
  B("div", {
841
- class: "relative flex size-16 items-center justify-center overflow-hidden rounded-[var(--ui-radius-md)] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-subtle)]",
841
+ class: "relative flex size-16 items-center justify-center overflow-hidden rounded-[var(--ui-radius-container)] border border-[var(--ui-border-subtle)] bg-[var(--ui-surface-subtle)]",
842
842
  style: Rt({ background: a.files?.(r.id ?? "")?.dominant })
843
843
  }, [
844
844
  r.src ?? a.files?.(r.id ?? "")?.thumb ? (p(), y("img", {