@jackuait/blok 0.10.8 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blok.mjs +2 -2
- package/dist/chunks/{blok-ClCrnWuI.mjs → blok-DbRn9adY.mjs} +2454 -2057
- package/dist/chunks/{constants-BoE5frJm.mjs → constants-C9lsSOXl.mjs} +4 -3
- package/dist/chunks/{tools-HQPJLj5m.mjs → tools-D0W3_dlA.mjs} +502 -497
- package/dist/full.mjs +3 -3
- package/dist/react.mjs +2 -2
- package/dist/tools.mjs +2 -2
- package/package.json +3 -6
- package/src/components/block/index.ts +36 -0
- package/src/components/blocks.ts +191 -5
- package/src/components/modules/api/blocks.ts +6 -4
- package/src/components/modules/blockEvents/composers/keyboardNavigation.ts +17 -6
- package/src/components/modules/blockManager/blockManager.ts +364 -23
- package/src/components/modules/blockManager/hierarchy.ts +164 -8
- package/src/components/modules/blockManager/operations.ts +223 -26
- package/src/components/modules/blockManager/types.ts +13 -1
- package/src/components/modules/blockManager/yjs-sync.ts +48 -3
- package/src/components/modules/drag/DragController.ts +209 -8
- package/src/components/modules/drag/operations/DragOperations.ts +153 -20
- package/src/components/modules/paste/handlers/base.ts +48 -20
- package/src/components/modules/paste/handlers/blok-data-handler.ts +93 -45
- package/src/components/modules/paste/index.ts +20 -0
- package/src/components/modules/saver.ts +75 -5
- package/src/components/modules/toolbar/index.ts +41 -60
- package/src/components/modules/uiControllers/controllers/keyboard.ts +20 -0
- package/src/components/modules/yjs/block-observer.ts +87 -23
- package/src/components/modules/yjs/document-store.ts +37 -11
- package/src/components/modules/yjs/index.ts +83 -7
- package/src/components/modules/yjs/types.ts +35 -2
- package/src/components/modules/yjs/undo-history.ts +116 -5
- package/src/components/utils/data-model-transform.ts +81 -7
- package/src/components/utils/hierarchy-invariant.ts +137 -0
- package/src/styles/main.css +5 -0
- package/src/tools/callout/constants.ts +0 -1
- package/src/tools/callout/dom-builder.ts +1 -11
- package/src/tools/callout/index.ts +0 -6
- package/src/tools/header/index.ts +14 -1
- package/src/tools/toggle/constants.ts +2 -1
- package/src/tools/toggle/dom-builder.ts +7 -0
- package/src/tools/toggle/index.ts +14 -1
- package/src/tools/toggle/toggle-lifecycle.ts +24 -0
|
@@ -130,7 +130,7 @@ var a = {
|
|
|
130
130
|
RIGHT: 2,
|
|
131
131
|
BACKWARD: 3,
|
|
132
132
|
FORWARD: 4
|
|
133
|
-
}, l = () => "0.10.
|
|
133
|
+
}, l = () => "0.10.9", u = /* @__PURE__ */ function(e) {
|
|
134
134
|
return e.VERBOSE = "VERBOSE", e.INFO = "INFO", e.WARN = "WARN", e.ERROR = "ERROR", e;
|
|
135
135
|
}({}), d = (e, t, n = "log", r, i = "color: inherit") => {
|
|
136
136
|
let a = typeof console > "u" ? void 0 : console;
|
|
@@ -3254,12 +3254,13 @@ var Gr = class e extends Hr {
|
|
|
3254
3254
|
qr = Jr, qr.isInline = !0;
|
|
3255
3255
|
//#endregion
|
|
3256
3256
|
//#region src/tools/toggle/constants.ts
|
|
3257
|
-
var Yr = "toggle", Xr = "tools.toggle.placeholder", Zr = "tools.toggle.bodyPlaceholder", Qr = "tools.toggle.ariaLabelCollapse", $r = "tools.toggle.ariaLabelExpand", ei = "outline-hidden py-[7px] mt-[2px] mb-px", ti = "outline-hidden pl-0.5 leading-[1.5] flex-1 min-w-0", ni = "flex items-center", ri = "flex-shrink-0 p-[8px] flex items-center justify-center cursor-pointer select-none rounded can-hover:hover:bg-item-hover-bg transition-colors duration-200 ease-in-out focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:outline-none", ii = "<svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.5 2.5L8.5 6L4.5 9.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>", ai = "hidden pl-7 pt-[8px] pb-[8px] text-gray-text leading-[1.5] cursor-pointer select-none", oi = "pl-7", si = {
|
|
3257
|
+
var Yr = "toggle", Xr = "tools.toggle.placeholder", Zr = "tools.toggle.bodyPlaceholder", Qr = "tools.toggle.ariaLabelCollapse", $r = "tools.toggle.ariaLabelExpand", ei = "outline-hidden py-[7px] mt-[2px] mb-px", ti = "outline-hidden pl-0.5 leading-[1.5] flex-1 min-w-0", ni = "flex items-center", ri = "flex-shrink-0 p-[8px] flex items-center justify-center cursor-pointer select-none rounded can-hover:hover:bg-item-hover-bg transition-colors duration-200 ease-in-out focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:outline-none in-data-[blok-toggle-empty=true]:text-gray-text", ii = "<svg aria-hidden=\"true\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.5 2.5L8.5 6L4.5 9.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>", ai = "hidden pl-7 pt-[8px] pb-[8px] text-gray-text leading-[1.5] cursor-pointer select-none", oi = "pl-7", si = {
|
|
3258
3258
|
toggleOpen: "data-blok-toggle-open",
|
|
3259
3259
|
toggleArrow: "data-blok-toggle-arrow",
|
|
3260
3260
|
toggleContent: "data-blok-toggle-content",
|
|
3261
3261
|
toggleBodyPlaceholder: "data-blok-toggle-body-placeholder",
|
|
3262
|
-
toggleChildren: "data-blok-toggle-children"
|
|
3262
|
+
toggleChildren: "data-blok-toggle-children",
|
|
3263
|
+
toggleEmpty: "data-blok-toggle-empty"
|
|
3263
3264
|
};
|
|
3264
3265
|
//#endregion
|
|
3265
3266
|
export { xn as $, h as $n, zt as $t, Zn as A, Te as An, _r as At, $n as B, w as Bn, an as Bt, X as C, Ne as Cn, vr as Ct, fr as D, Ae as Dn, pn as Dt, W as E, Me as En, Xn as Et, er as F, xe as Fn, Gn as Ft, lr as G, ce as Gn, V as Gt, or as H, de as Hn, Qt as Ht, tr as I, Se as In, Kn as It, ir as J, ue as Jn, Kt as Jt, cr as K, se as Kn, nn as Kt, Bn as L, ye as Ln, On as Lt, gn as M, De as Mn, Mn as Mt, _n as N, we as Nn, En as Nt, sn as O, ke as On, yn as Ot, vn as P, T as Pn, Wn as Pt, bn as Q, b as Qn, Rt as Qt, on as R, ge as Rn, Hn as Rt, Vr as S, Le as Sn, Vn as St, G as T, je as Tn, Pn as Tt, ur as U, oe as Un, Xt as Ut, Un as V, fe as Vn, Dn as Vt, sr as W, le as Wn, Zt as Wt, ar as X, te as Xn, Wt as Xt, nr as Y, ne as Yn, z as Yt, qn as Z, re as Zn, L as Zt, Hr as _, Be as _n, Jn as _t, ei as a, Mt as an, m as ar, Fn as at, Z as b, Pe as bn, hr as bt, ti as c, kt as cn, s as cr, Ln as ct, oi as d, ht as dn, o as dr, cn as dt, Bt as en, g as er, Sn as et, ni as f, et as fn, ln as ft, Gr as g, He as gn, An as gt, Kr as h, ze as hn, jn as ht, ri as i, jt as in, p as ir, Yn as it, rn as j, Ee as jn, fn as jt, mr as k, Oe as kn, gr as kt, Xr as l, Dt as ln, c as lr, Rn as lt, Jr as m, Xe as mn, kn as mt, $r as n, Ft as nn, ee as nr, wn as nt, Zr as o, At as on, f as or, Nn as ot, Yr as p, M as pn, pr as pt, rr as q, ae as qn, tn as qt, ii as r, Pt as rn, u as rr, Tn as rt, ai as s, Ot as sn, l as sr, In as st, Qr as t, Lt as tn, _ as tr, Cn as tt, si as u, N as un, a as ur, zn as ut, $ as v, Ue as vn, un as vt, J as w, Fe as wn, hn as wt, Br as x, Ie as xn, Qn as xt, Q as y, Re as yn, mn as yt, dr as z, C as zn, dn as zt };
|