@limetech/lime-elements 39.44.6 → 39.45.1
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 +21 -0
- package/dist/cjs/limel-form.cjs.entry.js +41 -9
- package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +778 -395
- package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +6 -6
- package/dist/cjs/{markdown-parser-ChnRAxpZ.js → markdown-parser-YH5HSSgF.js} +36 -56
- package/dist/collection/components/text-editor/link-menu/editor-link-menu.js +6 -6
- package/dist/collection/components/text-editor/prosemirror-adapter/editor-config.js +12 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-command-utils/active-state-utils.js +36 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-command-utils/list-utils.js +270 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-command-utils/node-utils.js +15 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/menu/menu-commands.js +81 -69
- package/dist/collection/components/text-editor/prosemirror-adapter/plugins/list-key-handler.js +44 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +4 -3
- package/dist/esm/limel-form.entry.js +41 -9
- package/dist/esm/limel-markdown.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +779 -396
- package/dist/esm/limel-text-editor-link-menu.entry.js +6 -6
- package/dist/esm/{markdown-parser-BSQKleVw.js → markdown-parser-DrxxGLF5.js} +36 -56
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-1f29f482.entry.js +1 -0
- package/dist/lime-elements/{p-3ea159fd.entry.js → p-38393fb4.entry.js} +1 -1
- package/dist/lime-elements/{p-1fb4bfa9.entry.js → p-421612f9.entry.js} +2 -2
- package/dist/lime-elements/{p-B0qhUema.js → p-C9xHOCE_.js} +2 -2
- package/dist/lime-elements/p-d97df2cd.entry.js +1 -0
- package/dist/types/components/text-editor/link-menu/editor-link-menu.d.ts +2 -2
- package/dist/types/components/text-editor/prosemirror-adapter/menu/menu-command-utils/active-state-utils.d.ts +6 -0
- package/dist/types/components/text-editor/prosemirror-adapter/menu/menu-command-utils/list-utils.d.ts +68 -0
- package/dist/types/components/text-editor/prosemirror-adapter/menu/menu-command-utils/node-utils.d.ts +10 -0
- package/dist/types/components/text-editor/prosemirror-adapter/menu/menu-commands.d.ts +10 -0
- package/dist/types/components/text-editor/prosemirror-adapter/plugins/list-key-handler.d.ts +14 -0
- package/package.json +4 -4
- package/dist/lime-elements/p-845cfda7.entry.js +0 -1
- package/dist/lime-elements/p-e8df7a2e.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [39.45.1](https://github.com/Lundalogik/lime-elements/compare/v39.45.0...v39.45.1) (2026-08-17)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **text-editor:** focus the link field when the link menu opens ([1226d6a](https://github.com/Lundalogik/lime-elements/commit/1226d6a6e3e0fdf3f85a676c1355fb891a8081f7))
|
|
7
|
+
|
|
8
|
+
## [39.45.0](https://github.com/Lundalogik/lime-elements/compare/v39.44.6...v39.45.0) (2026-08-17)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
* **text editor:** handle tab, enter and backspace inside lists ([b10f2de](https://github.com/Lundalogik/lime-elements/commit/b10f2de2f0f6b4fcbc563e295b93f9bd1cd80282))
|
|
14
|
+
* **text editor:** toggle, convert, wrap and unify lists from the menu ([6aae41c](https://github.com/Lundalogik/lime-elements/commit/6aae41c0d022f16bb5dd4c5646cde03bdd99b381))
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* **text editor:** align list command applicability between keymap and toolbar ([50fcdb6](https://github.com/Lundalogik/lime-elements/commit/50fcdb6816eae789283fe149cbf622eb5c1a15c0))
|
|
19
|
+
* **text editor:** disable disallowed menu items instead of hiding them ([dd2b235](https://github.com/Lundalogik/lime-elements/commit/dd2b235f06ec4a1b66627de1222bfde8050978f2))
|
|
20
|
+
* **text editor:** stop block toggles from crashing on select-all ([64e861f](https://github.com/Lundalogik/lime-elements/commit/64e861f4ce48a70d09b5d9834d987a08875d2ded))
|
|
21
|
+
|
|
1
22
|
## [39.44.6](https://github.com/Lundalogik/lime-elements/compare/v39.44.5...v39.44.6) (2026-08-13)
|
|
2
23
|
|
|
3
24
|
### Bug Fixes
|
|
@@ -26303,19 +26303,28 @@ function hashString(string) {
|
|
|
26303
26303
|
}
|
|
26304
26304
|
return hash.toString(16);
|
|
26305
26305
|
}
|
|
26306
|
-
/**
|
|
26306
|
+
/** Recursively serializes a value to JSON with object keys sorted alphabetically to produce
|
|
26307
|
+
* a stable string representation.
|
|
26307
26308
|
*
|
|
26308
26309
|
* @param object - The object for which the sorted stringify is desired
|
|
26309
26310
|
* @returns - The stringified object with keys sorted in a consistent order
|
|
26310
26311
|
*/
|
|
26311
26312
|
function sortedJSONStringify(object) {
|
|
26312
|
-
|
|
26313
|
-
|
|
26314
|
-
|
|
26315
|
-
|
|
26316
|
-
return
|
|
26317
|
-
}
|
|
26318
|
-
|
|
26313
|
+
function shouldIncludeValue(value) {
|
|
26314
|
+
return value !== undefined && typeof value !== 'function' && typeof value !== 'symbol';
|
|
26315
|
+
}
|
|
26316
|
+
if (Array.isArray(object)) {
|
|
26317
|
+
return `[${object.map((x) => (x === undefined ? 'undefined' : sortedJSONStringify(x))).join(',')}]`;
|
|
26318
|
+
}
|
|
26319
|
+
if (object === null || typeof object !== 'object') {
|
|
26320
|
+
return JSON.stringify(typeof object === 'function' ? null : object); // Normalise functions
|
|
26321
|
+
}
|
|
26322
|
+
const record = object;
|
|
26323
|
+
const sortedValues = Object.keys(record)
|
|
26324
|
+
.sort()
|
|
26325
|
+
.filter((key) => shouldIncludeValue(record[key]))
|
|
26326
|
+
.map((key) => `${JSON.stringify(key)}:${sortedJSONStringify(record[key])}`);
|
|
26327
|
+
return `{${sortedValues.join(',')}}`;
|
|
26319
26328
|
}
|
|
26320
26329
|
/** Stringifies an `object` and returns the hash of the resulting string. Sorts object fields
|
|
26321
26330
|
* in consistent order before stringify to prevent different hash ids for the same object.
|
|
@@ -39693,6 +39702,17 @@ class AJV8Validator {
|
|
|
39693
39702
|
}
|
|
39694
39703
|
catch (err) {
|
|
39695
39704
|
compilationError = err;
|
|
39705
|
+
// AJV registers a schema in its internal cache before running meta-schema
|
|
39706
|
+
// validation. When that check throws, the broken schema stays cached so
|
|
39707
|
+
// subsequent compile() calls skip revalidation and return silently. Remove
|
|
39708
|
+
// the entry so every call with an invalid schema consistently produces a
|
|
39709
|
+
// compilation error. For schemas with $id the cache key is the id string;
|
|
39710
|
+
// for anonymous schemas AJV uses the object reference as the key.
|
|
39711
|
+
// Guard with compiledValidator === undefined so that a runtime error thrown
|
|
39712
|
+
// by compiledValidator(formData) does not evict a correctly-compiled schema.
|
|
39713
|
+
if (compiledValidator === undefined) {
|
|
39714
|
+
this.ajv.removeSchema(schema[ID_KEY] !== undefined ? schema[ID_KEY] : schema);
|
|
39715
|
+
}
|
|
39696
39716
|
}
|
|
39697
39717
|
let errors;
|
|
39698
39718
|
if (compiledValidator) {
|
|
@@ -39799,13 +39819,17 @@ class AJV8Validator {
|
|
|
39799
39819
|
*/
|
|
39800
39820
|
isValid(schema, formData, rootSchema) {
|
|
39801
39821
|
var _a;
|
|
39822
|
+
// schemaId and compiled are declared outside the try so the catch block can
|
|
39823
|
+
// conditionally remove the broken schema from AJV's registry.
|
|
39824
|
+
let schemaId;
|
|
39825
|
+
let compiled = false;
|
|
39802
39826
|
try {
|
|
39803
39827
|
this.handleSchemaUpdate(rootSchema);
|
|
39804
39828
|
// then rewrite the schema ref's to point to the rootSchema
|
|
39805
39829
|
// this accounts for the case where schema have references to models
|
|
39806
39830
|
// that lives in the rootSchema but not in the schema in question.
|
|
39807
39831
|
const schemaWithIdRefPrefix = withIdRefPrefix(schema);
|
|
39808
|
-
|
|
39832
|
+
schemaId = (_a = schemaWithIdRefPrefix[ID_KEY]) !== null && _a !== void 0 ? _a : hashForSchema(schemaWithIdRefPrefix);
|
|
39809
39833
|
let compiledValidator;
|
|
39810
39834
|
compiledValidator = this.ajv.getSchema(schemaId);
|
|
39811
39835
|
if (compiledValidator === undefined) {
|
|
@@ -39816,12 +39840,20 @@ class AJV8Validator {
|
|
|
39816
39840
|
this.ajv.addSchema(schemaWithIdRefPrefix, schemaId).getSchema(schemaId) ||
|
|
39817
39841
|
this.ajv.compile(schemaWithIdRefPrefix);
|
|
39818
39842
|
}
|
|
39843
|
+
compiled = true;
|
|
39819
39844
|
const result = compiledValidator(formData);
|
|
39820
39845
|
return result;
|
|
39821
39846
|
}
|
|
39822
39847
|
catch (e) {
|
|
39823
39848
|
// oxlint-disable-next-line no-console
|
|
39824
39849
|
console.warn('Error encountered compiling schema:', e);
|
|
39850
|
+
// Remove the broken schema from AJV's registry so a subsequent rawValidation
|
|
39851
|
+
// or isValid call does not silently reuse a cached entry that bypassed
|
|
39852
|
+
// meta-schema validation. Guard with !compiled so that a runtime error thrown
|
|
39853
|
+
// by compiledValidator(formData) does not evict a correctly-compiled schema.
|
|
39854
|
+
if (!compiled && schemaId !== undefined) {
|
|
39855
|
+
this.ajv.removeSchema(schemaId);
|
|
39856
|
+
}
|
|
39825
39857
|
return false;
|
|
39826
39858
|
}
|
|
39827
39859
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index$1 = require('./index-DYg_7kkT.js');
|
|
4
|
-
var markdownParser = require('./markdown-parser-
|
|
4
|
+
var markdownParser = require('./markdown-parser-YH5HSSgF.js');
|
|
5
5
|
var config = require('./config-dit--4m5.js');
|
|
6
6
|
var index = require('./index-ETPz91V5.js');
|
|
7
7
|
var adaptColorContrast = require('./adapt-color-contrast-Beo1IEl_.js');
|