@aicayzer/inkkit 0.7.2 → 0.7.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.
|
@@ -59351,16 +59351,18 @@ var ImageView = class {
|
|
|
59351
59351
|
const text = document.createElement("span");
|
|
59352
59352
|
text.className = "inkkit-file-label";
|
|
59353
59353
|
text.textContent = label;
|
|
59354
|
-
|
|
59355
|
-
name.append(text);
|
|
59356
|
-
if (activation && this.runtime?.adapter.open) this.activateCard(label);
|
|
59357
|
-
else if (this.runtime?.adapter.open) {
|
|
59354
|
+
if (this.runtime?.adapter.open && !activation) {
|
|
59358
59355
|
const open = this.button("", this.activate);
|
|
59359
59356
|
open.classList.add("inkkit-file-open");
|
|
59360
|
-
|
|
59361
|
-
open.
|
|
59362
|
-
open.
|
|
59357
|
+
const opening = `${this.runtime.labels.fileOpen} ${label}`;
|
|
59358
|
+
open.setAttribute("aria-label", opening);
|
|
59359
|
+
open.title = opening;
|
|
59360
|
+
open.append(text, openArrow());
|
|
59363
59361
|
name.append(open);
|
|
59362
|
+
} else {
|
|
59363
|
+
text.title = label;
|
|
59364
|
+
name.append(text);
|
|
59365
|
+
if (activation && this.runtime?.adapter.open) this.activateCard(label);
|
|
59364
59366
|
}
|
|
59365
59367
|
footer.append(name);
|
|
59366
59368
|
if (status) {
|
|
@@ -59393,6 +59395,7 @@ var ImageView = class {
|
|
|
59393
59395
|
this.element.removeEventListener("click", this.cardClick);
|
|
59394
59396
|
this.element.removeEventListener("keydown", this.cardKey);
|
|
59395
59397
|
this.element.removeAttribute("tabindex");
|
|
59398
|
+
this.element.removeAttribute("title");
|
|
59396
59399
|
this.element.removeAttribute("data-inkkit-file-activation");
|
|
59397
59400
|
this.element.removeAttribute("data-inkkit-file-layout");
|
|
59398
59401
|
this.cardKeys = false;
|
|
@@ -59430,8 +59433,8 @@ var ImageView = class {
|
|
|
59430
59433
|
if (presentation.kind === "missing") this.card(label, this.runtime.labels.fileMissing, true);
|
|
59431
59434
|
else if (presentation.kind === "error") this.card(label, presentation.message || this.runtime.labels.fileError, true);
|
|
59432
59435
|
else if (presentation.kind === "image") {
|
|
59436
|
+
this.element.title = label;
|
|
59433
59437
|
this.renderImage(presentation.url, label, width);
|
|
59434
|
-
this.card(label);
|
|
59435
59438
|
} else if (presentation.kind === "audio" || presentation.kind === "video") {
|
|
59436
59439
|
const media = document.createElement(presentation.kind);
|
|
59437
59440
|
media.controls = true;
|
|
@@ -59679,7 +59682,7 @@ async function createMilkdownEditor(root, options, runtime) {
|
|
|
59679
59682
|
return true;
|
|
59680
59683
|
}
|
|
59681
59684
|
}));
|
|
59682
|
-
}).use(labelsCtx).use(linkSchemesCtx).use(formatInputCtx).use(richTextGuard).use(runtime.plugins.paste).use(visibleClipboard).use(runtime.plugins.suggestions).use(runtime.plugins.keymap).use(createDialect(Boolean(options.images || options.files), Boolean(options.wikiLinks), Boolean(options.files))).use(codeControlCtx).use(codeControlsPlugin(() => runtime.visibleRect())).use(tablePlugins).use(tableBlock).use(runtime.plugins.change).use(runtime.plugins.historyInput).use(history).use(clipboard).use(cursor).use(taskListPlugin((operation) => runtime.mutate(operation))).use(undoTypedRule).use(quoteBackspace).use(calloutEnter).use(literalEnter).use(literalReread).use(listItemBackspace).use(nestedItemEnter).use(rejoinLists).use(movedListItems).use(textInputPolicy).use(runtime.copy ? codeCopyPlugin((text) => runtime.copy?.(text)) : []).use(placeholderPlugin).use(options.rendering?.codeHighlighting === false ? [] : (await import("./highlight-
|
|
59685
|
+
}).use(labelsCtx).use(linkSchemesCtx).use(formatInputCtx).use(richTextGuard).use(runtime.plugins.paste).use(visibleClipboard).use(runtime.plugins.suggestions).use(runtime.plugins.keymap).use(createDialect(Boolean(options.images || options.files), Boolean(options.wikiLinks), Boolean(options.files))).use(codeControlCtx).use(codeControlsPlugin(() => runtime.visibleRect())).use(tablePlugins).use(tableBlock).use(runtime.plugins.change).use(runtime.plugins.historyInput).use(history).use(clipboard).use(cursor).use(taskListPlugin((operation) => runtime.mutate(operation))).use(undoTypedRule).use(quoteBackspace).use(calloutEnter).use(literalEnter).use(literalReread).use(listItemBackspace).use(nestedItemEnter).use(rejoinLists).use(movedListItems).use(textInputPolicy).use(runtime.copy ? codeCopyPlugin((text) => runtime.copy?.(text)) : []).use(placeholderPlugin).use(options.rendering?.codeHighlighting === false ? [] : (await import("./highlight-BF7N9czJ.js")).highlightPlugin).use(options.rendering?.diagramPreview === false || !diagramsAvailable() ? [] : mermaidPreview(runtime.diagrams, (error) => runtime.report(error))).use(selectionPlugin(drawn)).use(drawn ? drawnCaretPlugin : []).use($prose(() => search())).use(runtime.plugins.policy).use(options.wikiLinks ? wikiLinkView(options.wikiLinks, {
|
|
59683
59686
|
capture: () => runtime.capture(),
|
|
59684
59687
|
active: () => runtime.active(),
|
|
59685
59688
|
labels: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as DecorationSet, f as __commonJSMin, l as Plugin, o as $prose, p as __toESM, s as Decoration, u as PluginKey } from "./core-
|
|
1
|
+
import { c as DecorationSet, f as __commonJSMin, l as Plugin, o as $prose, p as __toESM, s as Decoration, u as PluginKey } from "./core-BI-sSLEL.js";
|
|
2
2
|
//#region node_modules/.pnpm/highlight.js@11.11.2/node_modules/highlight.js/es/languages/arduino.js
|
|
3
3
|
/** @type LanguageFn */
|
|
4
4
|
function cPlusPlus(hljs) {
|
package/dist/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as InkKitError, n as normalizeLinkAddress, r as InkKitEditor, t as canOpenLink } from "./chunks/core-
|
|
1
|
+
import { a as InkKitError, n as normalizeLinkAddress, r as InkKitEditor, t as canOpenLink } from "./chunks/core-BI-sSLEL.js";
|
|
2
2
|
export { InkKitEditor, InkKitError, canOpenLink, normalizeLinkAddress };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as InkKitError, i as registerDiagram, n as normalizeLinkAddress, r as InkKitEditor, t as canOpenLink } from "./chunks/core-
|
|
1
|
+
import { a as InkKitError, i as registerDiagram, n as normalizeLinkAddress, r as InkKitEditor, t as canOpenLink } from "./chunks/core-BI-sSLEL.js";
|
|
2
2
|
//#region node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs
|
|
3
3
|
/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */
|
|
4
4
|
function _OverloadYield(e, d) {
|
package/dist/style.css
CHANGED
|
@@ -379,6 +379,14 @@
|
|
|
379
379
|
padding: 6px;
|
|
380
380
|
white-space: normal;
|
|
381
381
|
}
|
|
382
|
+
/* A picture that loads is drawn bare: no border, padding or caption. Any grey inside it is the
|
|
383
|
+
picture's own. A picture that is loading or has failed keeps its card. */
|
|
384
|
+
.inkkit-root
|
|
385
|
+
.ProseMirror
|
|
386
|
+
.inkkit-file[data-inkkit-file-state='resolved'][data-inkkit-file-kind='image'] {
|
|
387
|
+
border: 0;
|
|
388
|
+
padding: 0;
|
|
389
|
+
}
|
|
382
390
|
|
|
383
391
|
/* A file presentation with `layout: 'fill'` takes the column's width instead of its label's. */
|
|
384
392
|
.inkkit-root
|
|
@@ -408,17 +416,6 @@
|
|
|
408
416
|
.inkkit-root .ProseMirror .inkkit-file-footer:not(:first-child) {
|
|
409
417
|
margin-block-start: 0.25em;
|
|
410
418
|
}
|
|
411
|
-
/* Below a picture, the name takes the picture's width rather than widening the card, so the grip
|
|
412
|
-
stays at the picture's edge; a short picture still leaves room for a few characters. */
|
|
413
|
-
.inkkit-root .ProseMirror .inkkit-image-preview ~ .inkkit-file-footer {
|
|
414
|
-
width: 0;
|
|
415
|
-
min-width: 100%;
|
|
416
|
-
}
|
|
417
|
-
.inkkit-root
|
|
418
|
-
.ProseMirror
|
|
419
|
-
.inkkit-image.inkkit-file:has(> .inkkit-image-preview) {
|
|
420
|
-
min-width: min(100%, 8em);
|
|
421
|
-
}
|
|
422
419
|
/* The name truncates; the open arrow stays visible right after it. */
|
|
423
420
|
.inkkit-root .ProseMirror .inkkit-file-name {
|
|
424
421
|
display: flex;
|
|
@@ -470,29 +467,42 @@
|
|
|
470
467
|
cursor: pointer;
|
|
471
468
|
}
|
|
472
469
|
.inkkit-root .ProseMirror .inkkit-file-open {
|
|
470
|
+
/* The name and the arrow are one link: a plain control that the footer's muted text colours. */
|
|
473
471
|
display: inline-flex;
|
|
472
|
+
flex: 0 1 auto;
|
|
474
473
|
align-items: center;
|
|
475
|
-
|
|
476
|
-
min-width:
|
|
477
|
-
|
|
474
|
+
gap: 0.25em;
|
|
475
|
+
min-width: 0;
|
|
476
|
+
max-width: 100%;
|
|
478
477
|
padding: 0;
|
|
479
478
|
color: var(--_inkkit-muted);
|
|
480
479
|
background: transparent;
|
|
481
|
-
border
|
|
480
|
+
border: 0;
|
|
481
|
+
border-radius: 3px;
|
|
482
|
+
text-align: start;
|
|
482
483
|
}
|
|
483
484
|
.inkkit-root .ProseMirror .inkkit-file-open:hover {
|
|
484
485
|
color: var(--_inkkit-text);
|
|
485
|
-
|
|
486
|
+
}
|
|
487
|
+
.inkkit-root .ProseMirror .inkkit-file-open:hover .inkkit-file-label {
|
|
488
|
+
text-decoration: underline;
|
|
486
489
|
}
|
|
487
490
|
.inkkit-root .ProseMirror .inkkit-file-open svg {
|
|
491
|
+
flex: none;
|
|
492
|
+
box-sizing: content-box;
|
|
488
493
|
width: 0.85em;
|
|
489
494
|
height: 0.85em;
|
|
495
|
+
padding: 0.2em;
|
|
496
|
+
border-radius: 3px;
|
|
490
497
|
fill: none;
|
|
491
498
|
stroke: currentColor;
|
|
492
499
|
stroke-width: 1.5;
|
|
493
500
|
stroke-linecap: round;
|
|
494
501
|
stroke-linejoin: round;
|
|
495
502
|
}
|
|
503
|
+
.inkkit-root .ProseMirror .inkkit-file-open:hover svg {
|
|
504
|
+
background: var(--_inkkit-code-bg);
|
|
505
|
+
}
|
|
496
506
|
|
|
497
507
|
.inkkit-root .ProseMirror {
|
|
498
508
|
/* The viewport, not the wrapper Milkdown adds, so a click below the text still places the caret. */
|
|
@@ -764,34 +774,6 @@
|
|
|
764
774
|
overflow-wrap: anywhere;
|
|
765
775
|
}
|
|
766
776
|
|
|
767
|
-
.inkkit-root .ProseMirror pre .inkkit-code-controls,
|
|
768
|
-
.inkkit-root .ProseMirror pre .inkkit-copy {
|
|
769
|
-
opacity: 0;
|
|
770
|
-
pointer-events: none;
|
|
771
|
-
transition: opacity 120ms;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
.inkkit-root .ProseMirror pre:hover .inkkit-code-controls,
|
|
775
|
-
.inkkit-root .ProseMirror pre:hover .inkkit-copy,
|
|
776
|
-
.inkkit-root .ProseMirror pre:focus-within .inkkit-code-controls,
|
|
777
|
-
.inkkit-root .ProseMirror pre:focus-within .inkkit-copy,
|
|
778
|
-
.inkkit-root
|
|
779
|
-
.ProseMirror
|
|
780
|
-
pre:has(.inkkit-code-language[aria-expanded='true'])
|
|
781
|
-
.inkkit-code-controls,
|
|
782
|
-
.inkkit-root
|
|
783
|
-
.ProseMirror
|
|
784
|
-
pre:has(.inkkit-code-language[aria-expanded='true'])
|
|
785
|
-
.inkkit-copy,
|
|
786
|
-
.inkkit-root
|
|
787
|
-
.ProseMirror-focused
|
|
788
|
-
pre[data-inkkit-code-active]
|
|
789
|
-
.inkkit-code-controls,
|
|
790
|
-
.inkkit-root .ProseMirror-focused pre[data-inkkit-code-active] .inkkit-copy {
|
|
791
|
-
opacity: 1;
|
|
792
|
-
pointer-events: auto;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
777
|
.inkkit-root .ProseMirror blockquote {
|
|
796
778
|
position: relative;
|
|
797
779
|
margin: 0 0 calc(var(--_inkkit-font-size) * 0.8);
|