@limetech/lime-elements 37.57.5 → 37.57.6
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 +19 -0
- package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/{markdown-parser-ae3795b9.js → markdown-parser-38bfbd42.js} +27 -16
- package/dist/cjs/{markdown-parser-ae3795b9.js.map → markdown-parser-38bfbd42.js.map} +1 -1
- package/dist/esm/limel-markdown.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/{markdown-parser-453ad769.js → markdown-parser-a51f65f6.js} +27 -16
- package/dist/esm/{markdown-parser-453ad769.js.map → markdown-parser-a51f65f6.js.map} +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-19405595.entry.js → p-1bbb0dca.entry.js} +2 -2
- package/dist/lime-elements/{p-ba3d2850.js → p-379b68fd.js} +2 -2
- package/dist/lime-elements/{p-ba3d2850.js.map → p-379b68fd.js.map} +1 -1
- package/dist/lime-elements/{p-cf66a132.entry.js → p-b054f9de.entry.js} +2 -2
- package/package.json +1 -1
- /package/dist/lime-elements/{p-19405595.entry.js.map → p-1bbb0dca.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-cf66a132.entry.js.map → p-b054f9de.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-6156b4fd.js';
|
|
2
|
-
import { m as markdownToHTML } from './markdown-parser-
|
|
2
|
+
import { m as markdownToHTML } from './markdown-parser-a51f65f6.js';
|
|
3
3
|
import './_commonjsHelpers-5ec8f9b7.js';
|
|
4
4
|
|
|
5
5
|
const markdownCss = "@charset \"UTF-8\";code{font-family:ui-monospace, \"Cascadia Code\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace;font-size:0.8125rem;letter-spacing:-0.0125rem;color:rgb(var(--contrast-1300));-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none;display:inline-block;border-radius:0.25rem;padding:0.03125rem 0.25rem;background-color:rgb(var(--contrast-600))}pre>code{display:block;margin:0.5rem 0;padding:0.5rem 0.75rem;overflow:auto;white-space:pre-wrap}h1{font-size:1.5rem}h2{font-size:1.25rem}h3{font-size:1.125rem}h4{font-size:1rem}h5{font-size:0.875rem}h6{font-size:0.75rem}h1,h2{margin-top:0.5rem;margin-bottom:0.5rem;letter-spacing:-0.03125rem;font-weight:500}h3,h4{margin-top:0.75rem;margin-bottom:0.25rem;font-weight:600}h5,h6{margin-top:0.5rem;margin-bottom:0.125rem;font-weight:600}h1,h2,h3,h4,h5,h6{word-break:break-word;hyphens:auto;-webkit-hyphens:auto}:not([contenteditable=true]) h1,:not([contenteditable=true]) h2,:not([contenteditable=true]) h3,:not([contenteditable=true]) h4,:not([contenteditable=true]) h5,:not([contenteditable=true]) h6{text-wrap:balance}[contenteditable=true] h1,[contenteditable=true] h2,[contenteditable=true] h3,[contenteditable=true] h4,[contenteditable=true] h5,[contenteditable=true] h6{text-wrap:initial}:host(limel-markdown.truncate-paragraphs) p{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}p,li{font-size:0.875rem;word-break:break-word;hyphens:auto;-webkit-hyphens:auto}a{word-break:break-all}p{margin-top:0;margin-bottom:0.5rem}p:only-child{margin-bottom:0}a{transition:color 0.2s ease;color:var(--markdown-hyperlink-color, rgb(var(--color-blue-dark)));text-decoration:none}a:hover{color:var(--markdown-hyperlink-color--hovered, rgb(var(--color-blue-default)))}hr{margin:1.75rem 0 2rem 0;border-width:0;border-top:1px solid rgb(var(--contrast-500))}ul{list-style:none}ul li{position:relative;margin-left:0.75rem}ul li:before{content:\"\";position:absolute;left:-0.5rem;top:0.5rem;width:0.25rem;height:0.25rem;border-radius:50%;background-color:rgb(var(--contrast-700));display:block}ol{margin-top:0.25rem;padding-left:1rem}ul{margin-top:0.25rem;padding-left:0}ul ul,ul ol,ol ol,ol ul{margin-left:0}li{margin-bottom:0.25rem}:host(limel-markdown:not(.no-table-styles)) table{table-layout:auto;min-width:100%;border-collapse:collapse;border-spacing:0;background:transparent;margin:0.75rem 0;border:1px solid rgb(var(--contrast-400))}:host(limel-markdown:not(.no-table-styles)) th,:host(limel-markdown:not(.no-table-styles)) td{text-align:left;vertical-align:top;transition:background-color 0.2s ease;font-size:0.875rem}:host(limel-markdown:not(.no-table-styles)) td{padding:0.5rem 0.375rem 0.75rem 0.375rem}:host(limel-markdown:not(.no-table-styles)) tr th{background-color:rgb(var(--contrast-400));padding:0.25rem 0.375rem;font-weight:normal}:host(limel-markdown:not(.no-table-styles)) tr th:only-child{text-align:center}:host(limel-markdown:not(.no-table-styles)) tbody tr:nth-child(odd) td{background-color:rgb(var(--contrast-200))}:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td{background-color:rgb(var(--contrast-300))}blockquote{position:relative;font-weight:100;font-size:0.875rem;max-width:100%;line-height:1.4;margin:0;padding:0.5rem 1.25rem;border-radius:0.05rem 0.75rem;background-color:rgb(var(--contrast-300))}blockquote:before,blockquote:after{position:absolute;font-size:2.75rem;opacity:0.4}blockquote:before{content:\"“\";left:0;top:-0.75rem}blockquote:after{content:\"”\";right:0;bottom:-2rem}dl{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;margin-bottom:2rem;border:1px solid rgb(var(--contrast-400));border-radius:0.375rem;background-color:rgb(var(--contrast-200))}dl dt,dl dd{padding:0.375rem 0.5rem;font-size:0.875rem;margin:0}dl dt:nth-of-type(even),dl dd:nth-of-type(even){background-color:rgb(var(--contrast-300))}dl dt:first-child{border-top-left-radius:0.375rem}dl dt:last-child{border-bottom-left-radius:0.375rem}dl dd:first-child{border-top-right-radius:0.375rem}dl dd:last-child{border-bottom-right-radius:0.375rem}hr{border-top:1px solid rgb(var(--contrast-700))}img{max-width:100%}.MsoNormal{margin:0}";
|
|
@@ -5,7 +5,7 @@ import { k as keysIn, b as getSymbolsIn, g as getPrototype, a as getAllKeysIn }
|
|
|
5
5
|
import { i as isObject$1, r as root, S as Symbol } from './isObject-c74e273c.js';
|
|
6
6
|
import { i as isArray } from './isArray-80298bc7.js';
|
|
7
7
|
import { i as isObjectLike } from './isObjectLike-38996507.js';
|
|
8
|
-
import { d as decodeHTML, m as markdownToHTML } from './markdown-parser-
|
|
8
|
+
import { d as decodeHTML, m as markdownToHTML } from './markdown-parser-a51f65f6.js';
|
|
9
9
|
import { t as translate$1 } from './translations-aee148ca.js';
|
|
10
10
|
import { c as createRandomString } from './random-string-812b1c35.js';
|
|
11
11
|
import { i as isItem } from './isItem-b0459122.js';
|
|
@@ -42676,6 +42676,8 @@ function zwitch(key, options) {
|
|
|
42676
42676
|
* @typedef {import('hast').RootContent} RootContent
|
|
42677
42677
|
* @typedef {import('hast').Text} Text
|
|
42678
42678
|
*
|
|
42679
|
+
* @typedef {import('hast-util-raw').Options} Options
|
|
42680
|
+
*
|
|
42679
42681
|
* @typedef {import('mdast-util-to-hast').Raw} Raw
|
|
42680
42682
|
*
|
|
42681
42683
|
* @typedef {import('parse5').DefaultTreeAdapterMap} DefaultTreeAdapterMap
|
|
@@ -42687,8 +42689,6 @@ function zwitch(key, options) {
|
|
|
42687
42689
|
* @typedef {import('parse5').Token.TagToken} TagToken
|
|
42688
42690
|
*
|
|
42689
42691
|
* @typedef {import('unist').Point} Point
|
|
42690
|
-
*
|
|
42691
|
-
* @typedef {import('vfile').VFile} VFile
|
|
42692
42692
|
*/
|
|
42693
42693
|
|
|
42694
42694
|
// Node types associated with MDX.
|
|
@@ -42833,6 +42833,15 @@ function element(node, state) {
|
|
|
42833
42833
|
* Nothing.
|
|
42834
42834
|
*/
|
|
42835
42835
|
function text(node, state) {
|
|
42836
|
+
// Allow `DATA` through `PLAINTEXT`,
|
|
42837
|
+
// but when hanging in a tag for example,
|
|
42838
|
+
// switch back to `DATA`.
|
|
42839
|
+
// Note: `State` is not exposed by `parse5`, so these numbers are fragile.
|
|
42840
|
+
// See: <https://github.com/inikulin/parse5/blob/46cba43/packages/parse5/lib/tokenizer/index.ts#L58>
|
|
42841
|
+
if (state.parser.tokenizer.state > 4) {
|
|
42842
|
+
state.parser.tokenizer.state = 0;
|
|
42843
|
+
}
|
|
42844
|
+
|
|
42836
42845
|
/** @type {CharacterToken} */
|
|
42837
42846
|
const token = {
|
|
42838
42847
|
type: TokenType.CHARACTER,
|
|
@@ -43155,6 +43164,8 @@ function setPoint(state, point) {
|
|
|
43155
43164
|
* Nothing.
|
|
43156
43165
|
*/
|
|
43157
43166
|
function startTag(node, state) {
|
|
43167
|
+
const tagName = node.tagName.toLowerCase();
|
|
43168
|
+
|
|
43158
43169
|
// Ignore tags if we’re in plain text.
|
|
43159
43170
|
if (state.parser.tokenizer.state === TokenizerMode.PLAINTEXT) return
|
|
43160
43171
|
|
|
@@ -43163,7 +43174,7 @@ function startTag(node, state) {
|
|
|
43163
43174
|
const current = state.parser.openElements.current;
|
|
43164
43175
|
let ns = 'namespaceURI' in current ? current.namespaceURI : webNamespaces$1.html;
|
|
43165
43176
|
|
|
43166
|
-
if (ns === webNamespaces$1.html &&
|
|
43177
|
+
if (ns === webNamespaces$1.html && tagName === 'svg') {
|
|
43167
43178
|
ns = webNamespaces$1.svg;
|
|
43168
43179
|
}
|
|
43169
43180
|
|
|
@@ -43172,19 +43183,18 @@ function startTag(node, state) {
|
|
|
43172
43183
|
{...node, children: []},
|
|
43173
43184
|
{space: ns === webNamespaces$1.svg ? 'svg' : 'html'}
|
|
43174
43185
|
);
|
|
43175
|
-
// Always element.
|
|
43176
|
-
/* c8 ignore next */
|
|
43177
|
-
const attrs = 'attrs' in result ? result.attrs : [];
|
|
43178
43186
|
|
|
43179
43187
|
/** @type {TagToken} */
|
|
43180
43188
|
const tag = {
|
|
43181
43189
|
type: TokenType.START_TAG,
|
|
43182
|
-
tagName
|
|
43183
|
-
tagID: getTagID(
|
|
43190
|
+
tagName,
|
|
43191
|
+
tagID: getTagID(tagName),
|
|
43184
43192
|
// We always send start and end tags.
|
|
43185
43193
|
selfClosing: false,
|
|
43186
43194
|
ackSelfClosing: false,
|
|
43187
|
-
|
|
43195
|
+
// Always element.
|
|
43196
|
+
/* c8 ignore next */
|
|
43197
|
+
attrs: 'attrs' in result ? result.attrs : [],
|
|
43188
43198
|
location: createParse5Location(node)
|
|
43189
43199
|
};
|
|
43190
43200
|
|
|
@@ -43204,7 +43214,7 @@ function startTag(node, state) {
|
|
|
43204
43214
|
// do, such as:
|
|
43205
43215
|
|
|
43206
43216
|
// Set a tag name, similar to how the tokenizer would do it.
|
|
43207
|
-
state.parser.tokenizer.lastStartTagName =
|
|
43217
|
+
state.parser.tokenizer.lastStartTagName = tagName;
|
|
43208
43218
|
|
|
43209
43219
|
// `inForeignNode` is correctly set by the parser.
|
|
43210
43220
|
}
|
|
@@ -43220,10 +43230,11 @@ function startTag(node, state) {
|
|
|
43220
43230
|
* Nothing.
|
|
43221
43231
|
*/
|
|
43222
43232
|
function endTag(node, state) {
|
|
43233
|
+
const tagName = node.tagName.toLowerCase();
|
|
43223
43234
|
// Do not emit closing tags for HTML void elements.
|
|
43224
43235
|
if (
|
|
43225
43236
|
!state.parser.tokenizer.inForeignNode &&
|
|
43226
|
-
htmlVoidElements.includes(
|
|
43237
|
+
htmlVoidElements.includes(tagName)
|
|
43227
43238
|
) {
|
|
43228
43239
|
return
|
|
43229
43240
|
}
|
|
@@ -43236,8 +43247,8 @@ function endTag(node, state) {
|
|
|
43236
43247
|
/** @type {TagToken} */
|
|
43237
43248
|
const tag = {
|
|
43238
43249
|
type: TokenType.END_TAG,
|
|
43239
|
-
tagName
|
|
43240
|
-
tagID: getTagID(
|
|
43250
|
+
tagName,
|
|
43251
|
+
tagID: getTagID(tagName),
|
|
43241
43252
|
selfClosing: false,
|
|
43242
43253
|
ackSelfClosing: false,
|
|
43243
43254
|
attrs: [],
|
|
@@ -43263,7 +43274,7 @@ function endTag(node, state) {
|
|
|
43263
43274
|
// tags:
|
|
43264
43275
|
if (
|
|
43265
43276
|
// Current element is closed.
|
|
43266
|
-
|
|
43277
|
+
tagName === state.parser.tokenizer.lastStartTagName &&
|
|
43267
43278
|
// `<textarea>` and `<title>`
|
|
43268
43279
|
(state.parser.tokenizer.state === TokenizerMode.RCDATA ||
|
|
43269
43280
|
// `<iframe>`, `<noembed>`, `<style>`, `<xmp>`
|
|
@@ -43288,7 +43299,7 @@ function documentMode(node) {
|
|
|
43288
43299
|
return Boolean(
|
|
43289
43300
|
head &&
|
|
43290
43301
|
(head.type === 'doctype' ||
|
|
43291
|
-
(head.type === 'element' && head.tagName === 'html'))
|
|
43302
|
+
(head.type === 'element' && head.tagName.toLowerCase() === 'html'))
|
|
43292
43303
|
)
|
|
43293
43304
|
}
|
|
43294
43305
|
|
|
@@ -44155,4 +44166,4 @@ async function markdownToHTML(text, options) {
|
|
|
44155
44166
|
|
|
44156
44167
|
export { decodeHTML as d, markdownToHTML as m };
|
|
44157
44168
|
|
|
44158
|
-
//# sourceMappingURL=markdown-parser-
|
|
44169
|
+
//# sourceMappingURL=markdown-parser-a51f65f6.js.map
|