quoin-editor 2.0.1 → 2.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/CHANGELOG.md +25 -0
- package/dist/ai.cjs +34 -34
- package/dist/ai.js +3 -3
- package/dist/catalogue.cjs +21 -21
- package/dist/catalogue.js +12 -12
- package/dist/{chunk-BYYCD54G.cjs → chunk-3B5VEXVQ.cjs} +2 -2
- package/dist/{chunk-5YAJZSTI.cjs → chunk-4EJJ4ZNC.cjs} +18 -18
- package/dist/{chunk-IKZSCTRF.cjs → chunk-55MN4QZU.cjs} +8 -5
- package/dist/{chunk-NFO3W644.cjs → chunk-5URH2Y2L.cjs} +22 -20
- package/dist/{chunk-B4VCDJSA.js → chunk-77THE3KY.js} +5 -5
- package/dist/{chunk-B4VCDJSA.js.map → chunk-77THE3KY.js.map} +1 -1
- package/dist/{chunk-V4WQG7FR.cjs → chunk-BCCFJINI.cjs} +70 -65
- package/dist/{chunk-NL5J77VD.js → chunk-BNTRGV4A.js} +44 -13
- package/dist/chunk-BNTRGV4A.js.map +1 -0
- package/dist/{chunk-IW4TMECB.js → chunk-C4SRLMQJ.js} +3 -3
- package/dist/{chunk-IW4TMECB.js.map → chunk-C4SRLMQJ.js.map} +1 -1
- package/dist/{chunk-CJVJNMOB.cjs → chunk-DZ5XR4O6.cjs} +177 -143
- package/dist/{chunk-ZN5DHNSL.js → chunk-FGVTDIHT.js} +80 -45
- package/dist/chunk-FGVTDIHT.js.map +1 -0
- package/dist/{chunk-66OPHDFA.cjs → chunk-H3TRVI44.cjs} +50 -50
- package/dist/{chunk-2UKI26JA.js → chunk-LCGOFL7S.js} +15 -10
- package/dist/{chunk-2UKI26JA.js.map → chunk-LCGOFL7S.js.map} +1 -1
- package/dist/{chunk-EU5IGKMP.js → chunk-MDIXI7DM.js} +3 -3
- package/dist/{chunk-EU5IGKMP.js.map → chunk-MDIXI7DM.js.map} +1 -1
- package/dist/{chunk-Z6LAARPB.cjs → chunk-MGN332NY.cjs} +45 -10
- package/dist/{chunk-4PIJC4FD.cjs → chunk-NAMZA4NW.cjs} +14 -14
- package/dist/{chunk-5X52BAZB.js → chunk-NLRSAOCK.js} +5 -5
- package/dist/{chunk-5X52BAZB.js.map → chunk-NLRSAOCK.js.map} +1 -1
- package/dist/{chunk-HOSDMHK6.cjs → chunk-OMUXPNCX.cjs} +27 -26
- package/dist/{chunk-YABGWOAV.js → chunk-QVWNUUMJ.js} +3 -3
- package/dist/{chunk-YABGWOAV.js.map → chunk-QVWNUUMJ.js.map} +1 -1
- package/dist/{chunk-6BVE46K7.js → chunk-RNYETN6X.js} +7 -5
- package/dist/{chunk-6BVE46K7.js.map → chunk-RNYETN6X.js.map} +1 -1
- package/dist/{chunk-77CNOLHY.cjs → chunk-SDFJZNYB.cjs} +3 -3
- package/dist/{chunk-LEICOZYK.cjs → chunk-SQHEZ3JY.cjs} +2 -2
- package/dist/{chunk-D6CIIWCU.cjs → chunk-UWCU6PJY.cjs} +30 -30
- package/dist/{chunk-KQPZTSW3.js → chunk-VQDQBMQY.js} +4 -4
- package/dist/{chunk-KQPZTSW3.js.map → chunk-VQDQBMQY.js.map} +1 -1
- package/dist/{chunk-M77A3EGD.js → chunk-WMM56LIB.js} +8 -5
- package/dist/{chunk-M77A3EGD.js.map → chunk-WMM56LIB.js.map} +1 -1
- package/dist/{chunk-MAS4AEF4.js → chunk-YHAVXOAA.js} +6 -5
- package/dist/chunk-YHAVXOAA.js.map +1 -0
- package/dist/{chunk-J2SVYBTC.js → chunk-YWYTLNAO.js} +4 -4
- package/dist/{chunk-J2SVYBTC.js.map → chunk-YWYTLNAO.js.map} +1 -1
- package/dist/comments.cjs +30 -30
- package/dist/comments.js +3 -3
- package/dist/diagram.cjs +6 -6
- package/dist/diagram.js +3 -3
- package/dist/embed.cjs +5 -5
- package/dist/embed.js +3 -3
- package/dist/emoji-data.cjs +4 -3
- package/dist/emoji-data.js +4 -3
- package/dist/emoji-data.js.map +1 -1
- package/dist/emoji.cjs +6 -6
- package/dist/emoji.js +3 -3
- package/dist/find.cjs +7 -7
- package/dist/find.js +3 -3
- package/dist/headless.cjs +11 -11
- package/dist/headless.js +1 -1
- package/dist/highlight.cjs +3 -3
- package/dist/highlight.js +2 -2
- package/dist/index.cjs +23 -23
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/math.cjs +6 -6
- package/dist/math.js +4 -4
- package/dist/mention.cjs +6 -6
- package/dist/mention.js +4 -4
- package/dist/presence.cjs +12 -12
- package/dist/presence.js +3 -3
- package/dist/source.cjs +2 -2
- package/dist/source.js +2 -2
- package/dist/stats.cjs +6 -6
- package/dist/stats.js +3 -3
- package/dist/styles.css +1 -1
- package/dist/table.cjs +22 -22
- package/dist/table.js +3 -3
- package/dist/toc.cjs +6 -6
- package/dist/toc.js +3 -3
- package/package.json +3 -2
- package/dist/chunk-MAS4AEF4.js.map +0 -1
- package/dist/chunk-NL5J77VD.js.map +0 -1
- package/dist/chunk-ZN5DHNSL.js.map +0 -1
package/dist/comments.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkLM3DHROX_cjs = require('./chunk-LM3DHROX.cjs');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunk3B5VEXVQ_cjs = require('./chunk-3B5VEXVQ.cjs');
|
|
6
|
+
var chunkDZ5XR4O6_cjs = require('./chunk-DZ5XR4O6.cjs');
|
|
7
|
+
var chunkMGN332NY_cjs = require('./chunk-MGN332NY.cjs');
|
|
8
8
|
var chunkZWTIRGY5_cjs = require('./chunk-ZWTIRGY5.cjs');
|
|
9
9
|
require('./chunk-A6PGQVTR.cjs');
|
|
10
10
|
var chunkFK7EBZPX_cjs = require('./chunk-FK7EBZPX.cjs');
|
|
@@ -186,7 +186,7 @@ function create(editor, pending, onCreate, link) {
|
|
|
186
186
|
if (link.mounts === 0) return;
|
|
187
187
|
const tr = settledTransaction(editor, pending.key, id);
|
|
188
188
|
editor.dispatch(tr);
|
|
189
|
-
if (id === null) link.report(
|
|
189
|
+
if (id === null) link.report(chunkDZ5XR4O6_cjs.toError(error));
|
|
190
190
|
else if (!tr.docChanged) link.report(new Error(`Comment thread ${id} has no text: it was deleted meanwhile`));
|
|
191
191
|
};
|
|
192
192
|
new Promise((resolve) => resolve(onCreate(input))).then(
|
|
@@ -290,7 +290,7 @@ function place(controller, box, gap) {
|
|
|
290
290
|
root.style.setProperty(HEIGHT, `${bottom}px`);
|
|
291
291
|
}
|
|
292
292
|
function useBlockAligned(controller, box, gap, key) {
|
|
293
|
-
|
|
293
|
+
chunkMGN332NY_cjs.useIsomorphicLayoutEffect(() => {
|
|
294
294
|
const element = box.current;
|
|
295
295
|
const view = element?.ownerDocument.defaultView;
|
|
296
296
|
if (!element || !view) return void 0;
|
|
@@ -334,10 +334,10 @@ function CommentMarkers({ env, box, entries, onOpen }) {
|
|
|
334
334
|
"data-rail-item": "",
|
|
335
335
|
"data-block": block,
|
|
336
336
|
"aria-label": env.labels.showComments(ids.length),
|
|
337
|
-
className:
|
|
337
|
+
className: chunkDZ5XR4O6_cjs.cn("quoin-comments-marker", chunkDZ5XR4O6_cjs.FOCUS_RING),
|
|
338
338
|
onClick: (event) => onOpen(ids[0], event.currentTarget),
|
|
339
339
|
children: [
|
|
340
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
340
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkDZ5XR4O6_cjs.MessageSquare, { "aria-hidden": "true" }),
|
|
341
341
|
ids.length
|
|
342
342
|
]
|
|
343
343
|
},
|
|
@@ -351,7 +351,7 @@ async function called(link, call) {
|
|
|
351
351
|
await call();
|
|
352
352
|
return true;
|
|
353
353
|
} catch (error) {
|
|
354
|
-
link.report(
|
|
354
|
+
link.report(chunkDZ5XR4O6_cjs.toError(error));
|
|
355
355
|
return false;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
@@ -444,21 +444,21 @@ function ReplyBox({ env, threadId, first }) {
|
|
|
444
444
|
}
|
|
445
445
|
),
|
|
446
446
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
447
|
-
|
|
447
|
+
chunkDZ5XR4O6_cjs.Button,
|
|
448
448
|
{
|
|
449
449
|
type: "submit",
|
|
450
450
|
variant: "ghost",
|
|
451
451
|
size: "icon-sm",
|
|
452
452
|
"aria-label": labels.send,
|
|
453
453
|
"aria-disabled": text === "" || sending || void 0,
|
|
454
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
454
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkDZ5XR4O6_cjs.SendHorizontal, {})
|
|
455
455
|
}
|
|
456
456
|
)
|
|
457
457
|
] });
|
|
458
458
|
}
|
|
459
459
|
function ThreadView({ env, id, thread, onEnded }) {
|
|
460
460
|
const { controller, host, labels, link } = env;
|
|
461
|
-
const readOnly =
|
|
461
|
+
const readOnly = chunkMGN332NY_cjs.useReadOnly(controller);
|
|
462
462
|
const [busy, setBusy] = react.useState(false);
|
|
463
463
|
const alive = react.useRef(true);
|
|
464
464
|
const root = react.useRef(null);
|
|
@@ -483,7 +483,7 @@ function ThreadView({ env, id, thread, onEnded }) {
|
|
|
483
483
|
/* @__PURE__ */ jsxRuntime.jsx(ReplyBox, { env, threadId: id, first: comments.length === 0 }),
|
|
484
484
|
!readOnly && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-1", children: [
|
|
485
485
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
486
|
-
|
|
486
|
+
chunkDZ5XR4O6_cjs.Button,
|
|
487
487
|
{
|
|
488
488
|
type: "button",
|
|
489
489
|
variant: "ghost",
|
|
@@ -494,7 +494,7 @@ function ThreadView({ env, id, thread, onEnded }) {
|
|
|
494
494
|
}
|
|
495
495
|
),
|
|
496
496
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
497
|
-
|
|
497
|
+
chunkDZ5XR4O6_cjs.Button,
|
|
498
498
|
{
|
|
499
499
|
type: "button",
|
|
500
500
|
variant: "ghost",
|
|
@@ -531,7 +531,7 @@ function ThreadCard({ env, entry, active, expanded, onToggle }) {
|
|
|
531
531
|
ref: header,
|
|
532
532
|
type: "button",
|
|
533
533
|
"aria-expanded": expanded,
|
|
534
|
-
className:
|
|
534
|
+
className: chunkDZ5XR4O6_cjs.cn("flex w-full flex-col items-start gap-1 rounded-sm text-start", chunkDZ5XR4O6_cjs.FOCUS_RING),
|
|
535
535
|
onClick: () => onToggle(expanded ? null : thread.id),
|
|
536
536
|
children: [
|
|
537
537
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: removed ? "text-xs text-muted-foreground italic" : "quoin-comments-quote", children: removed ? labels.textRemoved : anchorText2 }),
|
|
@@ -597,7 +597,7 @@ function CommentsSheet({ env, entries, value, onToggle, onClose, returnFocus })
|
|
|
597
597
|
children: [
|
|
598
598
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
599
599
|
/* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Title, { className: "text-sm font-semibold", children: labels.comments }),
|
|
600
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
600
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(chunkDZ5XR4O6_cjs.Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": labels.close, children: /* @__PURE__ */ jsxRuntime.jsx(chunkDZ5XR4O6_cjs.X, {}) }) })
|
|
601
601
|
] }),
|
|
602
602
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { "aria-label": labels.comments, className: "flex flex-col gap-2", children: entries.map((entry) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
603
603
|
ThreadCard,
|
|
@@ -644,22 +644,22 @@ function ThreadChooser({ env, choices, onChoose }) {
|
|
|
644
644
|
var docOf = (state) => state.doc;
|
|
645
645
|
function focusIsOurs(controller, content) {
|
|
646
646
|
const active = content?.ownerDocument.activeElement ?? null;
|
|
647
|
-
return active === null || active === active.ownerDocument.body ||
|
|
647
|
+
return active === null || active === active.ownerDocument.body || chunk3B5VEXVQ_cjs.ownsNode(controller, active);
|
|
648
648
|
}
|
|
649
649
|
function ThreadPopover({ env, open, threads, onChoose, onClose }) {
|
|
650
650
|
const { controller, labels } = env;
|
|
651
|
-
const doc =
|
|
651
|
+
const doc = chunkMGN332NY_cjs.useEditorState(controller, docOf);
|
|
652
652
|
const anchors = commentAnchors(doc);
|
|
653
653
|
const { ids } = open;
|
|
654
654
|
const first = ids.map((id) => anchors.get(id)?.[0]).find(Boolean);
|
|
655
655
|
const latest = react.useRef(first);
|
|
656
|
-
|
|
656
|
+
chunkMGN332NY_cjs.useIsomorphicLayoutEffect(() => {
|
|
657
657
|
if (first) latest.current = first;
|
|
658
658
|
});
|
|
659
659
|
const anchor = react.useMemo(
|
|
660
660
|
() => ({
|
|
661
|
-
current:
|
|
662
|
-
() => latest.current ?
|
|
661
|
+
current: chunkDZ5XR4O6_cjs.virtualAnchor(
|
|
662
|
+
() => latest.current ? chunkDZ5XR4O6_cjs.rangeRect(controller, latest.current) : null,
|
|
663
663
|
() => latest.current && controller.registry.get(latest.current.block, latest.current.region)
|
|
664
664
|
)
|
|
665
665
|
}),
|
|
@@ -672,7 +672,7 @@ function ThreadPopover({ env, open, threads, onChoose, onClose }) {
|
|
|
672
672
|
target?.focus();
|
|
673
673
|
}
|
|
674
674
|
};
|
|
675
|
-
|
|
675
|
+
chunkMGN332NY_cjs.useIsomorphicLayoutEffect(() => {
|
|
676
676
|
if (open.focus) focusField();
|
|
677
677
|
}, [open]);
|
|
678
678
|
if (first === void 0 && latest.current === void 0) return null;
|
|
@@ -693,7 +693,7 @@ function ThreadPopover({ env, open, threads, onChoose, onClose }) {
|
|
|
693
693
|
};
|
|
694
694
|
const choices = ids.map((id) => ({ id, anchorText: textOf(id), preview: threads.find(id)?.comments[0]?.body ?? "" }));
|
|
695
695
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
696
|
-
|
|
696
|
+
chunkDZ5XR4O6_cjs.Popover,
|
|
697
697
|
{
|
|
698
698
|
open: true,
|
|
699
699
|
modal: false,
|
|
@@ -701,9 +701,9 @@ function ThreadPopover({ env, open, threads, onChoose, onClose }) {
|
|
|
701
701
|
if (!next) onClose();
|
|
702
702
|
},
|
|
703
703
|
children: [
|
|
704
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
704
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkDZ5XR4O6_cjs.PopoverAnchor, { virtualRef: anchor }),
|
|
705
705
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
706
|
-
|
|
706
|
+
chunkDZ5XR4O6_cjs.PopoverContent,
|
|
707
707
|
{
|
|
708
708
|
ref: content,
|
|
709
709
|
"aria-label": gone ? labels.textRemoved : single ? labels.thread(textOf(ids[0])) : labels.threadsHere,
|
|
@@ -751,7 +751,7 @@ function useAnchorClicks(controller, threads) {
|
|
|
751
751
|
var WIDE_CANVAS = 800;
|
|
752
752
|
function useCanvasWide(box, initial) {
|
|
753
753
|
const [wide, setWide] = react.useState(initial);
|
|
754
|
-
|
|
754
|
+
chunkMGN332NY_cjs.useIsomorphicLayoutEffect(() => {
|
|
755
755
|
const canvas = box.current?.parentElement;
|
|
756
756
|
if (!canvas) return void 0;
|
|
757
757
|
const measure = () => setWide(canvas.offsetWidth >= WIDE_CANVAS);
|
|
@@ -768,15 +768,15 @@ function useThreads(threads) {
|
|
|
768
768
|
var commentsOf = (state) => chunkFK7EBZPX_cjs.getPluginState(state, commentsKey);
|
|
769
769
|
var docOf2 = (state) => state.doc;
|
|
770
770
|
function CommentsOverlay({ controller, host, labels }) {
|
|
771
|
-
const { onError } =
|
|
771
|
+
const { onError } = chunkDZ5XR4O6_cjs.useQuoin();
|
|
772
772
|
const link = linkOf(controller.editor);
|
|
773
|
-
|
|
773
|
+
chunkMGN332NY_cjs.useIsomorphicLayoutEffect(() => {
|
|
774
774
|
link.report = onError;
|
|
775
775
|
}, [link, onError]);
|
|
776
776
|
useAnchorClicks(controller, host.threads);
|
|
777
777
|
const threads = useThreads(host.threads);
|
|
778
|
-
const value =
|
|
779
|
-
const doc =
|
|
778
|
+
const value = chunkMGN332NY_cjs.useEditorState(controller, commentsOf);
|
|
779
|
+
const doc = chunkMGN332NY_cjs.useEditorState(controller, docOf2);
|
|
780
780
|
const entries = react.useMemo(() => railEntries(doc, threads, value.ended), [doc, threads, value.ended]);
|
|
781
781
|
const box = react.useRef(null);
|
|
782
782
|
const wide = useCanvasWide(box, host.initialLayout === "wide");
|
|
@@ -856,7 +856,7 @@ function watchEnded(editor, threads) {
|
|
|
856
856
|
var commentItem = (labels) => ({
|
|
857
857
|
id: "comment",
|
|
858
858
|
title: labels.comment,
|
|
859
|
-
icon:
|
|
859
|
+
icon: chunkDZ5XR4O6_cjs.MessageSquarePlus,
|
|
860
860
|
shortcut: "Mod-Alt-m",
|
|
861
861
|
available: (state) => hasCommentableText(state) && chunkFK7EBZPX_cjs.getPluginState(state, commentsKey).pending.length === 0,
|
|
862
862
|
// Focus goes back to the text first: the button leaves the toolbar while the thread is being asked for.
|
package/dist/comments.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { webAddress } from './chunk-DBOZFNWU.js';
|
|
3
|
-
import { ownsNode } from './chunk-
|
|
4
|
-
import { MessageSquarePlus, useQuoin, MessageSquare, cn, FOCUS_RING, Button, X, virtualAnchor, rangeRect, Popover, PopoverAnchor, PopoverContent, toError, SendHorizontal } from './chunk-
|
|
5
|
-
import { useIsomorphicLayoutEffect, useEditorState, useReadOnly } from './chunk-
|
|
3
|
+
import { ownsNode } from './chunk-C4SRLMQJ.js';
|
|
4
|
+
import { MessageSquarePlus, useQuoin, MessageSquare, cn, FOCUS_RING, Button, X, virtualAnchor, rangeRect, Popover, PopoverAnchor, PopoverContent, toError, SendHorizontal } from './chunk-FGVTDIHT.js';
|
|
5
|
+
import { useIsomorphicLayoutEffect, useEditorState, useReadOnly } from './chunk-BNTRGV4A.js';
|
|
6
6
|
import { mergeLabels } from './chunk-DLQCTGC3.js';
|
|
7
7
|
import './chunk-HDJ653LM.js';
|
|
8
8
|
import { createPluginKey, defineExtension, getPluginState, isCollapsed, markRanges, Transaction, comparePos, textSelection, addMarkStep, sameSelection, removeMarkStep } from './chunk-5RBMZGKV.js';
|
package/dist/diagram.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var chunkSDFJZNYB_cjs = require('./chunk-SDFJZNYB.cjs');
|
|
5
|
+
require('./chunk-DZ5XR4O6.cjs');
|
|
6
|
+
require('./chunk-MGN332NY.cjs');
|
|
7
7
|
require('./chunk-ZWTIRGY5.cjs');
|
|
8
8
|
require('./chunk-A6PGQVTR.cjs');
|
|
9
9
|
require('./chunk-FK7EBZPX.cjs');
|
|
@@ -14,13 +14,13 @@ require('./chunk-I7X7B3WD.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "DEFAULT_DIAGRAM_LANGUAGES", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkSDFJZNYB_cjs.DEFAULT_DIAGRAM_LANGUAGES; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "diagramExtension", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkSDFJZNYB_cjs.diagramExtension; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "englishDiagramLabels", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkSDFJZNYB_cjs.englishDiagramLabels; }
|
|
26
26
|
});
|
package/dist/diagram.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { DEFAULT_DIAGRAM_LANGUAGES, diagramExtension, englishDiagramLabels } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
2
|
+
export { DEFAULT_DIAGRAM_LANGUAGES, diagramExtension, englishDiagramLabels } from './chunk-MDIXI7DM.js';
|
|
3
|
+
import './chunk-FGVTDIHT.js';
|
|
4
|
+
import './chunk-BNTRGV4A.js';
|
|
5
5
|
import './chunk-DLQCTGC3.js';
|
|
6
6
|
import './chunk-HDJ653LM.js';
|
|
7
7
|
import './chunk-5RBMZGKV.js';
|
package/dist/embed.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkH3TRVI44_cjs = require('./chunk-H3TRVI44.cjs');
|
|
5
5
|
require('./chunk-LM3DHROX.cjs');
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-DZ5XR4O6.cjs');
|
|
7
|
+
require('./chunk-MGN332NY.cjs');
|
|
8
8
|
require('./chunk-ZWTIRGY5.cjs');
|
|
9
9
|
require('./chunk-A6PGQVTR.cjs');
|
|
10
10
|
require('./chunk-FK7EBZPX.cjs');
|
|
@@ -15,9 +15,9 @@ require('./chunk-I7X7B3WD.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "embedExtension", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkH3TRVI44_cjs.embedExtension; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "englishEmbedLabels", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkH3TRVI44_cjs.englishEmbedLabels; }
|
|
23
23
|
});
|
package/dist/embed.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { embedExtension, englishEmbedLabels } from './chunk-
|
|
2
|
+
export { embedExtension, englishEmbedLabels } from './chunk-VQDQBMQY.js';
|
|
3
3
|
import './chunk-DBOZFNWU.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-FGVTDIHT.js';
|
|
5
|
+
import './chunk-BNTRGV4A.js';
|
|
6
6
|
import './chunk-DLQCTGC3.js';
|
|
7
7
|
import './chunk-HDJ653LM.js';
|
|
8
8
|
import './chunk-5RBMZGKV.js';
|
package/dist/emoji-data.cjs
CHANGED
|
@@ -1951,7 +1951,8 @@ function emojiByShortcode(code) {
|
|
|
1951
1951
|
|
|
1952
1952
|
// src/emoji/search-emoji.ts
|
|
1953
1953
|
var MATCHES = 4;
|
|
1954
|
-
|
|
1954
|
+
var FOLDED_TAGS = ALL_EMOJI.map(({ tags }) => tags.map((tag) => tag.toLowerCase()));
|
|
1955
|
+
function matchOf({ shortcodes }, tags, query) {
|
|
1955
1956
|
if (shortcodes.includes(query)) return 0;
|
|
1956
1957
|
if (shortcodes.some((code) => code.startsWith(query))) return 1;
|
|
1957
1958
|
if (tags.some((tag) => tag.startsWith(query))) return 2;
|
|
@@ -1962,8 +1963,8 @@ function searchEmoji(query, limit = Number.POSITIVE_INFINITY) {
|
|
|
1962
1963
|
const most = Math.max(0, limit);
|
|
1963
1964
|
if (wanted === "") return ALL_EMOJI.slice(0, most);
|
|
1964
1965
|
const matches = Array.from({ length: MATCHES }, () => []);
|
|
1965
|
-
for (const emoji of ALL_EMOJI) {
|
|
1966
|
-
const at = matchOf(emoji, wanted);
|
|
1966
|
+
for (const [i, emoji] of ALL_EMOJI.entries()) {
|
|
1967
|
+
const at = matchOf(emoji, FOLDED_TAGS[i], wanted);
|
|
1967
1968
|
if (at !== null) matches[at].push(emoji);
|
|
1968
1969
|
}
|
|
1969
1970
|
return matches.flat().slice(0, most);
|
package/dist/emoji-data.js
CHANGED
|
@@ -1949,7 +1949,8 @@ function emojiByShortcode(code) {
|
|
|
1949
1949
|
|
|
1950
1950
|
// src/emoji/search-emoji.ts
|
|
1951
1951
|
var MATCHES = 4;
|
|
1952
|
-
|
|
1952
|
+
var FOLDED_TAGS = ALL_EMOJI.map(({ tags }) => tags.map((tag) => tag.toLowerCase()));
|
|
1953
|
+
function matchOf({ shortcodes }, tags, query) {
|
|
1953
1954
|
if (shortcodes.includes(query)) return 0;
|
|
1954
1955
|
if (shortcodes.some((code) => code.startsWith(query))) return 1;
|
|
1955
1956
|
if (tags.some((tag) => tag.startsWith(query))) return 2;
|
|
@@ -1960,8 +1961,8 @@ function searchEmoji(query, limit = Number.POSITIVE_INFINITY) {
|
|
|
1960
1961
|
const most = Math.max(0, limit);
|
|
1961
1962
|
if (wanted === "") return ALL_EMOJI.slice(0, most);
|
|
1962
1963
|
const matches = Array.from({ length: MATCHES }, () => []);
|
|
1963
|
-
for (const emoji of ALL_EMOJI) {
|
|
1964
|
-
const at = matchOf(emoji, wanted);
|
|
1964
|
+
for (const [i, emoji] of ALL_EMOJI.entries()) {
|
|
1965
|
+
const at = matchOf(emoji, FOLDED_TAGS[i], wanted);
|
|
1965
1966
|
if (at !== null) matches[at].push(emoji);
|
|
1966
1967
|
}
|
|
1967
1968
|
return matches.flat().slice(0, most);
|