@limetech/lime-elements 39.44.1 → 39.44.2
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 +8 -0
- package/dist/cjs/limel-form.cjs.entry.js +55 -2
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +10806 -10737
- package/dist/collection/components/text-editor/prosemirror-adapter/editor-config.js +75 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.js +52 -51
- package/dist/esm/limel-form.entry.js +55 -2
- package/dist/esm/limel-prosemirror-adapter.entry.js +10806 -10737
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-49f810e0.entry.js +1 -0
- package/dist/lime-elements/{p-09fb0765.entry.js → p-68eda654.entry.js} +1 -1
- package/dist/types/components/text-editor/prosemirror-adapter/editor-config.d.ts +60 -0
- package/dist/types/components/text-editor/prosemirror-adapter/prosemirror-adapter.d.ts +3 -1
- package/dist/types/components.d.ts +5 -3
- package/dist/types/util/link-helper.d.ts +1 -1
- package/package.json +4 -2
- package/dist/lime-elements/p-10186cbd.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [39.44.2](https://github.com/Lundalogik/lime-elements/compare/v39.44.1...v39.44.2) (2026-08-06)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **text-editor:** cancel pending caret restore when the editor is disconnected ([99db91e](https://github.com/Lundalogik/lime-elements/commit/99db91e50139330bc5e4b7076d89a0a5bef672ec))
|
|
7
|
+
* **text-editor:** keep caret position when focus is regained without a click ([2ba040a](https://github.com/Lundalogik/lime-elements/commit/2ba040ae7324c6e2071fd35994b9dbd6d5082987))
|
|
8
|
+
|
|
1
9
|
## [39.44.1](https://github.com/Lundalogik/lime-elements/compare/v39.44.0...v39.44.1) (2026-07-14)
|
|
2
10
|
|
|
3
11
|
### Bug Fixes
|
|
@@ -20541,7 +20541,12 @@ function requireFastUri () {
|
|
|
20541
20541
|
*/
|
|
20542
20542
|
function resolve (baseURI, relativeURI, options) {
|
|
20543
20543
|
const schemelessOptions = options ? Object.assign({ scheme: 'null' }, options) : { scheme: 'null' };
|
|
20544
|
-
const
|
|
20544
|
+
const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
|
|
20545
|
+
const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
|
|
20546
|
+
if (baseMalformed || relativeMalformed) {
|
|
20547
|
+
throw new Error(baseParsed.error || relativeParsed.error || 'URI is malformed.')
|
|
20548
|
+
}
|
|
20549
|
+
const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
|
|
20545
20550
|
schemelessOptions.skipEscape = true;
|
|
20546
20551
|
return serialize(resolved, schemelessOptions)
|
|
20547
20552
|
}
|
|
@@ -20717,6 +20722,19 @@ function requireFastUri () {
|
|
|
20717
20722
|
|
|
20718
20723
|
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
20719
20724
|
|
|
20725
|
+
// Captures the authority component (between "//" and the next "/", "?" or "#"),
|
|
20726
|
+
// with or without a scheme prefix, for the literal-backslash rejection below.
|
|
20727
|
+
const AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
20728
|
+
|
|
20729
|
+
// Captures the leading authority-introducer region after an optional scheme: a
|
|
20730
|
+
// run of forward slashes, backslashes, and the characters the WHATWG URL parser
|
|
20731
|
+
// removes before parsing (TAB U+0009, LF U+000A, CR U+000D). A valid introducer
|
|
20732
|
+
// is exactly "//". Node treats "\" as "/" on special schemes and strips those
|
|
20733
|
+
// characters first, so forms like "\\", "/\", "\/", "/<TAB>/", or a leading
|
|
20734
|
+
// "<TAB>//" reach an authority in Node while fast-uri's URI_PARSE folds them into
|
|
20735
|
+
// the path group (host confusion / SSRF / redirect bypass).
|
|
20736
|
+
const AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
|
|
20737
|
+
|
|
20720
20738
|
/**
|
|
20721
20739
|
* @param {import('./types/index').URIComponent} parsed
|
|
20722
20740
|
* @param {RegExpMatchArray} matches
|
|
@@ -20763,6 +20781,41 @@ function requireFastUri () {
|
|
|
20763
20781
|
}
|
|
20764
20782
|
}
|
|
20765
20783
|
|
|
20784
|
+
// A literal backslash (U+005C) is not a valid RFC 3986 URI character and is
|
|
20785
|
+
// not an authority delimiter. Reject it in the authority rather than
|
|
20786
|
+
// rewriting it: normalizing "\" -> "/" (WHATWG error recovery) could silently
|
|
20787
|
+
// change the resource identified by an otherwise-invalid input, and lets "\"
|
|
20788
|
+
// act as a host delimiter here while Node's native URL parses a different
|
|
20789
|
+
// host (SSRF / redirect / origin-allowlist bypass). Percent-encoded %5C is
|
|
20790
|
+
// untouched and remains valid encoded data.
|
|
20791
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
20792
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf('\\') !== -1) {
|
|
20793
|
+
parsed.error = 'URI authority must not contain a literal backslash.';
|
|
20794
|
+
malformedAuthorityOrPort = true;
|
|
20795
|
+
}
|
|
20796
|
+
|
|
20797
|
+
// Reject a malformed or whitespace-smuggled authority introducer. fast-uri
|
|
20798
|
+
// only recognizes a literal "//"; anything else in the leading separator run
|
|
20799
|
+
// (a backslash, or a "//" that appears only after removing the TAB/LF/CR that
|
|
20800
|
+
// Node strips) means the authority fast-uri parses differs from the one Node's
|
|
20801
|
+
// URL resolves. Reject rather than rewrite, mirroring the literal-backslash
|
|
20802
|
+
// guard above. Percent-encoded forms (%5C, %09) are untouched, valid data.
|
|
20803
|
+
const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
|
|
20804
|
+
if (introducerMatch !== null) {
|
|
20805
|
+
const region = introducerMatch[1];
|
|
20806
|
+
const normalizedRegion = region.replace(/[\t\n\r]/g, '');
|
|
20807
|
+
// Two or more leading separators introduce an authority.
|
|
20808
|
+
if (normalizedRegion.length >= 2) {
|
|
20809
|
+
if (normalizedRegion.slice(0, 2) !== '//') {
|
|
20810
|
+
parsed.error = parsed.error || 'URI authority must not contain a literal backslash.';
|
|
20811
|
+
malformedAuthorityOrPort = true;
|
|
20812
|
+
} else if (region.length !== normalizedRegion.length) {
|
|
20813
|
+
parsed.error = parsed.error || 'URI authority introducer must not contain whitespace.';
|
|
20814
|
+
malformedAuthorityOrPort = true;
|
|
20815
|
+
}
|
|
20816
|
+
}
|
|
20817
|
+
}
|
|
20818
|
+
|
|
20766
20819
|
const matches = uri.match(URI_PARSE);
|
|
20767
20820
|
|
|
20768
20821
|
if (matches) {
|
|
@@ -20820,7 +20873,7 @@ function requireFastUri () {
|
|
|
20820
20873
|
if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
20821
20874
|
// convert Unicode IDN -> ASCII IDN
|
|
20822
20875
|
try {
|
|
20823
|
-
parsed.host = URL
|
|
20876
|
+
parsed.host = new URL('http://' + parsed.host).hostname;
|
|
20824
20877
|
} catch (e) {
|
|
20825
20878
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
20826
20879
|
}
|