docblocks-react-ui 0.10.0 → 0.10.1
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/CHANGELOG.md +37 -0
- package/dist/{Editor-BZjfHAO5.mjs → Editor-DKO25suc.mjs} +191 -268
- package/dist/index.mjs +1 -1
- package/dist/mermaid/index.mjs +1 -1
- package/dist/styles.css +3 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# docblocks-react-ui
|
|
2
2
|
|
|
3
|
+
## 0.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9188b14: The attributes panel's polish: the label column stands the longest
|
|
8
|
+
locale key (the Russian's published-date key — the `w-32`), the rows
|
|
9
|
+
stand a 4 px gap over the former padding, the row's minimum height
|
|
10
|
+
stands dropped (the rows hug the values' band), the "Not set"
|
|
11
|
+
placeholder stands the values' font and the column's left edge over
|
|
12
|
+
every row, and the `publishedAt` row is display-only (the value is
|
|
13
|
+
consumer-owned — the panel's edit entry and the row's removal stand
|
|
14
|
+
removed, like the `status` row; the
|
|
15
|
+
`docblocks/attributes-published-at` slot now marks the display span).
|
|
16
|
+
- 985c50f: The color pickers stand one shared mechanism (the canvas's palette's
|
|
17
|
+
parity): the circular swatches over the shared `ColorSwatches` with the
|
|
18
|
+
custom rainbow's swatch + the hex's input, and the trigger's preview over
|
|
19
|
+
the shared `ColorChip` (the current's color, the hollow's stroke over the
|
|
20
|
+
stroke's attrs, the `X` over the absent).
|
|
21
|
+
|
|
22
|
+
- The callout's menu: the native `input type="color"`'s picker stands
|
|
23
|
+
removed. The custom color's commit stands over the hex's field (the
|
|
24
|
+
Enter / the blur over the valid value); the close over the uncommitted
|
|
25
|
+
draft discards it (the canvas's Esc's parity — the former's
|
|
26
|
+
commit-on-close's scrub stands no stand). The
|
|
27
|
+
`docblocks/callout-color-picker` slot now marks the hex's input.
|
|
28
|
+
- The table's row / column background: the own square swatch's grid stands
|
|
29
|
+
removed over the shared's palette (the subcontent's slot
|
|
30
|
+
`docblocks/table-color-palette`); the conditional `Remove background`'s
|
|
31
|
+
item stands removed — the shared's none's swatch
|
|
32
|
+
(`docblocks/palette-none`) is the clear's mechanism. The handle's menu
|
|
33
|
+
closes over a swatch's pick (the palette's buttons stand no Radix
|
|
34
|
+
item's close of their own).
|
|
35
|
+
- The page format toolbar's color trigger stands the current's color's
|
|
36
|
+
chip (the mark's hex; the `X` over the absent / the mixed's range).
|
|
37
|
+
- The `ColorChip`'s primitive (the `docblocks/color-chip`'s slot) is the
|
|
38
|
+
shared's trigger's preview.
|
|
39
|
+
|
|
3
40
|
## 0.10.0
|
|
4
41
|
|
|
5
42
|
### Minor Changes
|
|
@@ -3806,10 +3806,6 @@ const INIT_OPTIONS = {
|
|
|
3806
3806
|
access: {
|
|
3807
3807
|
"notPublished": "This document has not been published yet.",
|
|
3808
3808
|
"notPublishedHint": "Readers see the document only after it has been published."
|
|
3809
|
-
},
|
|
3810
|
-
colorPicker: {
|
|
3811
|
-
"aria": "Color picker",
|
|
3812
|
-
"hexAria": "Hex color value"
|
|
3813
3809
|
}
|
|
3814
3810
|
},
|
|
3815
3811
|
database: {
|
|
@@ -3948,7 +3944,8 @@ const INIT_OPTIONS = {
|
|
|
3948
3944
|
"callout": {
|
|
3949
3945
|
"typeAria": "Callout type",
|
|
3950
3946
|
"variant": "{variant} callout",
|
|
3951
|
-
"iconAria": "Callout icon"
|
|
3947
|
+
"iconAria": "Callout icon",
|
|
3948
|
+
"hexAria": "Background hex value"
|
|
3952
3949
|
},
|
|
3953
3950
|
"color": {
|
|
3954
3951
|
"trigger": "Text and background color",
|
|
@@ -4073,8 +4070,6 @@ const INIT_OPTIONS = {
|
|
|
4073
4070
|
},
|
|
4074
4071
|
menu: {
|
|
4075
4072
|
"background": "Background",
|
|
4076
|
-
"backgroundSwatch": "Background {color}",
|
|
4077
|
-
"removeBackground": "Remove background",
|
|
4078
4073
|
"insertRight": "Insert right",
|
|
4079
4074
|
"insertLeft": "Insert left",
|
|
4080
4075
|
"insertBelow": "Insert below",
|
|
@@ -4304,10 +4299,6 @@ const INIT_OPTIONS = {
|
|
|
4304
4299
|
access: {
|
|
4305
4300
|
"notPublished": "Документ ещё не опубликован.",
|
|
4306
4301
|
"notPublishedHint": "Читатели увидят документ только после публикации."
|
|
4307
|
-
},
|
|
4308
|
-
colorPicker: {
|
|
4309
|
-
"aria": "Выбор цвета",
|
|
4310
|
-
"hexAria": "Цвет в hex-формате"
|
|
4311
4302
|
}
|
|
4312
4303
|
},
|
|
4313
4304
|
database: {
|
|
@@ -4446,7 +4437,8 @@ const INIT_OPTIONS = {
|
|
|
4446
4437
|
"callout": {
|
|
4447
4438
|
"typeAria": "Тип выноски",
|
|
4448
4439
|
"variant": "Выноска: {variant}",
|
|
4449
|
-
"iconAria": "Иконка выноски"
|
|
4440
|
+
"iconAria": "Иконка выноски",
|
|
4441
|
+
"hexAria": "Цвет фона в hex-формате"
|
|
4450
4442
|
},
|
|
4451
4443
|
"color": {
|
|
4452
4444
|
"trigger": "Цвет текста и фона",
|
|
@@ -4571,8 +4563,6 @@ const INIT_OPTIONS = {
|
|
|
4571
4563
|
},
|
|
4572
4564
|
menu: {
|
|
4573
4565
|
"background": "Фон",
|
|
4574
|
-
"backgroundSwatch": "Фон {color}",
|
|
4575
|
-
"removeBackground": "Убрать фон",
|
|
4576
4566
|
"insertRight": "Вставить справа",
|
|
4577
4567
|
"insertLeft": "Вставить слева",
|
|
4578
4568
|
"insertBelow": "Вставить ниже",
|
|
@@ -6490,168 +6480,35 @@ function probeFor(entry) {
|
|
|
6490
6480
|
return el;
|
|
6491
6481
|
}
|
|
6492
6482
|
//#endregion
|
|
6493
|
-
//#region src/shared/ui/
|
|
6483
|
+
//#region src/shared/ui/ColorChip.tsx
|
|
6494
6484
|
/**
|
|
6495
|
-
* The
|
|
6496
|
-
*
|
|
6497
|
-
*
|
|
6498
|
-
*
|
|
6499
|
-
*
|
|
6500
|
-
*
|
|
6501
|
-
*
|
|
6502
|
-
*
|
|
6503
|
-
* own classes merge through `cn` (width, focus background, or padding
|
|
6504
|
-
* overrides win over the size's stand).
|
|
6485
|
+
* The color chip's preview — the trigger's current-color stand, the shared
|
|
6486
|
+
* language over every color trigger (the page's format buttons, the canvas
|
|
6487
|
+
* toolbars, the table's handles). The `fill` mode's square is filled with
|
|
6488
|
+
* the current hex; the `stroke` mode's square is hollow with the current
|
|
6489
|
+
* hex's border (the stroke's preview). The none's stand is the X over the
|
|
6490
|
+
* theme's muted frame. The frame's border reads the canvas chrome's token
|
|
6491
|
+
* over the canvas toolbars and the standard's `--border` elsewhere (the
|
|
6492
|
+
* token's fallback).
|
|
6505
6493
|
*/
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
size: {
|
|
6516
|
-
default: `
|
|
6517
|
-
border-input px-3 py-1 text-base shadow-xs
|
|
6518
|
-
focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40
|
|
6519
|
-
aria-invalid:border-destructive aria-invalid:ring-destructive/20
|
|
6520
|
-
md:text-sm
|
|
6521
|
-
dark:aria-invalid:ring-destructive/40
|
|
6522
|
-
`,
|
|
6523
|
-
sm: `h-8 border-border px-2 py-0.5 text-sm`
|
|
6494
|
+
function ColorChip({ value, mode = "fill", className }) {
|
|
6495
|
+
const none = value === void 0 || value === null || value === "";
|
|
6496
|
+
const stroke = mode === "stroke" && !none;
|
|
6497
|
+
return /* @__PURE__ */ jsx("span", {
|
|
6498
|
+
"data-slot": "docblocks/color-chip",
|
|
6499
|
+
className: cn("relative size-3 shrink-0 rounded-(--docblocks-radius)", className),
|
|
6500
|
+
style: none ? { border: "1px solid var(--docblocks-formatbar-border-color, var(--border, #888))" } : stroke ? { border: `2px solid ${value}` } : {
|
|
6501
|
+
background: value,
|
|
6502
|
+
border: "1px solid var(--docblocks-formatbar-border-color, var(--border, #888))"
|
|
6524
6503
|
},
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
dark:bg-transparent
|
|
6532
|
-
`
|
|
6533
|
-
}
|
|
6534
|
-
},
|
|
6535
|
-
defaultVariants: {
|
|
6536
|
-
size: "default",
|
|
6537
|
-
variant: "default"
|
|
6538
|
-
}
|
|
6539
|
-
});
|
|
6540
|
-
function Input({ className, size, variant, type, ...props }) {
|
|
6541
|
-
return /* @__PURE__ */ jsx("input", {
|
|
6542
|
-
type,
|
|
6543
|
-
"data-slot": "input",
|
|
6544
|
-
className: cn(inputVariants({
|
|
6545
|
-
size,
|
|
6546
|
-
variant,
|
|
6547
|
-
className
|
|
6548
|
-
})),
|
|
6549
|
-
...props
|
|
6550
|
-
});
|
|
6551
|
-
}
|
|
6552
|
-
//#endregion
|
|
6553
|
-
//#region src/shared/ui/ColorPicker.tsx
|
|
6554
|
-
/**
|
|
6555
|
-
* The custom color's picker body (the callout menu's custom swatch opens it
|
|
6556
|
-
* as an inline section): the native `input type="color"` (the live scrub —
|
|
6557
|
-
* no doc write over the scrub) and the hex field (the strict `#rrggbb`).
|
|
6558
|
-
* The doc write stands one `onCommit` per pick (one undo step, one wire
|
|
6559
|
-
* update — the swatch pick's parity): the native dialog's commit (`change`),
|
|
6560
|
-
* the field's valid Enter / blur. An invalid field value resets to the
|
|
6561
|
-
* draft on blur (the picker stands the last valid stand). The close without
|
|
6562
|
-
* an explicit commit (the Esc / the toggle / the menu's dismiss) commits the
|
|
6563
|
-
* last scrubbed value (the picker's unmount commits it); an untouched
|
|
6564
|
-
* picker commits nothing.
|
|
6565
|
-
*/
|
|
6566
|
-
/** The absent value's stand: the native input's neutral default. */
|
|
6567
|
-
const DEFAULT_HEX = "#808080";
|
|
6568
|
-
/** The strict hex field's stand: `#` + six hex digits. */
|
|
6569
|
-
const STRICT_HEX_RE = /^#([0-9a-f]{6})$/i;
|
|
6570
|
-
function ColorPickerInner({ value, onCommit, onClose }) {
|
|
6571
|
-
const { t } = useTranslation("common");
|
|
6572
|
-
const [draft, setDraft] = useState(value ?? DEFAULT_HEX);
|
|
6573
|
-
const [field, setField] = useState(value ?? DEFAULT_HEX);
|
|
6574
|
-
const valueRef = useRef(value);
|
|
6575
|
-
valueRef.current = value;
|
|
6576
|
-
const onCommitRef = useRef(onCommit);
|
|
6577
|
-
onCommitRef.current = onCommit;
|
|
6578
|
-
const onCloseRef = useRef(onClose);
|
|
6579
|
-
onCloseRef.current = onClose;
|
|
6580
|
-
const draftRef = useRef(draft);
|
|
6581
|
-
draftRef.current = draft;
|
|
6582
|
-
const touchedRef = useRef(false);
|
|
6583
|
-
const committedRef = useRef(false);
|
|
6584
|
-
useEffect(() => {
|
|
6585
|
-
return () => {
|
|
6586
|
-
if (!touchedRef.current || committedRef.current) return;
|
|
6587
|
-
const committed = normalizeHex$1(draftRef.current);
|
|
6588
|
-
const current = valueRef.current === null ? null : normalizeHex$1(valueRef.current);
|
|
6589
|
-
if (committed !== null && committed !== current) onCommitRef.current(committed);
|
|
6590
|
-
};
|
|
6591
|
-
}, []);
|
|
6592
|
-
const nativeRef = useRef(null);
|
|
6593
|
-
useEffect(() => {
|
|
6594
|
-
const el = nativeRef.current;
|
|
6595
|
-
if (el === null) return;
|
|
6596
|
-
const onChange = (event) => {
|
|
6597
|
-
committedRef.current = true;
|
|
6598
|
-
const committed = normalizeHex$1(event.target.value);
|
|
6599
|
-
const current = valueRef.current === null ? null : normalizeHex$1(valueRef.current);
|
|
6600
|
-
if (committed !== null && committed !== current) onCommitRef.current(committed);
|
|
6601
|
-
onCloseRef.current();
|
|
6602
|
-
};
|
|
6603
|
-
el.addEventListener("change", onChange);
|
|
6604
|
-
return () => el.removeEventListener("change", onChange);
|
|
6605
|
-
}, []);
|
|
6606
|
-
/** The field's commit gesture (the Enter / the valid blur): write + close. */
|
|
6607
|
-
const commitField = (raw) => {
|
|
6608
|
-
const match = raw.trim().match(STRICT_HEX_RE);
|
|
6609
|
-
if (match === null) return false;
|
|
6610
|
-
committedRef.current = true;
|
|
6611
|
-
const hex = `#${match[1].toLowerCase()}`;
|
|
6612
|
-
setDraft(hex);
|
|
6613
|
-
setField(hex);
|
|
6614
|
-
if (hex !== (valueRef.current === null ? null : normalizeHex$1(valueRef.current))) onCommitRef.current(hex);
|
|
6615
|
-
onCloseRef.current();
|
|
6616
|
-
return true;
|
|
6617
|
-
};
|
|
6618
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
6619
|
-
className: "flex flex-col gap-2",
|
|
6620
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
6621
|
-
ref: nativeRef,
|
|
6622
|
-
type: "color",
|
|
6623
|
-
value: draft,
|
|
6624
|
-
onInput: (event) => {
|
|
6625
|
-
touchedRef.current = true;
|
|
6626
|
-
setDraft(event.currentTarget.value);
|
|
6627
|
-
},
|
|
6628
|
-
"aria-label": t("colorPicker.aria"),
|
|
6629
|
-
className: "h-8 w-8 cursor-pointer rounded-xs border border-(--border) bg-transparent p-0.5"
|
|
6630
|
-
}), /* @__PURE__ */ jsx(Input, {
|
|
6631
|
-
value: field,
|
|
6632
|
-
size: "sm",
|
|
6633
|
-
"aria-label": t("colorPicker.hexAria"),
|
|
6634
|
-
placeholder: "#rrggbb",
|
|
6635
|
-
className: "font-(family-name:--docblocks-mono-font-family)",
|
|
6636
|
-
onChange: (event) => setField(event.target.value),
|
|
6637
|
-
onKeyDown: (event) => {
|
|
6638
|
-
if (event.key === "Enter") {
|
|
6639
|
-
event.preventDefault();
|
|
6640
|
-
commitField(field);
|
|
6641
|
-
}
|
|
6642
|
-
},
|
|
6643
|
-
onBlur: () => {
|
|
6644
|
-
if (!commitField(field)) setField(draft);
|
|
6645
|
-
}
|
|
6646
|
-
})]
|
|
6504
|
+
"aria-hidden": true,
|
|
6505
|
+
children: none && /* @__PURE__ */ jsx(X, {
|
|
6506
|
+
className: "absolute inset-0 m-auto size-2.5 text-muted-foreground",
|
|
6507
|
+
strokeWidth: 2.5,
|
|
6508
|
+
"aria-hidden": true
|
|
6509
|
+
})
|
|
6647
6510
|
});
|
|
6648
6511
|
}
|
|
6649
|
-
/** The palette's i18n scope: the package's instance stands the provider's
|
|
6650
|
-
* seat over the picker (the primitive stands also outside the editor's
|
|
6651
|
-
* scope — the ColorSwatches' parity). */
|
|
6652
|
-
function ColorPicker(props) {
|
|
6653
|
-
return /* @__PURE__ */ jsx(DocblocksI18nProvider, { children: /* @__PURE__ */ jsx(ColorPickerInner, { ...props }) });
|
|
6654
|
-
}
|
|
6655
6512
|
//#endregion
|
|
6656
6513
|
//#region src/shared/ui/ColorSwatches.tsx
|
|
6657
6514
|
/**
|
|
@@ -7443,6 +7300,66 @@ function DropdownMenuSubContent({ className, ...props }) {
|
|
|
7443
7300
|
});
|
|
7444
7301
|
}
|
|
7445
7302
|
//#endregion
|
|
7303
|
+
//#region src/shared/ui/Input.tsx
|
|
7304
|
+
/**
|
|
7305
|
+
* The text input primitive: the standard field control for the editor's
|
|
7306
|
+
* chrome forms. Two sizes: `default` (the standard h-9 field — the header
|
|
7307
|
+
* and the portaled forms; the `--input` token frame + the focus ring) and
|
|
7308
|
+
* `sm` (the compact h-8 grid-control look the database grid, the filter
|
|
7309
|
+
* builder, and the portaled pickers stand — the `--border` token frame,
|
|
7310
|
+
* no ring). Two looks: `default` (the framed field) and `inline` (the
|
|
7311
|
+
* row's flat field — the in-row editor: no frame / the background / the
|
|
7312
|
+
* shadow over the rest, the focus's border stand only). The call site's
|
|
7313
|
+
* own classes merge through `cn` (width, focus background, or padding
|
|
7314
|
+
* overrides win over the size's stand).
|
|
7315
|
+
*/
|
|
7316
|
+
const inputVariants = cva(`
|
|
7317
|
+
h-9 w-full min-w-0 rounded-md border bg-transparent transition-[color,box-shadow] duration-300 outline-none
|
|
7318
|
+
selection:bg-primary selection:text-primary-foreground
|
|
7319
|
+
file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground
|
|
7320
|
+
placeholder:text-muted-foreground
|
|
7321
|
+
disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
|
|
7322
|
+
dark:bg-input/30
|
|
7323
|
+
`, {
|
|
7324
|
+
variants: {
|
|
7325
|
+
size: {
|
|
7326
|
+
default: `
|
|
7327
|
+
border-input px-3 py-1 text-base shadow-xs
|
|
7328
|
+
focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40
|
|
7329
|
+
aria-invalid:border-destructive aria-invalid:ring-destructive/20
|
|
7330
|
+
md:text-sm
|
|
7331
|
+
dark:aria-invalid:ring-destructive/40
|
|
7332
|
+
`,
|
|
7333
|
+
sm: `h-8 border-border px-2 py-0.5 text-sm`
|
|
7334
|
+
},
|
|
7335
|
+
variant: {
|
|
7336
|
+
default: ``,
|
|
7337
|
+
inline: `
|
|
7338
|
+
h-8 border-transparent bg-transparent px-1.5 py-0.5 text-sm shadow-none
|
|
7339
|
+
focus-visible:border-ring focus-visible:ring-0
|
|
7340
|
+
aria-invalid:border-destructive
|
|
7341
|
+
dark:bg-transparent
|
|
7342
|
+
`
|
|
7343
|
+
}
|
|
7344
|
+
},
|
|
7345
|
+
defaultVariants: {
|
|
7346
|
+
size: "default",
|
|
7347
|
+
variant: "default"
|
|
7348
|
+
}
|
|
7349
|
+
});
|
|
7350
|
+
function Input({ className, size, variant, type, ...props }) {
|
|
7351
|
+
return /* @__PURE__ */ jsx("input", {
|
|
7352
|
+
type,
|
|
7353
|
+
"data-slot": "input",
|
|
7354
|
+
className: cn(inputVariants({
|
|
7355
|
+
size,
|
|
7356
|
+
variant,
|
|
7357
|
+
className
|
|
7358
|
+
})),
|
|
7359
|
+
...props
|
|
7360
|
+
});
|
|
7361
|
+
}
|
|
7362
|
+
//#endregion
|
|
7446
7363
|
//#region src/shared/ui/InlineEditInput.tsx
|
|
7447
7364
|
/**
|
|
7448
7365
|
* The inline edit's input (the document meta's inline editors — the
|
|
@@ -20094,6 +20011,7 @@ function FormatToolbar({ rootRef, palette }) {
|
|
|
20094
20011
|
const alignActive = (align) => range.kind === "cross" ? uniformAlignOfRange(doc, range.cross) === align : alignOfBlock(single) === align;
|
|
20095
20012
|
const paletteActive = (value) => range.kind === "cross" ? uniformMarkValueRange(doc, range.cross, target) === value : uniformMarkValue(single, range.from, range.to, target) === value;
|
|
20096
20013
|
const currentMarkValue = range.kind === "cross" ? uniformMarkValueRange(doc, range.cross, target) : uniformMarkValue(single, range.from, range.to, target);
|
|
20014
|
+
const chipValue = currentMarkValue !== null && currentMarkValue !== "mixed" ? currentMarkValue : null;
|
|
20097
20015
|
const listValue = block !== void 0 && block.type === "list-item" ? block.attrs.list : block !== void 0 && block.type === "paragraph" ? "paragraph" : block !== void 0 && block.type === "quote" ? "quote" : "";
|
|
20098
20016
|
const toggleMarkAt = (mark) => () => onToggleMark(mark);
|
|
20099
20017
|
const alignAt = (align) => () => onAlign(align);
|
|
@@ -20190,7 +20108,10 @@ function FormatToolbar({ rootRef, palette }) {
|
|
|
20190
20108
|
title: t("formatToolbar.color.trigger"),
|
|
20191
20109
|
"aria-label": t("formatToolbar.color.trigger"),
|
|
20192
20110
|
className: "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
20193
|
-
children: /* @__PURE__ */
|
|
20111
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
20112
|
+
className: "flex items-center gap-1",
|
|
20113
|
+
children: [/* @__PURE__ */ jsx(Baseline, { className: "size-4" }), /* @__PURE__ */ jsx(ColorChip, { value: chipValue })]
|
|
20114
|
+
})
|
|
20194
20115
|
})
|
|
20195
20116
|
}), /* @__PURE__ */ jsxs(PopoverContent, {
|
|
20196
20117
|
align: "start",
|
|
@@ -20299,29 +20220,27 @@ function calloutIconName(icon, variant) {
|
|
|
20299
20220
|
/**
|
|
20300
20221
|
* The callout's management affordance — the marker-zone icon stands a
|
|
20301
20222
|
* button; its click opens the block's management menu (the type presets /
|
|
20302
|
-
* the background palette over the custom
|
|
20303
|
-
*
|
|
20304
|
-
*
|
|
20305
|
-
*
|
|
20306
|
-
*
|
|
20223
|
+
* the background palette over the custom hex / the icon catalog) beside the
|
|
20224
|
+
* icon. The menu manages the block's attrs, not the selection's marks, so
|
|
20225
|
+
* it stands for an empty callout (no text selection needed). The read-only
|
|
20226
|
+
* stands (view / published) render the icon without a button — no pointer
|
|
20227
|
+
* events, the editing-surface parity.
|
|
20307
20228
|
*
|
|
20308
20229
|
* The menu is a non-modal portaled popover: the content's mousedown guard
|
|
20309
20230
|
* keeps the editor's text selection alive over the open (the format
|
|
20310
|
-
* toolbar's menu parity — the guard yields over the
|
|
20311
|
-
*
|
|
20312
|
-
*
|
|
20313
|
-
*
|
|
20314
|
-
*
|
|
20315
|
-
* dismiss) applies the last scrubbed value (the picker's unmount commits
|
|
20316
|
-
* it; the grid's custom swatch carries a non-preset current value as its
|
|
20317
|
-
* own dot).
|
|
20231
|
+
* toolbar's menu parity — the guard yields over the hex's input, its focus
|
|
20232
|
+
* stands the gesture). The pick's stand closes the menu over the color and
|
|
20233
|
+
* the icon's apply (the type preset stays open). The custom's stand is the
|
|
20234
|
+
* rainbow's swatch (the dot over the non-preset current) + the hex's input
|
|
20235
|
+
* (the shared mechanism — the canvas's palette's parity).
|
|
20318
20236
|
*/
|
|
20319
20237
|
function CalloutBlockMenu({ id, block }) {
|
|
20320
20238
|
const { t } = useTranslation("editor");
|
|
20321
20239
|
const { doc, viewMode } = useEditorContext();
|
|
20322
20240
|
const palette = useFormatPalette();
|
|
20323
20241
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
20324
|
-
const [
|
|
20242
|
+
const [hexDraft, setHexDraft] = useState("");
|
|
20243
|
+
const hexRef = useRef(null);
|
|
20325
20244
|
const variant = block.attrs?.variant ?? "info";
|
|
20326
20245
|
const color = block.attrs?.color ?? null;
|
|
20327
20246
|
const icon = block.attrs?.icon ?? null;
|
|
@@ -20350,6 +20269,16 @@ function CalloutBlockMenu({ id, block }) {
|
|
|
20350
20269
|
if (color === hex) return;
|
|
20351
20270
|
doc.updateBlock(id, { color: hex });
|
|
20352
20271
|
};
|
|
20272
|
+
useEffect(() => {
|
|
20273
|
+
if (!menuOpen) setHexDraft("");
|
|
20274
|
+
}, [menuOpen]);
|
|
20275
|
+
const commitHexDraft = () => {
|
|
20276
|
+
const normalized = normalizeHex$1(hexDraft);
|
|
20277
|
+
if (normalized !== null) {
|
|
20278
|
+
onColorCommit(normalized);
|
|
20279
|
+
setMenuOpen(false);
|
|
20280
|
+
}
|
|
20281
|
+
};
|
|
20353
20282
|
const onIconPick = (name) => {
|
|
20354
20283
|
setMenuOpen(false);
|
|
20355
20284
|
if (icon === name) return;
|
|
@@ -20384,10 +20313,7 @@ function CalloutBlockMenu({ id, block }) {
|
|
|
20384
20313
|
children: /* @__PURE__ */ jsxs(Popover, {
|
|
20385
20314
|
modal: false,
|
|
20386
20315
|
open: menuOpen,
|
|
20387
|
-
onOpenChange:
|
|
20388
|
-
setMenuOpen(next);
|
|
20389
|
-
setPickerOpen(false);
|
|
20390
|
-
},
|
|
20316
|
+
onOpenChange: setMenuOpen,
|
|
20391
20317
|
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
20392
20318
|
asChild: true,
|
|
20393
20319
|
children: /* @__PURE__ */ jsx(Button, {
|
|
@@ -20451,15 +20377,24 @@ function CalloutBlockMenu({ id, block }) {
|
|
|
20451
20377
|
noneActive: color === null,
|
|
20452
20378
|
onSelectNone: onColorNone,
|
|
20453
20379
|
allowCustom: true,
|
|
20454
|
-
onCustom: () =>
|
|
20455
|
-
}),
|
|
20380
|
+
onCustom: () => hexRef.current?.focus()
|
|
20381
|
+
}), /* @__PURE__ */ jsx(Input, {
|
|
20382
|
+
ref: hexRef,
|
|
20383
|
+
type: "text",
|
|
20384
|
+
size: "sm",
|
|
20456
20385
|
"data-slot": "docblocks/callout-color-picker",
|
|
20457
|
-
|
|
20458
|
-
|
|
20459
|
-
|
|
20460
|
-
|
|
20461
|
-
|
|
20462
|
-
|
|
20386
|
+
"aria-label": t("formatToolbar.callout.hexAria"),
|
|
20387
|
+
className: "mt-2 h-7 font-mono text-xs",
|
|
20388
|
+
placeholder: "#rrggbb",
|
|
20389
|
+
value: hexDraft,
|
|
20390
|
+
onChange: (event) => setHexDraft(event.target.value),
|
|
20391
|
+
onKeyDown: (event) => {
|
|
20392
|
+
if (event.key === "Enter") {
|
|
20393
|
+
event.preventDefault();
|
|
20394
|
+
commitHexDraft();
|
|
20395
|
+
}
|
|
20396
|
+
},
|
|
20397
|
+
onBlur: commitHexDraft
|
|
20463
20398
|
})]
|
|
20464
20399
|
}),
|
|
20465
20400
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -22890,11 +22825,14 @@ function onToolbarBodyMouseDown(event) {
|
|
|
22890
22825
|
/** One color section of the shape toolbar (the fill or the stroke). The
|
|
22891
22826
|
* open state is the toolbar's (the sections are mutually exclusive — the
|
|
22892
22827
|
* non-modal popover does not close on an outside click, so a per-section
|
|
22893
|
-
* state would let both palettes stand open at once).
|
|
22894
|
-
|
|
22828
|
+
* state would let both palettes stand open at once). The custom's stand is
|
|
22829
|
+
* the rainbow's swatch (the dot over the current custom's value) + the hex
|
|
22830
|
+
* input (the shared mechanism — the native dialog's no-stand). */
|
|
22831
|
+
function ColorSection({ target, label, current, mode = "fill", icon, open, onOpenChange, onApply, allowNone = true, slotPrefix = "docblocks/shape" }) {
|
|
22895
22832
|
const { t } = useTranslation("canvas");
|
|
22896
22833
|
const palette = useFormatPalette();
|
|
22897
22834
|
const [draft, setDraft] = useState("");
|
|
22835
|
+
const hexRef = useRef(null);
|
|
22898
22836
|
const none = allowNone && (current === void 0 || current === "none");
|
|
22899
22837
|
const lower = current?.toLowerCase();
|
|
22900
22838
|
useEffect(() => {
|
|
@@ -22935,13 +22873,9 @@ function ColorSection({ target, label, current, chipStyle, icon, open, onOpenCha
|
|
|
22935
22873
|
className: "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
22936
22874
|
children: /* @__PURE__ */ jsxs("span", {
|
|
22937
22875
|
className: "flex items-center gap-1",
|
|
22938
|
-
children: [icon,
|
|
22939
|
-
|
|
22940
|
-
|
|
22941
|
-
...chipStyle,
|
|
22942
|
-
border: "1px solid var(--docblocks-formatbar-border-color, #888)"
|
|
22943
|
-
},
|
|
22944
|
-
"aria-hidden": true
|
|
22876
|
+
children: [icon, /* @__PURE__ */ jsx(ColorChip, {
|
|
22877
|
+
value: current,
|
|
22878
|
+
mode
|
|
22945
22879
|
})]
|
|
22946
22880
|
})
|
|
22947
22881
|
})
|
|
@@ -22961,8 +22895,11 @@ function ColorSection({ target, label, current, chipStyle, icon, open, onOpenCha
|
|
|
22961
22895
|
label: target,
|
|
22962
22896
|
allowNone,
|
|
22963
22897
|
noneActive: none,
|
|
22964
|
-
onSelectNone: allowNone ? selectNone : void 0
|
|
22898
|
+
onSelectNone: allowNone ? selectNone : void 0,
|
|
22899
|
+
allowCustom: true,
|
|
22900
|
+
onCustom: () => hexRef.current?.focus()
|
|
22965
22901
|
}), /* @__PURE__ */ jsx(Input, {
|
|
22902
|
+
ref: hexRef,
|
|
22966
22903
|
size: "sm",
|
|
22967
22904
|
"data-slot": `${slotPrefix}-${target}-hex`,
|
|
22968
22905
|
"aria-label": t("colorHex", { label }),
|
|
@@ -23124,7 +23061,7 @@ function ConnectorToolbar({ id, variant, strokeColor, strokeWidth, strokeStyle,
|
|
|
23124
23061
|
target: "stroke",
|
|
23125
23062
|
label: t("connector.lineColor"),
|
|
23126
23063
|
current: strokeColor,
|
|
23127
|
-
|
|
23064
|
+
mode: "stroke",
|
|
23128
23065
|
icon: /* @__PURE__ */ jsx(Stroke, { className: "size-4" }),
|
|
23129
23066
|
open: openSection === "stroke",
|
|
23130
23067
|
onOpenChange: openStrokeSection,
|
|
@@ -24653,7 +24590,6 @@ function ShapeTextControls({ slotPrefix, sizeListId, fontFamily, textColor, text
|
|
|
24653
24590
|
target: "text",
|
|
24654
24591
|
label: t("text.color"),
|
|
24655
24592
|
current: textColor,
|
|
24656
|
-
chipStyle: { background: textColor ?? "transparent" },
|
|
24657
24593
|
icon: /* @__PURE__ */ jsx(Palette, { className: "size-4" }),
|
|
24658
24594
|
open: textColorOpen,
|
|
24659
24595
|
onOpenChange: onTextColorOpenChange,
|
|
@@ -24916,7 +24852,6 @@ function ShapeToolbar({ id, fill, stroke, strokeWidth, strokeStyle, variant, tex
|
|
|
24916
24852
|
target: "fill",
|
|
24917
24853
|
label: t("shape.fillColor"),
|
|
24918
24854
|
current: fill,
|
|
24919
|
-
chipStyle: { background: fill ?? "transparent" },
|
|
24920
24855
|
icon: /* @__PURE__ */ jsx(Fill, { className: "size-4" }),
|
|
24921
24856
|
open: openSection === "fill",
|
|
24922
24857
|
onOpenChange: openFillSection,
|
|
@@ -24926,7 +24861,7 @@ function ShapeToolbar({ id, fill, stroke, strokeWidth, strokeStyle, variant, tex
|
|
|
24926
24861
|
target: "stroke",
|
|
24927
24862
|
label: t("shape.strokeColor"),
|
|
24928
24863
|
current: stroke,
|
|
24929
|
-
|
|
24864
|
+
mode: "stroke",
|
|
24930
24865
|
icon: /* @__PURE__ */ jsx(Stroke, { className: "size-4" }),
|
|
24931
24866
|
open: openSection === "stroke",
|
|
24932
24867
|
onOpenChange: openStrokeSection,
|
|
@@ -26665,13 +26600,13 @@ function HandleMenu({ kind, index, visible, left, top, open, onOpenChange, dragg
|
|
|
26665
26600
|
})]
|
|
26666
26601
|
});
|
|
26667
26602
|
}
|
|
26668
|
-
/** The handle's menu items (in the fixed order: the background palette
|
|
26669
|
-
*
|
|
26670
|
-
* items; the edge moves are disabled). The
|
|
26671
|
-
* color is read from the store (a primitive selector: the menu
|
|
26672
|
-
* when the row/column's cells gain or lose the color — a cell
|
|
26673
|
-
* does not touch the table block, so the block's own
|
|
26674
|
-
* fire). */
|
|
26603
|
+
/** The handle's menu items (in the fixed order: the background palette (the
|
|
26604
|
+
* shared's swatches — the none's swatch stands the clear), the insert / move
|
|
26605
|
+
* / duplicate / clear / delete items; the edge moves are disabled). The
|
|
26606
|
+
* background color is read from the store (a primitive selector: the menu
|
|
26607
|
+
* re-renders when the row/column's cells gain or lose the color — a cell
|
|
26608
|
+
* color change does not touch the table block, so the block's own
|
|
26609
|
+
* subscription does not fire). */
|
|
26675
26610
|
function HandleMenuItems({ tableId, kind, index, palette, atStart, atEnd, onAction, onColor }) {
|
|
26676
26611
|
const { t } = useTranslation("table");
|
|
26677
26612
|
const { store } = useEditorContext();
|
|
@@ -26706,35 +26641,21 @@ function HandleMenuItems({ tableId, kind, index, palette, atStart, atEnd, onActi
|
|
|
26706
26641
|
const selectClear = () => onAction("clear");
|
|
26707
26642
|
const selectRemove = () => onAction("remove");
|
|
26708
26643
|
const clearColor = () => onColor(null);
|
|
26709
|
-
const selectSwatch = (swatch) => (event) => {
|
|
26710
|
-
const hex = resolveColorToHex(swatch, event.currentTarget);
|
|
26711
|
-
if (hex !== null) onColor(hex);
|
|
26712
|
-
};
|
|
26713
26644
|
const column = kind === "column";
|
|
26714
26645
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
26715
|
-
/* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx("
|
|
26716
|
-
|
|
26717
|
-
|
|
26718
|
-
|
|
26719
|
-
|
|
26720
|
-
|
|
26721
|
-
|
|
26722
|
-
|
|
26723
|
-
|
|
26724
|
-
|
|
26725
|
-
|
|
26726
|
-
|
|
26727
|
-
title: swatch,
|
|
26728
|
-
className: "size-6",
|
|
26729
|
-
style: { background: swatch },
|
|
26730
|
-
onClick: selectSwatch(swatch)
|
|
26731
|
-
}, swatch))
|
|
26646
|
+
/* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(ColorChip, { value: color }), t("menu.background")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, {
|
|
26647
|
+
"data-slot": "docblocks/table-color-palette",
|
|
26648
|
+
className: "w-auto p-2",
|
|
26649
|
+
children: /* @__PURE__ */ jsx(ColorSwatches, {
|
|
26650
|
+
colors: palette,
|
|
26651
|
+
current: color,
|
|
26652
|
+
onSelect: (hex) => onColor(hex),
|
|
26653
|
+
label: t("menu.background"),
|
|
26654
|
+
allowNone: true,
|
|
26655
|
+
noneActive: color === void 0,
|
|
26656
|
+
onSelectNone: clearColor
|
|
26657
|
+
})
|
|
26732
26658
|
})] }),
|
|
26733
|
-
color !== void 0 && /* @__PURE__ */ jsx(DropdownMenuItem, {
|
|
26734
|
-
"data-slot": "docblocks/table-remove-color",
|
|
26735
|
-
onSelect: clearColor,
|
|
26736
|
-
children: t("menu.removeBackground")
|
|
26737
|
-
}),
|
|
26738
26659
|
/* @__PURE__ */ jsx(DropdownMenuItem, {
|
|
26739
26660
|
onSelect: selectInsertAfter,
|
|
26740
26661
|
children: column ? t("menu.insertRight") : t("menu.insertBelow")
|
|
@@ -27580,6 +27501,7 @@ function TableBlock({ id, block }) {
|
|
|
27580
27501
|
if (kind === "column") doc.setTableColumnColor(id, index, color);
|
|
27581
27502
|
else doc.setTableRowColor(id, rowId, color);
|
|
27582
27503
|
} catch {}
|
|
27504
|
+
setMenu(null);
|
|
27583
27505
|
};
|
|
27584
27506
|
const columnCenters = [];
|
|
27585
27507
|
{
|
|
@@ -30545,10 +30467,10 @@ function AttributeRow({ attributeKey, label, removable, onRemove, removeAria, to
|
|
|
30545
30467
|
return /* @__PURE__ */ jsxs("div", {
|
|
30546
30468
|
"data-slot": "docblocks/attribute-row",
|
|
30547
30469
|
"data-attribute-key": attributeKey,
|
|
30548
|
-
className: "flex
|
|
30470
|
+
className: "flex items-center gap-3",
|
|
30549
30471
|
children: [
|
|
30550
30472
|
/* @__PURE__ */ jsx("span", {
|
|
30551
|
-
className: cn("w-
|
|
30473
|
+
className: cn("w-32 shrink-0 truncate text-sm text-muted-foreground", topAlign && "self-start", labelClassName),
|
|
30552
30474
|
children: label
|
|
30553
30475
|
}),
|
|
30554
30476
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -31088,7 +31010,7 @@ function DraggableAttributeRow({ attributeKey, onDragStart, onDragEnd, topAlign,
|
|
|
31088
31010
|
rounded-full text-(--docblocks-gutter-color) opacity-0
|
|
31089
31011
|
group-hover:opacity-100
|
|
31090
31012
|
active:cursor-grabbing
|
|
31091
|
-
`, topAlign ? "top-
|
|
31013
|
+
`, topAlign ? "top-1.5" : "top-1/2 -translate-y-1/2"),
|
|
31092
31014
|
children: /* @__PURE__ */ jsx(GripVertical, { className: "size-4" })
|
|
31093
31015
|
}), children]
|
|
31094
31016
|
});
|
|
@@ -31101,7 +31023,7 @@ function TagsZone({ tags, readOnly, onTagAdd, onTagRemove, onTagClick }) {
|
|
|
31101
31023
|
const { t } = useTranslation("editor");
|
|
31102
31024
|
if (tags.length === 0) {
|
|
31103
31025
|
if (readOnly || onTagAdd === void 0) return /* @__PURE__ */ jsx("span", {
|
|
31104
|
-
className: "text-muted-foreground",
|
|
31026
|
+
className: "text-sm text-muted-foreground",
|
|
31105
31027
|
children: t("attributes.notSet")
|
|
31106
31028
|
});
|
|
31107
31029
|
return /* @__PURE__ */ jsxs("button", {
|
|
@@ -31257,7 +31179,7 @@ function AttributesPanel() {
|
|
|
31257
31179
|
return node === null ? defaultZone : node;
|
|
31258
31180
|
};
|
|
31259
31181
|
const notSet = /* @__PURE__ */ jsx("span", {
|
|
31260
|
-
className: "text-muted-foreground",
|
|
31182
|
+
className: "text-sm text-muted-foreground",
|
|
31261
31183
|
children: t("attributes.notSet")
|
|
31262
31184
|
});
|
|
31263
31185
|
const customKeysAll = Object.keys(attributes).filter((key) => !isPresetKey(key));
|
|
@@ -31415,7 +31337,7 @@ function AttributesPanel() {
|
|
|
31415
31337
|
children: [/* @__PURE__ */ jsx(ChevronDown, { className: cn("size-3.5 transition-transform", !open && "-rotate-90") }), t("attributes.title")]
|
|
31416
31338
|
}), open ? /* @__PURE__ */ jsxs("div", {
|
|
31417
31339
|
"data-slot": "docblocks/attributes-body",
|
|
31418
|
-
className: "mt-1 border-t border-muted pt-1.5",
|
|
31340
|
+
className: "mt-1 flex flex-col gap-1 border-t border-muted pt-1.5",
|
|
31419
31341
|
children: [
|
|
31420
31342
|
hidden.has("id") ? null : /* @__PURE__ */ jsx(AttributeRow, {
|
|
31421
31343
|
attributeKey: "id",
|
|
@@ -31460,12 +31382,15 @@ function AttributesPanel() {
|
|
|
31460
31382
|
attributeKey: "tags",
|
|
31461
31383
|
label: t("attributes.tags"),
|
|
31462
31384
|
removable: false,
|
|
31463
|
-
children:
|
|
31464
|
-
|
|
31465
|
-
|
|
31466
|
-
|
|
31467
|
-
|
|
31468
|
-
|
|
31385
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
31386
|
+
className: "flex min-w-0 flex-1 items-center px-1.5 py-1",
|
|
31387
|
+
children: docTags === null ? notSet : /* @__PURE__ */ jsx(TagsZone, {
|
|
31388
|
+
tags: docTags.tags,
|
|
31389
|
+
readOnly: viewMode,
|
|
31390
|
+
onTagAdd: docTags.onTagAdd,
|
|
31391
|
+
onTagRemove: docTags.onTagRemove,
|
|
31392
|
+
onTagClick: docTags.onTagClick
|
|
31393
|
+
})
|
|
31469
31394
|
})
|
|
31470
31395
|
}, "tags"),
|
|
31471
31396
|
hidden.has("createdBy") ? null : /* @__PURE__ */ jsx(AttributeRow, {
|
|
@@ -31502,21 +31427,19 @@ function AttributesPanel() {
|
|
|
31502
31427
|
hidden.has("publishedAt") ? null : /* @__PURE__ */ jsx(AttributeRow, {
|
|
31503
31428
|
attributeKey: "publishedAt",
|
|
31504
31429
|
label: t("attributes.publishedAt"),
|
|
31505
|
-
removable:
|
|
31506
|
-
onRemove: () => remove("publishedAt"),
|
|
31507
|
-
removeAria: t("attributes.removeAria", { name: t("attributes.publishedAt") }),
|
|
31430
|
+
removable: false,
|
|
31508
31431
|
children: (() => {
|
|
31509
31432
|
const raw = stringValue("publishedAt");
|
|
31510
|
-
|
|
31511
|
-
|
|
31512
|
-
|
|
31513
|
-
|
|
31514
|
-
else set("publishedAt", next);
|
|
31433
|
+
return valueZone("publishedAt", /* @__PURE__ */ jsx("span", {
|
|
31434
|
+
"data-slot": "docblocks/attributes-published-at",
|
|
31435
|
+
className: "block truncate px-1.5 py-1 text-sm",
|
|
31436
|
+
children: raw === void 0 || raw === "" ? notSet : displayPublishedDate(raw, locale)
|
|
31515
31437
|
}));
|
|
31516
31438
|
})()
|
|
31517
31439
|
}, "publishedAt"),
|
|
31518
31440
|
viewMode ? /* @__PURE__ */ jsx("div", {
|
|
31519
31441
|
"data-slot": "docblocks/attributes-custom",
|
|
31442
|
+
className: "flex flex-col gap-1",
|
|
31520
31443
|
children: displayCustomKeys.map((key) => renderCustomRow(key))
|
|
31521
31444
|
}) : /* @__PURE__ */ jsx(Reorder.Group, {
|
|
31522
31445
|
as: "div",
|
|
@@ -31524,7 +31447,7 @@ function AttributesPanel() {
|
|
|
31524
31447
|
axis: "y",
|
|
31525
31448
|
values: displayCustomKeys,
|
|
31526
31449
|
onReorder: (next) => setDragOrder(next),
|
|
31527
|
-
className: "flex flex-col",
|
|
31450
|
+
className: "flex flex-col gap-1",
|
|
31528
31451
|
children: displayCustomKeys.map((key) => /* @__PURE__ */ jsx(DraggableAttributeRow, {
|
|
31529
31452
|
attributeKey: key,
|
|
31530
31453
|
topAlign: isListCustom(key),
|
|
@@ -31974,7 +31897,7 @@ function useEditing() {
|
|
|
31974
31897
|
if (inner === null) return;
|
|
31975
31898
|
const position = locatePosition(inner, event.key === "Home" ? 0 : doc.getTextLength(targetId));
|
|
31976
31899
|
applyDomSelection(position.node, position.offset, position.node, position.offset);
|
|
31977
|
-
(position.node instanceof Element ? position.node : position.node.parentElement)?.scrollIntoView({ block: event.key === "Home" ? "start" : "end" });
|
|
31900
|
+
(position.node instanceof Element ? position.node : position.node.parentElement)?.scrollIntoView?.({ block: event.key === "Home" ? "start" : "end" });
|
|
31978
31901
|
return;
|
|
31979
31902
|
}
|
|
31980
31903
|
if (viewMode) return;
|
|
@@ -33195,4 +33118,4 @@ function Editor({ view = "page", formatPalette = FORMAT_PALETTE }) {
|
|
|
33195
33118
|
});
|
|
33196
33119
|
}
|
|
33197
33120
|
//#endregion
|
|
33198
|
-
export {
|
|
33121
|
+
export { DropdownMenuSubTrigger as $, BookOpen as $t, SelectItem as A, Card as At, DropdownMenu as B, useDoc as Bt, emptyFilter as C, isBridgeErrorCode as Ct, Select as D, TEXT_TYPES as Dt, ScrollArea as E, parseCellValue as Et, SelectTrigger as F, CardHeader as Ft, DropdownMenuLabel as G, useSelectionView as Gt, DropdownMenuContent as H, usePresence as Ht, SelectValue as I, CardTitle as It, DropdownMenuRadioItem as J, INLINE_CODE_CLASS as Jt, DropdownMenuPortal as K, useText as Kt, Label as L, Badge as Lt, SelectScrollDownButton as M, CardContent as Mt, SelectScrollUpButton as N, CardDescription as Nt, SelectContent as O, columnAnnotation as Ot, SelectSeparator as P, CardFooter as Pt, DropdownMenuSubContent as Q, CodeXml as Qt, InlineEditInput as R, badgeVariants as Rt, FilterBuilder as S, isBridgeError as St, SegmentSelector as T, conditionMatches as Tt, DropdownMenuGroup as U, usePresenceSharing as Ut, DropdownMenuCheckboxItem as V, useMeta as Vt, DropdownMenuItem as W, useSelection as Wt, DropdownMenuShortcut as X, Pen as Xt, DropdownMenuSeparator as Y, renderRuns as Yt, DropdownMenuSub as Z, Eye as Zt, parseFrontmatter as _, PROTOCOL_VERSION as _t, childrenSlot as a, PopoverDescription as at, cellValueEqual as b, BRIDGE_ERROR_CODES as bt, SHAPE_FONT_STACKS as c, PopoverTrigger as ct, textOf as d, buttonVariants as dt, createMemoryBlobStore as en, DropdownMenuTrigger as et, markToggleAction as f, BareSelect as ft, mapFrontmatter as g, BASELINE_CAPABILITIES as gt, mdToBlocks as h, AlertTitle as ht, DEFAULT_EMBED_SANDBOX as i, PopoverContent as it, SelectLabel as j, CardAction as jt, SelectGroup as k, Skeleton as kt, TextBlock as l, Checkbox as lt, insertNative as m, AlertDescription as mt, EditorProvider as n, Popover as nt, CodeHeader as o, PopoverHeader as ot, htmlToBlocks as p, Alert as pt, DropdownMenuRadioGroup as q, DocblocksI18nProvider as qt, useEditorContext as r, PopoverAnchor as rt, SHAPE_FONT_OPTIONS as s, PopoverTitle as st, Editor as t, Separator as tt, FORMAT_PALETTE as u, Button as ut, GridBody as v, isDatabaseBridge as vt, filterIsComplete as w, toBridgeError as wt, newMutationContext as x, BridgeError as xt, useDatabaseTable as y, validateProtocolDescriptor as yt, Input as z, useBlock as zt };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as DropdownMenuSubTrigger, $t as BookOpen, A as SelectItem, At as Card, B as DropdownMenu, Bt as useDoc, C as emptyFilter, Ct as isBridgeErrorCode, D as Select, Dt as TEXT_TYPES, E as ScrollArea, Et as parseCellValue, F as SelectTrigger, Ft as CardHeader, G as DropdownMenuLabel, Gt as useSelectionView, H as DropdownMenuContent, Ht as usePresence, I as SelectValue, It as CardTitle, J as DropdownMenuRadioItem, K as DropdownMenuPortal, Kt as useText, L as Label, Lt as Badge, M as SelectScrollDownButton, Mt as CardContent, N as SelectScrollUpButton, Nt as CardDescription, O as SelectContent, Ot as columnAnnotation, P as SelectSeparator, Pt as CardFooter, Q as DropdownMenuSubContent, R as InlineEditInput, Rt as badgeVariants, S as FilterBuilder, St as isBridgeError, T as SegmentSelector, Tt as conditionMatches, U as DropdownMenuGroup, Ut as usePresenceSharing, V as DropdownMenuCheckboxItem, Vt as useMeta, W as DropdownMenuItem, Wt as useSelection, X as DropdownMenuShortcut, Xt as Pen, Y as DropdownMenuSeparator, Yt as renderRuns, Z as DropdownMenuSub, Zt as Eye, _ as parseFrontmatter, _t as PROTOCOL_VERSION, at as PopoverDescription, b as cellValueEqual, bt as BRIDGE_ERROR_CODES, c as SHAPE_FONT_STACKS, ct as PopoverTrigger, dt as buttonVariants, en as createMemoryBlobStore, et as DropdownMenuTrigger, f as markToggleAction, ft as BareSelect, g as mapFrontmatter, gt as BASELINE_CAPABILITIES, h as mdToBlocks, ht as AlertTitle, i as DEFAULT_EMBED_SANDBOX, it as PopoverContent, j as SelectLabel, jt as CardAction, k as SelectGroup, kt as Skeleton, lt as Checkbox, m as insertNative, mt as AlertDescription, n as EditorProvider, nt as Popover, ot as PopoverHeader, p as htmlToBlocks, pt as Alert, q as DropdownMenuRadioGroup, qt as DocblocksI18nProvider, r as useEditorContext, rt as PopoverAnchor, s as SHAPE_FONT_OPTIONS, st as PopoverTitle, t as Editor, tt as Separator, u as FORMAT_PALETTE, ut as Button, v as GridBody, vt as isDatabaseBridge, w as filterIsComplete, wt as toBridgeError, x as newMutationContext, xt as BridgeError, y as useDatabaseTable, yt as validateProtocolDescriptor, z as Input, zt as useBlock } from "./Editor-DKO25suc.mjs";
|
|
2
2
|
import { a as preventDefault, s as cn } from "./constants-D8PSgkwi.mjs";
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
package/dist/mermaid/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Jt as INLINE_CODE_CLASS, Qt as CodeXml, T as SegmentSelector, Zt as Eye, a as childrenSlot, d as textOf, ht as AlertTitle, kt as Skeleton, l as TextBlock, mt as AlertDescription, o as CodeHeader, pt as Alert, r as useEditorContext } from "../Editor-
|
|
1
|
+
import { Jt as INLINE_CODE_CLASS, Qt as CodeXml, T as SegmentSelector, Zt as Eye, a as childrenSlot, d as textOf, ht as AlertTitle, kt as Skeleton, l as TextBlock, mt as AlertDescription, o as CodeHeader, pt as Alert, r as useEditorContext } from "../Editor-DKO25suc.mjs";
|
|
2
2
|
import { f as LoaderCircle, l as TriangleAlert } from "../constants-D8PSgkwi.mjs";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
package/dist/styles.css
CHANGED
|
@@ -723,9 +723,6 @@
|
|
|
723
723
|
.min-h-6 {
|
|
724
724
|
min-height: calc(var(--spacing) * 6);
|
|
725
725
|
}
|
|
726
|
-
.min-h-11 {
|
|
727
|
-
min-height: calc(var(--spacing) * 11);
|
|
728
|
-
}
|
|
729
726
|
.min-h-16 {
|
|
730
727
|
min-height: calc(var(--spacing) * 16);
|
|
731
728
|
}
|
|
@@ -762,9 +759,6 @@
|
|
|
762
759
|
.w-7 {
|
|
763
760
|
width: calc(var(--spacing) * 7);
|
|
764
761
|
}
|
|
765
|
-
.w-8 {
|
|
766
|
-
width: calc(var(--spacing) * 8);
|
|
767
|
-
}
|
|
768
762
|
.w-10 {
|
|
769
763
|
width: calc(var(--spacing) * 10);
|
|
770
764
|
}
|
|
@@ -774,6 +768,9 @@
|
|
|
774
768
|
.w-28 {
|
|
775
769
|
width: calc(var(--spacing) * 28);
|
|
776
770
|
}
|
|
771
|
+
.w-32 {
|
|
772
|
+
width: calc(var(--spacing) * 32);
|
|
773
|
+
}
|
|
777
774
|
.w-40 {
|
|
778
775
|
width: calc(var(--spacing) * 40);
|
|
779
776
|
}
|
|
@@ -1011,9 +1008,6 @@
|
|
|
1011
1008
|
.auto-rows-min {
|
|
1012
1009
|
grid-auto-rows: min-content;
|
|
1013
1010
|
}
|
|
1014
|
-
.grid-cols-3 {
|
|
1015
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
1016
|
-
}
|
|
1017
1011
|
.grid-cols-6 {
|
|
1018
1012
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
1019
1013
|
}
|
|
@@ -1698,9 +1692,6 @@
|
|
|
1698
1692
|
.text-\(--docblocks-link-color\) {
|
|
1699
1693
|
color: var(--docblocks-link-color);
|
|
1700
1694
|
}
|
|
1701
|
-
.text-\(--docblocks-muted-foreground\) {
|
|
1702
|
-
color: var(--docblocks-muted-foreground);
|
|
1703
|
-
}
|
|
1704
1695
|
.text-\(--docblocks-muted-text-color\) {
|
|
1705
1696
|
color: var(--docblocks-muted-text-color);
|
|
1706
1697
|
}
|
package/package.json
CHANGED