@fuma-content/studio 1.0.1 → 1.0.3
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/build/client/assets/{QueryClientProvider-DqiXnN2L.js → QueryClientProvider-Cys2v_1v.js} +1 -1
- package/build/client/assets/{actions-DkbV2Z0p.js → actions-BIaFztcg.js} +1 -1
- package/build/client/assets/{actions-DpkI7OTF.js → actions-Bws1O3FH.js} +1 -1
- package/build/client/assets/{badge-CZkdLoIP.js → badge-C70RdDmr.js} +1 -1
- package/build/client/assets/{button-Bm94vje1.js → button-B0G-joJA.js} +5 -5
- package/build/client/assets/{client-Crg-pMcu.js → client-C814jsdE.js} +1 -1
- package/build/client/assets/{client-OSVRoCKH.js → client-Cfd36Zz-.js} +143 -141
- package/build/client/assets/{client-BWBqEatf.js → client-wwp8K9Xz.js} +1 -1
- package/build/client/assets/dropdown-menu-Re3QusA0.js +1 -0
- package/build/client/assets/entry.rsc-CdTwhQ3_.js +1 -0
- package/build/client/assets/{index-Bx93mXy1.js → index-C37mbJ0i.js} +1 -1
- package/build/client/assets/{index-BdrDVoE8.js → index-DL539Bhx.js} +1 -1
- package/build/client/assets/{index-BpILsqFO.js → index-DXHuzvfN.js} +1 -1
- package/build/client/assets/{index-DOs5iMXj.js → index-DZ8LIlZu.js} +1 -1
- package/build/client/assets/{index-CQRgqbuL.js → index-DprkZK2S.js} +1 -1
- package/build/client/assets/{index-DTzAH5JX.js → index-UnlOgAz7.js} +1 -1
- package/build/client/assets/{layout-CnpYRqF0.js → layout-C5TjiFIx.js} +1 -1
- package/build/client/assets/{mdx-BNErtsK6.js → mdx-CehodSrM.js} +1 -1
- package/build/client/assets/page-CiRIEJz9.js +1 -0
- package/build/client/assets/{page-DOzl4Kpa.js → page-DBIuN_hk.js} +1 -1
- package/build/client/assets/{react-B8--K7an.js → react-D58ornpH.js} +2 -2
- package/build/client/assets/{root-B_CXTQpA.js → root-CNcQf1GA.js} +1 -1
- package/build/client/assets/root-CbriXo_i.css +1 -0
- package/build/client/assets/root-DJ8qMHCd.js +1 -0
- package/build/client/assets/{router-a9jyj9wf.js → router-XCTsiXqQ.js} +1 -1
- package/build/client/assets/{separator-tWFpvpUX.js → separator-BDe8wWVP.js} +1 -1
- package/build/client/assets/{sidebar-BBYit8gY.js → sidebar-DNKkYLTA.js} +1 -1
- package/build/client/assets/{site-header-DQkKe-WA.js → site-header-1Aor7-g4.js} +1 -1
- package/build/client/assets/{spinner-BdPhtfsc.js → spinner-O3ZbB6fn.js} +1 -1
- package/build/client/assets/{tooltip-Dvh-iHDG.js → tooltip-B4fI3WTO.js} +3 -3
- package/build/client/assets/use-sync-CfDyibsS.js +9 -0
- package/build/client/assets/{yaml-Cloe7OVn.js → yaml-DUnUkeX8.js} +1 -1
- package/build/server/__ssr_build/__vite_rsc_assets_manifest.js +132 -132
- package/build/server/__ssr_build/assets/{actions-B50-3n-a.js → actions-D6dLhck1.js} +4 -4
- package/build/server/__ssr_build/assets/{actions-BFtCTvOL.js → actions-DLZnfFzU.js} +2 -2
- package/build/server/__ssr_build/assets/{badge-DYFvBSp8.js → badge-CH6ntch2.js} +1 -1
- package/build/server/__ssr_build/assets/{button-C_-b_vqm.js → button-U-KvP9zg.js} +35 -32
- package/build/server/__ssr_build/assets/{client-CU90j0R8.js → client-C-WcMcGh.js} +3 -3
- package/build/server/__ssr_build/assets/{client--HXec13w.js → client-DX-wDNer.js} +5 -5
- package/build/server/__ssr_build/assets/{client-BqW9rGyi.js → client-JNaR8Jey.js} +630 -913
- package/build/server/__ssr_build/assets/{dropdown-menu-D2YyT3lP.js → dropdown-menu-gcIcDMHP.js} +2 -3
- package/build/server/__ssr_build/assets/{index-B-gno69w.js → index-BJ-AF-IL.js} +7 -7
- package/build/server/__ssr_build/assets/{index-DBc0nhEL.js → index-BloUStie.js} +1 -1
- package/build/server/__ssr_build/assets/{index-Dtw6X3NW.js → index-CWwW5yWZ.js} +1 -1
- package/build/server/__ssr_build/assets/{layout-CPnSx9PI.js → layout-B79fq6F-.js} +11 -11
- package/build/server/__ssr_build/assets/{page-BwoghW3K.js → page-CxhOzrct.js} +8 -8
- package/build/server/__ssr_build/assets/{page-HxttullC.js → page-DxtKhA1K.js} +11 -11
- package/build/server/__ssr_build/assets/{root-CS7F-km4.js → root-TWeSpY2W.js} +1 -1
- package/build/server/__ssr_build/assets/{separator-8UA_ceSq.js → separator-CKrKBtv4.js} +1 -1
- package/build/server/__ssr_build/assets/{sidebar-BzNOZeBO.js → sidebar-DoXmiwf0.js} +2 -2
- package/build/server/__ssr_build/assets/{site-header-CXHKSzqk.js → site-header-pFjDV73T.js} +2 -2
- package/build/server/__ssr_build/assets/{spinner-BXcLlTNs.js → spinner-w3Q_wkh3.js} +2 -2
- package/build/server/__ssr_build/assets/{tooltip-DZ4WdJt-.js → tooltip-B2NV0tpS.js} +1 -4
- package/build/server/__ssr_build/assets/{use-sync-TRS0zL-Y.js → use-sync-p_-o0jkt.js} +3046 -3129
- package/build/server/__ssr_build/index.js +7 -7
- package/build/server/__vite_rsc_assets_manifest.js +132 -132
- package/build/server/assets/{page-zlF_Ew1s.js → page-BfKoQQmw.js} +1 -1
- package/build/server/assets/{root-CVOXO6T9.js → root-BqMNAwvK.js} +1 -1
- package/build/server/assets/root-CbriXo_i.css +1 -0
- package/build/server/assets/{route-o-6k10r9.js → route-DiqCR5uw.js} +22 -94
- package/build/server/index.js +1 -1
- package/dist/bin/cli.d.mts +1 -0
- package/dist/bin/cli.mjs +71 -0
- package/dist/bin.mjs +5 -3
- package/dist/package.mjs +1 -1
- package/package.json +9 -5
- package/build/client/assets/dropdown-menu-EF-sTINr.js +0 -1
- package/build/client/assets/entry.rsc-D51PwnQL.js +0 -1
- package/build/client/assets/page-uNpJU_rv.js +0 -1
- package/build/client/assets/root-D3NoAGI1.js +0 -1
- package/build/client/assets/root-z8crlXSh.css +0 -1
- package/build/client/assets/use-sync-ZgcwUdu_.js +0 -9
- package/build/server/assets/root-z8crlXSh.css +0 -1
- /package/build/server/__ssr_build/assets/{root-D-Y-rGw5.js → root-BYlluTc0.js} +0 -0
- /package/build/server/assets/{root-dGb6ch_9.js → root-ByROcfN4.js} +0 -0
|
@@ -4,36 +4,36 @@ import minproc from "node:process";
|
|
|
4
4
|
import minpath from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import clsx$1, { clsx } from "clsx";
|
|
7
|
-
import { c as createDialogScope, R as Root$2, W as WarningProvider, C as Content, P as Portal$1, O as Overlay, T as Title, D as Description, a as Close, b as Trigger$1, s as shimExports, u as useSyncExternalStoreExports, d as ContextMenu, e as ContextMenuTrigger, f as ContextMenuContent, g as ContextMenuGroup, h as ContextMenuItem, i as ContextMenuSub, j as ContextMenuSubTrigger, k as ContextMenuSubContent, l as Tooltip, m as TooltipTrigger, n as Portal$3, o as Content2$2, p as TooltipProvider, q as TooltipContent$1, r as formatErrorMessage, t as createSelector, N as NOOP, E as EMPTY_OBJECT, v as useStableCallback, w as useIsoLayoutEffect, x as useBaseUiId, y as EMPTY_ARRAY, z as useRefWithInit, S as Store, A as useStore$1, B as useValueAsRef, F as useTransitionStatus, G as useOpenInteractionType, H as createGenericEventDetails, I as inputClear, J as inputChange, K as createChangeEventDetails, L as focusOut, M as outsidePress, Q as getTarget, U as itemPress, V as none, X as useOpenChangeComplete, Y as useFloatingRootContext$1, Z as useClick, _ as useDismiss, $ as contains$1, a0 as useListNavigation, a1 as useInteractions, a2 as useMergedRefs, a3 as visuallyHiddenInput, a4 as visuallyHidden, a5 as pressableTriggerOpenStateMapping, a6 as useDirection$1, a7 as useRenderElement, a8 as stopEvent, a9 as isFirefox, aa as escapeKey, ab as isAndroid, ac as CompositeList, ad as FloatingPortal, ae as DROPDOWN_COLLISION_AVOIDANCE, af as useAnchorPositioning, ag as useScrollLock, ah as InternalBackdrop, ai as inertValue, aj as popupStateMapping, ak as FloatingFocusManager, al as transitionStatusMapping, am as getDisabledMountTransitionStyles, an as useCompositeListItem, ao as IndexGuessBehavior, ap as useButton
|
|
8
|
-
import { c as createLucideIcon, u as useComposedRefs, a as createContextScope, b as composeEventHandlers, d as createSlottable, P as Primitive, e as useCallbackRef, f as useLayoutEffect2, g as Presence, h as useControllableState, i as useSize, j as createPopperScope, R as Root2$3, k as useId$1, A as Anchor$1, l as Portal$2, m as hideOthers, n as ReactRemoveScroll, o as createSlot$1, p as useFocusGuards, F as FocusScope, D as DismissableLayer, C as Content$1, q as Arrow, r as composeRefs$1, s as cn, B as Button$2, X as X$1, t as isElement$2, v as buttonVariants$1,
|
|
7
|
+
import { c as createDialogScope, R as Root$2, W as WarningProvider, C as Content, P as Portal$1, O as Overlay, T as Title, D as Description, a as Close, b as Trigger$1, s as shimExports, u as useSyncExternalStoreExports, d as ContextMenu, e as ContextMenuTrigger, f as ContextMenuContent, g as ContextMenuGroup, h as ContextMenuItem, i as ContextMenuSub, j as ContextMenuSubTrigger, k as ContextMenuSubContent, l as Tooltip, m as TooltipTrigger, n as Portal$3, o as Content2$2, p as TooltipProvider, q as TooltipContent$1, r as formatErrorMessage, t as createSelector, N as NOOP, E as EMPTY_OBJECT, v as useStableCallback, w as useIsoLayoutEffect, x as useBaseUiId, y as EMPTY_ARRAY, z as useRefWithInit, S as Store, A as useStore$1, B as useValueAsRef, F as useTransitionStatus, G as useOpenInteractionType, H as createGenericEventDetails, I as inputClear, J as inputChange, K as createChangeEventDetails, L as focusOut, M as outsidePress, Q as getTarget, U as itemPress, V as none, X as useOpenChangeComplete, Y as useFloatingRootContext$1, Z as useClick, _ as useDismiss, $ as contains$1, a0 as useListNavigation, a1 as useInteractions, a2 as useMergedRefs, a3 as visuallyHiddenInput, a4 as visuallyHidden, a5 as pressableTriggerOpenStateMapping, a6 as useDirection$1, a7 as useRenderElement, a8 as stopEvent, a9 as isFirefox, aa as escapeKey, ab as isAndroid, ac as CompositeList, ad as FloatingPortal, ae as DROPDOWN_COLLISION_AVOIDANCE, af as useAnchorPositioning, ag as useScrollLock, ah as InternalBackdrop, ai as inertValue, aj as popupStateMapping, ak as FloatingFocusManager, al as transitionStatusMapping, am as getDisabledMountTransitionStyles, an as useCompositeListItem, ao as IndexGuessBehavior, ap as useButton } from "./tooltip-B2NV0tpS.js";
|
|
8
|
+
import { c as createLucideIcon, u as useComposedRefs, a as createContextScope, b as composeEventHandlers, d as createSlottable, P as Primitive, e as useCallbackRef, f as useLayoutEffect2, g as Presence, h as useControllableState, i as useSize, j as createPopperScope, R as Root2$3, k as useId$1, A as Anchor$1, l as Portal$2, m as hideOthers, n as ReactRemoveScroll, o as createSlot$1, p as useFocusGuards, F as FocusScope, D as DismissableLayer, C as Content$1, q as Arrow, r as composeRefs$1, s as cn, B as Button$2, X as X$1, t as isElement$2, v as ChevronRight, w as buttonVariants$1, x as useFloating$1, y as autoUpdate, z as offset, E as flip } from "./button-U-KvP9zg.js";
|
|
9
9
|
import { cva } from "class-variance-authority";
|
|
10
|
-
import { c as createRovingFocusGroupScope, u as useDirection, R as Root$3, I as Item, C as Check } from "./index-
|
|
10
|
+
import { c as createRovingFocusGroupScope, u as useDirection, R as Root$3, I as Item, C as Check } from "./index-BloUStie.js";
|
|
11
11
|
import { createLowlight, all as all$1 } from "lowlight";
|
|
12
12
|
import remarkGfm from "remark-gfm";
|
|
13
13
|
import remarkMath from "remark-math";
|
|
14
|
-
import { u as usePrevious, L as LoaderCircle, C as ChevronDown } from "./spinner-
|
|
14
|
+
import { u as usePrevious, L as LoaderCircle, C as ChevronDown } from "./spinner-w3Q_wkh3.js";
|
|
15
15
|
import { AbstractChat, DefaultChatTransport } from "ai";
|
|
16
16
|
import { differenceInMinutes, differenceInHours, differenceInDays, format as format$1, addDays, addMonths, addWeeks, addYears, differenceInCalendarDays, differenceInCalendarMonths, eachMonthOfInterval, eachYearOfInterval, endOfISOWeek, endOfMonth, endOfWeek, endOfYear, getISOWeek, getMonth, getYear, getWeek, isAfter as isAfter$1, isBefore as isBefore$1, isDate as isDate$1, isSameDay, isSameMonth, isSameYear, max as max$1, min as min$1, setMonth, setYear, startOfDay, startOfISOWeek, startOfMonth, startOfWeek, startOfYear } from "date-fns";
|
|
17
|
-
import { D as DropdownMenu, a as DropdownMenuTrigger, E as Ellipsis, b as DropdownMenuContent, c as DropdownMenuGroup, d as DropdownMenuItem, T as Trash, e as DropdownMenuSeparator, f as DropdownMenuRadioGroup, g as DropdownMenuLabel, h as DropdownMenuRadioItem, i as DropdownMenuItemIndicator, j as DropdownMenuSub, k as DropdownMenuSubTrigger, l as DropdownMenuSubContent, m as DropdownMenuPortal, n as DropdownMenuCheckboxItem } from "./dropdown-menu-
|
|
17
|
+
import { D as DropdownMenu, a as DropdownMenuTrigger, E as Ellipsis, b as DropdownMenuContent, c as DropdownMenuGroup, d as DropdownMenuItem, T as Trash, e as DropdownMenuSeparator, f as DropdownMenuRadioGroup, g as DropdownMenuLabel, h as DropdownMenuRadioItem, i as DropdownMenuItemIndicator, j as DropdownMenuSub, k as DropdownMenuSubTrigger, l as DropdownMenuSubContent, m as DropdownMenuPortal, n as DropdownMenuCheckboxItem } from "./dropdown-menu-gcIcDMHP.js";
|
|
18
18
|
import { NativeTypes, getEmptyImage, HTML5Backend } from "react-dnd-html5-backend";
|
|
19
|
-
import { R as Root$4, S as Separator } from "./separator-
|
|
20
|
-
import { S as Search, t as toast } from "./index-
|
|
19
|
+
import { R as Root$4, S as Separator } from "./separator-CKrKBtv4.js";
|
|
20
|
+
import { S as Search, t as toast } from "./index-CWwW5yWZ.js";
|
|
21
21
|
import highlight from "highlight.js";
|
|
22
|
-
import { f as Trash2, P as Plus, I as Input, u as useForm, L as Label, a as useSync, T as Tabs, b as TabsList, c as TabsTrigger, d as TabsContent, J as JSONSchemaEditorProvider, e as JSONSchemaEditorContent, Y as YamlEditorLazy, S as StatusBar } from "./use-sync-TRS0zL-Y.js";
|
|
23
22
|
import { enUS as enUS$1 } from "date-fns/locale";
|
|
24
23
|
import debounce$1 from "lodash.debounce";
|
|
24
|
+
import { P as Plus, I as Input, f as Trash2, u as useForm, L as Label, a as useSync, T as Tabs, b as TabsList, c as TabsTrigger, d as TabsContent, J as JSONSchemaEditorProvider, e as JSONSchemaEditorContent, Y as YamlEditorLazy, S as StatusBar } from "./use-sync-p_-o0jkt.js";
|
|
25
25
|
import { genUploader, version as version$2 } from "uploadthing/client";
|
|
26
26
|
import { z } from "zod";
|
|
27
27
|
import "../__vite_rsc_assets_manifest.js";
|
|
28
28
|
import "node:async_hooks";
|
|
29
29
|
import "tailwind-merge";
|
|
30
30
|
import "ajv/dist/2020.js";
|
|
31
|
-
const __iconNode$
|
|
31
|
+
const __iconNode$1q = [
|
|
32
32
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
33
33
|
["polyline", { points: "11 3 11 11 14 8 17 11 17 3", key: "1wcwz3" }]
|
|
34
34
|
];
|
|
35
|
-
const Album = createLucideIcon("album", __iconNode$
|
|
36
|
-
const __iconNode$
|
|
35
|
+
const Album = createLucideIcon("album", __iconNode$1q);
|
|
36
|
+
const __iconNode$1p = [
|
|
37
37
|
["path", { d: "M12 6.528V3a1 1 0 0 1 1-1h0", key: "11qiee" }],
|
|
38
38
|
[
|
|
39
39
|
"path",
|
|
@@ -43,28 +43,28 @@ const __iconNode$1q = [
|
|
|
43
43
|
}
|
|
44
44
|
]
|
|
45
45
|
];
|
|
46
|
-
const Apple = createLucideIcon("apple", __iconNode$
|
|
47
|
-
const __iconNode$
|
|
46
|
+
const Apple = createLucideIcon("apple", __iconNode$1p);
|
|
47
|
+
const __iconNode$1o = [
|
|
48
48
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
49
49
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
50
50
|
];
|
|
51
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
52
|
-
const __iconNode$
|
|
51
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$1o);
|
|
52
|
+
const __iconNode$1n = [
|
|
53
53
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
54
54
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
55
55
|
];
|
|
56
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$
|
|
57
|
-
const __iconNode$
|
|
56
|
+
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1n);
|
|
57
|
+
const __iconNode$1m = [
|
|
58
58
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
59
59
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
60
60
|
];
|
|
61
|
-
const ArrowRight = createLucideIcon("arrow-right", __iconNode$
|
|
62
|
-
const __iconNode$
|
|
61
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$1m);
|
|
62
|
+
const __iconNode$1l = [
|
|
63
63
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
64
64
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
65
65
|
];
|
|
66
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
67
|
-
const __iconNode$
|
|
66
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$1l);
|
|
67
|
+
const __iconNode$1k = [
|
|
68
68
|
["path", { d: "M2 10v3", key: "1fnikh" }],
|
|
69
69
|
["path", { d: "M6 6v11", key: "11sgs0" }],
|
|
70
70
|
["path", { d: "M10 3v18", key: "yhl04a" }],
|
|
@@ -72,8 +72,8 @@ const __iconNode$1l = [
|
|
|
72
72
|
["path", { d: "M18 5v13", key: "123xd1" }],
|
|
73
73
|
["path", { d: "M22 10v3", key: "154ddg" }]
|
|
74
74
|
];
|
|
75
|
-
const AudioLines = createLucideIcon("audio-lines", __iconNode$
|
|
76
|
-
const __iconNode$
|
|
75
|
+
const AudioLines = createLucideIcon("audio-lines", __iconNode$1k);
|
|
76
|
+
const __iconNode$1j = [
|
|
77
77
|
[
|
|
78
78
|
"path",
|
|
79
79
|
{
|
|
@@ -84,21 +84,21 @@ const __iconNode$1k = [
|
|
|
84
84
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
85
85
|
["line", { x1: "12", x2: "12.01", y1: "17", y2: "17", key: "io3f8k" }]
|
|
86
86
|
];
|
|
87
|
-
const BadgeQuestionMark = createLucideIcon("badge-question-mark", __iconNode$
|
|
88
|
-
const __iconNode$
|
|
87
|
+
const BadgeQuestionMark = createLucideIcon("badge-question-mark", __iconNode$1j);
|
|
88
|
+
const __iconNode$1i = [
|
|
89
89
|
["path", { d: "M4 20h16", key: "14thso" }],
|
|
90
90
|
["path", { d: "m6 16 6-12 6 12", key: "1b4byz" }],
|
|
91
91
|
["path", { d: "M8 12h8", key: "1wcyev" }]
|
|
92
92
|
];
|
|
93
|
-
const Baseline = createLucideIcon("baseline", __iconNode$
|
|
94
|
-
const __iconNode$
|
|
93
|
+
const Baseline = createLucideIcon("baseline", __iconNode$1i);
|
|
94
|
+
const __iconNode$1h = [
|
|
95
95
|
[
|
|
96
96
|
"path",
|
|
97
97
|
{ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
|
|
98
98
|
]
|
|
99
99
|
];
|
|
100
|
-
const Bold = createLucideIcon("bold", __iconNode$
|
|
101
|
-
const __iconNode$
|
|
100
|
+
const Bold = createLucideIcon("bold", __iconNode$1h);
|
|
101
|
+
const __iconNode$1g = [
|
|
102
102
|
["path", { d: "M12 21V7", key: "gj6g52" }],
|
|
103
103
|
["path", { d: "m16 12 2 2 4-4", key: "mdajum" }],
|
|
104
104
|
[
|
|
@@ -109,8 +109,8 @@ const __iconNode$1h = [
|
|
|
109
109
|
}
|
|
110
110
|
]
|
|
111
111
|
];
|
|
112
|
-
const BookOpenCheck = createLucideIcon("book-open-check", __iconNode$
|
|
113
|
-
const __iconNode$
|
|
112
|
+
const BookOpenCheck = createLucideIcon("book-open-check", __iconNode$1g);
|
|
113
|
+
const __iconNode$1f = [
|
|
114
114
|
[
|
|
115
115
|
"path",
|
|
116
116
|
{ d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
|
|
@@ -123,34 +123,34 @@ const __iconNode$1g = [
|
|
|
123
123
|
}
|
|
124
124
|
]
|
|
125
125
|
];
|
|
126
|
-
const Braces = createLucideIcon("braces", __iconNode$
|
|
127
|
-
const __iconNode$
|
|
126
|
+
const Braces = createLucideIcon("braces", __iconNode$1f);
|
|
127
|
+
const __iconNode$1e = [
|
|
128
128
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
129
129
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
130
130
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
131
131
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
132
132
|
];
|
|
133
|
-
const Calendar$1 = createLucideIcon("calendar", __iconNode$
|
|
134
|
-
const __iconNode$
|
|
135
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$
|
|
136
|
-
const __iconNode$
|
|
133
|
+
const Calendar$1 = createLucideIcon("calendar", __iconNode$1e);
|
|
134
|
+
const __iconNode$1d = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
135
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$1d);
|
|
136
|
+
const __iconNode$1c = [
|
|
137
137
|
["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
|
|
138
138
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
139
139
|
];
|
|
140
|
-
const Clock = createLucideIcon("clock", __iconNode$
|
|
141
|
-
const __iconNode$
|
|
140
|
+
const Clock = createLucideIcon("clock", __iconNode$1c);
|
|
141
|
+
const __iconNode$1b = [
|
|
142
142
|
["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
|
|
143
143
|
["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
|
|
144
144
|
["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
|
|
145
145
|
];
|
|
146
|
-
const CodeXml = createLucideIcon("code-xml", __iconNode$
|
|
147
|
-
const __iconNode$
|
|
146
|
+
const CodeXml = createLucideIcon("code-xml", __iconNode$1b);
|
|
147
|
+
const __iconNode$1a = [
|
|
148
148
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
149
149
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
150
150
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
151
151
|
];
|
|
152
|
-
const Columns3 = createLucideIcon("columns-3", __iconNode$
|
|
153
|
-
const __iconNode$
|
|
152
|
+
const Columns3 = createLucideIcon("columns-3", __iconNode$1a);
|
|
153
|
+
const __iconNode$19 = [
|
|
154
154
|
["path", { d: "M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1", key: "1l7d7l" }],
|
|
155
155
|
["path", { d: "M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1", key: "9955pe" }],
|
|
156
156
|
["path", { d: "m7 15 3 3", key: "4hkfgk" }],
|
|
@@ -158,8 +158,8 @@ const __iconNode$1a = [
|
|
|
158
158
|
["rect", { x: "14", y: "14", width: "7", height: "7", rx: "1", key: "1cdgtw" }],
|
|
159
159
|
["rect", { x: "3", y: "3", width: "7", height: "7", rx: "1", key: "zi3rio" }]
|
|
160
160
|
];
|
|
161
|
-
const Combine = createLucideIcon("combine", __iconNode$
|
|
162
|
-
const __iconNode$
|
|
161
|
+
const Combine = createLucideIcon("combine", __iconNode$19);
|
|
162
|
+
const __iconNode$18 = [
|
|
163
163
|
[
|
|
164
164
|
"path",
|
|
165
165
|
{
|
|
@@ -169,29 +169,29 @@ const __iconNode$19 = [
|
|
|
169
169
|
],
|
|
170
170
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
171
171
|
];
|
|
172
|
-
const Compass = createLucideIcon("compass", __iconNode$
|
|
173
|
-
const __iconNode$
|
|
172
|
+
const Compass = createLucideIcon("compass", __iconNode$18);
|
|
173
|
+
const __iconNode$17 = [
|
|
174
174
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
175
175
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
176
176
|
];
|
|
177
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
178
|
-
const __iconNode$
|
|
177
|
+
const Copy = createLucideIcon("copy", __iconNode$17);
|
|
178
|
+
const __iconNode$16 = [
|
|
179
179
|
["path", { d: "M20 4v7a4 4 0 0 1-4 4H4", key: "6o5b7l" }],
|
|
180
180
|
["path", { d: "m9 10-5 5 5 5", key: "1kshq7" }]
|
|
181
181
|
];
|
|
182
|
-
const CornerDownLeft = createLucideIcon("corner-down-left", __iconNode$
|
|
183
|
-
const __iconNode$
|
|
182
|
+
const CornerDownLeft = createLucideIcon("corner-down-left", __iconNode$16);
|
|
183
|
+
const __iconNode$15 = [
|
|
184
184
|
["path", { d: "M20 20v-7a4 4 0 0 0-4-4H4", key: "1nkjon" }],
|
|
185
185
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }]
|
|
186
186
|
];
|
|
187
|
-
const CornerUpLeft = createLucideIcon("corner-up-left", __iconNode$
|
|
188
|
-
const __iconNode$
|
|
187
|
+
const CornerUpLeft = createLucideIcon("corner-up-left", __iconNode$15);
|
|
188
|
+
const __iconNode$14 = [
|
|
189
189
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
190
190
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
191
191
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
192
192
|
];
|
|
193
|
-
const Download = createLucideIcon("download", __iconNode$
|
|
194
|
-
const __iconNode$
|
|
193
|
+
const Download = createLucideIcon("download", __iconNode$14);
|
|
194
|
+
const __iconNode$13 = [
|
|
195
195
|
[
|
|
196
196
|
"path",
|
|
197
197
|
{
|
|
@@ -201,14 +201,14 @@ const __iconNode$14 = [
|
|
|
201
201
|
],
|
|
202
202
|
["path", { d: "m5.082 11.09 8.828 8.828", key: "1wx5vj" }]
|
|
203
203
|
];
|
|
204
|
-
const Eraser = createLucideIcon("eraser", __iconNode$
|
|
205
|
-
const __iconNode$
|
|
204
|
+
const Eraser = createLucideIcon("eraser", __iconNode$13);
|
|
205
|
+
const __iconNode$12 = [
|
|
206
206
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
207
207
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
208
208
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
209
209
|
];
|
|
210
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
211
|
-
const __iconNode$
|
|
210
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$12);
|
|
211
|
+
const __iconNode$11 = [
|
|
212
212
|
[
|
|
213
213
|
"path",
|
|
214
214
|
{
|
|
@@ -218,8 +218,8 @@ const __iconNode$12 = [
|
|
|
218
218
|
],
|
|
219
219
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
220
220
|
];
|
|
221
|
-
const Eye = createLucideIcon("eye", __iconNode$
|
|
222
|
-
const __iconNode$
|
|
221
|
+
const Eye = createLucideIcon("eye", __iconNode$11);
|
|
222
|
+
const __iconNode$10 = [
|
|
223
223
|
[
|
|
224
224
|
"path",
|
|
225
225
|
{
|
|
@@ -230,8 +230,8 @@ const __iconNode$11 = [
|
|
|
230
230
|
["path", { d: "M16 8 2 22", key: "vp34q" }],
|
|
231
231
|
["path", { d: "M17.5 15H9", key: "1oz8nu" }]
|
|
232
232
|
];
|
|
233
|
-
const Feather = createLucideIcon("feather", __iconNode$
|
|
234
|
-
const __iconNode
|
|
233
|
+
const Feather = createLucideIcon("feather", __iconNode$10);
|
|
234
|
+
const __iconNode$$ = [
|
|
235
235
|
[
|
|
236
236
|
"path",
|
|
237
237
|
{
|
|
@@ -243,8 +243,8 @@ const __iconNode$10 = [
|
|
|
243
243
|
["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
|
|
244
244
|
["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
|
|
245
245
|
];
|
|
246
|
-
const FileCode = createLucideIcon("file-code", __iconNode
|
|
247
|
-
const __iconNode
|
|
246
|
+
const FileCode = createLucideIcon("file-code", __iconNode$$);
|
|
247
|
+
const __iconNode$_ = [
|
|
248
248
|
[
|
|
249
249
|
"path",
|
|
250
250
|
{
|
|
@@ -256,8 +256,8 @@ const __iconNode$$ = [
|
|
|
256
256
|
["path", { d: "M12 12v6", key: "3ahymv" }],
|
|
257
257
|
["path", { d: "m15 15-3-3-3 3", key: "15xj92" }]
|
|
258
258
|
];
|
|
259
|
-
const FileUp = createLucideIcon("file-up", __iconNode
|
|
260
|
-
const __iconNode$
|
|
259
|
+
const FileUp = createLucideIcon("file-up", __iconNode$_);
|
|
260
|
+
const __iconNode$Z = [
|
|
261
261
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
262
262
|
["path", { d: "M7 3v18", key: "bbkbws" }],
|
|
263
263
|
["path", { d: "M3 7.5h4", key: "zfgn84" }],
|
|
@@ -267,8 +267,8 @@ const __iconNode$_ = [
|
|
|
267
267
|
["path", { d: "M17 7.5h4", key: "myr1c1" }],
|
|
268
268
|
["path", { d: "M17 16.5h4", key: "go4c1d" }]
|
|
269
269
|
];
|
|
270
|
-
const Film = createLucideIcon("film", __iconNode$
|
|
271
|
-
const __iconNode$
|
|
270
|
+
const Film = createLucideIcon("film", __iconNode$Z);
|
|
271
|
+
const __iconNode$Y = [
|
|
272
272
|
[
|
|
273
273
|
"path",
|
|
274
274
|
{
|
|
@@ -277,30 +277,21 @@ const __iconNode$Z = [
|
|
|
277
277
|
}
|
|
278
278
|
]
|
|
279
279
|
];
|
|
280
|
-
const Flag = createLucideIcon("flag", __iconNode$
|
|
281
|
-
const __iconNode$
|
|
280
|
+
const Flag = createLucideIcon("flag", __iconNode$Y);
|
|
281
|
+
const __iconNode$X = [
|
|
282
282
|
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
283
283
|
["path", { d: "M3 12h18", key: "1i2n21" }],
|
|
284
284
|
["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", key: "h1oib" }]
|
|
285
285
|
];
|
|
286
|
-
const Grid2x2 = createLucideIcon("grid-2x2", __iconNode$
|
|
287
|
-
const __iconNode$
|
|
286
|
+
const Grid2x2 = createLucideIcon("grid-2x2", __iconNode$X);
|
|
287
|
+
const __iconNode$W = [
|
|
288
288
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
289
289
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
290
290
|
["path", { d: "M3 15h18", key: "5xshup" }],
|
|
291
291
|
["path", { d: "M9 3v18", key: "fh3hqa" }],
|
|
292
292
|
["path", { d: "M15 3v18", key: "14nvp0" }]
|
|
293
293
|
];
|
|
294
|
-
const Grid3x3 = createLucideIcon("grid-3x3", __iconNode$
|
|
295
|
-
const __iconNode$W = [
|
|
296
|
-
["circle", { cx: "12", cy: "9", r: "1", key: "124mty" }],
|
|
297
|
-
["circle", { cx: "19", cy: "9", r: "1", key: "1ruzo2" }],
|
|
298
|
-
["circle", { cx: "5", cy: "9", r: "1", key: "1a8b28" }],
|
|
299
|
-
["circle", { cx: "12", cy: "15", r: "1", key: "1e56xg" }],
|
|
300
|
-
["circle", { cx: "19", cy: "15", r: "1", key: "1a92ep" }],
|
|
301
|
-
["circle", { cx: "5", cy: "15", r: "1", key: "5r1jwy" }]
|
|
302
|
-
];
|
|
303
|
-
const GripHorizontal = createLucideIcon("grip-horizontal", __iconNode$W);
|
|
294
|
+
const Grid3x3 = createLucideIcon("grid-3x3", __iconNode$W);
|
|
304
295
|
const __iconNode$V = [
|
|
305
296
|
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
306
297
|
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
@@ -67288,201 +67279,6 @@ const BaseCodeBlockKit = [
|
|
|
67288
67279
|
BaseCodeLinePlugin.withComponent(CodeLineElementStatic),
|
|
67289
67280
|
BaseCodeSyntaxPlugin.withComponent(CodeSyntaxLeafStatic)
|
|
67290
67281
|
];
|
|
67291
|
-
const withColumn = ({ editor, tf: { normalizeNode: normalizeNode2, selectAll: selectAll2 }, type }) => ({ transforms: {
|
|
67292
|
-
normalizeNode([n2, path3]) {
|
|
67293
|
-
if (ElementApi.isElement(n2) && n2.type === editor.getType(KEYS.columnGroup)) {
|
|
67294
|
-
const node3 = n2;
|
|
67295
|
-
const firstChild = node3.children[0];
|
|
67296
|
-
if (node3.children.length === 1 && firstChild.type === editor.getType(KEYS.p)) editor.tf.unwrapNodes({ at: PathApi.child(path3, 0) });
|
|
67297
|
-
if (!node3.children.some((child) => ElementApi.isElement(child) && child.type === type)) {
|
|
67298
|
-
editor.tf.removeNodes({ at: path3 });
|
|
67299
|
-
return;
|
|
67300
|
-
}
|
|
67301
|
-
if (node3.children.length < 2) {
|
|
67302
|
-
editor.tf.withoutNormalizing(() => {
|
|
67303
|
-
editor.tf.unwrapNodes({ at: path3 });
|
|
67304
|
-
editor.tf.unwrapNodes({ at: path3 });
|
|
67305
|
-
});
|
|
67306
|
-
return;
|
|
67307
|
-
}
|
|
67308
|
-
editor.tf.withoutNormalizing(() => {
|
|
67309
|
-
const totalColumns = node3.children.length;
|
|
67310
|
-
let widths = node3.children.map((col) => {
|
|
67311
|
-
const parsed = Number.parseFloat(col.width);
|
|
67312
|
-
return Number.isNaN(parsed) ? 0 : parsed;
|
|
67313
|
-
});
|
|
67314
|
-
const sum = widths.reduce((acc, w2) => acc + w2, 0);
|
|
67315
|
-
if (sum !== 100) {
|
|
67316
|
-
const adjustment = (100 - sum) / totalColumns;
|
|
67317
|
-
widths = widths.map((w2) => w2 + adjustment);
|
|
67318
|
-
widths.forEach((w2, i) => {
|
|
67319
|
-
const columnPath = path3.concat([i]);
|
|
67320
|
-
editor.tf.setNodes({ width: `${w2}%` }, { at: columnPath });
|
|
67321
|
-
});
|
|
67322
|
-
}
|
|
67323
|
-
});
|
|
67324
|
-
}
|
|
67325
|
-
if (ElementApi.isElement(n2) && n2.type === type) {
|
|
67326
|
-
if (n2.children.length === 0) {
|
|
67327
|
-
editor.tf.removeNodes({ at: path3 });
|
|
67328
|
-
return;
|
|
67329
|
-
}
|
|
67330
|
-
}
|
|
67331
|
-
return normalizeNode2([n2, path3]);
|
|
67332
|
-
},
|
|
67333
|
-
selectAll: () => {
|
|
67334
|
-
const apply2 = () => {
|
|
67335
|
-
const at3 = editor.selection;
|
|
67336
|
-
if (!at3) return;
|
|
67337
|
-
const column = editor.api.above({ match: { type } });
|
|
67338
|
-
if (!column) return;
|
|
67339
|
-
let targetPath = column[1];
|
|
67340
|
-
if (editor.api.isStart(editor.api.start(at3), targetPath) && editor.api.isEnd(editor.api.end(at3), targetPath)) targetPath = PathApi.parent(targetPath);
|
|
67341
|
-
if (targetPath.length === 0) return;
|
|
67342
|
-
editor.tf.select(targetPath);
|
|
67343
|
-
return true;
|
|
67344
|
-
};
|
|
67345
|
-
if (apply2()) return true;
|
|
67346
|
-
return selectAll2();
|
|
67347
|
-
}
|
|
67348
|
-
} });
|
|
67349
|
-
const BaseColumnItemPlugin = createSlatePlugin({
|
|
67350
|
-
key: KEYS.column,
|
|
67351
|
-
node: {
|
|
67352
|
-
isContainer: true,
|
|
67353
|
-
isElement: true,
|
|
67354
|
-
isStrictSiblings: true
|
|
67355
|
-
}
|
|
67356
|
-
}).overrideEditor(withColumn);
|
|
67357
|
-
const BaseColumnPlugin = createSlatePlugin({
|
|
67358
|
-
key: KEYS.columnGroup,
|
|
67359
|
-
node: {
|
|
67360
|
-
isContainer: true,
|
|
67361
|
-
isElement: true
|
|
67362
|
-
},
|
|
67363
|
-
plugins: [BaseColumnItemPlugin]
|
|
67364
|
-
});
|
|
67365
|
-
const insertColumnGroup = (editor, { columns = 2, select: selectProp, ...options2 } = {}) => {
|
|
67366
|
-
const width = 100 / columns;
|
|
67367
|
-
editor.tf.withoutNormalizing(() => {
|
|
67368
|
-
editor.tf.insertNodes({
|
|
67369
|
-
children: new Array(columns).fill(null).map(() => ({
|
|
67370
|
-
children: [editor.api.create.block()],
|
|
67371
|
-
type: editor.getType(KEYS.column),
|
|
67372
|
-
width: `${width}%`
|
|
67373
|
-
})),
|
|
67374
|
-
type: editor.getType(KEYS.columnGroup)
|
|
67375
|
-
}, options2);
|
|
67376
|
-
if (selectProp) {
|
|
67377
|
-
const entry = editor.api.node({
|
|
67378
|
-
at: options2.at,
|
|
67379
|
-
match: { type: editor.getType(KEYS.column) }
|
|
67380
|
-
});
|
|
67381
|
-
if (!entry) return;
|
|
67382
|
-
editor.tf.select(entry[1].concat([0]));
|
|
67383
|
-
}
|
|
67384
|
-
});
|
|
67385
|
-
};
|
|
67386
|
-
const columnsToWidths = ({ columns = 2 } = {}) => new Array(columns).fill(null).map(() => `${100 / columns}%`);
|
|
67387
|
-
const setColumns = (editor, { at: at3, columns, widths }) => {
|
|
67388
|
-
editor.tf.withoutNormalizing(() => {
|
|
67389
|
-
if (!at3) return;
|
|
67390
|
-
widths = widths ?? columnsToWidths({ columns });
|
|
67391
|
-
if (widths.length === 0) return;
|
|
67392
|
-
const columnGroup = editor.api.node(at3);
|
|
67393
|
-
if (!columnGroup) return;
|
|
67394
|
-
const [{ children }, path3] = columnGroup;
|
|
67395
|
-
const currentCount = children.length;
|
|
67396
|
-
const targetCount = widths.length;
|
|
67397
|
-
if (currentCount === targetCount) {
|
|
67398
|
-
widths.forEach((width, i) => {
|
|
67399
|
-
editor.tf.setNodes({ width }, { at: path3.concat([i]) });
|
|
67400
|
-
});
|
|
67401
|
-
return;
|
|
67402
|
-
}
|
|
67403
|
-
if (targetCount > currentCount) {
|
|
67404
|
-
const columnsToAdd = targetCount - currentCount;
|
|
67405
|
-
const insertPath = path3.concat([currentCount]);
|
|
67406
|
-
const newColumns = new Array(columnsToAdd).fill(null).map((_, i) => ({
|
|
67407
|
-
children: [editor.api.create.block()],
|
|
67408
|
-
type: editor.getType(KEYS.column),
|
|
67409
|
-
width: widths[currentCount + i] || `${100 / targetCount}%`
|
|
67410
|
-
}));
|
|
67411
|
-
editor.tf.insertNodes(newColumns, { at: insertPath });
|
|
67412
|
-
widths.forEach((width, i) => {
|
|
67413
|
-
editor.tf.setNodes({ width }, { at: path3.concat([i]) });
|
|
67414
|
-
});
|
|
67415
|
-
return;
|
|
67416
|
-
}
|
|
67417
|
-
if (targetCount < currentCount) {
|
|
67418
|
-
const keepColumnIndex = targetCount - 1;
|
|
67419
|
-
const keepColumnPath = path3.concat([keepColumnIndex]);
|
|
67420
|
-
const keepColumnNode = NodeApi.get(editor, keepColumnPath);
|
|
67421
|
-
if (!keepColumnNode) return;
|
|
67422
|
-
const to2 = keepColumnPath.concat([keepColumnNode.children.length]);
|
|
67423
|
-
for (let i = currentCount - 1; i > keepColumnIndex; i--) {
|
|
67424
|
-
const columnPath = path3.concat([i]);
|
|
67425
|
-
const columnEntry = editor.api.node(columnPath);
|
|
67426
|
-
if (!columnEntry) continue;
|
|
67427
|
-
editor.tf.moveNodes({
|
|
67428
|
-
at: columnEntry[1],
|
|
67429
|
-
children: true,
|
|
67430
|
-
to: to2
|
|
67431
|
-
});
|
|
67432
|
-
}
|
|
67433
|
-
for (let i = currentCount - 1; i > keepColumnIndex; i--) editor.tf.removeNodes({ at: path3.concat([i]) });
|
|
67434
|
-
widths.forEach((width, i) => {
|
|
67435
|
-
editor.tf.setNodes({ width }, { at: path3.concat([i]) });
|
|
67436
|
-
});
|
|
67437
|
-
}
|
|
67438
|
-
});
|
|
67439
|
-
};
|
|
67440
|
-
const toggleColumnGroup = (editor, { at: at3, columns = 2, widths } = {}) => {
|
|
67441
|
-
const entry = editor.api.block({ at: at3 });
|
|
67442
|
-
const columnGroupEntry = editor.api.block({
|
|
67443
|
-
above: true,
|
|
67444
|
-
at: at3,
|
|
67445
|
-
match: { type: editor.getType(KEYS.columnGroup) }
|
|
67446
|
-
});
|
|
67447
|
-
if (!entry) return;
|
|
67448
|
-
const [node3, path3] = entry;
|
|
67449
|
-
if (columnGroupEntry) setColumns(editor, {
|
|
67450
|
-
at: columnGroupEntry[1],
|
|
67451
|
-
columns,
|
|
67452
|
-
widths
|
|
67453
|
-
});
|
|
67454
|
-
else {
|
|
67455
|
-
const columnWidths = widths || columnsToWidths({ columns });
|
|
67456
|
-
const nodes2 = {
|
|
67457
|
-
children: new Array(columns).fill(null).map((_, index2) => ({
|
|
67458
|
-
children: [index2 === 0 ? node3 : editor.api.create.block()],
|
|
67459
|
-
type: editor.getType(KEYS.column),
|
|
67460
|
-
width: columnWidths[index2]
|
|
67461
|
-
})),
|
|
67462
|
-
type: editor.getType(KEYS.columnGroup)
|
|
67463
|
-
};
|
|
67464
|
-
editor.tf.replaceNodes(nodes2, { at: path3 });
|
|
67465
|
-
editor.tf.select(editor.api.start(path3.concat([0])));
|
|
67466
|
-
}
|
|
67467
|
-
};
|
|
67468
|
-
function ColumnElementStatic(props) {
|
|
67469
|
-
const { width } = props.element;
|
|
67470
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "group/column relative", style: { width: width ?? "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
67471
|
-
SlateElement,
|
|
67472
|
-
{
|
|
67473
|
-
className: "h-full px-2 pt-2 group-first/column:pl-0 group-last/column:pr-0",
|
|
67474
|
-
...props,
|
|
67475
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative h-full border border-transparent p-1.5", children: props.children })
|
|
67476
|
-
}
|
|
67477
|
-
) });
|
|
67478
|
-
}
|
|
67479
|
-
function ColumnGroupElementStatic(props) {
|
|
67480
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlateElement, { className: "mb-2", ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-full rounded", children: props.children }) });
|
|
67481
|
-
}
|
|
67482
|
-
const BaseColumnKit = [
|
|
67483
|
-
BaseColumnPlugin.withComponent(ColumnGroupElementStatic),
|
|
67484
|
-
BaseColumnItemPlugin.withComponent(ColumnElementStatic)
|
|
67485
|
-
];
|
|
67486
67282
|
function CommentLeafStatic(props) {
|
|
67487
67283
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(SlateLeaf, { ...props, className: "border-b-2 border-b-highlight/35 bg-highlight/15", children: props.children });
|
|
67488
67284
|
}
|
|
@@ -68568,7 +68364,28 @@ const MarkdownKit = [
|
|
|
68568
68364
|
MarkdownPlugin.configure({
|
|
68569
68365
|
options: {
|
|
68570
68366
|
plainMarks: [KEYS.suggestion, KEYS.comment],
|
|
68571
|
-
remarkPlugins: [remarkMath, remarkGfm, remarkMdx]
|
|
68367
|
+
remarkPlugins: [remarkMath, remarkGfm, remarkMdx],
|
|
68368
|
+
rules: {
|
|
68369
|
+
code_block: {
|
|
68370
|
+
deserialize: (mdastNode, _deco, options2) => ({
|
|
68371
|
+
children: (mdastNode.value || "").split("\n").map((line) => ({
|
|
68372
|
+
children: [{ text: line }],
|
|
68373
|
+
type: getPluginType(options2.editor, KEYS.codeLine)
|
|
68374
|
+
})),
|
|
68375
|
+
lang: mdastNode.lang ?? void 0,
|
|
68376
|
+
meta: mdastNode.meta,
|
|
68377
|
+
type: getPluginType(options2.editor, KEYS.codeBlock)
|
|
68378
|
+
}),
|
|
68379
|
+
serialize: (node3) => ({
|
|
68380
|
+
lang: node3.lang,
|
|
68381
|
+
type: "code",
|
|
68382
|
+
meta: node3.meta,
|
|
68383
|
+
value: node3.children.map(
|
|
68384
|
+
(child) => child?.children === void 0 ? child.text : child.children.map((c2) => c2.text).join("")
|
|
68385
|
+
).join("\n")
|
|
68386
|
+
})
|
|
68387
|
+
}
|
|
68388
|
+
}
|
|
68572
68389
|
}
|
|
68573
68390
|
})
|
|
68574
68391
|
];
|
|
@@ -87313,7 +87130,6 @@ const BaseEditorKit = [
|
|
|
87313
87130
|
...BaseTableKit,
|
|
87314
87131
|
...BaseMediaKit,
|
|
87315
87132
|
...BaseCalloutKit,
|
|
87316
|
-
...BaseColumnKit,
|
|
87317
87133
|
...BaseMathKit,
|
|
87318
87134
|
...BaseDateKit,
|
|
87319
87135
|
...BaseLinkKit,
|
|
@@ -93627,7 +93443,7 @@ const useDropLine = (t0) => {
|
|
|
93627
93443
|
const $2 = distExports.c(5);
|
|
93628
93444
|
let t1;
|
|
93629
93445
|
if ($2[0] !== t0) {
|
|
93630
|
-
t1 =
|
|
93446
|
+
t1 = {};
|
|
93631
93447
|
$2[0] = t0;
|
|
93632
93448
|
$2[1] = t1;
|
|
93633
93449
|
} else t1 = $2[1];
|
|
@@ -98423,7 +98239,7 @@ function ComboboxChipsInput({ className, ...props }) {
|
|
|
98423
98239
|
ComboboxInput,
|
|
98424
98240
|
{
|
|
98425
98241
|
"data-slot": "combobox-chip-input",
|
|
98426
|
-
className: cn("
|
|
98242
|
+
className: cn("outline-none", className),
|
|
98427
98243
|
...props
|
|
98428
98244
|
}
|
|
98429
98245
|
);
|
|
@@ -98439,10 +98255,11 @@ function CodeBlockElement(props) {
|
|
|
98439
98255
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
98440
98256
|
"div",
|
|
98441
98257
|
{
|
|
98442
|
-
className: "flex items-center select-none
|
|
98258
|
+
className: "flex items-center select-none pb-1 contain-layout gap-1",
|
|
98443
98259
|
contentEditable: false,
|
|
98444
98260
|
children: [
|
|
98445
98261
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CodeBlockCombobox, {}),
|
|
98262
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CodeBlockMeta, {}),
|
|
98446
98263
|
isLangSupported(element.lang) && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
98447
98264
|
Button$2,
|
|
98448
98265
|
{
|
|
@@ -98480,46 +98297,87 @@ function CodeBlockElement(props) {
|
|
|
98480
98297
|
}
|
|
98481
98298
|
);
|
|
98482
98299
|
}
|
|
98300
|
+
function CodeBlockMeta() {
|
|
98301
|
+
const editor = useEditorRef();
|
|
98302
|
+
const readOnly = useReadOnly();
|
|
98303
|
+
const element = useElement();
|
|
98304
|
+
const [value, setValue2] = reactExports.useState(element.meta);
|
|
98305
|
+
if (readOnly)
|
|
98306
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "px-2 flex-1 font-mono text-sm text-muted-foreground", children: value });
|
|
98307
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
98308
|
+
"input",
|
|
98309
|
+
{
|
|
98310
|
+
value,
|
|
98311
|
+
onChange: (e2) => setValue2(e2.target.value),
|
|
98312
|
+
onBlur: () => {
|
|
98313
|
+
editor.transforms.setNodes({ meta: value }, { at: element });
|
|
98314
|
+
},
|
|
98315
|
+
placeholder: "custom meta",
|
|
98316
|
+
className: "px-2 rounded-lg flex-1 min-w-0 w-fit font-mono text-sm hover:bg-accent hover:text-accent-foreground focus-visible:outline-none not-focus-visible:text-muted-foreground placeholder:text-muted-foreground"
|
|
98317
|
+
}
|
|
98318
|
+
);
|
|
98319
|
+
}
|
|
98320
|
+
const languageItems = lowlight.listLanguages().map((lang) => {
|
|
98321
|
+
const info = highlight.getLanguage(lang);
|
|
98322
|
+
return {
|
|
98323
|
+
label: info.name ?? lang,
|
|
98324
|
+
value: lang
|
|
98325
|
+
};
|
|
98326
|
+
});
|
|
98483
98327
|
function CodeBlockCombobox() {
|
|
98484
98328
|
const editor = useEditorRef();
|
|
98485
98329
|
const element = useElement();
|
|
98486
98330
|
const readOnly = useReadOnly();
|
|
98487
|
-
const
|
|
98488
|
-
|
|
98489
|
-
|
|
98490
|
-
|
|
98491
|
-
|
|
98492
|
-
|
|
98493
|
-
|
|
98494
|
-
|
|
98495
|
-
|
|
98496
|
-
|
|
98497
|
-
|
|
98498
|
-
|
|
98499
|
-
|
|
98331
|
+
const [open2, setOpen] = reactExports.useState(false);
|
|
98332
|
+
const selectOnCloseRef = reactExports.useRef(null);
|
|
98333
|
+
const [items2, value] = reactExports.useMemo(() => {
|
|
98334
|
+
let items22 = languageItems;
|
|
98335
|
+
let value2 = null;
|
|
98336
|
+
if (element.lang) {
|
|
98337
|
+
const info = highlight.getLanguage(element.lang);
|
|
98338
|
+
if (info) {
|
|
98339
|
+
value2 = languageItems.find((item) => item.label === info.name) ?? null;
|
|
98340
|
+
} else {
|
|
98341
|
+
value2 = {
|
|
98342
|
+
label: element.lang,
|
|
98343
|
+
value: element.lang
|
|
98344
|
+
};
|
|
98345
|
+
items22 = [...items22, value2];
|
|
98346
|
+
}
|
|
98347
|
+
}
|
|
98348
|
+
return [items22, value2];
|
|
98500
98349
|
}, [element.lang]);
|
|
98350
|
+
function setLang(lang) {
|
|
98351
|
+
editor.tf.setNodes({ lang }, { at: element });
|
|
98352
|
+
editor.tf.replaceNodes(element.children, { at: element, children: true });
|
|
98353
|
+
}
|
|
98501
98354
|
if (readOnly) {
|
|
98502
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-mono text-sm text-muted-foreground
|
|
98355
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "px-2 font-mono text-sm text-muted-foreground", children: value?.label });
|
|
98503
98356
|
}
|
|
98504
98357
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
98505
98358
|
Combobox,
|
|
98506
98359
|
{
|
|
98507
98360
|
items: items2,
|
|
98508
98361
|
value,
|
|
98362
|
+
onInputValueChange: (v) => {
|
|
98363
|
+
selectOnCloseRef.current = v;
|
|
98364
|
+
},
|
|
98509
98365
|
onValueChange: (item) => {
|
|
98510
|
-
if (item)
|
|
98511
|
-
|
|
98512
|
-
|
|
98513
|
-
|
|
98514
|
-
|
|
98515
|
-
|
|
98366
|
+
if (item === null) return;
|
|
98367
|
+
setLang(item.value);
|
|
98368
|
+
selectOnCloseRef.current = null;
|
|
98369
|
+
},
|
|
98370
|
+
open: open2,
|
|
98371
|
+
onOpenChange: (v) => {
|
|
98372
|
+
if (!v && selectOnCloseRef.current) setLang(selectOnCloseRef.current);
|
|
98373
|
+
setOpen(v);
|
|
98516
98374
|
},
|
|
98517
98375
|
children: [
|
|
98518
98376
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
98519
98377
|
ComboboxChipsInput,
|
|
98520
98378
|
{
|
|
98521
98379
|
placeholder: "Select Language",
|
|
98522
|
-
className: "
|
|
98380
|
+
className: "px-2 rounded-lg font-mono text-sm not-data-popup-open:text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
98523
98381
|
}
|
|
98524
98382
|
),
|
|
98525
98383
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ComboboxContent, { className: "max-w-[200px]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComboboxList2, { children: (item) => /* @__PURE__ */ jsxRuntimeExports.jsx(ComboboxItem2, { value: item, children: item.label }, item.value) }) })
|
|
@@ -98568,614 +98426,6 @@ const CodeBlockKit = [
|
|
|
98568
98426
|
CodeLinePlugin.withComponent(CodeLineElement),
|
|
98569
98427
|
CodeSyntaxPlugin.withComponent(CodeSyntaxLeaf)
|
|
98570
98428
|
];
|
|
98571
|
-
const ColumnItemPlugin = toPlatePlugin(BaseColumnItemPlugin);
|
|
98572
|
-
const ColumnPlugin = toPlatePlugin(BaseColumnPlugin, { plugins: [ColumnItemPlugin] });
|
|
98573
|
-
const isTouchEvent = (event) => "touches" in event;
|
|
98574
|
-
const resizeLengthToRelative = (length, parentLength) => {
|
|
98575
|
-
if (typeof length === "number") return `${length / parentLength * 100}%`;
|
|
98576
|
-
return length;
|
|
98577
|
-
};
|
|
98578
|
-
const resizeLengthToStatic = (length, parentLength) => {
|
|
98579
|
-
if (typeof length === "string") return parentLength * Number.parseFloat(length) / 100;
|
|
98580
|
-
return length;
|
|
98581
|
-
};
|
|
98582
|
-
const resizeLengthClampStatic = (length, { max: max2, min: min2 }) => {
|
|
98583
|
-
let result = length;
|
|
98584
|
-
if (min2 !== void 0) result = Math.max(result, min2);
|
|
98585
|
-
if (max2 !== void 0) result = Math.min(result, max2);
|
|
98586
|
-
return result;
|
|
98587
|
-
};
|
|
98588
|
-
const resizeLengthClamp = (length, parentLength, { max: max2, min: min2 }) => {
|
|
98589
|
-
const clampedStaticLength = resizeLengthClampStatic(resizeLengthToStatic(length, parentLength), {
|
|
98590
|
-
max: max2 === void 0 ? void 0 : resizeLengthToStatic(max2, parentLength),
|
|
98591
|
-
min: min2 === void 0 ? void 0 : resizeLengthToStatic(min2, parentLength)
|
|
98592
|
-
});
|
|
98593
|
-
switch (typeof length) {
|
|
98594
|
-
case "number":
|
|
98595
|
-
return clampedStaticLength;
|
|
98596
|
-
case "string":
|
|
98597
|
-
return resizeLengthToRelative(clampedStaticLength, parentLength);
|
|
98598
|
-
default:
|
|
98599
|
-
throw new Error("Invalid length type");
|
|
98600
|
-
}
|
|
98601
|
-
};
|
|
98602
|
-
const initialState = { onResize: null };
|
|
98603
|
-
const { ResizeHandleProvider, useResizeHandleValue } = createAtomStore(initialState, {
|
|
98604
|
-
name: "resizeHandle",
|
|
98605
|
-
suppressWarnings: true
|
|
98606
|
-
});
|
|
98607
|
-
const useResizeHandleState = (t0) => {
|
|
98608
|
-
const $2 = distExports.c(21);
|
|
98609
|
-
const { direction: t1, initialSize: _initialSize, onHover, onHoverEnd, onMouseDown, onResize: onResizeProp, onTouchStart } = t0;
|
|
98610
|
-
const direction = t1 === void 0 ? "left" : t1;
|
|
98611
|
-
const readOnly = useReadOnly();
|
|
98612
|
-
const onResizeStore = useResizeHandleValue("onResize");
|
|
98613
|
-
const onResize = onResizeProp ?? onResizeStore;
|
|
98614
|
-
const [isResizing, setIsResizing] = We.useState(false);
|
|
98615
|
-
const [initialPosition, setInitialPosition] = We.useState(0);
|
|
98616
|
-
const [initialSizeState, setInitialSize] = We.useState(0);
|
|
98617
|
-
const initialSize = _initialSize ?? initialSizeState;
|
|
98618
|
-
const isHorizontal = direction === "left" || direction === "right";
|
|
98619
|
-
let t2;
|
|
98620
|
-
let t3;
|
|
98621
|
-
if ($2[0] !== direction || $2[1] !== initialPosition || $2[2] !== initialSize || $2[3] !== isHorizontal || $2[4] !== isResizing || $2[5] !== onHoverEnd || $2[6] !== onResize) {
|
|
98622
|
-
t2 = () => {
|
|
98623
|
-
if (!isResizing) return;
|
|
98624
|
-
const sendResizeEvent = (event, finished) => {
|
|
98625
|
-
const { clientX, clientY } = isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : event;
|
|
98626
|
-
onResize({
|
|
98627
|
-
delta: (isHorizontal ? clientX : clientY) - initialPosition,
|
|
98628
|
-
direction,
|
|
98629
|
-
finished,
|
|
98630
|
-
initialSize
|
|
98631
|
-
});
|
|
98632
|
-
};
|
|
98633
|
-
const handleMouseMove = (event_0) => sendResizeEvent(event_0, false);
|
|
98634
|
-
const handleMouseUp = (event_1) => {
|
|
98635
|
-
setIsResizing(false);
|
|
98636
|
-
onHoverEnd?.();
|
|
98637
|
-
sendResizeEvent(event_1, true);
|
|
98638
|
-
};
|
|
98639
|
-
window.addEventListener("mousemove", handleMouseMove);
|
|
98640
|
-
window.addEventListener("mouseup", handleMouseUp);
|
|
98641
|
-
window.addEventListener("touchmove", handleMouseMove);
|
|
98642
|
-
window.addEventListener("touchend", handleMouseUp);
|
|
98643
|
-
return () => {
|
|
98644
|
-
window.removeEventListener("mousemove", handleMouseMove);
|
|
98645
|
-
window.removeEventListener("mouseup", handleMouseUp);
|
|
98646
|
-
window.removeEventListener("touchmove", handleMouseMove);
|
|
98647
|
-
window.removeEventListener("touchend", handleMouseUp);
|
|
98648
|
-
};
|
|
98649
|
-
};
|
|
98650
|
-
t3 = [
|
|
98651
|
-
isResizing,
|
|
98652
|
-
initialPosition,
|
|
98653
|
-
initialSize,
|
|
98654
|
-
onResize,
|
|
98655
|
-
isHorizontal,
|
|
98656
|
-
onHoverEnd,
|
|
98657
|
-
direction
|
|
98658
|
-
];
|
|
98659
|
-
$2[0] = direction;
|
|
98660
|
-
$2[1] = initialPosition;
|
|
98661
|
-
$2[2] = initialSize;
|
|
98662
|
-
$2[3] = isHorizontal;
|
|
98663
|
-
$2[4] = isResizing;
|
|
98664
|
-
$2[5] = onHoverEnd;
|
|
98665
|
-
$2[6] = onResize;
|
|
98666
|
-
$2[7] = t2;
|
|
98667
|
-
$2[8] = t3;
|
|
98668
|
-
} else {
|
|
98669
|
-
t2 = $2[7];
|
|
98670
|
-
t3 = $2[8];
|
|
98671
|
-
}
|
|
98672
|
-
We.useEffect(t2, t3);
|
|
98673
|
-
let t4;
|
|
98674
|
-
if ($2[9] !== direction || $2[10] !== initialPosition || $2[11] !== initialSize || $2[12] !== isHorizontal || $2[13] !== isResizing || $2[14] !== onHover || $2[15] !== onHoverEnd || $2[16] !== onMouseDown || $2[17] !== onResize || $2[18] !== onTouchStart || $2[19] !== readOnly) {
|
|
98675
|
-
t4 = {
|
|
98676
|
-
direction,
|
|
98677
|
-
initialPosition,
|
|
98678
|
-
initialSize,
|
|
98679
|
-
isHorizontal,
|
|
98680
|
-
isResizing,
|
|
98681
|
-
readOnly,
|
|
98682
|
-
setInitialPosition,
|
|
98683
|
-
setInitialSize,
|
|
98684
|
-
setIsResizing,
|
|
98685
|
-
onHover,
|
|
98686
|
-
onHoverEnd,
|
|
98687
|
-
onMouseDown,
|
|
98688
|
-
onResize,
|
|
98689
|
-
onTouchStart
|
|
98690
|
-
};
|
|
98691
|
-
$2[9] = direction;
|
|
98692
|
-
$2[10] = initialPosition;
|
|
98693
|
-
$2[11] = initialSize;
|
|
98694
|
-
$2[12] = isHorizontal;
|
|
98695
|
-
$2[13] = isResizing;
|
|
98696
|
-
$2[14] = onHover;
|
|
98697
|
-
$2[15] = onHoverEnd;
|
|
98698
|
-
$2[16] = onMouseDown;
|
|
98699
|
-
$2[17] = onResize;
|
|
98700
|
-
$2[18] = onTouchStart;
|
|
98701
|
-
$2[19] = readOnly;
|
|
98702
|
-
$2[20] = t4;
|
|
98703
|
-
} else t4 = $2[20];
|
|
98704
|
-
return t4;
|
|
98705
|
-
};
|
|
98706
|
-
const useResizeHandle = ({ isHorizontal, isResizing, readOnly, setInitialPosition, setInitialSize, setIsResizing, onHover, onHoverEnd, onMouseDown, onTouchStart }) => {
|
|
98707
|
-
const handleMouseDown = (event) => {
|
|
98708
|
-
const { clientX, clientY } = event;
|
|
98709
|
-
setInitialPosition(isHorizontal ? clientX : clientY);
|
|
98710
|
-
const element = event.target.parentElement;
|
|
98711
|
-
setInitialSize(isHorizontal ? element.offsetWidth : element.offsetHeight);
|
|
98712
|
-
setIsResizing(true);
|
|
98713
|
-
onMouseDown?.(event);
|
|
98714
|
-
};
|
|
98715
|
-
const handleTouchStart = (event) => {
|
|
98716
|
-
const { touches } = event;
|
|
98717
|
-
const { clientX, clientY } = touches[0];
|
|
98718
|
-
setInitialPosition(isHorizontal ? clientX : clientY);
|
|
98719
|
-
const element = event.target.parentElement;
|
|
98720
|
-
setInitialSize(isHorizontal ? element.offsetWidth : element.offsetHeight);
|
|
98721
|
-
setIsResizing(true);
|
|
98722
|
-
onTouchStart?.(event);
|
|
98723
|
-
};
|
|
98724
|
-
const handleMouseOver = () => {
|
|
98725
|
-
onHover?.();
|
|
98726
|
-
};
|
|
98727
|
-
const handleMouseOut = () => {
|
|
98728
|
-
if (!isResizing) onHoverEnd?.();
|
|
98729
|
-
};
|
|
98730
|
-
return {
|
|
98731
|
-
hidden: readOnly,
|
|
98732
|
-
props: {
|
|
98733
|
-
onMouseDown: handleMouseDown,
|
|
98734
|
-
onMouseOut: handleMouseOut,
|
|
98735
|
-
onMouseOver: handleMouseOver,
|
|
98736
|
-
onTouchEnd: handleMouseOut,
|
|
98737
|
-
onTouchMove: handleMouseOver,
|
|
98738
|
-
onTouchStart: handleTouchStart
|
|
98739
|
-
}
|
|
98740
|
-
};
|
|
98741
|
-
};
|
|
98742
|
-
createPrimitiveComponent("div")({
|
|
98743
|
-
propsHook: useResizeHandle,
|
|
98744
|
-
stateHook: useResizeHandleState
|
|
98745
|
-
});
|
|
98746
|
-
const { ResizableProvider, useResizableSet, useResizableValue } = createAtomStore({ width: 0 }, { name: "resizable" });
|
|
98747
|
-
const useResizableState = (t0) => {
|
|
98748
|
-
const $2 = distExports.c(17);
|
|
98749
|
-
let t1;
|
|
98750
|
-
if ($2[0] !== t0) {
|
|
98751
|
-
t1 = t0 === void 0 ? {} : t0;
|
|
98752
|
-
$2[0] = t0;
|
|
98753
|
-
$2[1] = t1;
|
|
98754
|
-
} else t1 = $2[1];
|
|
98755
|
-
const { align: t2, maxWidth: t3, minWidth: t4 } = t1;
|
|
98756
|
-
const align = t2 === void 0 ? "center" : t2;
|
|
98757
|
-
const maxWidth = t3 === void 0 ? "100%" : t3;
|
|
98758
|
-
const minWidth = t4 === void 0 ? 92 : t4;
|
|
98759
|
-
const editor = useEditorRef();
|
|
98760
|
-
const element = useElement();
|
|
98761
|
-
const path3 = usePath();
|
|
98762
|
-
const nodeWidth = element?.width ?? "100%";
|
|
98763
|
-
const width = useResizableValue("width");
|
|
98764
|
-
const setWidth = useResizableSet("width");
|
|
98765
|
-
let t5;
|
|
98766
|
-
if ($2[2] !== editor || $2[3] !== nodeWidth || $2[4] !== path3) {
|
|
98767
|
-
t5 = (w2) => {
|
|
98768
|
-
if (w2 === nodeWidth) editor.tf.select(path3);
|
|
98769
|
-
else editor.tf.setNodes({ width: w2 }, { at: path3 });
|
|
98770
|
-
};
|
|
98771
|
-
$2[2] = editor;
|
|
98772
|
-
$2[3] = nodeWidth;
|
|
98773
|
-
$2[4] = path3;
|
|
98774
|
-
$2[5] = t5;
|
|
98775
|
-
} else t5 = $2[5];
|
|
98776
|
-
const setNodeWidth = t5;
|
|
98777
|
-
let t6;
|
|
98778
|
-
let t7;
|
|
98779
|
-
if ($2[6] !== nodeWidth || $2[7] !== setWidth) {
|
|
98780
|
-
t6 = () => {
|
|
98781
|
-
setWidth(nodeWidth);
|
|
98782
|
-
};
|
|
98783
|
-
t7 = [nodeWidth, setWidth];
|
|
98784
|
-
$2[6] = nodeWidth;
|
|
98785
|
-
$2[7] = setWidth;
|
|
98786
|
-
$2[8] = t6;
|
|
98787
|
-
$2[9] = t7;
|
|
98788
|
-
} else {
|
|
98789
|
-
t6 = $2[8];
|
|
98790
|
-
t7 = $2[9];
|
|
98791
|
-
}
|
|
98792
|
-
We.useEffect(t6, t7);
|
|
98793
|
-
let t8;
|
|
98794
|
-
if ($2[10] !== align || $2[11] !== maxWidth || $2[12] !== minWidth || $2[13] !== setNodeWidth || $2[14] !== setWidth || $2[15] !== width) {
|
|
98795
|
-
t8 = {
|
|
98796
|
-
align,
|
|
98797
|
-
maxWidth,
|
|
98798
|
-
minWidth,
|
|
98799
|
-
setNodeWidth,
|
|
98800
|
-
setWidth,
|
|
98801
|
-
width
|
|
98802
|
-
};
|
|
98803
|
-
$2[10] = align;
|
|
98804
|
-
$2[11] = maxWidth;
|
|
98805
|
-
$2[12] = minWidth;
|
|
98806
|
-
$2[13] = setNodeWidth;
|
|
98807
|
-
$2[14] = setWidth;
|
|
98808
|
-
$2[15] = width;
|
|
98809
|
-
$2[16] = t8;
|
|
98810
|
-
} else t8 = $2[16];
|
|
98811
|
-
return t8;
|
|
98812
|
-
};
|
|
98813
|
-
const useResizable = (t0) => {
|
|
98814
|
-
const $2 = distExports.c(19);
|
|
98815
|
-
const { align, maxWidth, minWidth, setNodeWidth, setWidth, width } = t0;
|
|
98816
|
-
const wrapperRef = We.useRef(null);
|
|
98817
|
-
let t1;
|
|
98818
|
-
if ($2[0] !== align || $2[1] !== maxWidth || $2[2] !== minWidth || $2[3] !== setNodeWidth || $2[4] !== setWidth) {
|
|
98819
|
-
t1 = (t2$1) => {
|
|
98820
|
-
const { delta, direction, finished, initialSize } = t2$1;
|
|
98821
|
-
const wrapperStaticWidth = wrapperRef.current.offsetWidth;
|
|
98822
|
-
const newWidth = resizeLengthClamp(initialSize + delta * ((align === "center" ? 2 : 1) * (direction === "left" ? -1 : 1)), wrapperStaticWidth, {
|
|
98823
|
-
max: maxWidth,
|
|
98824
|
-
min: minWidth
|
|
98825
|
-
});
|
|
98826
|
-
if (finished) setNodeWidth(newWidth);
|
|
98827
|
-
else setWidth(newWidth);
|
|
98828
|
-
};
|
|
98829
|
-
$2[0] = align;
|
|
98830
|
-
$2[1] = maxWidth;
|
|
98831
|
-
$2[2] = minWidth;
|
|
98832
|
-
$2[3] = setNodeWidth;
|
|
98833
|
-
$2[4] = setWidth;
|
|
98834
|
-
$2[5] = t1;
|
|
98835
|
-
} else t1 = $2[5];
|
|
98836
|
-
const t2 = t1;
|
|
98837
|
-
let t3;
|
|
98838
|
-
if ($2[6] !== t2) {
|
|
98839
|
-
t3 = { onResize: t2 };
|
|
98840
|
-
$2[6] = t2;
|
|
98841
|
-
$2[7] = t3;
|
|
98842
|
-
} else t3 = $2[7];
|
|
98843
|
-
let t4;
|
|
98844
|
-
if ($2[8] !== maxWidth || $2[9] !== minWidth || $2[10] !== width) {
|
|
98845
|
-
t4 = {
|
|
98846
|
-
maxWidth,
|
|
98847
|
-
minWidth,
|
|
98848
|
-
position: "relative",
|
|
98849
|
-
width
|
|
98850
|
-
};
|
|
98851
|
-
$2[8] = maxWidth;
|
|
98852
|
-
$2[9] = minWidth;
|
|
98853
|
-
$2[10] = width;
|
|
98854
|
-
$2[11] = t4;
|
|
98855
|
-
} else t4 = $2[11];
|
|
98856
|
-
const t5 = t4;
|
|
98857
|
-
let t6;
|
|
98858
|
-
if ($2[12] !== t5) {
|
|
98859
|
-
t6 = { style: t5 };
|
|
98860
|
-
$2[12] = t5;
|
|
98861
|
-
$2[13] = t6;
|
|
98862
|
-
} else t6 = $2[13];
|
|
98863
|
-
let t7;
|
|
98864
|
-
if ($2[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
98865
|
-
t7 = { position: "relative" };
|
|
98866
|
-
$2[14] = t7;
|
|
98867
|
-
} else t7 = $2[14];
|
|
98868
|
-
let t8;
|
|
98869
|
-
if ($2[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
98870
|
-
t8 = { style: t7 };
|
|
98871
|
-
$2[15] = t8;
|
|
98872
|
-
} else t8 = $2[15];
|
|
98873
|
-
let t9;
|
|
98874
|
-
if ($2[16] !== t3 || $2[17] !== t6) {
|
|
98875
|
-
t9 = {
|
|
98876
|
-
context: t3,
|
|
98877
|
-
props: t6,
|
|
98878
|
-
wrapperProps: t8,
|
|
98879
|
-
wrapperRef
|
|
98880
|
-
};
|
|
98881
|
-
$2[16] = t3;
|
|
98882
|
-
$2[17] = t6;
|
|
98883
|
-
$2[18] = t9;
|
|
98884
|
-
} else t9 = $2[18];
|
|
98885
|
-
return t9;
|
|
98886
|
-
};
|
|
98887
|
-
const Resizable$1 = We.forwardRef((t0, ref2) => {
|
|
98888
|
-
const $2 = distExports.c(16);
|
|
98889
|
-
let children;
|
|
98890
|
-
let options2;
|
|
98891
|
-
let rest;
|
|
98892
|
-
if ($2[0] !== t0) {
|
|
98893
|
-
({ children, options: options2, ...rest } = t0);
|
|
98894
|
-
$2[0] = t0;
|
|
98895
|
-
$2[1] = children;
|
|
98896
|
-
$2[2] = options2;
|
|
98897
|
-
$2[3] = rest;
|
|
98898
|
-
} else {
|
|
98899
|
-
children = $2[1];
|
|
98900
|
-
options2 = $2[2];
|
|
98901
|
-
rest = $2[3];
|
|
98902
|
-
}
|
|
98903
|
-
const { context, props, wrapperProps, wrapperRef } = useResizable(useResizableState(options2));
|
|
98904
|
-
let t1;
|
|
98905
|
-
if ($2[4] !== children || $2[5] !== context.onResize) {
|
|
98906
|
-
t1 = /* @__PURE__ */ We.createElement(ResizeHandleProvider, { onResize: context.onResize }, children);
|
|
98907
|
-
$2[4] = children;
|
|
98908
|
-
$2[5] = context.onResize;
|
|
98909
|
-
$2[6] = t1;
|
|
98910
|
-
} else t1 = $2[6];
|
|
98911
|
-
let t2;
|
|
98912
|
-
if ($2[7] !== props || $2[8] !== ref2 || $2[9] !== rest || $2[10] !== t1) {
|
|
98913
|
-
t2 = /* @__PURE__ */ We.createElement("div", {
|
|
98914
|
-
ref: ref2,
|
|
98915
|
-
...props,
|
|
98916
|
-
...rest
|
|
98917
|
-
}, t1);
|
|
98918
|
-
$2[7] = props;
|
|
98919
|
-
$2[8] = ref2;
|
|
98920
|
-
$2[9] = rest;
|
|
98921
|
-
$2[10] = t1;
|
|
98922
|
-
$2[11] = t2;
|
|
98923
|
-
} else t2 = $2[11];
|
|
98924
|
-
let t3;
|
|
98925
|
-
if ($2[12] !== t2 || $2[13] !== wrapperProps || $2[14] !== wrapperRef) {
|
|
98926
|
-
t3 = /* @__PURE__ */ We.createElement("div", {
|
|
98927
|
-
ref: wrapperRef,
|
|
98928
|
-
...wrapperProps
|
|
98929
|
-
}, t2);
|
|
98930
|
-
$2[12] = t2;
|
|
98931
|
-
$2[13] = wrapperProps;
|
|
98932
|
-
$2[14] = wrapperRef;
|
|
98933
|
-
$2[15] = t3;
|
|
98934
|
-
} else t3 = $2[15];
|
|
98935
|
-
return t3;
|
|
98936
|
-
});
|
|
98937
|
-
Resizable$1.displayName = "Resizable";
|
|
98938
|
-
const ColumnElement = withHOC(
|
|
98939
|
-
ResizableProvider,
|
|
98940
|
-
function ColumnElement2(props) {
|
|
98941
|
-
const { width } = props.element;
|
|
98942
|
-
const readOnly = useReadOnly();
|
|
98943
|
-
const isSelectionAreaVisible = usePluginOption(BlockSelectionPlugin, "isSelectionAreaVisible");
|
|
98944
|
-
const { isDragging, previewRef, handleRef } = useDraggable({
|
|
98945
|
-
element: props.element,
|
|
98946
|
-
orientation: "horizontal",
|
|
98947
|
-
type: "column",
|
|
98948
|
-
canDropNode: ({ dragEntry, dropEntry }) => PathApi.equals(PathApi.parent(dragEntry[1]), PathApi.parent(dropEntry[1]))
|
|
98949
|
-
});
|
|
98950
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "group/column relative", style: { width: width ?? "100%" }, children: [
|
|
98951
|
-
!readOnly && !isSelectionAreaVisible && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
98952
|
-
"div",
|
|
98953
|
-
{
|
|
98954
|
-
ref: handleRef,
|
|
98955
|
-
className: cn(
|
|
98956
|
-
"-translate-x-1/2 -translate-y-1/2 absolute top-2 left-1/2 z-50",
|
|
98957
|
-
"pointer-events-auto flex items-center",
|
|
98958
|
-
"opacity-0 transition-opacity group-hover/column:opacity-100"
|
|
98959
|
-
),
|
|
98960
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnDragHandle, {})
|
|
98961
|
-
}
|
|
98962
|
-
),
|
|
98963
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
98964
|
-
PlateElement,
|
|
98965
|
-
{
|
|
98966
|
-
...props,
|
|
98967
|
-
ref: useComposedRef$1(props.ref, previewRef),
|
|
98968
|
-
className: "h-full px-2 pt-2 group-first/column:pl-0 group-last/column:pr-0",
|
|
98969
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
98970
|
-
"div",
|
|
98971
|
-
{
|
|
98972
|
-
className: cn(
|
|
98973
|
-
"relative h-full border border-transparent p-1.5",
|
|
98974
|
-
!readOnly && "rounded-lg border-border border-dashed",
|
|
98975
|
-
isDragging && "opacity-50"
|
|
98976
|
-
),
|
|
98977
|
-
children: [
|
|
98978
|
-
props.children,
|
|
98979
|
-
!readOnly && !isSelectionAreaVisible && /* @__PURE__ */ jsxRuntimeExports.jsx(DropLine$1, {})
|
|
98980
|
-
]
|
|
98981
|
-
}
|
|
98982
|
-
)
|
|
98983
|
-
}
|
|
98984
|
-
)
|
|
98985
|
-
] });
|
|
98986
|
-
}
|
|
98987
|
-
);
|
|
98988
|
-
const ColumnDragHandle = reactExports.memo(function ColumnDragHandle2() {
|
|
98989
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
98990
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { variant: "ghost", className: "!px-1 h-5", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
98991
|
-
GripHorizontal,
|
|
98992
|
-
{
|
|
98993
|
-
className: "text-muted-foreground",
|
|
98994
|
-
onClick: (event) => {
|
|
98995
|
-
event.stopPropagation();
|
|
98996
|
-
event.preventDefault();
|
|
98997
|
-
}
|
|
98998
|
-
}
|
|
98999
|
-
) }) }),
|
|
99000
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent$1, { children: "Drag to move column" })
|
|
99001
|
-
] }) });
|
|
99002
|
-
});
|
|
99003
|
-
function DropLine$1() {
|
|
99004
|
-
const { dropLine } = useDropLine({ orientation: "horizontal" });
|
|
99005
|
-
if (!dropLine) return null;
|
|
99006
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99007
|
-
"div",
|
|
99008
|
-
{
|
|
99009
|
-
className: cn(
|
|
99010
|
-
"slate-dropLine",
|
|
99011
|
-
"absolute bg-brand/50",
|
|
99012
|
-
dropLine === "left" && "group-first/column:-left-1 inset-y-0 left-[-10.5px] w-1",
|
|
99013
|
-
dropLine === "right" && "group-last/column:-right-1 inset-y-0 right-[-11px] w-1"
|
|
99014
|
-
)
|
|
99015
|
-
}
|
|
99016
|
-
);
|
|
99017
|
-
}
|
|
99018
|
-
function ColumnGroupElement(props) {
|
|
99019
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(PlateElement, { className: "mb-2", ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnFloatingToolbar, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex size-full rounded", children: props.children }) }) });
|
|
99020
|
-
}
|
|
99021
|
-
function ColumnFloatingToolbar({ children }) {
|
|
99022
|
-
const editor = useEditorRef();
|
|
99023
|
-
const readOnly = useReadOnly();
|
|
99024
|
-
const element = useElement();
|
|
99025
|
-
const { props: buttonProps } = useRemoveNodeButton({ element });
|
|
99026
|
-
const selected = useSelected();
|
|
99027
|
-
const isCollapsed = useEditorSelector((editor2) => editor2.api.isCollapsed(), []);
|
|
99028
|
-
const isFocusedLast = useFocusedLast();
|
|
99029
|
-
const open2 = isFocusedLast && !readOnly && selected && isCollapsed;
|
|
99030
|
-
const onColumnChange = (widths) => {
|
|
99031
|
-
setColumns(editor, {
|
|
99032
|
-
at: element,
|
|
99033
|
-
widths
|
|
99034
|
-
});
|
|
99035
|
-
};
|
|
99036
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Popover, { open: open2, modal: false, children: [
|
|
99037
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(PopoverAnchor, { children }),
|
|
99038
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99039
|
-
PopoverContent,
|
|
99040
|
-
{
|
|
99041
|
-
className: "w-auto p-1",
|
|
99042
|
-
onOpenAutoFocus: (e2) => e2.preventDefault(),
|
|
99043
|
-
align: "center",
|
|
99044
|
-
side: "top",
|
|
99045
|
-
sideOffset: 10,
|
|
99046
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "box-content flex h-8 items-center", children: [
|
|
99047
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { variant: "ghost", className: "size-8", onClick: () => onColumnChange(["50%", "50%"]), children: /* @__PURE__ */ jsxRuntimeExports.jsx(DoubleColumnOutlined, {}) }),
|
|
99048
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99049
|
-
Button$2,
|
|
99050
|
-
{
|
|
99051
|
-
variant: "ghost",
|
|
99052
|
-
className: "size-8",
|
|
99053
|
-
onClick: () => onColumnChange(["33%", "33%", "33%"]),
|
|
99054
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThreeColumnOutlined, {})
|
|
99055
|
-
}
|
|
99056
|
-
),
|
|
99057
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { variant: "ghost", className: "size-8", onClick: () => onColumnChange(["70%", "30%"]), children: /* @__PURE__ */ jsxRuntimeExports.jsx(RightSideDoubleColumnOutlined, {}) }),
|
|
99058
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { variant: "ghost", className: "size-8", onClick: () => onColumnChange(["30%", "70%"]), children: /* @__PURE__ */ jsxRuntimeExports.jsx(LeftSideDoubleColumnOutlined, {}) }),
|
|
99059
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99060
|
-
Button$2,
|
|
99061
|
-
{
|
|
99062
|
-
variant: "ghost",
|
|
99063
|
-
className: "size-8",
|
|
99064
|
-
onClick: () => onColumnChange(["25%", "50%", "25%"]),
|
|
99065
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(DoubleSideDoubleColumnOutlined, {})
|
|
99066
|
-
}
|
|
99067
|
-
),
|
|
99068
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Separator, { orientation: "vertical", className: "mx-1 h-6" }),
|
|
99069
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { variant: "ghost", className: "size-8", ...buttonProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, {}) })
|
|
99070
|
-
] })
|
|
99071
|
-
}
|
|
99072
|
-
)
|
|
99073
|
-
] });
|
|
99074
|
-
}
|
|
99075
|
-
const DoubleColumnOutlined = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99076
|
-
"svg",
|
|
99077
|
-
{
|
|
99078
|
-
fill: "none",
|
|
99079
|
-
height: "16",
|
|
99080
|
-
viewBox: "0 0 16 16",
|
|
99081
|
-
width: "16",
|
|
99082
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
99083
|
-
...props,
|
|
99084
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99085
|
-
"path",
|
|
99086
|
-
{
|
|
99087
|
-
clipRule: "evenodd",
|
|
99088
|
-
d: "M8.5 3H13V13H8.5V3ZM7.5 2H8.5H13C13.5523 2 14 2.44772 14 3V13C14 13.5523 13.5523 14 13 14H8.5H7.5H3C2.44772 14 2 13.5523 2 13V3C2 2.44772 2.44772 2 3 2H7.5ZM7.5 13H3L3 3H7.5V13Z",
|
|
99089
|
-
fill: "currentColor",
|
|
99090
|
-
fillRule: "evenodd"
|
|
99091
|
-
}
|
|
99092
|
-
)
|
|
99093
|
-
}
|
|
99094
|
-
);
|
|
99095
|
-
const ThreeColumnOutlined = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99096
|
-
"svg",
|
|
99097
|
-
{
|
|
99098
|
-
fill: "none",
|
|
99099
|
-
height: "16",
|
|
99100
|
-
viewBox: "0 0 16 16",
|
|
99101
|
-
width: "16",
|
|
99102
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
99103
|
-
...props,
|
|
99104
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99105
|
-
"path",
|
|
99106
|
-
{
|
|
99107
|
-
clipRule: "evenodd",
|
|
99108
|
-
d: "M9.25 3H6.75V13H9.25V3ZM9.25 2H6.75H5.75H3C2.44772 2 2 2.44772 2 3V13C2 13.5523 2.44772 14 3 14H5.75H6.75H9.25H10.25H13C13.5523 14 14 13.5523 14 13V3C14 2.44772 13.5523 2 13 2H10.25H9.25ZM10.25 3V13H13V3H10.25ZM3 13H5.75V3H3L3 13Z",
|
|
99109
|
-
fill: "currentColor",
|
|
99110
|
-
fillRule: "evenodd"
|
|
99111
|
-
}
|
|
99112
|
-
)
|
|
99113
|
-
}
|
|
99114
|
-
);
|
|
99115
|
-
const RightSideDoubleColumnOutlined = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99116
|
-
"svg",
|
|
99117
|
-
{
|
|
99118
|
-
fill: "none",
|
|
99119
|
-
height: "16",
|
|
99120
|
-
viewBox: "0 0 16 16",
|
|
99121
|
-
width: "16",
|
|
99122
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
99123
|
-
...props,
|
|
99124
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99125
|
-
"path",
|
|
99126
|
-
{
|
|
99127
|
-
clipRule: "evenodd",
|
|
99128
|
-
d: "M11.25 3H13V13H11.25V3ZM10.25 2H11.25H13C13.5523 2 14 2.44772 14 3V13C14 13.5523 13.5523 14 13 14H11.25H10.25H3C2.44772 14 2 13.5523 2 13V3C2 2.44772 2.44772 2 3 2H10.25ZM10.25 13H3L3 3H10.25V13Z",
|
|
99129
|
-
fill: "currentColor",
|
|
99130
|
-
fillRule: "evenodd"
|
|
99131
|
-
}
|
|
99132
|
-
)
|
|
99133
|
-
}
|
|
99134
|
-
);
|
|
99135
|
-
const LeftSideDoubleColumnOutlined = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99136
|
-
"svg",
|
|
99137
|
-
{
|
|
99138
|
-
fill: "none",
|
|
99139
|
-
height: "16",
|
|
99140
|
-
viewBox: "0 0 16 16",
|
|
99141
|
-
width: "16",
|
|
99142
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
99143
|
-
...props,
|
|
99144
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99145
|
-
"path",
|
|
99146
|
-
{
|
|
99147
|
-
clipRule: "evenodd",
|
|
99148
|
-
d: "M5.75 3H13V13H5.75V3ZM4.75 2H5.75H13C13.5523 2 14 2.44772 14 3V13C14 13.5523 13.5523 14 13 14H5.75H4.75H3C2.44772 14 2 13.5523 2 13V3C2 2.44772 2.44772 2 3 2H4.75ZM4.75 13H3L3 3H4.75V13Z",
|
|
99149
|
-
fill: "currentColor",
|
|
99150
|
-
fillRule: "evenodd"
|
|
99151
|
-
}
|
|
99152
|
-
)
|
|
99153
|
-
}
|
|
99154
|
-
);
|
|
99155
|
-
const DoubleSideDoubleColumnOutlined = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99156
|
-
"svg",
|
|
99157
|
-
{
|
|
99158
|
-
fill: "none",
|
|
99159
|
-
height: "16",
|
|
99160
|
-
viewBox: "0 0 16 16",
|
|
99161
|
-
width: "16",
|
|
99162
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
99163
|
-
...props,
|
|
99164
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
99165
|
-
"path",
|
|
99166
|
-
{
|
|
99167
|
-
clipRule: "evenodd",
|
|
99168
|
-
d: "M10.25 3H5.75V13H10.25V3ZM10.25 2H5.75H4.75H3C2.44772 2 2 2.44772 2 3V13C2 13.5523 2.44772 14 3 14H4.75H5.75H10.25H11.25H13C13.5523 14 14 13.5523 14 13V3C14 2.44772 13.5523 2 13 2H11.25H10.25ZM11.25 3V13H13V3H11.25ZM3 13H4.75V3H3L3 13Z",
|
|
99169
|
-
fill: "currentColor",
|
|
99170
|
-
fillRule: "evenodd"
|
|
99171
|
-
}
|
|
99172
|
-
)
|
|
99173
|
-
}
|
|
99174
|
-
);
|
|
99175
|
-
const ColumnKit = [
|
|
99176
|
-
ColumnPlugin.withComponent(ColumnGroupElement),
|
|
99177
|
-
ColumnItemPlugin.withComponent(ColumnElement)
|
|
99178
|
-
];
|
|
99179
98429
|
function GhostText() {
|
|
99180
98430
|
const element = useElement();
|
|
99181
98431
|
const isSuggested = usePluginOption(CopilotPlugin, "isSuggested", element.id);
|
|
@@ -108421,6 +107671,109 @@ function OutdentToolbarButton(props) {
|
|
|
108421
107671
|
const { props: buttonProps } = useOutdentButton();
|
|
108422
107672
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarButton, { ...props, ...buttonProps, tooltip: "Outdent", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListIndentDecrease, {}) });
|
|
108423
107673
|
}
|
|
107674
|
+
const insertColumnGroup = (editor, { columns = 2, select: selectProp, ...options2 } = {}) => {
|
|
107675
|
+
const width = 100 / columns;
|
|
107676
|
+
editor.tf.withoutNormalizing(() => {
|
|
107677
|
+
editor.tf.insertNodes({
|
|
107678
|
+
children: new Array(columns).fill(null).map(() => ({
|
|
107679
|
+
children: [editor.api.create.block()],
|
|
107680
|
+
type: editor.getType(KEYS.column),
|
|
107681
|
+
width: `${width}%`
|
|
107682
|
+
})),
|
|
107683
|
+
type: editor.getType(KEYS.columnGroup)
|
|
107684
|
+
}, options2);
|
|
107685
|
+
if (selectProp) {
|
|
107686
|
+
const entry = editor.api.node({
|
|
107687
|
+
at: options2.at,
|
|
107688
|
+
match: { type: editor.getType(KEYS.column) }
|
|
107689
|
+
});
|
|
107690
|
+
if (!entry) return;
|
|
107691
|
+
editor.tf.select(entry[1].concat([0]));
|
|
107692
|
+
}
|
|
107693
|
+
});
|
|
107694
|
+
};
|
|
107695
|
+
const columnsToWidths = ({ columns = 2 } = {}) => new Array(columns).fill(null).map(() => `${100 / columns}%`);
|
|
107696
|
+
const setColumns = (editor, { at: at3, columns, widths }) => {
|
|
107697
|
+
editor.tf.withoutNormalizing(() => {
|
|
107698
|
+
if (!at3) return;
|
|
107699
|
+
widths = widths ?? columnsToWidths({ columns });
|
|
107700
|
+
if (widths.length === 0) return;
|
|
107701
|
+
const columnGroup = editor.api.node(at3);
|
|
107702
|
+
if (!columnGroup) return;
|
|
107703
|
+
const [{ children }, path3] = columnGroup;
|
|
107704
|
+
const currentCount = children.length;
|
|
107705
|
+
const targetCount = widths.length;
|
|
107706
|
+
if (currentCount === targetCount) {
|
|
107707
|
+
widths.forEach((width, i) => {
|
|
107708
|
+
editor.tf.setNodes({ width }, { at: path3.concat([i]) });
|
|
107709
|
+
});
|
|
107710
|
+
return;
|
|
107711
|
+
}
|
|
107712
|
+
if (targetCount > currentCount) {
|
|
107713
|
+
const columnsToAdd = targetCount - currentCount;
|
|
107714
|
+
const insertPath = path3.concat([currentCount]);
|
|
107715
|
+
const newColumns = new Array(columnsToAdd).fill(null).map((_, i) => ({
|
|
107716
|
+
children: [editor.api.create.block()],
|
|
107717
|
+
type: editor.getType(KEYS.column),
|
|
107718
|
+
width: widths[currentCount + i] || `${100 / targetCount}%`
|
|
107719
|
+
}));
|
|
107720
|
+
editor.tf.insertNodes(newColumns, { at: insertPath });
|
|
107721
|
+
widths.forEach((width, i) => {
|
|
107722
|
+
editor.tf.setNodes({ width }, { at: path3.concat([i]) });
|
|
107723
|
+
});
|
|
107724
|
+
return;
|
|
107725
|
+
}
|
|
107726
|
+
if (targetCount < currentCount) {
|
|
107727
|
+
const keepColumnIndex = targetCount - 1;
|
|
107728
|
+
const keepColumnPath = path3.concat([keepColumnIndex]);
|
|
107729
|
+
const keepColumnNode = NodeApi.get(editor, keepColumnPath);
|
|
107730
|
+
if (!keepColumnNode) return;
|
|
107731
|
+
const to2 = keepColumnPath.concat([keepColumnNode.children.length]);
|
|
107732
|
+
for (let i = currentCount - 1; i > keepColumnIndex; i--) {
|
|
107733
|
+
const columnPath = path3.concat([i]);
|
|
107734
|
+
const columnEntry = editor.api.node(columnPath);
|
|
107735
|
+
if (!columnEntry) continue;
|
|
107736
|
+
editor.tf.moveNodes({
|
|
107737
|
+
at: columnEntry[1],
|
|
107738
|
+
children: true,
|
|
107739
|
+
to: to2
|
|
107740
|
+
});
|
|
107741
|
+
}
|
|
107742
|
+
for (let i = currentCount - 1; i > keepColumnIndex; i--) editor.tf.removeNodes({ at: path3.concat([i]) });
|
|
107743
|
+
widths.forEach((width, i) => {
|
|
107744
|
+
editor.tf.setNodes({ width }, { at: path3.concat([i]) });
|
|
107745
|
+
});
|
|
107746
|
+
}
|
|
107747
|
+
});
|
|
107748
|
+
};
|
|
107749
|
+
const toggleColumnGroup = (editor, { at: at3, columns = 2, widths } = {}) => {
|
|
107750
|
+
const entry = editor.api.block({ at: at3 });
|
|
107751
|
+
const columnGroupEntry = editor.api.block({
|
|
107752
|
+
above: true,
|
|
107753
|
+
at: at3,
|
|
107754
|
+
match: { type: editor.getType(KEYS.columnGroup) }
|
|
107755
|
+
});
|
|
107756
|
+
if (!entry) return;
|
|
107757
|
+
const [node3, path3] = entry;
|
|
107758
|
+
if (columnGroupEntry) setColumns(editor, {
|
|
107759
|
+
at: columnGroupEntry[1],
|
|
107760
|
+
columns,
|
|
107761
|
+
widths
|
|
107762
|
+
});
|
|
107763
|
+
else {
|
|
107764
|
+
const columnWidths = widths || columnsToWidths({ columns });
|
|
107765
|
+
const nodes2 = {
|
|
107766
|
+
children: new Array(columns).fill(null).map((_, index2) => ({
|
|
107767
|
+
children: [index2 === 0 ? node3 : editor.api.create.block()],
|
|
107768
|
+
type: editor.getType(KEYS.column),
|
|
107769
|
+
width: columnWidths[index2]
|
|
107770
|
+
})),
|
|
107771
|
+
type: editor.getType(KEYS.columnGroup)
|
|
107772
|
+
};
|
|
107773
|
+
editor.tf.replaceNodes(nodes2, { at: path3 });
|
|
107774
|
+
editor.tf.select(editor.api.start(path3.concat([0])));
|
|
107775
|
+
}
|
|
107776
|
+
};
|
|
108424
107777
|
var isClient$1 = typeof document !== "undefined";
|
|
108425
107778
|
var noop$3 = function noop() {
|
|
108426
107779
|
};
|
|
@@ -109627,6 +108980,371 @@ const triggerFloatingLink = (editor, { focused } = {}) => {
|
|
|
109627
108980
|
}
|
|
109628
108981
|
triggerFloatingLinkInsert(editor, { focused });
|
|
109629
108982
|
};
|
|
108983
|
+
const isTouchEvent = (event) => "touches" in event;
|
|
108984
|
+
const resizeLengthToRelative = (length, parentLength) => {
|
|
108985
|
+
if (typeof length === "number") return `${length / parentLength * 100}%`;
|
|
108986
|
+
return length;
|
|
108987
|
+
};
|
|
108988
|
+
const resizeLengthToStatic = (length, parentLength) => {
|
|
108989
|
+
if (typeof length === "string") return parentLength * Number.parseFloat(length) / 100;
|
|
108990
|
+
return length;
|
|
108991
|
+
};
|
|
108992
|
+
const resizeLengthClampStatic = (length, { max: max2, min: min2 }) => {
|
|
108993
|
+
let result = length;
|
|
108994
|
+
if (min2 !== void 0) result = Math.max(result, min2);
|
|
108995
|
+
if (max2 !== void 0) result = Math.min(result, max2);
|
|
108996
|
+
return result;
|
|
108997
|
+
};
|
|
108998
|
+
const resizeLengthClamp = (length, parentLength, { max: max2, min: min2 }) => {
|
|
108999
|
+
const clampedStaticLength = resizeLengthClampStatic(resizeLengthToStatic(length, parentLength), {
|
|
109000
|
+
max: max2 === void 0 ? void 0 : resizeLengthToStatic(max2, parentLength),
|
|
109001
|
+
min: min2 === void 0 ? void 0 : resizeLengthToStatic(min2, parentLength)
|
|
109002
|
+
});
|
|
109003
|
+
switch (typeof length) {
|
|
109004
|
+
case "number":
|
|
109005
|
+
return clampedStaticLength;
|
|
109006
|
+
case "string":
|
|
109007
|
+
return resizeLengthToRelative(clampedStaticLength, parentLength);
|
|
109008
|
+
default:
|
|
109009
|
+
throw new Error("Invalid length type");
|
|
109010
|
+
}
|
|
109011
|
+
};
|
|
109012
|
+
const initialState = { onResize: null };
|
|
109013
|
+
const { ResizeHandleProvider, useResizeHandleValue } = createAtomStore(initialState, {
|
|
109014
|
+
name: "resizeHandle",
|
|
109015
|
+
suppressWarnings: true
|
|
109016
|
+
});
|
|
109017
|
+
const useResizeHandleState = (t0) => {
|
|
109018
|
+
const $2 = distExports.c(21);
|
|
109019
|
+
const { direction: t1, initialSize: _initialSize, onHover, onHoverEnd, onMouseDown, onResize: onResizeProp, onTouchStart } = t0;
|
|
109020
|
+
const direction = t1 === void 0 ? "left" : t1;
|
|
109021
|
+
const readOnly = useReadOnly();
|
|
109022
|
+
const onResizeStore = useResizeHandleValue("onResize");
|
|
109023
|
+
const onResize = onResizeProp ?? onResizeStore;
|
|
109024
|
+
const [isResizing, setIsResizing] = We.useState(false);
|
|
109025
|
+
const [initialPosition, setInitialPosition] = We.useState(0);
|
|
109026
|
+
const [initialSizeState, setInitialSize] = We.useState(0);
|
|
109027
|
+
const initialSize = _initialSize ?? initialSizeState;
|
|
109028
|
+
const isHorizontal = direction === "left" || direction === "right";
|
|
109029
|
+
let t2;
|
|
109030
|
+
let t3;
|
|
109031
|
+
if ($2[0] !== direction || $2[1] !== initialPosition || $2[2] !== initialSize || $2[3] !== isHorizontal || $2[4] !== isResizing || $2[5] !== onHoverEnd || $2[6] !== onResize) {
|
|
109032
|
+
t2 = () => {
|
|
109033
|
+
if (!isResizing) return;
|
|
109034
|
+
const sendResizeEvent = (event, finished) => {
|
|
109035
|
+
const { clientX, clientY } = isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : event;
|
|
109036
|
+
onResize({
|
|
109037
|
+
delta: (isHorizontal ? clientX : clientY) - initialPosition,
|
|
109038
|
+
direction,
|
|
109039
|
+
finished,
|
|
109040
|
+
initialSize
|
|
109041
|
+
});
|
|
109042
|
+
};
|
|
109043
|
+
const handleMouseMove = (event_0) => sendResizeEvent(event_0, false);
|
|
109044
|
+
const handleMouseUp = (event_1) => {
|
|
109045
|
+
setIsResizing(false);
|
|
109046
|
+
onHoverEnd?.();
|
|
109047
|
+
sendResizeEvent(event_1, true);
|
|
109048
|
+
};
|
|
109049
|
+
window.addEventListener("mousemove", handleMouseMove);
|
|
109050
|
+
window.addEventListener("mouseup", handleMouseUp);
|
|
109051
|
+
window.addEventListener("touchmove", handleMouseMove);
|
|
109052
|
+
window.addEventListener("touchend", handleMouseUp);
|
|
109053
|
+
return () => {
|
|
109054
|
+
window.removeEventListener("mousemove", handleMouseMove);
|
|
109055
|
+
window.removeEventListener("mouseup", handleMouseUp);
|
|
109056
|
+
window.removeEventListener("touchmove", handleMouseMove);
|
|
109057
|
+
window.removeEventListener("touchend", handleMouseUp);
|
|
109058
|
+
};
|
|
109059
|
+
};
|
|
109060
|
+
t3 = [
|
|
109061
|
+
isResizing,
|
|
109062
|
+
initialPosition,
|
|
109063
|
+
initialSize,
|
|
109064
|
+
onResize,
|
|
109065
|
+
isHorizontal,
|
|
109066
|
+
onHoverEnd,
|
|
109067
|
+
direction
|
|
109068
|
+
];
|
|
109069
|
+
$2[0] = direction;
|
|
109070
|
+
$2[1] = initialPosition;
|
|
109071
|
+
$2[2] = initialSize;
|
|
109072
|
+
$2[3] = isHorizontal;
|
|
109073
|
+
$2[4] = isResizing;
|
|
109074
|
+
$2[5] = onHoverEnd;
|
|
109075
|
+
$2[6] = onResize;
|
|
109076
|
+
$2[7] = t2;
|
|
109077
|
+
$2[8] = t3;
|
|
109078
|
+
} else {
|
|
109079
|
+
t2 = $2[7];
|
|
109080
|
+
t3 = $2[8];
|
|
109081
|
+
}
|
|
109082
|
+
We.useEffect(t2, t3);
|
|
109083
|
+
let t4;
|
|
109084
|
+
if ($2[9] !== direction || $2[10] !== initialPosition || $2[11] !== initialSize || $2[12] !== isHorizontal || $2[13] !== isResizing || $2[14] !== onHover || $2[15] !== onHoverEnd || $2[16] !== onMouseDown || $2[17] !== onResize || $2[18] !== onTouchStart || $2[19] !== readOnly) {
|
|
109085
|
+
t4 = {
|
|
109086
|
+
direction,
|
|
109087
|
+
initialPosition,
|
|
109088
|
+
initialSize,
|
|
109089
|
+
isHorizontal,
|
|
109090
|
+
isResizing,
|
|
109091
|
+
readOnly,
|
|
109092
|
+
setInitialPosition,
|
|
109093
|
+
setInitialSize,
|
|
109094
|
+
setIsResizing,
|
|
109095
|
+
onHover,
|
|
109096
|
+
onHoverEnd,
|
|
109097
|
+
onMouseDown,
|
|
109098
|
+
onResize,
|
|
109099
|
+
onTouchStart
|
|
109100
|
+
};
|
|
109101
|
+
$2[9] = direction;
|
|
109102
|
+
$2[10] = initialPosition;
|
|
109103
|
+
$2[11] = initialSize;
|
|
109104
|
+
$2[12] = isHorizontal;
|
|
109105
|
+
$2[13] = isResizing;
|
|
109106
|
+
$2[14] = onHover;
|
|
109107
|
+
$2[15] = onHoverEnd;
|
|
109108
|
+
$2[16] = onMouseDown;
|
|
109109
|
+
$2[17] = onResize;
|
|
109110
|
+
$2[18] = onTouchStart;
|
|
109111
|
+
$2[19] = readOnly;
|
|
109112
|
+
$2[20] = t4;
|
|
109113
|
+
} else t4 = $2[20];
|
|
109114
|
+
return t4;
|
|
109115
|
+
};
|
|
109116
|
+
const useResizeHandle = ({ isHorizontal, isResizing, readOnly, setInitialPosition, setInitialSize, setIsResizing, onHover, onHoverEnd, onMouseDown, onTouchStart }) => {
|
|
109117
|
+
const handleMouseDown = (event) => {
|
|
109118
|
+
const { clientX, clientY } = event;
|
|
109119
|
+
setInitialPosition(isHorizontal ? clientX : clientY);
|
|
109120
|
+
const element = event.target.parentElement;
|
|
109121
|
+
setInitialSize(isHorizontal ? element.offsetWidth : element.offsetHeight);
|
|
109122
|
+
setIsResizing(true);
|
|
109123
|
+
onMouseDown?.(event);
|
|
109124
|
+
};
|
|
109125
|
+
const handleTouchStart = (event) => {
|
|
109126
|
+
const { touches } = event;
|
|
109127
|
+
const { clientX, clientY } = touches[0];
|
|
109128
|
+
setInitialPosition(isHorizontal ? clientX : clientY);
|
|
109129
|
+
const element = event.target.parentElement;
|
|
109130
|
+
setInitialSize(isHorizontal ? element.offsetWidth : element.offsetHeight);
|
|
109131
|
+
setIsResizing(true);
|
|
109132
|
+
onTouchStart?.(event);
|
|
109133
|
+
};
|
|
109134
|
+
const handleMouseOver = () => {
|
|
109135
|
+
onHover?.();
|
|
109136
|
+
};
|
|
109137
|
+
const handleMouseOut = () => {
|
|
109138
|
+
if (!isResizing) onHoverEnd?.();
|
|
109139
|
+
};
|
|
109140
|
+
return {
|
|
109141
|
+
hidden: readOnly,
|
|
109142
|
+
props: {
|
|
109143
|
+
onMouseDown: handleMouseDown,
|
|
109144
|
+
onMouseOut: handleMouseOut,
|
|
109145
|
+
onMouseOver: handleMouseOver,
|
|
109146
|
+
onTouchEnd: handleMouseOut,
|
|
109147
|
+
onTouchMove: handleMouseOver,
|
|
109148
|
+
onTouchStart: handleTouchStart
|
|
109149
|
+
}
|
|
109150
|
+
};
|
|
109151
|
+
};
|
|
109152
|
+
createPrimitiveComponent("div")({
|
|
109153
|
+
propsHook: useResizeHandle,
|
|
109154
|
+
stateHook: useResizeHandleState
|
|
109155
|
+
});
|
|
109156
|
+
const { ResizableProvider, useResizableSet, useResizableValue } = createAtomStore({ width: 0 }, { name: "resizable" });
|
|
109157
|
+
const useResizableState = (t0) => {
|
|
109158
|
+
const $2 = distExports.c(17);
|
|
109159
|
+
let t1;
|
|
109160
|
+
if ($2[0] !== t0) {
|
|
109161
|
+
t1 = t0 === void 0 ? {} : t0;
|
|
109162
|
+
$2[0] = t0;
|
|
109163
|
+
$2[1] = t1;
|
|
109164
|
+
} else t1 = $2[1];
|
|
109165
|
+
const { align: t2, maxWidth: t3, minWidth: t4 } = t1;
|
|
109166
|
+
const align = t2 === void 0 ? "center" : t2;
|
|
109167
|
+
const maxWidth = t3 === void 0 ? "100%" : t3;
|
|
109168
|
+
const minWidth = t4 === void 0 ? 92 : t4;
|
|
109169
|
+
const editor = useEditorRef();
|
|
109170
|
+
const element = useElement();
|
|
109171
|
+
const path3 = usePath();
|
|
109172
|
+
const nodeWidth = element?.width ?? "100%";
|
|
109173
|
+
const width = useResizableValue("width");
|
|
109174
|
+
const setWidth = useResizableSet("width");
|
|
109175
|
+
let t5;
|
|
109176
|
+
if ($2[2] !== editor || $2[3] !== nodeWidth || $2[4] !== path3) {
|
|
109177
|
+
t5 = (w2) => {
|
|
109178
|
+
if (w2 === nodeWidth) editor.tf.select(path3);
|
|
109179
|
+
else editor.tf.setNodes({ width: w2 }, { at: path3 });
|
|
109180
|
+
};
|
|
109181
|
+
$2[2] = editor;
|
|
109182
|
+
$2[3] = nodeWidth;
|
|
109183
|
+
$2[4] = path3;
|
|
109184
|
+
$2[5] = t5;
|
|
109185
|
+
} else t5 = $2[5];
|
|
109186
|
+
const setNodeWidth = t5;
|
|
109187
|
+
let t6;
|
|
109188
|
+
let t7;
|
|
109189
|
+
if ($2[6] !== nodeWidth || $2[7] !== setWidth) {
|
|
109190
|
+
t6 = () => {
|
|
109191
|
+
setWidth(nodeWidth);
|
|
109192
|
+
};
|
|
109193
|
+
t7 = [nodeWidth, setWidth];
|
|
109194
|
+
$2[6] = nodeWidth;
|
|
109195
|
+
$2[7] = setWidth;
|
|
109196
|
+
$2[8] = t6;
|
|
109197
|
+
$2[9] = t7;
|
|
109198
|
+
} else {
|
|
109199
|
+
t6 = $2[8];
|
|
109200
|
+
t7 = $2[9];
|
|
109201
|
+
}
|
|
109202
|
+
We.useEffect(t6, t7);
|
|
109203
|
+
let t8;
|
|
109204
|
+
if ($2[10] !== align || $2[11] !== maxWidth || $2[12] !== minWidth || $2[13] !== setNodeWidth || $2[14] !== setWidth || $2[15] !== width) {
|
|
109205
|
+
t8 = {
|
|
109206
|
+
align,
|
|
109207
|
+
maxWidth,
|
|
109208
|
+
minWidth,
|
|
109209
|
+
setNodeWidth,
|
|
109210
|
+
setWidth,
|
|
109211
|
+
width
|
|
109212
|
+
};
|
|
109213
|
+
$2[10] = align;
|
|
109214
|
+
$2[11] = maxWidth;
|
|
109215
|
+
$2[12] = minWidth;
|
|
109216
|
+
$2[13] = setNodeWidth;
|
|
109217
|
+
$2[14] = setWidth;
|
|
109218
|
+
$2[15] = width;
|
|
109219
|
+
$2[16] = t8;
|
|
109220
|
+
} else t8 = $2[16];
|
|
109221
|
+
return t8;
|
|
109222
|
+
};
|
|
109223
|
+
const useResizable = (t0) => {
|
|
109224
|
+
const $2 = distExports.c(19);
|
|
109225
|
+
const { align, maxWidth, minWidth, setNodeWidth, setWidth, width } = t0;
|
|
109226
|
+
const wrapperRef = We.useRef(null);
|
|
109227
|
+
let t1;
|
|
109228
|
+
if ($2[0] !== align || $2[1] !== maxWidth || $2[2] !== minWidth || $2[3] !== setNodeWidth || $2[4] !== setWidth) {
|
|
109229
|
+
t1 = (t2$1) => {
|
|
109230
|
+
const { delta, direction, finished, initialSize } = t2$1;
|
|
109231
|
+
const wrapperStaticWidth = wrapperRef.current.offsetWidth;
|
|
109232
|
+
const newWidth = resizeLengthClamp(initialSize + delta * ((align === "center" ? 2 : 1) * (direction === "left" ? -1 : 1)), wrapperStaticWidth, {
|
|
109233
|
+
max: maxWidth,
|
|
109234
|
+
min: minWidth
|
|
109235
|
+
});
|
|
109236
|
+
if (finished) setNodeWidth(newWidth);
|
|
109237
|
+
else setWidth(newWidth);
|
|
109238
|
+
};
|
|
109239
|
+
$2[0] = align;
|
|
109240
|
+
$2[1] = maxWidth;
|
|
109241
|
+
$2[2] = minWidth;
|
|
109242
|
+
$2[3] = setNodeWidth;
|
|
109243
|
+
$2[4] = setWidth;
|
|
109244
|
+
$2[5] = t1;
|
|
109245
|
+
} else t1 = $2[5];
|
|
109246
|
+
const t2 = t1;
|
|
109247
|
+
let t3;
|
|
109248
|
+
if ($2[6] !== t2) {
|
|
109249
|
+
t3 = { onResize: t2 };
|
|
109250
|
+
$2[6] = t2;
|
|
109251
|
+
$2[7] = t3;
|
|
109252
|
+
} else t3 = $2[7];
|
|
109253
|
+
let t4;
|
|
109254
|
+
if ($2[8] !== maxWidth || $2[9] !== minWidth || $2[10] !== width) {
|
|
109255
|
+
t4 = {
|
|
109256
|
+
maxWidth,
|
|
109257
|
+
minWidth,
|
|
109258
|
+
position: "relative",
|
|
109259
|
+
width
|
|
109260
|
+
};
|
|
109261
|
+
$2[8] = maxWidth;
|
|
109262
|
+
$2[9] = minWidth;
|
|
109263
|
+
$2[10] = width;
|
|
109264
|
+
$2[11] = t4;
|
|
109265
|
+
} else t4 = $2[11];
|
|
109266
|
+
const t5 = t4;
|
|
109267
|
+
let t6;
|
|
109268
|
+
if ($2[12] !== t5) {
|
|
109269
|
+
t6 = { style: t5 };
|
|
109270
|
+
$2[12] = t5;
|
|
109271
|
+
$2[13] = t6;
|
|
109272
|
+
} else t6 = $2[13];
|
|
109273
|
+
let t7;
|
|
109274
|
+
if ($2[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
109275
|
+
t7 = { position: "relative" };
|
|
109276
|
+
$2[14] = t7;
|
|
109277
|
+
} else t7 = $2[14];
|
|
109278
|
+
let t8;
|
|
109279
|
+
if ($2[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
109280
|
+
t8 = { style: t7 };
|
|
109281
|
+
$2[15] = t8;
|
|
109282
|
+
} else t8 = $2[15];
|
|
109283
|
+
let t9;
|
|
109284
|
+
if ($2[16] !== t3 || $2[17] !== t6) {
|
|
109285
|
+
t9 = {
|
|
109286
|
+
context: t3,
|
|
109287
|
+
props: t6,
|
|
109288
|
+
wrapperProps: t8,
|
|
109289
|
+
wrapperRef
|
|
109290
|
+
};
|
|
109291
|
+
$2[16] = t3;
|
|
109292
|
+
$2[17] = t6;
|
|
109293
|
+
$2[18] = t9;
|
|
109294
|
+
} else t9 = $2[18];
|
|
109295
|
+
return t9;
|
|
109296
|
+
};
|
|
109297
|
+
const Resizable$1 = We.forwardRef((t0, ref2) => {
|
|
109298
|
+
const $2 = distExports.c(16);
|
|
109299
|
+
let children;
|
|
109300
|
+
let options2;
|
|
109301
|
+
let rest;
|
|
109302
|
+
if ($2[0] !== t0) {
|
|
109303
|
+
({ children, options: options2, ...rest } = t0);
|
|
109304
|
+
$2[0] = t0;
|
|
109305
|
+
$2[1] = children;
|
|
109306
|
+
$2[2] = options2;
|
|
109307
|
+
$2[3] = rest;
|
|
109308
|
+
} else {
|
|
109309
|
+
children = $2[1];
|
|
109310
|
+
options2 = $2[2];
|
|
109311
|
+
rest = $2[3];
|
|
109312
|
+
}
|
|
109313
|
+
const { context, props, wrapperProps, wrapperRef } = useResizable(useResizableState(options2));
|
|
109314
|
+
let t1;
|
|
109315
|
+
if ($2[4] !== children || $2[5] !== context.onResize) {
|
|
109316
|
+
t1 = /* @__PURE__ */ We.createElement(ResizeHandleProvider, { onResize: context.onResize }, children);
|
|
109317
|
+
$2[4] = children;
|
|
109318
|
+
$2[5] = context.onResize;
|
|
109319
|
+
$2[6] = t1;
|
|
109320
|
+
} else t1 = $2[6];
|
|
109321
|
+
let t2;
|
|
109322
|
+
if ($2[7] !== props || $2[8] !== ref2 || $2[9] !== rest || $2[10] !== t1) {
|
|
109323
|
+
t2 = /* @__PURE__ */ We.createElement("div", {
|
|
109324
|
+
ref: ref2,
|
|
109325
|
+
...props,
|
|
109326
|
+
...rest
|
|
109327
|
+
}, t1);
|
|
109328
|
+
$2[7] = props;
|
|
109329
|
+
$2[8] = ref2;
|
|
109330
|
+
$2[9] = rest;
|
|
109331
|
+
$2[10] = t1;
|
|
109332
|
+
$2[11] = t2;
|
|
109333
|
+
} else t2 = $2[11];
|
|
109334
|
+
let t3;
|
|
109335
|
+
if ($2[12] !== t2 || $2[13] !== wrapperProps || $2[14] !== wrapperRef) {
|
|
109336
|
+
t3 = /* @__PURE__ */ We.createElement("div", {
|
|
109337
|
+
ref: wrapperRef,
|
|
109338
|
+
...wrapperProps
|
|
109339
|
+
}, t2);
|
|
109340
|
+
$2[12] = t2;
|
|
109341
|
+
$2[13] = wrapperProps;
|
|
109342
|
+
$2[14] = wrapperRef;
|
|
109343
|
+
$2[15] = t3;
|
|
109344
|
+
} else t3 = $2[15];
|
|
109345
|
+
return t3;
|
|
109346
|
+
});
|
|
109347
|
+
Resizable$1.displayName = "Resizable";
|
|
109630
109348
|
const onKeyDownTable = ({ editor, event }) => {
|
|
109631
109349
|
if (event.defaultPrevented) return;
|
|
109632
109350
|
if (event.which === 229 && editor.selection && editor.api.isExpanded()) {
|
|
@@ -116670,7 +116388,6 @@ const EditorKit = [
|
|
|
116670
116388
|
...TableKit,
|
|
116671
116389
|
...MediaKit,
|
|
116672
116390
|
...CalloutKit,
|
|
116673
|
-
...ColumnKit,
|
|
116674
116391
|
...MathKit,
|
|
116675
116392
|
...DateKit,
|
|
116676
116393
|
...LinkKit,
|