@kritzel/engine 0.4.32 → 0.4.34
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/cjs/{engine.constants-cfbepvaI.js → engine.constants-VyFrUl1W.js} +32 -31
- package/dist/cjs/{index-BrjM5aN2.js → index-BP5Iy6FQ.js} +15 -9
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/kritzel-awareness-cursors_5.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stencil.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/constants/version.js +1 -1
- package/dist/components/index.js +6 -6
- package/dist/components/kritzel-awareness-cursors.js +1 -1
- package/dist/components/kritzel-cursor-trail.js +1 -1
- package/dist/components/kritzel-engine.js +37 -36
- package/dist/components/kritzel-icon.js +1 -1
- package/dist/components/kritzel-watermark.js +1 -1
- package/dist/components/{p-Bnuu1qip.js → p-BHVbfJrf.js} +1 -1
- package/dist/components/{p-9YjkpHyU.js → p-BTU9qcSW.js} +1 -1
- package/dist/components/{p-CJ5B8cMK.js → p-BWfRbEIq.js} +4 -3
- package/dist/components/{p-BIUT0gBe.js → p-NAEiq8CK.js} +1 -1
- package/dist/components/{p-DXnF4FeS.js → p-k0LxV9Bg.js} +1 -1
- package/dist/esm/{engine.constants-DPDQhv6S.js → engine.constants-BHTr2qPx.js} +32 -31
- package/dist/esm/{index-Hqbtnnex.js → index-C8PnHbLt.js} +15 -9
- package/dist/esm/index.js +3 -3
- package/dist/esm/kritzel-awareness-cursors_5.entry.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/stencil.js +3 -3
- package/dist/stencil/index.esm.js +3 -3
- package/dist/stencil/{p-d678528e.entry.js → p-40097a38.entry.js} +2 -2
- package/dist/stencil/{p-DPDQhv6S.js → p-BHTr2qPx.js} +32 -31
- package/dist/stencil/{p-Hqbtnnex.js → p-C8PnHbLt.js} +15 -9
- package/dist/stencil/stencil.esm.js +4 -4
- package/dist/types/constants/version.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +61 -55
- package/package.json +3 -1
|
@@ -1385,7 +1385,6 @@ class Mark {
|
|
|
1385
1385
|
if (!type)
|
|
1386
1386
|
throw new RangeError(`There is no mark type ${json.type} in this schema`);
|
|
1387
1387
|
let mark = type.create(json.attrs);
|
|
1388
|
-
type.checkAttrs(mark.attrs);
|
|
1389
1388
|
return mark;
|
|
1390
1389
|
}
|
|
1391
1390
|
/**
|
|
@@ -2365,11 +2364,11 @@ class Node {
|
|
|
2365
2364
|
*/
|
|
2366
2365
|
check() {
|
|
2367
2366
|
this.type.checkContent(this.content);
|
|
2368
|
-
this.type.
|
|
2367
|
+
checkAttrs(this.type.attrs, this.attrs, "node", this.type.name);
|
|
2369
2368
|
let copy = Mark.none;
|
|
2370
2369
|
for (let i = 0; i < this.marks.length; i++) {
|
|
2371
2370
|
let mark = this.marks[i];
|
|
2372
|
-
mark.type.
|
|
2371
|
+
checkAttrs(mark.type.attrs, mark.attrs, "mark", mark.type.name);
|
|
2373
2372
|
copy = mark.addToSet(copy);
|
|
2374
2373
|
}
|
|
2375
2374
|
if (!Mark.sameSet(copy, this.marks))
|
|
@@ -2410,7 +2409,6 @@ class Node {
|
|
|
2410
2409
|
}
|
|
2411
2410
|
let content = Fragment.fromJSON(schema, json.content);
|
|
2412
2411
|
let node = schema.nodeType(json.type).create(json.attrs, content, marks);
|
|
2413
|
-
node.type.checkAttrs(node.attrs);
|
|
2414
2412
|
return node;
|
|
2415
2413
|
}
|
|
2416
2414
|
}
|
|
@@ -2460,6 +2458,15 @@ function wrapMarks(marks, str) {
|
|
|
2460
2458
|
str = marks[i].type.name + "(" + str + ")";
|
|
2461
2459
|
return str;
|
|
2462
2460
|
}
|
|
2461
|
+
function checkAttrs(attrs, values, type, name) {
|
|
2462
|
+
for (let attr in values)
|
|
2463
|
+
if (!(attr in attrs))
|
|
2464
|
+
throw new RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);
|
|
2465
|
+
for (let attr in attrs) {
|
|
2466
|
+
if (attrs[attr].validate)
|
|
2467
|
+
attrs[attr].validate(values[attr]);
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2463
2470
|
|
|
2464
2471
|
/**
|
|
2465
2472
|
Instances of this class represent a match state of a node type's
|
|
@@ -2914,27 +2921,21 @@ function defaultAttrs(attrs) {
|
|
|
2914
2921
|
function computeAttrs(attrs, value) {
|
|
2915
2922
|
let built = Object.create(null);
|
|
2916
2923
|
for (let name in attrs) {
|
|
2924
|
+
let attr = attrs[name];
|
|
2917
2925
|
let given = value && value[name];
|
|
2918
2926
|
if (given === undefined) {
|
|
2919
|
-
let attr = attrs[name];
|
|
2920
2927
|
if (attr.hasDefault)
|
|
2921
2928
|
given = attr.default;
|
|
2922
2929
|
else
|
|
2923
2930
|
throw new RangeError("No value supplied for attribute " + name);
|
|
2924
2931
|
}
|
|
2932
|
+
else if (attr.validate) {
|
|
2933
|
+
attr.validate(given);
|
|
2934
|
+
}
|
|
2925
2935
|
built[name] = given;
|
|
2926
2936
|
}
|
|
2927
2937
|
return built;
|
|
2928
2938
|
}
|
|
2929
|
-
function checkAttrs(attrs, values, type, name) {
|
|
2930
|
-
for (let attr in values)
|
|
2931
|
-
if (!(attr in attrs))
|
|
2932
|
-
throw new RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);
|
|
2933
|
-
for (let attr in attrs) {
|
|
2934
|
-
if (attrs[attr].validate)
|
|
2935
|
-
attrs[attr].validate(values[attr]);
|
|
2936
|
-
}
|
|
2937
|
-
}
|
|
2938
2939
|
function initAttrs(typeName, attrs) {
|
|
2939
2940
|
let result = Object.create(null);
|
|
2940
2941
|
if (attrs)
|
|
@@ -3106,11 +3107,9 @@ let NodeType$1 = class NodeType {
|
|
|
3106
3107
|
throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);
|
|
3107
3108
|
}
|
|
3108
3109
|
/**
|
|
3109
|
-
@internal
|
|
3110
|
+
@internal no longer useful, but called by old prosemirror-view versions
|
|
3110
3111
|
*/
|
|
3111
|
-
checkAttrs(attrs) {
|
|
3112
|
-
checkAttrs(this.attrs, attrs, "node", this.name);
|
|
3113
|
-
}
|
|
3112
|
+
checkAttrs(attrs) { }
|
|
3114
3113
|
/**
|
|
3115
3114
|
Check whether the given mark type is allowed in this node.
|
|
3116
3115
|
*/
|
|
@@ -3257,12 +3256,6 @@ class MarkType {
|
|
|
3257
3256
|
return set[i];
|
|
3258
3257
|
}
|
|
3259
3258
|
/**
|
|
3260
|
-
@internal
|
|
3261
|
-
*/
|
|
3262
|
-
checkAttrs(attrs) {
|
|
3263
|
-
checkAttrs(this.attrs, attrs, "mark", this.name);
|
|
3264
|
-
}
|
|
3265
|
-
/**
|
|
3266
3259
|
Queries whether a given mark type is
|
|
3267
3260
|
[excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.
|
|
3268
3261
|
*/
|
|
@@ -9954,7 +9947,8 @@ function nodeLen(node) {
|
|
|
9954
9947
|
}
|
|
9955
9948
|
function isIgnorable(dom, dir) {
|
|
9956
9949
|
let desc = dom.pmViewDesc;
|
|
9957
|
-
return desc
|
|
9950
|
+
return desc ? desc.size == 0 && (dir < 0 || dom.nextSibling || dom.nodeName != "BR")
|
|
9951
|
+
: dom.nodeType == 1 && dom.contentEditable == "false";
|
|
9958
9952
|
}
|
|
9959
9953
|
function skipIgnoredNodes(view, dir) {
|
|
9960
9954
|
return dir < 0 ? skipIgnoredNodesBefore(view) : skipIgnoredNodesAfter(view);
|
|
@@ -10543,12 +10537,11 @@ function addContext(slice, context) {
|
|
|
10543
10537
|
if (!type || type.hasRequiredAttrs())
|
|
10544
10538
|
break;
|
|
10545
10539
|
try {
|
|
10546
|
-
type.
|
|
10540
|
+
content = Fragment.from(type.create(array[i + 1], content));
|
|
10547
10541
|
}
|
|
10548
10542
|
catch (e) {
|
|
10549
10543
|
break;
|
|
10550
10544
|
}
|
|
10551
|
-
content = Fragment.from(type.create(array[i + 1], content));
|
|
10552
10545
|
openStart++;
|
|
10553
10546
|
openEnd++;
|
|
10554
10547
|
}
|
|
@@ -11028,7 +11021,7 @@ editHandlers.compositionstart = editHandlers.compositionupdate = view => {
|
|
|
11028
11021
|
if (!view.composing) {
|
|
11029
11022
|
view.domObserver.flush();
|
|
11030
11023
|
let { state } = view, $pos = state.selection.$to;
|
|
11031
|
-
if (state.selection instanceof TextSelection &&
|
|
11024
|
+
if (state.selection instanceof TextSelection && state.selection.empty &&
|
|
11032
11025
|
(state.storedMarks ||
|
|
11033
11026
|
(!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false)) ||
|
|
11034
11027
|
chrome && windows$1 && selectionBeforeUneditable(view))) { // Issue #1500
|
|
@@ -12665,9 +12658,7 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
|
|
|
12665
12658
|
// as being an iOS enter press), just dispatch an Enter key instead.
|
|
12666
12659
|
if (((ios && view.input.lastIOSEnter > Date.now() - 225 &&
|
|
12667
12660
|
(!inlineChange || addedNodes.some(n => n.nodeName == "DIV" || n.nodeName == "P"))) ||
|
|
12668
|
-
(!inlineChange && $from.pos
|
|
12669
|
-
(!$from.sameParent($to) || !$from.parent.inlineContent) &&
|
|
12670
|
-
$from.pos < $to.pos && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", "")))) &&
|
|
12661
|
+
(!inlineChange && looksLikeEnter(parse.doc, $from.pos, $to.pos))) &&
|
|
12671
12662
|
view.someProp("handleKeyDown", f => f(view, keyEvent(13, "Enter")))) {
|
|
12672
12663
|
view.input.lastIOSEnter = 0;
|
|
12673
12664
|
return;
|
|
@@ -12818,6 +12809,16 @@ function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
|
|
|
12818
12809
|
// The fragments after the join point must match
|
|
12819
12810
|
return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);
|
|
12820
12811
|
}
|
|
12812
|
+
function looksLikeEnter(content, from, to) {
|
|
12813
|
+
let newTextlines = 0, newLeaves = 0;
|
|
12814
|
+
content.nodesBetween(from, to, (node, pos) => {
|
|
12815
|
+
if (node.isTextblock && pos >= from && pos < to)
|
|
12816
|
+
newTextlines++;
|
|
12817
|
+
else if (node.isText ? /\S/.test(node.text.slice(Math.max(0, from - pos), Math.min(node.nodeSize, to - pos))) : node.isLeaf)
|
|
12818
|
+
newLeaves++;
|
|
12819
|
+
});
|
|
12820
|
+
return newLeaves == 0 && newTextlines == 1;
|
|
12821
|
+
}
|
|
12821
12822
|
function skipClosingAndOpening($pos, fromEnd, mayOpen) {
|
|
12822
12823
|
let depth = $pos.depth, end = fromEnd ? $pos.end() : $pos.pos;
|
|
12823
12824
|
while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {
|
|
@@ -2,7 +2,7 @@ const NAMESPACE = 'stencil';
|
|
|
2
2
|
const BUILD = /* stencil */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.45.1 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
|
|
@@ -848,7 +848,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
848
848
|
if (idxInOld >= 0) {
|
|
849
849
|
elmToMove = oldCh[idxInOld];
|
|
850
850
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
851
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2,
|
|
851
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
852
852
|
} else {
|
|
853
853
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
854
854
|
oldCh[idxInOld] = void 0;
|
|
@@ -1283,21 +1283,26 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
|
-
const
|
|
1286
|
+
const parsedValue = parsePropertyValue(
|
|
1287
|
+
newValue,
|
|
1288
|
+
memberFlags);
|
|
1289
|
+
const setterSetVal = (val) => {
|
|
1287
1290
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
1288
1291
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1289
1292
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1290
1293
|
}
|
|
1291
|
-
ref.$lazyInstance$[memberName] =
|
|
1292
|
-
newValue,
|
|
1293
|
-
memberFlags);
|
|
1294
|
+
ref.$lazyInstance$[memberName] = val;
|
|
1294
1295
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1295
1296
|
};
|
|
1296
1297
|
if (ref.$lazyInstance$) {
|
|
1297
|
-
setterSetVal();
|
|
1298
|
+
setterSetVal(parsedValue);
|
|
1298
1299
|
} else {
|
|
1300
|
+
ref.$instanceValues$.set(memberName, parsedValue);
|
|
1299
1301
|
ref.$fetchedCbList$.push(() => {
|
|
1300
|
-
|
|
1302
|
+
const pendingValue = ref.$instanceValues$.get(memberName);
|
|
1303
|
+
if (ref.$lazyInstance$[memberName] !== pendingValue) {
|
|
1304
|
+
setterSetVal(pendingValue);
|
|
1305
|
+
}
|
|
1301
1306
|
});
|
|
1302
1307
|
}
|
|
1303
1308
|
}
|
|
@@ -1351,8 +1356,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1351
1356
|
if (isBooleanTarget) {
|
|
1352
1357
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
1353
1358
|
}
|
|
1359
|
+
const currentValue = propMemberFlags & 4096 /* Setter */ ? hostRef.$instanceValues$.get(propName) : this[propName];
|
|
1354
1360
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1355
|
-
if (!isSpuriousBooleanRemoval && newValue !=
|
|
1361
|
+
if (!isSpuriousBooleanRemoval && newValue != currentValue && (!propDesc.get || !!propDesc.set)) {
|
|
1356
1362
|
this[propName] = newValue;
|
|
1357
1363
|
}
|
|
1358
1364
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DEFAULT_STROKE_SIZES, a as DEFAULT_COLOR_PALETTE, b as DEFAULT_FONT_SIZES, c as DEFAULT_TEXT_TOOL_AVAILABLE_FONTS, S as ShapeType } from './engine.constants-
|
|
2
|
-
export { a4 as ABSOLUTE_SCALE_MAX, a5 as ABSOLUTE_SCALE_MIN, _ as APP_STATE_MIGRATIONS, A as AssetNotFoundError, a0 as CURRENT_APP_STATE_SCHEMA_VERSION, a1 as CURRENT_WORKSPACE_SCHEMA_VERSION, P as DEFAULT_SYNC_CONFIG, V as DE_LOCALE, U as EN_LOCALE, X as FR_LOCALE, I as IndexedDBAssetProvider, a6 as KRITZEL_WEBSITE_URL, Y as KritzelAlignment, E as KritzelAnchorManager, B as KritzelAssetResolver, K as KritzelBaseObject, n as KritzelBaseTool, o as KritzelBrushTool, x as KritzelColorHelper, u as KritzelCursorHelper, w as KritzelDevicesHelper, j as KritzelDynamicObject, J as KritzelDynamicObjectRendererRegistry, q as KritzelEraserTool, L as KritzelFontRegistry, h as KritzelGroup, y as KritzelHTMLHelper, M as KritzelIconRegistry, k as KritzelIframeObject, f as KritzelImage, r as KritzelImageTool, v as KritzelKeyboardHelper, H as KritzelLicenseManager, g as KritzelLine, p as KritzelLineTool, G as KritzelLocalizationManager, e as KritzelPath, m as KritzelSelectionBox, l as KritzelSelectionGroup, z as KritzelSelectionTool, i as KritzelShape, t as KritzelShapeTool, d as KritzelText, s as KritzelTextTool, F as KritzelThemeManager, C as KritzelWorkspace, O as ObjectHelper, T as ThemeHelper, W as WORKSPACE_EXPORT_VERSION, $ as WORKSPACE_MIGRATIONS, R as darkTheme, N as defaultIcons, Q as lightTheme, a2 as resolveColor, a3 as resolveTextToolAvailableFonts, Z as runMigrations } from './engine.constants-
|
|
1
|
+
import { D as DEFAULT_STROKE_SIZES, a as DEFAULT_COLOR_PALETTE, b as DEFAULT_FONT_SIZES, c as DEFAULT_TEXT_TOOL_AVAILABLE_FONTS, S as ShapeType } from './engine.constants-BHTr2qPx.js';
|
|
2
|
+
export { a4 as ABSOLUTE_SCALE_MAX, a5 as ABSOLUTE_SCALE_MIN, _ as APP_STATE_MIGRATIONS, A as AssetNotFoundError, a0 as CURRENT_APP_STATE_SCHEMA_VERSION, a1 as CURRENT_WORKSPACE_SCHEMA_VERSION, P as DEFAULT_SYNC_CONFIG, V as DE_LOCALE, U as EN_LOCALE, X as FR_LOCALE, I as IndexedDBAssetProvider, a6 as KRITZEL_WEBSITE_URL, Y as KritzelAlignment, E as KritzelAnchorManager, B as KritzelAssetResolver, K as KritzelBaseObject, n as KritzelBaseTool, o as KritzelBrushTool, x as KritzelColorHelper, u as KritzelCursorHelper, w as KritzelDevicesHelper, j as KritzelDynamicObject, J as KritzelDynamicObjectRendererRegistry, q as KritzelEraserTool, L as KritzelFontRegistry, h as KritzelGroup, y as KritzelHTMLHelper, M as KritzelIconRegistry, k as KritzelIframeObject, f as KritzelImage, r as KritzelImageTool, v as KritzelKeyboardHelper, H as KritzelLicenseManager, g as KritzelLine, p as KritzelLineTool, G as KritzelLocalizationManager, e as KritzelPath, m as KritzelSelectionBox, l as KritzelSelectionGroup, z as KritzelSelectionTool, i as KritzelShape, t as KritzelShapeTool, d as KritzelText, s as KritzelTextTool, F as KritzelThemeManager, C as KritzelWorkspace, O as ObjectHelper, T as ThemeHelper, W as WORKSPACE_EXPORT_VERSION, $ as WORKSPACE_MIGRATIONS, R as darkTheme, N as defaultIcons, Q as lightTheme, a2 as resolveColor, a3 as resolveTextToolAvailableFonts, Z as runMigrations } from './engine.constants-BHTr2qPx.js';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
import { IndexeddbPersistence } from 'y-indexeddb';
|
|
5
5
|
import { WebsocketProvider } from 'y-websocket';
|
|
@@ -4129,6 +4129,6 @@ const DEFAULT_ASSET_STORAGE_CONFIG = {
|
|
|
4129
4129
|
* This file is auto-generated by the version bump scripts.
|
|
4130
4130
|
* Do not modify manually.
|
|
4131
4131
|
*/
|
|
4132
|
-
const KRITZEL_VERSION = '0.4.
|
|
4132
|
+
const KRITZEL_VERSION = '0.4.34';
|
|
4133
4133
|
|
|
4134
4134
|
export { BroadcastSyncProvider, DEFAULT_ASSET_STORAGE_CONFIG, DEFAULT_BRUSH_CONFIG, DEFAULT_COLOR_PALETTE, DEFAULT_LINE_TOOL_CONFIG, DEFAULT_SHAPE_CONFIG, DEFAULT_TEXT_CONFIG, DEFAULT_TEXT_TOOL_AVAILABLE_FONTS, HocuspocusSyncProvider, HttpAssetProvider, InMemorySyncProvider, IndexedDBSyncProvider, KRITZEL_VERSION, KritzelToolConfigHelper, PresignedAssetProvider, ShapeType, WebSocketSyncProvider, hasRemoteSyncProvider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, f as forceUpdate } from './index-
|
|
2
|
-
import { e as KritzelPath, g as KritzelLine, a7 as KritzelMouseButton, m as KritzelSelectionBox, a8 as KritzelBaseHandler, l as KritzelSelectionGroup, t as KritzelShapeTool, p as KritzelLineTool, s as KritzelTextTool, z as KritzelSelectionTool, r as KritzelImageTool, q as KritzelEraserTool, o as KritzelBrushTool, C as KritzelWorkspace, h as KritzelGroup, k as KritzelIframeObject, j as KritzelDynamicObject, f as KritzelImage, i as KritzelShape, d as KritzelText, Y as KritzelAlignment, P as DEFAULT_SYNC_CONFIG, Z as runMigrations, a1 as CURRENT_WORKSPACE_SCHEMA_VERSION, $ as WORKSPACE_MIGRATIONS, O as ObjectHelper, a0 as CURRENT_APP_STATE_SCHEMA_VERSION, _ as APP_STATE_MIGRATIONS, u as KritzelCursorHelper, w as KritzelDevicesHelper, a9 as KritzelClassHelper, aa as KritzelImageFileHelper, ab as imageCompression, E as KritzelAnchorManager, F as KritzelThemeManager, G as KritzelLocalizationManager, H as KritzelLicenseManager, B as KritzelAssetResolver, x as KritzelColorHelper, a4 as ABSOLUTE_SCALE_MAX, a5 as ABSOLUTE_SCALE_MIN, ac as KritzelEventHelper, W as WORKSPACE_EXPORT_VERSION, a3 as resolveTextToolAvailableFonts, n as KritzelBaseTool, v as KritzelKeyboardHelper, M as KritzelIconRegistry, a6 as KRITZEL_WEBSITE_URL } from './engine.constants-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, f as forceUpdate } from './index-C8PnHbLt.js';
|
|
2
|
+
import { e as KritzelPath, g as KritzelLine, a7 as KritzelMouseButton, m as KritzelSelectionBox, a8 as KritzelBaseHandler, l as KritzelSelectionGroup, t as KritzelShapeTool, p as KritzelLineTool, s as KritzelTextTool, z as KritzelSelectionTool, r as KritzelImageTool, q as KritzelEraserTool, o as KritzelBrushTool, C as KritzelWorkspace, h as KritzelGroup, k as KritzelIframeObject, j as KritzelDynamicObject, f as KritzelImage, i as KritzelShape, d as KritzelText, Y as KritzelAlignment, P as DEFAULT_SYNC_CONFIG, Z as runMigrations, a1 as CURRENT_WORKSPACE_SCHEMA_VERSION, $ as WORKSPACE_MIGRATIONS, O as ObjectHelper, a0 as CURRENT_APP_STATE_SCHEMA_VERSION, _ as APP_STATE_MIGRATIONS, u as KritzelCursorHelper, w as KritzelDevicesHelper, a9 as KritzelClassHelper, aa as KritzelImageFileHelper, ab as imageCompression, E as KritzelAnchorManager, F as KritzelThemeManager, G as KritzelLocalizationManager, H as KritzelLicenseManager, B as KritzelAssetResolver, x as KritzelColorHelper, a4 as ABSOLUTE_SCALE_MAX, a5 as ABSOLUTE_SCALE_MIN, ac as KritzelEventHelper, W as WORKSPACE_EXPORT_VERSION, a3 as resolveTextToolAvailableFonts, n as KritzelBaseTool, v as KritzelKeyboardHelper, M as KritzelIconRegistry, a6 as KRITZEL_WEBSITE_URL } from './engine.constants-BHTr2qPx.js';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-C8PnHbLt.js';
|
|
2
|
+
export { s as setNonce } from './index-C8PnHbLt.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
package/dist/esm/stencil.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-C8PnHbLt.js';
|
|
2
|
+
export { s as setNonce } from './index-C8PnHbLt.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.45.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
var patchBrowser = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DEFAULT_STROKE_SIZES, a as DEFAULT_COLOR_PALETTE, b as DEFAULT_FONT_SIZES, c as DEFAULT_TEXT_TOOL_AVAILABLE_FONTS, S as ShapeType } from './p-
|
|
2
|
-
export { a4 as ABSOLUTE_SCALE_MAX, a5 as ABSOLUTE_SCALE_MIN, _ as APP_STATE_MIGRATIONS, A as AssetNotFoundError, a0 as CURRENT_APP_STATE_SCHEMA_VERSION, a1 as CURRENT_WORKSPACE_SCHEMA_VERSION, P as DEFAULT_SYNC_CONFIG, V as DE_LOCALE, U as EN_LOCALE, X as FR_LOCALE, I as IndexedDBAssetProvider, a6 as KRITZEL_WEBSITE_URL, Y as KritzelAlignment, E as KritzelAnchorManager, B as KritzelAssetResolver, K as KritzelBaseObject, n as KritzelBaseTool, o as KritzelBrushTool, x as KritzelColorHelper, u as KritzelCursorHelper, w as KritzelDevicesHelper, j as KritzelDynamicObject, J as KritzelDynamicObjectRendererRegistry, q as KritzelEraserTool, L as KritzelFontRegistry, h as KritzelGroup, y as KritzelHTMLHelper, M as KritzelIconRegistry, k as KritzelIframeObject, f as KritzelImage, r as KritzelImageTool, v as KritzelKeyboardHelper, H as KritzelLicenseManager, g as KritzelLine, p as KritzelLineTool, G as KritzelLocalizationManager, e as KritzelPath, m as KritzelSelectionBox, l as KritzelSelectionGroup, z as KritzelSelectionTool, i as KritzelShape, t as KritzelShapeTool, d as KritzelText, s as KritzelTextTool, F as KritzelThemeManager, C as KritzelWorkspace, O as ObjectHelper, T as ThemeHelper, W as WORKSPACE_EXPORT_VERSION, $ as WORKSPACE_MIGRATIONS, R as darkTheme, N as defaultIcons, Q as lightTheme, a2 as resolveColor, a3 as resolveTextToolAvailableFonts, Z as runMigrations } from './p-
|
|
1
|
+
import { D as DEFAULT_STROKE_SIZES, a as DEFAULT_COLOR_PALETTE, b as DEFAULT_FONT_SIZES, c as DEFAULT_TEXT_TOOL_AVAILABLE_FONTS, S as ShapeType } from './p-BHTr2qPx.js';
|
|
2
|
+
export { a4 as ABSOLUTE_SCALE_MAX, a5 as ABSOLUTE_SCALE_MIN, _ as APP_STATE_MIGRATIONS, A as AssetNotFoundError, a0 as CURRENT_APP_STATE_SCHEMA_VERSION, a1 as CURRENT_WORKSPACE_SCHEMA_VERSION, P as DEFAULT_SYNC_CONFIG, V as DE_LOCALE, U as EN_LOCALE, X as FR_LOCALE, I as IndexedDBAssetProvider, a6 as KRITZEL_WEBSITE_URL, Y as KritzelAlignment, E as KritzelAnchorManager, B as KritzelAssetResolver, K as KritzelBaseObject, n as KritzelBaseTool, o as KritzelBrushTool, x as KritzelColorHelper, u as KritzelCursorHelper, w as KritzelDevicesHelper, j as KritzelDynamicObject, J as KritzelDynamicObjectRendererRegistry, q as KritzelEraserTool, L as KritzelFontRegistry, h as KritzelGroup, y as KritzelHTMLHelper, M as KritzelIconRegistry, k as KritzelIframeObject, f as KritzelImage, r as KritzelImageTool, v as KritzelKeyboardHelper, H as KritzelLicenseManager, g as KritzelLine, p as KritzelLineTool, G as KritzelLocalizationManager, e as KritzelPath, m as KritzelSelectionBox, l as KritzelSelectionGroup, z as KritzelSelectionTool, i as KritzelShape, t as KritzelShapeTool, d as KritzelText, s as KritzelTextTool, F as KritzelThemeManager, C as KritzelWorkspace, O as ObjectHelper, T as ThemeHelper, W as WORKSPACE_EXPORT_VERSION, $ as WORKSPACE_MIGRATIONS, R as darkTheme, N as defaultIcons, Q as lightTheme, a2 as resolveColor, a3 as resolveTextToolAvailableFonts, Z as runMigrations } from './p-BHTr2qPx.js';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
import { IndexeddbPersistence } from 'y-indexeddb';
|
|
5
5
|
import { WebsocketProvider } from 'y-websocket';
|
|
@@ -4129,6 +4129,6 @@ const DEFAULT_ASSET_STORAGE_CONFIG = {
|
|
|
4129
4129
|
* This file is auto-generated by the version bump scripts.
|
|
4130
4130
|
* Do not modify manually.
|
|
4131
4131
|
*/
|
|
4132
|
-
const KRITZEL_VERSION = '0.4.
|
|
4132
|
+
const KRITZEL_VERSION = '0.4.34';
|
|
4133
4133
|
|
|
4134
4134
|
export { BroadcastSyncProvider, DEFAULT_ASSET_STORAGE_CONFIG, DEFAULT_BRUSH_CONFIG, DEFAULT_COLOR_PALETTE, DEFAULT_LINE_TOOL_CONFIG, DEFAULT_SHAPE_CONFIG, DEFAULT_TEXT_CONFIG, DEFAULT_TEXT_TOOL_AVAILABLE_FONTS, HocuspocusSyncProvider, HttpAssetProvider, InMemorySyncProvider, IndexedDBSyncProvider, KRITZEL_VERSION, KritzelToolConfigHelper, PresignedAssetProvider, ShapeType, WebSocketSyncProvider, hasRemoteSyncProvider };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, f as forceUpdate } from './p-
|
|
2
|
-
import { e as KritzelPath, g as KritzelLine, a7 as KritzelMouseButton, m as KritzelSelectionBox, a8 as KritzelBaseHandler, l as KritzelSelectionGroup, t as KritzelShapeTool, p as KritzelLineTool, s as KritzelTextTool, z as KritzelSelectionTool, r as KritzelImageTool, q as KritzelEraserTool, o as KritzelBrushTool, C as KritzelWorkspace, h as KritzelGroup, k as KritzelIframeObject, j as KritzelDynamicObject, f as KritzelImage, i as KritzelShape, d as KritzelText, Y as KritzelAlignment, P as DEFAULT_SYNC_CONFIG, Z as runMigrations, a1 as CURRENT_WORKSPACE_SCHEMA_VERSION, $ as WORKSPACE_MIGRATIONS, O as ObjectHelper, a0 as CURRENT_APP_STATE_SCHEMA_VERSION, _ as APP_STATE_MIGRATIONS, u as KritzelCursorHelper, w as KritzelDevicesHelper, a9 as KritzelClassHelper, aa as KritzelImageFileHelper, ab as imageCompression, E as KritzelAnchorManager, F as KritzelThemeManager, G as KritzelLocalizationManager, H as KritzelLicenseManager, B as KritzelAssetResolver, x as KritzelColorHelper, a4 as ABSOLUTE_SCALE_MAX, a5 as ABSOLUTE_SCALE_MIN, ac as KritzelEventHelper, W as WORKSPACE_EXPORT_VERSION, a3 as resolveTextToolAvailableFonts, n as KritzelBaseTool, v as KritzelKeyboardHelper, M as KritzelIconRegistry, a6 as KRITZEL_WEBSITE_URL } from './p-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent, f as forceUpdate } from './p-C8PnHbLt.js';
|
|
2
|
+
import { e as KritzelPath, g as KritzelLine, a7 as KritzelMouseButton, m as KritzelSelectionBox, a8 as KritzelBaseHandler, l as KritzelSelectionGroup, t as KritzelShapeTool, p as KritzelLineTool, s as KritzelTextTool, z as KritzelSelectionTool, r as KritzelImageTool, q as KritzelEraserTool, o as KritzelBrushTool, C as KritzelWorkspace, h as KritzelGroup, k as KritzelIframeObject, j as KritzelDynamicObject, f as KritzelImage, i as KritzelShape, d as KritzelText, Y as KritzelAlignment, P as DEFAULT_SYNC_CONFIG, Z as runMigrations, a1 as CURRENT_WORKSPACE_SCHEMA_VERSION, $ as WORKSPACE_MIGRATIONS, O as ObjectHelper, a0 as CURRENT_APP_STATE_SCHEMA_VERSION, _ as APP_STATE_MIGRATIONS, u as KritzelCursorHelper, w as KritzelDevicesHelper, a9 as KritzelClassHelper, aa as KritzelImageFileHelper, ab as imageCompression, E as KritzelAnchorManager, F as KritzelThemeManager, G as KritzelLocalizationManager, H as KritzelLicenseManager, B as KritzelAssetResolver, x as KritzelColorHelper, a4 as ABSOLUTE_SCALE_MAX, a5 as ABSOLUTE_SCALE_MIN, ac as KritzelEventHelper, W as WORKSPACE_EXPORT_VERSION, a3 as resolveTextToolAvailableFonts, n as KritzelBaseTool, v as KritzelKeyboardHelper, M as KritzelIconRegistry, a6 as KRITZEL_WEBSITE_URL } from './p-BHTr2qPx.js';
|
|
3
3
|
import * as Y from 'yjs';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -1385,7 +1385,6 @@ class Mark {
|
|
|
1385
1385
|
if (!type)
|
|
1386
1386
|
throw new RangeError(`There is no mark type ${json.type} in this schema`);
|
|
1387
1387
|
let mark = type.create(json.attrs);
|
|
1388
|
-
type.checkAttrs(mark.attrs);
|
|
1389
1388
|
return mark;
|
|
1390
1389
|
}
|
|
1391
1390
|
/**
|
|
@@ -2365,11 +2364,11 @@ class Node {
|
|
|
2365
2364
|
*/
|
|
2366
2365
|
check() {
|
|
2367
2366
|
this.type.checkContent(this.content);
|
|
2368
|
-
this.type.
|
|
2367
|
+
checkAttrs(this.type.attrs, this.attrs, "node", this.type.name);
|
|
2369
2368
|
let copy = Mark.none;
|
|
2370
2369
|
for (let i = 0; i < this.marks.length; i++) {
|
|
2371
2370
|
let mark = this.marks[i];
|
|
2372
|
-
mark.type.
|
|
2371
|
+
checkAttrs(mark.type.attrs, mark.attrs, "mark", mark.type.name);
|
|
2373
2372
|
copy = mark.addToSet(copy);
|
|
2374
2373
|
}
|
|
2375
2374
|
if (!Mark.sameSet(copy, this.marks))
|
|
@@ -2410,7 +2409,6 @@ class Node {
|
|
|
2410
2409
|
}
|
|
2411
2410
|
let content = Fragment.fromJSON(schema, json.content);
|
|
2412
2411
|
let node = schema.nodeType(json.type).create(json.attrs, content, marks);
|
|
2413
|
-
node.type.checkAttrs(node.attrs);
|
|
2414
2412
|
return node;
|
|
2415
2413
|
}
|
|
2416
2414
|
}
|
|
@@ -2460,6 +2458,15 @@ function wrapMarks(marks, str) {
|
|
|
2460
2458
|
str = marks[i].type.name + "(" + str + ")";
|
|
2461
2459
|
return str;
|
|
2462
2460
|
}
|
|
2461
|
+
function checkAttrs(attrs, values, type, name) {
|
|
2462
|
+
for (let attr in values)
|
|
2463
|
+
if (!(attr in attrs))
|
|
2464
|
+
throw new RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);
|
|
2465
|
+
for (let attr in attrs) {
|
|
2466
|
+
if (attrs[attr].validate)
|
|
2467
|
+
attrs[attr].validate(values[attr]);
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2463
2470
|
|
|
2464
2471
|
/**
|
|
2465
2472
|
Instances of this class represent a match state of a node type's
|
|
@@ -2914,27 +2921,21 @@ function defaultAttrs(attrs) {
|
|
|
2914
2921
|
function computeAttrs(attrs, value) {
|
|
2915
2922
|
let built = Object.create(null);
|
|
2916
2923
|
for (let name in attrs) {
|
|
2924
|
+
let attr = attrs[name];
|
|
2917
2925
|
let given = value && value[name];
|
|
2918
2926
|
if (given === undefined) {
|
|
2919
|
-
let attr = attrs[name];
|
|
2920
2927
|
if (attr.hasDefault)
|
|
2921
2928
|
given = attr.default;
|
|
2922
2929
|
else
|
|
2923
2930
|
throw new RangeError("No value supplied for attribute " + name);
|
|
2924
2931
|
}
|
|
2932
|
+
else if (attr.validate) {
|
|
2933
|
+
attr.validate(given);
|
|
2934
|
+
}
|
|
2925
2935
|
built[name] = given;
|
|
2926
2936
|
}
|
|
2927
2937
|
return built;
|
|
2928
2938
|
}
|
|
2929
|
-
function checkAttrs(attrs, values, type, name) {
|
|
2930
|
-
for (let attr in values)
|
|
2931
|
-
if (!(attr in attrs))
|
|
2932
|
-
throw new RangeError(`Unsupported attribute ${attr} for ${type} of type ${name}`);
|
|
2933
|
-
for (let attr in attrs) {
|
|
2934
|
-
if (attrs[attr].validate)
|
|
2935
|
-
attrs[attr].validate(values[attr]);
|
|
2936
|
-
}
|
|
2937
|
-
}
|
|
2938
2939
|
function initAttrs(typeName, attrs) {
|
|
2939
2940
|
let result = Object.create(null);
|
|
2940
2941
|
if (attrs)
|
|
@@ -3106,11 +3107,9 @@ let NodeType$1 = class NodeType {
|
|
|
3106
3107
|
throw new RangeError(`Invalid content for node ${this.name}: ${content.toString().slice(0, 50)}`);
|
|
3107
3108
|
}
|
|
3108
3109
|
/**
|
|
3109
|
-
@internal
|
|
3110
|
+
@internal no longer useful, but called by old prosemirror-view versions
|
|
3110
3111
|
*/
|
|
3111
|
-
checkAttrs(attrs) {
|
|
3112
|
-
checkAttrs(this.attrs, attrs, "node", this.name);
|
|
3113
|
-
}
|
|
3112
|
+
checkAttrs(attrs) { }
|
|
3114
3113
|
/**
|
|
3115
3114
|
Check whether the given mark type is allowed in this node.
|
|
3116
3115
|
*/
|
|
@@ -3257,12 +3256,6 @@ class MarkType {
|
|
|
3257
3256
|
return set[i];
|
|
3258
3257
|
}
|
|
3259
3258
|
/**
|
|
3260
|
-
@internal
|
|
3261
|
-
*/
|
|
3262
|
-
checkAttrs(attrs) {
|
|
3263
|
-
checkAttrs(this.attrs, attrs, "mark", this.name);
|
|
3264
|
-
}
|
|
3265
|
-
/**
|
|
3266
3259
|
Queries whether a given mark type is
|
|
3267
3260
|
[excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.
|
|
3268
3261
|
*/
|
|
@@ -9954,7 +9947,8 @@ function nodeLen(node) {
|
|
|
9954
9947
|
}
|
|
9955
9948
|
function isIgnorable(dom, dir) {
|
|
9956
9949
|
let desc = dom.pmViewDesc;
|
|
9957
|
-
return desc
|
|
9950
|
+
return desc ? desc.size == 0 && (dir < 0 || dom.nextSibling || dom.nodeName != "BR")
|
|
9951
|
+
: dom.nodeType == 1 && dom.contentEditable == "false";
|
|
9958
9952
|
}
|
|
9959
9953
|
function skipIgnoredNodes(view, dir) {
|
|
9960
9954
|
return dir < 0 ? skipIgnoredNodesBefore(view) : skipIgnoredNodesAfter(view);
|
|
@@ -10543,12 +10537,11 @@ function addContext(slice, context) {
|
|
|
10543
10537
|
if (!type || type.hasRequiredAttrs())
|
|
10544
10538
|
break;
|
|
10545
10539
|
try {
|
|
10546
|
-
type.
|
|
10540
|
+
content = Fragment.from(type.create(array[i + 1], content));
|
|
10547
10541
|
}
|
|
10548
10542
|
catch (e) {
|
|
10549
10543
|
break;
|
|
10550
10544
|
}
|
|
10551
|
-
content = Fragment.from(type.create(array[i + 1], content));
|
|
10552
10545
|
openStart++;
|
|
10553
10546
|
openEnd++;
|
|
10554
10547
|
}
|
|
@@ -11028,7 +11021,7 @@ editHandlers.compositionstart = editHandlers.compositionupdate = view => {
|
|
|
11028
11021
|
if (!view.composing) {
|
|
11029
11022
|
view.domObserver.flush();
|
|
11030
11023
|
let { state } = view, $pos = state.selection.$to;
|
|
11031
|
-
if (state.selection instanceof TextSelection &&
|
|
11024
|
+
if (state.selection instanceof TextSelection && state.selection.empty &&
|
|
11032
11025
|
(state.storedMarks ||
|
|
11033
11026
|
(!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false)) ||
|
|
11034
11027
|
chrome && windows$1 && selectionBeforeUneditable(view))) { // Issue #1500
|
|
@@ -12665,9 +12658,7 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
|
|
|
12665
12658
|
// as being an iOS enter press), just dispatch an Enter key instead.
|
|
12666
12659
|
if (((ios && view.input.lastIOSEnter > Date.now() - 225 &&
|
|
12667
12660
|
(!inlineChange || addedNodes.some(n => n.nodeName == "DIV" || n.nodeName == "P"))) ||
|
|
12668
|
-
(!inlineChange && $from.pos
|
|
12669
|
-
(!$from.sameParent($to) || !$from.parent.inlineContent) &&
|
|
12670
|
-
$from.pos < $to.pos && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", "")))) &&
|
|
12661
|
+
(!inlineChange && looksLikeEnter(parse.doc, $from.pos, $to.pos))) &&
|
|
12671
12662
|
view.someProp("handleKeyDown", f => f(view, keyEvent(13, "Enter")))) {
|
|
12672
12663
|
view.input.lastIOSEnter = 0;
|
|
12673
12664
|
return;
|
|
@@ -12818,6 +12809,16 @@ function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
|
|
|
12818
12809
|
// The fragments after the join point must match
|
|
12819
12810
|
return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content);
|
|
12820
12811
|
}
|
|
12812
|
+
function looksLikeEnter(content, from, to) {
|
|
12813
|
+
let newTextlines = 0, newLeaves = 0;
|
|
12814
|
+
content.nodesBetween(from, to, (node, pos) => {
|
|
12815
|
+
if (node.isTextblock && pos >= from && pos < to)
|
|
12816
|
+
newTextlines++;
|
|
12817
|
+
else if (node.isText ? /\S/.test(node.text.slice(Math.max(0, from - pos), Math.min(node.nodeSize, to - pos))) : node.isLeaf)
|
|
12818
|
+
newLeaves++;
|
|
12819
|
+
});
|
|
12820
|
+
return newLeaves == 0 && newTextlines == 1;
|
|
12821
|
+
}
|
|
12821
12822
|
function skipClosingAndOpening($pos, fromEnd, mayOpen) {
|
|
12822
12823
|
let depth = $pos.depth, end = fromEnd ? $pos.end() : $pos.pos;
|
|
12823
12824
|
while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {
|
|
@@ -2,7 +2,7 @@ const NAMESPACE = 'stencil';
|
|
|
2
2
|
const BUILD = /* stencil */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.45.1 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
|
|
@@ -835,7 +835,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
835
835
|
if (idxInOld >= 0) {
|
|
836
836
|
elmToMove = oldCh[idxInOld];
|
|
837
837
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
838
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2,
|
|
838
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
839
839
|
} else {
|
|
840
840
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
841
841
|
oldCh[idxInOld] = void 0;
|
|
@@ -1270,21 +1270,26 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1270
1270
|
}
|
|
1271
1271
|
return;
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1273
|
+
const parsedValue = parsePropertyValue(
|
|
1274
|
+
newValue,
|
|
1275
|
+
memberFlags);
|
|
1276
|
+
const setterSetVal = (val) => {
|
|
1274
1277
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
1275
1278
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1276
1279
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
1277
1280
|
}
|
|
1278
|
-
ref.$lazyInstance$[memberName] =
|
|
1279
|
-
newValue,
|
|
1280
|
-
memberFlags);
|
|
1281
|
+
ref.$lazyInstance$[memberName] = val;
|
|
1281
1282
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1282
1283
|
};
|
|
1283
1284
|
if (ref.$lazyInstance$) {
|
|
1284
|
-
setterSetVal();
|
|
1285
|
+
setterSetVal(parsedValue);
|
|
1285
1286
|
} else {
|
|
1287
|
+
ref.$instanceValues$.set(memberName, parsedValue);
|
|
1286
1288
|
ref.$fetchedCbList$.push(() => {
|
|
1287
|
-
|
|
1289
|
+
const pendingValue = ref.$instanceValues$.get(memberName);
|
|
1290
|
+
if (ref.$lazyInstance$[memberName] !== pendingValue) {
|
|
1291
|
+
setterSetVal(pendingValue);
|
|
1292
|
+
}
|
|
1288
1293
|
});
|
|
1289
1294
|
}
|
|
1290
1295
|
}
|
|
@@ -1338,8 +1343,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1338
1343
|
if (isBooleanTarget) {
|
|
1339
1344
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
1340
1345
|
}
|
|
1346
|
+
const currentValue = propMemberFlags & 4096 /* Setter */ ? hostRef.$instanceValues$.get(propName) : this[propName];
|
|
1341
1347
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1342
|
-
if (!isSpuriousBooleanRemoval && newValue !=
|
|
1348
|
+
if (!isSpuriousBooleanRemoval && newValue != currentValue && (!propDesc.get || !!propDesc.set)) {
|
|
1343
1349
|
this[propName] = newValue;
|
|
1344
1350
|
}
|
|
1345
1351
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './p-
|
|
2
|
-
export { s as setNonce } from './p-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './p-C8PnHbLt.js';
|
|
2
|
+
export { s as setNonce } from './p-C8PnHbLt.js';
|
|
3
3
|
import { g as globalScripts } from './p-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.45.1 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
var patchBrowser = () => {
|
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["p-
|
|
20
|
+
return bootstrapLazy([["p-40097a38",[[513,"kritzel-engine",{"workspaces":[16],"editorId":[1,"editor-id"],"activeWorkspaceId":[1,"active-workspace-id"],"syncConfig":[16],"assetStorageConfig":[16],"user":[16],"tools":[16],"globalContextMenuItems":[16],"objectContextMenuItems":[16],"scaleMax":[1026,"scale-max"],"scaleMin":[1026,"scale-min"],"cursorTarget":[16],"lockDrawingScale":[4,"lock-drawing-scale"],"theme":[1],"licenseKey":[1,"license-key"],"themes":[16],"locale":[1],"locales":[16],"fallbackLocale":[1,"fallback-locale"],"viewportBoundaryLeft":[2,"viewport-boundary-left"],"viewportBoundaryRight":[2,"viewport-boundary-right"],"viewportBoundaryTop":[2,"viewport-boundary-top"],"viewportBoundaryBottom":[2,"viewport-boundary-bottom"],"debugInfo":[16],"isPanningEnabled":[4,"is-panning-enabled"],"isZoomingEnabled":[4,"is-zooming-enabled"],"forceUpdate":[32],"triggerSelectionChange":[64],"beginSceneBootstrap":[64],"endSceneBootstrap":[64],"registerTool":[64],"setActiveTool":[64],"disable":[64],"enable":[64],"delete":[64],"copy":[64],"cut":[64],"paste":[64],"bringForward":[64],"sendBackward":[64],"bringToFront":[64],"sendToBack":[64],"alignObjects":[64],"group":[64],"ungroup":[64],"undo":[64],"redo":[64],"hideContextMenu":[64],"openContextMenu":[64],"getObjectById":[64],"getAllObjects":[64],"findObjects":[64],"getObjectsTotalCount":[64],"addObject":[64],"addObjects":[64],"updateObject":[64],"removeObject":[64],"removeObjects":[64],"getSelectedObjects":[64],"getDisplayableShortcuts":[64],"selectObjects":[64],"selectAllObjectsInViewport":[64],"clearSelection":[64],"centerObjectInViewport":[64],"panToObject":[64],"backToContent":[64],"centerAllObjects":[64],"centerObjects":[64],"setViewport":[64],"panTo":[64],"zoomTo":[64],"zoomIn":[64],"zoomOut":[64],"getViewport":[64],"screenToWorld":[64],"worldToScreen":[64],"getObjectsInViewport":[64],"getScreenshot":[64],"exportViewportAsPng":[64],"exportViewportAsSvg":[64],"getSelectedObjectSupportedExportFormats":[64],"canExportSelectedObjectAs":[64],"exportSelectedObject":[64],"exportAsJson":[64],"importFromJson":[64],"loadObjectsFromJson":[64],"downloadAsJson":[64],"importFromFile":[64],"cancelImportFromFile":[64],"setActiveWorkspace":[64],"createWorkspace":[64],"updateWorkspace":[64],"deleteWorkspace":[64],"getWorkspaces":[64],"getActiveWorkspace":[64],"getIsPublic":[64],"loadSharedWorkspace":[64],"reinitSync":[64],"saveSettings":[64],"loadSettings":[64],"registerLocales":[64],"configureLocales":[64],"setLocale":[64],"getLocale":[64],"getAvailableLocales":[64],"getAvailableLocaleOptions":[64],"t":[64],"getResolvedTerms":[64],"getTool":[64]},[[1,"wheel","handleWheel"],[0,"pointerdown","handlePointerDown"],[0,"pointermove","handlePointerMove"],[0,"pointerup","handlePointerUp"],[0,"pointercancel","handlePointerCancel"],[1,"pointerleave","handlePointerLeave"],[1,"longpress","handleLongPress"],[0,"contextmenu","handleContextMenu"],[9,"resize","handleResize"],[8,"keydown","handleKeyDown"],[8,"keyup","handleKeyUp"],[8,"copy","handleCopy"],[8,"cut","handleCut"],[8,"paste","handlePaste"],[4,"dblclick","preventDoubleTapZoomOnTouchDevices"]],{"workspaces":[{"onWorkspacesPropChange":0}],"activeWorkspaceId":[{"onActiveWorkspaceIdChange":0}],"syncConfig":[{"onSyncConfigChange":0}],"assetStorageConfig":[{"onAssetStorageConfigChange":0}],"user":[{"onUserChange":0}],"tools":[{"onToolsChange":0}],"globalContextMenuItems":[{"onGlobalContextMenuItemsChange":0}],"objectContextMenuItems":[{"onObjectContextMenuItemsChange":0}],"scaleMax":[{"validateScaleMax":0}],"scaleMin":[{"validateScaleMin":0}],"cursorTarget":[{"onCursorTargetChange":0}],"lockDrawingScale":[{"onLockDrawingScaleChange":0}],"theme":[{"onThemeChange":0}],"licenseKey":[{"onLicenseKeyChange":0}],"themes":[{"onThemesChange":0}],"locale":[{"onLocaleChange":0}],"locales":[{"onLocalesChange":0}],"fallbackLocale":[{"onFallbackLocaleChange":0}],"viewportBoundaryLeft":[{"onViewportBoundaryLeftChange":0}],"viewportBoundaryRight":[{"onViewportBoundaryRightChange":0}],"viewportBoundaryTop":[{"onViewportBoundaryTopChange":0}],"viewportBoundaryBottom":[{"onViewportBoundaryBottomChange":0}],"debugInfo":[{"onDebugInfoChange":0}]}],[513,"kritzel-awareness-cursors",{"core":[16],"showEdgeIndicators":[4,"show-edge-indicators"],"edgeIndicatorPadding":[2,"edge-indicator-padding"],"remoteCursors":[32],"objectVersion":[32]}],[513,"kritzel-cursor-trail",{"core":[16],"cursorTrailPoints":[32],"isLeftButtonDown":[32]},[[9,"pointerdown","handleMouseDown"],[9,"pointermove","handlePointerMove"],[9,"pointerup","handlePointerUp"]]],[513,"kritzel-icon",{"name":[1],"label":[1],"size":[2]}],[513,"kritzel-watermark",{"core":[16],"label":[1]}]]]], options);
|
|
21
21
|
});
|