@limetech/lime-elements 39.2.2 → 39.3.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [39.3.1](https://github.com/Lundalogik/lime-elements/compare/v39.3.0...v39.3.1) (2026-02-24)
2
+
3
+ ### Bug Fixes
4
+
5
+
6
+ * **card:** ensure small images won't create huge cards ([5227301](https://github.com/Lundalogik/lime-elements/commit/5227301739f68ae44a6abc7fcf9b0e82a7a4f5d6))
7
+
8
+ ## [39.3.0](https://github.com/Lundalogik/lime-elements/compare/v39.2.2...v39.3.0) (2026-02-23)
9
+
10
+ ### Features
11
+
12
+
13
+ * **markdown:** hydrate JSON attributes on whitelisted custom elements ([ef3a7a9](https://github.com/Lundalogik/lime-elements/commit/ef3a7a95d7340362dc7916fe16542e39278e74b0))
14
+
1
15
  ## [39.2.2](https://github.com/Lundalogik/lime-elements/compare/v39.2.1...v39.2.2) (2026-02-22)
2
16
 
3
17
  ### Bug Fixes
@@ -5,7 +5,7 @@ var isItem = require('./is-item-DMELyaao.js');
5
5
  var getIconProps = require('./get-icon-props-CwpDdQDI.js');
6
6
  var _3dTiltHoverEffect = require('./3d-tilt-hover-effect-DI8kt0Y0.js');
7
7
 
8
- const cardCss = () => `@charset "UTF-8";*{box-sizing:border-box;min-width:0;min-height:0}:host(limel-card){display:flex;border-radius:var(--card-border-radius, 0.95rem)}section{box-sizing:border-box;display:flex;gap:0.5rem;flex-direction:column}:host(limel-card[orientation=landscape]) section{flex-direction:row}section{width:100%;border-radius:var(--card-border-radius, 0.95rem);border:1px solid rgb(var(--contrast-500));padding:0.25rem;background-color:var(--card-background-color, rgb(var(--contrast-300)))}section:hover{border-color:transparent;background-color:var(--card-background-color--hovered, var(--card-background-color, rgb(var(--contrast-200))))}.body{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}img{transition:filter 0.6s ease;object-fit:cover;border-radius:calc(var(--card-border-radius, 0.95rem) / 1.4)}:host(limel-card[orientation=portrait]) img{width:100%}:host(limel-card[orientation=landscape]) img{flex-shrink:0;max-width:40%;height:100%}section:hover img,section:focus-visible img{transition-duration:0.2s;filter:saturate(1.3)}.markdown-wrapper{position:relative;flex-grow:1;display:flex;flex-direction:column}.markdown-wrapper limel-markdown{overflow-y:auto;flex-grow:1;padding:0.5rem 0.75rem}.markdown-wrapper::before{top:0;background:radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::after{bottom:0;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::before,.markdown-wrapper::after{content:"";pointer-events:none;position:absolute;right:0;left:0;height:0.75rem;opacity:0;transition:opacity 0.6s ease;background-repeat:no-repeat}.markdown-wrapper.can-scroll-up::before,.markdown-wrapper.can-scroll-down::after{opacity:1}header{flex-shrink:0;display:flex;justify-content:center;gap:0.5rem;padding:0.25rem 0.75rem}:host(limel-card[orientation=landscape]) header{padding-top:0.5rem}header:has(limel-icon){padding-left:0.25rem}header .headings{flex-grow:1;display:flex;flex-direction:column;gap:0.125rem}header .title{padding-right:1.25rem}header limel-icon{flex-shrink:0;width:2rem}header h1{font-size:1.125rem;font-weight:500;color:var(--card-heading-color, rgb(var(--contrast-1100)));letter-spacing:-0.03125rem}header h2{font-size:var(--limel-theme-default-font-size);font-weight:400;color:var(--card-subheading-color, rgb(var(--contrast-1000)))}header h1,header h2{word-break:break-word;hyphens:auto;-webkit-hyphens:auto;margin:0}limel-action-bar{flex-shrink:0;--action-bar-background-color:transparent;margin-left:auto}limel-3d-hover-effect-glow{border-radius:var(--card-border-radius, 0.95rem)}:host(limel-card){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-card){perspective:2000px}}section{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}section:focus{outline:none}section:hover,section:focus,section:focus-visible,section:focus-within{will-change:background-color, box-shadow, transform}section:hover,section:focus,section:focus-visible,section:active{transition-duration:0.2s}section:hover,section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}section:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}section:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}:host(limel-card[clickable]) section{cursor:pointer;box-shadow:var(--button-shadow-normal)}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}:host(limel-card[clickable]) section:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}`;
8
+ const cardCss = () => `@charset "UTF-8";*{box-sizing:border-box;min-width:0;min-height:0}:host(limel-card){display:flex;border-radius:var(--card-border-radius, 0.95rem)}section{box-sizing:border-box;display:flex;gap:0.5rem;flex-direction:column}:host(limel-card[orientation=landscape]) section{flex-direction:row}section{width:100%;border-radius:var(--card-border-radius, 0.95rem);border:1px solid rgb(var(--contrast-500));padding:0.25rem;background-color:var(--card-background-color, rgb(var(--contrast-300)))}section:hover{border-color:transparent;background-color:var(--card-background-color--hovered, var(--card-background-color, rgb(var(--contrast-200))))}.body{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}.image-wrapper{flex-shrink:0;display:flex;align-items:center;justify-content:center}:host(limel-card[orientation=portrait]) .image-wrapper{width:100%}:host(limel-card[orientation=landscape]) .image-wrapper{flex-shrink:0;max-width:40%;height:100%}:host(limel-card[orientation=landscape]) .image-wrapper img{height:100%}img{transition:filter 0.6s ease;object-fit:cover;border-radius:calc(var(--card-border-radius, 0.95rem) / 1.4);min-width:0.5rem;min-height:0.5rem;max-width:100%;max-height:100%}section:hover img,section:focus-visible img{transition-duration:0.2s;filter:saturate(1.3)}.markdown-wrapper{position:relative;flex-grow:1;display:flex;flex-direction:column}.markdown-wrapper limel-markdown{overflow-y:auto;flex-grow:1;padding:0.5rem 0.75rem}.markdown-wrapper::before{top:0;background:radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::after{bottom:0;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::before,.markdown-wrapper::after{content:"";pointer-events:none;position:absolute;right:0;left:0;height:0.75rem;opacity:0;transition:opacity 0.6s ease;background-repeat:no-repeat}.markdown-wrapper.can-scroll-up::before,.markdown-wrapper.can-scroll-down::after{opacity:1}header{flex-shrink:0;display:flex;justify-content:center;gap:0.5rem;padding:0.25rem 0.75rem}:host(limel-card[orientation=landscape]) header{padding-top:0.5rem}header:has(limel-icon){padding-left:0.25rem}header .headings{flex-grow:1;display:flex;flex-direction:column;gap:0.125rem}header .title{padding-right:1.25rem}header limel-icon{flex-shrink:0;width:2rem}header h1{font-size:1.125rem;font-weight:500;color:var(--card-heading-color, rgb(var(--contrast-1100)));letter-spacing:-0.03125rem}header h2{font-size:var(--limel-theme-default-font-size);font-weight:400;color:var(--card-subheading-color, rgb(var(--contrast-1000)))}header h1,header h2{word-break:break-word;hyphens:auto;-webkit-hyphens:auto;margin:0}limel-action-bar{flex-shrink:0;--action-bar-background-color:transparent;margin-left:auto}limel-3d-hover-effect-glow{border-radius:var(--card-border-radius, 0.95rem)}:host(limel-card){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-card){perspective:2000px}}section{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}section:focus{outline:none}section:hover,section:focus,section:focus-visible,section:focus-within{will-change:background-color, box-shadow, transform}section:hover,section:focus,section:focus-visible,section:active{transition-duration:0.2s}section:hover,section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}section:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}section:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}:host(limel-card[clickable]) section{cursor:pointer;box-shadow:var(--button-shadow-normal)}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}:host(limel-card[clickable]) section:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}`;
9
9
 
10
10
  const Card = class {
11
11
  constructor(hostRef) {
@@ -94,7 +94,7 @@ const Card = class {
94
94
  if (!((_a = this.image) === null || _a === void 0 ? void 0 : _a.src)) {
95
95
  return;
96
96
  }
97
- return index.h("img", { src: this.image.src, alt: this.image.alt, loading: "lazy" });
97
+ return (index.h("div", { class: "image-wrapper" }, index.h("img", { src: this.image.src, alt: this.image.alt, loading: "lazy" })));
98
98
  }
99
99
  renderHeader() {
100
100
  if (!this.heading && !this.subheading && !this.icon) {
@@ -35,6 +35,82 @@ class ImageIntersectionObserver {
35
35
  }
36
36
  }
37
37
 
38
+ /**
39
+ * After innerHTML is set on a container, custom elements receive all
40
+ * attribute values as strings. This function walks whitelisted custom
41
+ * elements and parses any attribute values that look like JSON objects
42
+ * or arrays, setting them as JS properties instead.
43
+ *
44
+ * This enables markdown content to include custom elements with complex
45
+ * props, e.g.:
46
+ * ```html
47
+ * <limel-chip text="GitHub" link='{"href":"https://github.com","target":"_blank"}'></limel-chip>
48
+ * ```
49
+ *
50
+ * @param container - The root element to search within.
51
+ * @param whitelist - The list of whitelisted custom element definitions.
52
+ */
53
+ function hydrateCustomElements(container, whitelist) {
54
+ if (!container || !(whitelist === null || whitelist === void 0 ? void 0 : whitelist.length)) {
55
+ return;
56
+ }
57
+ for (const definition of whitelist) {
58
+ const elements = container.querySelectorAll(definition.tagName);
59
+ for (const element of elements) {
60
+ hydrateElement(element, definition.attributes);
61
+ }
62
+ }
63
+ }
64
+ function hydrateElement(element, attributes) {
65
+ for (const attrName of attributes) {
66
+ const value = element.getAttribute(attrName);
67
+ if (!value) {
68
+ continue;
69
+ }
70
+ const parsed = tryParseJson(value);
71
+ if (parsed !== undefined) {
72
+ // Set the JS property (camelCase) instead of the attribute
73
+ const propName = attributeToPropName(attrName);
74
+ element[propName] = parsed;
75
+ }
76
+ }
77
+ }
78
+ function tryParseJson(value) {
79
+ const trimmed = value.trim();
80
+ if ((trimmed.startsWith('{') && trimmed.endsWith('}')) ||
81
+ (trimmed.startsWith('[') && trimmed.endsWith(']'))) {
82
+ try {
83
+ return JSON.parse(trimmed);
84
+ }
85
+ catch (_a) {
86
+ // The sanitizer may HTML-encode quotes inside attribute values.
87
+ // Try decoding common HTML entities before giving up.
88
+ try {
89
+ const decoded = trimmed
90
+ .replaceAll('&#x22;', '"')
91
+ .replaceAll('&#34;', '"')
92
+ .replaceAll('&quot;', '"')
93
+ .replaceAll('&#x27;', "'")
94
+ .replaceAll('&#39;', "'")
95
+ .replaceAll('&apos;', "'")
96
+ .replaceAll('&amp;', '&');
97
+ return JSON.parse(decoded);
98
+ }
99
+ catch (_b) {
100
+ return;
101
+ }
102
+ }
103
+ }
104
+ }
105
+ /**
106
+ * Convert a kebab-case attribute name to a camelCase property name.
107
+ * e.g. "menu-items" → "menuItems"
108
+ * @param attrName
109
+ */
110
+ function attributeToPropName(attrName) {
111
+ return attrName.replaceAll(/-([a-z])/g, (_, letter) => letter.toUpperCase());
112
+ }
113
+
38
114
  const markdownCss = () => `@charset "UTF-8";code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:var(--limel-theme-default-small-font-size);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:var(--limel-theme-default-font-size)}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:var(--limel-theme-default-font-size);word-break:break-word}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}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}: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:var(--limel-theme-default-font-size)}: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))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}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:var(--limel-theme-default-font-size);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}img{max-width:100%;border-radius:0.25rem}kbd{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));background-color:rgb(var(--contrast-200));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;padding:0.125rem 0.5rem;margin:0 0.25rem;box-shadow:var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;border-radius:0.125rem;border-style:solid;border-color:rgba(var(--contrast-600), 0.8);border-width:0 1px 0.125rem 1px}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto}`;
39
115
 
40
116
  const Markdown = class {
@@ -69,7 +145,7 @@ const Markdown = class {
69
145
  this.imageIntersectionObserver = null;
70
146
  }
71
147
  async textChanged() {
72
- var _a;
148
+ var _a, _b;
73
149
  try {
74
150
  this.cleanupImageIntersectionObserver();
75
151
  const html = await markdownParser.markdownToHTML(this.value, {
@@ -79,6 +155,7 @@ const Markdown = class {
79
155
  removeEmptyParagraphs: this.removeEmptyParagraphs,
80
156
  });
81
157
  this.rootElement.innerHTML = html;
158
+ hydrateCustomElements(this.rootElement, (_b = this.whitelist) !== null && _b !== void 0 ? _b : []);
82
159
  this.setupImageIntersectionObserver();
83
160
  }
84
161
  catch (error) {
@@ -95,7 +172,7 @@ const Markdown = class {
95
172
  this.cleanupImageIntersectionObserver();
96
173
  }
97
174
  render() {
98
- return (index.h(index.Host, { key: 'b1939b572c0a9ac59178497f56ebc469bc707d98' }, index.h("div", { key: 'f9dd27e5263281fad9e6d1da9d25d3ccd3a9990e', id: "markdown", ref: (el) => (this.rootElement = el) })));
175
+ return (index.h(index.Host, { key: 'd7e3122596fa19c63e05d69855fbc693cb8c4fe7' }, index.h("div", { key: '9a65798b0888a3d2d7a35c0d320408faa3d937b6', id: "markdown", ref: (el) => (this.rootElement = el) })));
99
176
  }
100
177
  setupImageIntersectionObserver() {
101
178
  if (this.lazyLoadImages) {
@@ -132,19 +132,33 @@ section:hover {
132
132
  gap: 0.5rem;
133
133
  }
134
134
 
135
- img {
136
- transition: filter 0.6s ease;
137
- object-fit: cover;
138
- border-radius: calc(var(--card-border-radius, 0.95rem) / 1.4);
135
+ .image-wrapper {
136
+ flex-shrink: 0;
137
+ display: flex;
138
+ align-items: center;
139
+ justify-content: center;
139
140
  }
140
- :host(limel-card[orientation=portrait]) img {
141
+ :host(limel-card[orientation=portrait]) .image-wrapper {
141
142
  width: 100%;
142
143
  }
143
- :host(limel-card[orientation=landscape]) img {
144
+ :host(limel-card[orientation=landscape]) .image-wrapper {
144
145
  flex-shrink: 0;
145
146
  max-width: 40%;
146
147
  height: 100%;
147
148
  }
149
+ :host(limel-card[orientation=landscape]) .image-wrapper img {
150
+ height: 100%;
151
+ }
152
+
153
+ img {
154
+ transition: filter 0.6s ease;
155
+ object-fit: cover;
156
+ border-radius: calc(var(--card-border-radius, 0.95rem) / 1.4);
157
+ min-width: 0.5rem;
158
+ min-height: 0.5rem;
159
+ max-width: 100%;
160
+ max-height: 100%;
161
+ }
148
162
  section:hover img, section:focus-visible img {
149
163
  transition-duration: 0.2s;
150
164
  filter: saturate(1.3);
@@ -101,7 +101,7 @@ export class Card {
101
101
  if (!((_a = this.image) === null || _a === void 0 ? void 0 : _a.src)) {
102
102
  return;
103
103
  }
104
- return h("img", { src: this.image.src, alt: this.image.alt, loading: "lazy" });
104
+ return (h("div", { class: "image-wrapper" }, h("img", { src: this.image.src, alt: this.image.alt, loading: "lazy" })));
105
105
  }
106
106
  renderHeader() {
107
107
  if (!this.heading && !this.subheading && !this.icon) {
@@ -0,0 +1,75 @@
1
+ /**
2
+ * After innerHTML is set on a container, custom elements receive all
3
+ * attribute values as strings. This function walks whitelisted custom
4
+ * elements and parses any attribute values that look like JSON objects
5
+ * or arrays, setting them as JS properties instead.
6
+ *
7
+ * This enables markdown content to include custom elements with complex
8
+ * props, e.g.:
9
+ * ```html
10
+ * <limel-chip text="GitHub" link='{"href":"https://github.com","target":"_blank"}'></limel-chip>
11
+ * ```
12
+ *
13
+ * @param container - The root element to search within.
14
+ * @param whitelist - The list of whitelisted custom element definitions.
15
+ */
16
+ export function hydrateCustomElements(container, whitelist) {
17
+ if (!container || !(whitelist === null || whitelist === void 0 ? void 0 : whitelist.length)) {
18
+ return;
19
+ }
20
+ for (const definition of whitelist) {
21
+ const elements = container.querySelectorAll(definition.tagName);
22
+ for (const element of elements) {
23
+ hydrateElement(element, definition.attributes);
24
+ }
25
+ }
26
+ }
27
+ function hydrateElement(element, attributes) {
28
+ for (const attrName of attributes) {
29
+ const value = element.getAttribute(attrName);
30
+ if (!value) {
31
+ continue;
32
+ }
33
+ const parsed = tryParseJson(value);
34
+ if (parsed !== undefined) {
35
+ // Set the JS property (camelCase) instead of the attribute
36
+ const propName = attributeToPropName(attrName);
37
+ element[propName] = parsed;
38
+ }
39
+ }
40
+ }
41
+ function tryParseJson(value) {
42
+ const trimmed = value.trim();
43
+ if ((trimmed.startsWith('{') && trimmed.endsWith('}')) ||
44
+ (trimmed.startsWith('[') && trimmed.endsWith(']'))) {
45
+ try {
46
+ return JSON.parse(trimmed);
47
+ }
48
+ catch (_a) {
49
+ // The sanitizer may HTML-encode quotes inside attribute values.
50
+ // Try decoding common HTML entities before giving up.
51
+ try {
52
+ const decoded = trimmed
53
+ .replaceAll('&#x22;', '"')
54
+ .replaceAll('&#34;', '"')
55
+ .replaceAll('&quot;', '"')
56
+ .replaceAll('&#x27;', "'")
57
+ .replaceAll('&#39;', "'")
58
+ .replaceAll('&apos;', "'")
59
+ .replaceAll('&amp;', '&');
60
+ return JSON.parse(decoded);
61
+ }
62
+ catch (_b) {
63
+ return;
64
+ }
65
+ }
66
+ }
67
+ }
68
+ /**
69
+ * Convert a kebab-case attribute name to a camelCase property name.
70
+ * e.g. "menu-items" → "menuItems"
71
+ * @param attrName
72
+ */
73
+ function attributeToPropName(attrName) {
74
+ return attrName.replaceAll(/-([a-z])/g, (_, letter) => letter.toUpperCase());
75
+ }
@@ -2,6 +2,7 @@ import { h, Host } from "@stencil/core";
2
2
  import { markdownToHTML } from "./markdown-parser";
3
3
  import { globalConfig } from "../../global/config";
4
4
  import { ImageIntersectionObserver } from "./image-intersection-observer";
5
+ import { hydrateCustomElements } from "./hydrate-custom-elements";
5
6
  /**
6
7
  * The Markdown component receives markdown syntax
7
8
  * and renders it as HTML.
@@ -19,6 +20,7 @@ import { ImageIntersectionObserver } from "./image-intersection-observer";
19
20
  * @exampleComponent limel-example-markdown-blockquotes
20
21
  * @exampleComponent limel-example-markdown-horizontal-rule
21
22
  * @exampleComponent limel-example-markdown-custom-component
23
+ * @exampleComponent limel-example-markdown-custom-component-with-json-props
22
24
  * @exampleComponent limel-example-markdown-remove-empty-paragraphs
23
25
  * @exampleComponent limel-example-markdown-composite
24
26
  */
@@ -53,7 +55,7 @@ export class Markdown {
53
55
  this.imageIntersectionObserver = null;
54
56
  }
55
57
  async textChanged() {
56
- var _a;
58
+ var _a, _b;
57
59
  try {
58
60
  this.cleanupImageIntersectionObserver();
59
61
  const html = await markdownToHTML(this.value, {
@@ -63,6 +65,7 @@ export class Markdown {
63
65
  removeEmptyParagraphs: this.removeEmptyParagraphs,
64
66
  });
65
67
  this.rootElement.innerHTML = html;
68
+ hydrateCustomElements(this.rootElement, (_b = this.whitelist) !== null && _b !== void 0 ? _b : []);
66
69
  this.setupImageIntersectionObserver();
67
70
  }
68
71
  catch (error) {
@@ -79,7 +82,7 @@ export class Markdown {
79
82
  this.cleanupImageIntersectionObserver();
80
83
  }
81
84
  render() {
82
- return (h(Host, { key: 'b1939b572c0a9ac59178497f56ebc469bc707d98' }, h("div", { key: 'f9dd27e5263281fad9e6d1da9d25d3ccd3a9990e', id: "markdown", ref: (el) => (this.rootElement = el) })));
85
+ return (h(Host, { key: 'd7e3122596fa19c63e05d69855fbc693cb8c4fe7' }, h("div", { key: '9a65798b0888a3d2d7a35c0d320408faa3d937b6', id: "markdown", ref: (el) => (this.rootElement = el) })));
83
86
  }
84
87
  setupImageIntersectionObserver() {
85
88
  if (this.lazyLoadImages) {
@@ -3,7 +3,7 @@ import { i as isItem } from './is-item-CrvUOVvg.js';
3
3
  import { g as getIconName } from './get-icon-props-CgNJbSP4.js';
4
4
  import { g as getMouseEventHandlers } from './3d-tilt-hover-effect-5eP2N9QI.js';
5
5
 
6
- const cardCss = () => `@charset "UTF-8";*{box-sizing:border-box;min-width:0;min-height:0}:host(limel-card){display:flex;border-radius:var(--card-border-radius, 0.95rem)}section{box-sizing:border-box;display:flex;gap:0.5rem;flex-direction:column}:host(limel-card[orientation=landscape]) section{flex-direction:row}section{width:100%;border-radius:var(--card-border-radius, 0.95rem);border:1px solid rgb(var(--contrast-500));padding:0.25rem;background-color:var(--card-background-color, rgb(var(--contrast-300)))}section:hover{border-color:transparent;background-color:var(--card-background-color--hovered, var(--card-background-color, rgb(var(--contrast-200))))}.body{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}img{transition:filter 0.6s ease;object-fit:cover;border-radius:calc(var(--card-border-radius, 0.95rem) / 1.4)}:host(limel-card[orientation=portrait]) img{width:100%}:host(limel-card[orientation=landscape]) img{flex-shrink:0;max-width:40%;height:100%}section:hover img,section:focus-visible img{transition-duration:0.2s;filter:saturate(1.3)}.markdown-wrapper{position:relative;flex-grow:1;display:flex;flex-direction:column}.markdown-wrapper limel-markdown{overflow-y:auto;flex-grow:1;padding:0.5rem 0.75rem}.markdown-wrapper::before{top:0;background:radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::after{bottom:0;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::before,.markdown-wrapper::after{content:"";pointer-events:none;position:absolute;right:0;left:0;height:0.75rem;opacity:0;transition:opacity 0.6s ease;background-repeat:no-repeat}.markdown-wrapper.can-scroll-up::before,.markdown-wrapper.can-scroll-down::after{opacity:1}header{flex-shrink:0;display:flex;justify-content:center;gap:0.5rem;padding:0.25rem 0.75rem}:host(limel-card[orientation=landscape]) header{padding-top:0.5rem}header:has(limel-icon){padding-left:0.25rem}header .headings{flex-grow:1;display:flex;flex-direction:column;gap:0.125rem}header .title{padding-right:1.25rem}header limel-icon{flex-shrink:0;width:2rem}header h1{font-size:1.125rem;font-weight:500;color:var(--card-heading-color, rgb(var(--contrast-1100)));letter-spacing:-0.03125rem}header h2{font-size:var(--limel-theme-default-font-size);font-weight:400;color:var(--card-subheading-color, rgb(var(--contrast-1000)))}header h1,header h2{word-break:break-word;hyphens:auto;-webkit-hyphens:auto;margin:0}limel-action-bar{flex-shrink:0;--action-bar-background-color:transparent;margin-left:auto}limel-3d-hover-effect-glow{border-radius:var(--card-border-radius, 0.95rem)}:host(limel-card){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-card){perspective:2000px}}section{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}section:focus{outline:none}section:hover,section:focus,section:focus-visible,section:focus-within{will-change:background-color, box-shadow, transform}section:hover,section:focus,section:focus-visible,section:active{transition-duration:0.2s}section:hover,section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}section:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}section:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}:host(limel-card[clickable]) section{cursor:pointer;box-shadow:var(--button-shadow-normal)}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}:host(limel-card[clickable]) section:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}`;
6
+ const cardCss = () => `@charset "UTF-8";*{box-sizing:border-box;min-width:0;min-height:0}:host(limel-card){display:flex;border-radius:var(--card-border-radius, 0.95rem)}section{box-sizing:border-box;display:flex;gap:0.5rem;flex-direction:column}:host(limel-card[orientation=landscape]) section{flex-direction:row}section{width:100%;border-radius:var(--card-border-radius, 0.95rem);border:1px solid rgb(var(--contrast-500));padding:0.25rem;background-color:var(--card-background-color, rgb(var(--contrast-300)))}section:hover{border-color:transparent;background-color:var(--card-background-color--hovered, var(--card-background-color, rgb(var(--contrast-200))))}.body{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}.image-wrapper{flex-shrink:0;display:flex;align-items:center;justify-content:center}:host(limel-card[orientation=portrait]) .image-wrapper{width:100%}:host(limel-card[orientation=landscape]) .image-wrapper{flex-shrink:0;max-width:40%;height:100%}:host(limel-card[orientation=landscape]) .image-wrapper img{height:100%}img{transition:filter 0.6s ease;object-fit:cover;border-radius:calc(var(--card-border-radius, 0.95rem) / 1.4);min-width:0.5rem;min-height:0.5rem;max-width:100%;max-height:100%}section:hover img,section:focus-visible img{transition-duration:0.2s;filter:saturate(1.3)}.markdown-wrapper{position:relative;flex-grow:1;display:flex;flex-direction:column}.markdown-wrapper limel-markdown{overflow-y:auto;flex-grow:1;padding:0.5rem 0.75rem}.markdown-wrapper::before{top:0;background:radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::after{bottom:0;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::before,.markdown-wrapper::after{content:"";pointer-events:none;position:absolute;right:0;left:0;height:0.75rem;opacity:0;transition:opacity 0.6s ease;background-repeat:no-repeat}.markdown-wrapper.can-scroll-up::before,.markdown-wrapper.can-scroll-down::after{opacity:1}header{flex-shrink:0;display:flex;justify-content:center;gap:0.5rem;padding:0.25rem 0.75rem}:host(limel-card[orientation=landscape]) header{padding-top:0.5rem}header:has(limel-icon){padding-left:0.25rem}header .headings{flex-grow:1;display:flex;flex-direction:column;gap:0.125rem}header .title{padding-right:1.25rem}header limel-icon{flex-shrink:0;width:2rem}header h1{font-size:1.125rem;font-weight:500;color:var(--card-heading-color, rgb(var(--contrast-1100)));letter-spacing:-0.03125rem}header h2{font-size:var(--limel-theme-default-font-size);font-weight:400;color:var(--card-subheading-color, rgb(var(--contrast-1000)))}header h1,header h2{word-break:break-word;hyphens:auto;-webkit-hyphens:auto;margin:0}limel-action-bar{flex-shrink:0;--action-bar-background-color:transparent;margin-left:auto}limel-3d-hover-effect-glow{border-radius:var(--card-border-radius, 0.95rem)}:host(limel-card){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-card){perspective:2000px}}section{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}section:focus{outline:none}section:hover,section:focus,section:focus-visible,section:focus-within{will-change:background-color, box-shadow, transform}section:hover,section:focus,section:focus-visible,section:active{transition-duration:0.2s}section:hover,section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}section:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}section:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}:host(limel-card[clickable]) section{cursor:pointer;box-shadow:var(--button-shadow-normal)}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}:host(limel-card[clickable]) section:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}`;
7
7
 
8
8
  const Card = class {
9
9
  constructor(hostRef) {
@@ -92,7 +92,7 @@ const Card = class {
92
92
  if (!((_a = this.image) === null || _a === void 0 ? void 0 : _a.src)) {
93
93
  return;
94
94
  }
95
- return h("img", { src: this.image.src, alt: this.image.alt, loading: "lazy" });
95
+ return (h("div", { class: "image-wrapper" }, h("img", { src: this.image.src, alt: this.image.alt, loading: "lazy" })));
96
96
  }
97
97
  renderHeader() {
98
98
  if (!this.heading && !this.subheading && !this.icon) {
@@ -33,6 +33,82 @@ class ImageIntersectionObserver {
33
33
  }
34
34
  }
35
35
 
36
+ /**
37
+ * After innerHTML is set on a container, custom elements receive all
38
+ * attribute values as strings. This function walks whitelisted custom
39
+ * elements and parses any attribute values that look like JSON objects
40
+ * or arrays, setting them as JS properties instead.
41
+ *
42
+ * This enables markdown content to include custom elements with complex
43
+ * props, e.g.:
44
+ * ```html
45
+ * <limel-chip text="GitHub" link='{"href":"https://github.com","target":"_blank"}'></limel-chip>
46
+ * ```
47
+ *
48
+ * @param container - The root element to search within.
49
+ * @param whitelist - The list of whitelisted custom element definitions.
50
+ */
51
+ function hydrateCustomElements(container, whitelist) {
52
+ if (!container || !(whitelist === null || whitelist === void 0 ? void 0 : whitelist.length)) {
53
+ return;
54
+ }
55
+ for (const definition of whitelist) {
56
+ const elements = container.querySelectorAll(definition.tagName);
57
+ for (const element of elements) {
58
+ hydrateElement(element, definition.attributes);
59
+ }
60
+ }
61
+ }
62
+ function hydrateElement(element, attributes) {
63
+ for (const attrName of attributes) {
64
+ const value = element.getAttribute(attrName);
65
+ if (!value) {
66
+ continue;
67
+ }
68
+ const parsed = tryParseJson(value);
69
+ if (parsed !== undefined) {
70
+ // Set the JS property (camelCase) instead of the attribute
71
+ const propName = attributeToPropName(attrName);
72
+ element[propName] = parsed;
73
+ }
74
+ }
75
+ }
76
+ function tryParseJson(value) {
77
+ const trimmed = value.trim();
78
+ if ((trimmed.startsWith('{') && trimmed.endsWith('}')) ||
79
+ (trimmed.startsWith('[') && trimmed.endsWith(']'))) {
80
+ try {
81
+ return JSON.parse(trimmed);
82
+ }
83
+ catch (_a) {
84
+ // The sanitizer may HTML-encode quotes inside attribute values.
85
+ // Try decoding common HTML entities before giving up.
86
+ try {
87
+ const decoded = trimmed
88
+ .replaceAll('&#x22;', '"')
89
+ .replaceAll('&#34;', '"')
90
+ .replaceAll('&quot;', '"')
91
+ .replaceAll('&#x27;', "'")
92
+ .replaceAll('&#39;', "'")
93
+ .replaceAll('&apos;', "'")
94
+ .replaceAll('&amp;', '&');
95
+ return JSON.parse(decoded);
96
+ }
97
+ catch (_b) {
98
+ return;
99
+ }
100
+ }
101
+ }
102
+ }
103
+ /**
104
+ * Convert a kebab-case attribute name to a camelCase property name.
105
+ * e.g. "menu-items" → "menuItems"
106
+ * @param attrName
107
+ */
108
+ function attributeToPropName(attrName) {
109
+ return attrName.replaceAll(/-([a-z])/g, (_, letter) => letter.toUpperCase());
110
+ }
111
+
36
112
  const markdownCss = () => `@charset "UTF-8";code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:var(--limel-theme-default-small-font-size);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:var(--limel-theme-default-font-size)}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:var(--limel-theme-default-font-size);word-break:break-word}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}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}: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:var(--limel-theme-default-font-size)}: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))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}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:var(--limel-theme-default-font-size);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}img{max-width:100%;border-radius:0.25rem}kbd{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));background-color:rgb(var(--contrast-200));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;padding:0.125rem 0.5rem;margin:0 0.25rem;box-shadow:var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;border-radius:0.125rem;border-style:solid;border-color:rgba(var(--contrast-600), 0.8);border-width:0 1px 0.125rem 1px}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto}`;
37
113
 
38
114
  const Markdown = class {
@@ -67,7 +143,7 @@ const Markdown = class {
67
143
  this.imageIntersectionObserver = null;
68
144
  }
69
145
  async textChanged() {
70
- var _a;
146
+ var _a, _b;
71
147
  try {
72
148
  this.cleanupImageIntersectionObserver();
73
149
  const html = await markdownToHTML(this.value, {
@@ -77,6 +153,7 @@ const Markdown = class {
77
153
  removeEmptyParagraphs: this.removeEmptyParagraphs,
78
154
  });
79
155
  this.rootElement.innerHTML = html;
156
+ hydrateCustomElements(this.rootElement, (_b = this.whitelist) !== null && _b !== void 0 ? _b : []);
80
157
  this.setupImageIntersectionObserver();
81
158
  }
82
159
  catch (error) {
@@ -93,7 +170,7 @@ const Markdown = class {
93
170
  this.cleanupImageIntersectionObserver();
94
171
  }
95
172
  render() {
96
- return (h(Host, { key: 'b1939b572c0a9ac59178497f56ebc469bc707d98' }, h("div", { key: 'f9dd27e5263281fad9e6d1da9d25d3ccd3a9990e', id: "markdown", ref: (el) => (this.rootElement = el) })));
173
+ return (h(Host, { key: 'd7e3122596fa19c63e05d69855fbc693cb8c4fe7' }, h("div", { key: '9a65798b0888a3d2d7a35c0d320408faa3d937b6', id: "markdown", ref: (el) => (this.rootElement = el) })));
97
174
  }
98
175
  setupImageIntersectionObserver() {
99
176
  if (this.lazyLoadImages) {
@@ -1 +1 @@
1
- import{p as e,g as l,b as a}from"./p-DBTJNfo7.js";export{s as setNonce}from"./p-DBTJNfo7.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await l(),a(JSON.parse('[["p-5c804a58",[[257,"limel-card",{"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"actions":[16],"clickable":[516],"orientation":[513],"canScrollUp":[32],"canScrollDown":[32]}]]],["p-caaab537",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"accept":[513],"language":[1]}]]],["p-656b8f6e",[[1,"limel-file-viewer",{"url":[513],"filename":[513],"alt":[513],"allowFullscreen":[516,"allow-fullscreen"],"allowOpenInNewTab":[516,"allow-open-in-new-tab"],"allowDownload":[516,"allow-download"],"language":[1],"officeViewer":[513,"office-viewer"],"actions":[16],"isFullscreen":[32],"fileType":[32],"loading":[32],"fileUrl":[32],"email":[32]},null,{"url":[{"watchUrl":0}]}]]],["p-4610d398",[[0,"limel-list-item",{"language":[513],"value":[8],"text":[513],"secondaryText":[513,"secondary-text"],"disabled":[516],"icon":[1],"iconSize":[513,"icon-size"],"badgeIcon":[516,"badge-icon"],"selected":[516],"actions":[16],"primaryComponent":[16],"image":[16],"type":[513]}]]],["p-8e6a36a7",[[17,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"invalid":[516],"value":[16],"searcher":[16],"allItems":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]},null,{"disabled":[{"onDisabledChange":0}],"value":[{"onChangeValue":0}]}]]],["p-e00a96bd",[[17,"limel-split-button",{"label":[513],"primary":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"items":[16]}]]],["p-3ad102a1",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"placeholder":[513],"manualInput":[516,"manual-input"],"palette":[16],"paletteColumnCount":[514,"palette-column-count"],"isOpen":[32]}]]],["p-d5bbfe2c",[[1,"limel-profile-picture",{"language":[513],"label":[513],"icon":[1],"helperText":[1,"helper-text"],"disabled":[516],"readonly":[516],"required":[516],"invalid":[516],"loading":[516],"value":[1],"imageFit":[513,"image-fit"],"accept":[513],"resize":[16],"objectUrl":[32],"imageError":[32],"isErrorMessagePopoverOpen":[32]},null,{"value":[{"handleValueChange":0}]}]]],["p-8ec92025",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formatter":[16],"internalFormat":[32],"showPortal":[32]}]]],["p-d53b8de5",[[1,"limel-dock",{"dockItems":[16],"dockFooterItems":[16],"accessibleLabel":[513,"accessible-label"],"expanded":[516],"allowResize":[516,"allow-resize"],"mobileBreakPoint":[514,"mobile-break-point"],"useMobileLayout":[32]}]]],["p-73655c23",[[1,"limel-snackbar",{"open":[516],"message":[1],"timeout":[514],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"offset":[32],"isOpen":[32],"closing":[32],"show":[64]},[[0,"changeOffset","onChangeIndex"]],{"open":[{"watchOpen":0}]}]]],["p-50300a44",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]},null,{"menuOpen":[{"watchOpen":0}]}]]],["p-accc6cc0",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]},null,{"value":[{"valueChanged":0}]}]]],["p-eec6e88c",[[1,"limel-chart",{"language":[513],"accessibleLabel":[513,"accessible-label"],"accessibleItemsLabel":[513,"accessible-items-label"],"accessibleValuesLabel":[513,"accessible-values-label"],"displayAxisLabels":[516,"display-axis-labels"],"displayItemText":[516,"display-item-text"],"displayItemValue":[516,"display-item-value"],"items":[16],"type":[513],"orientation":[513],"maxValue":[514,"max-value"],"axisIncrement":[514,"axis-increment"],"loading":[516]},null,{"items":[{"handleChange":0}],"axisIncrement":[{"handleChange":0}],"maxValue":[{"handleChange":0}]}]]],["p-46b95d7c",[[1,"limel-help",{"value":[1],"trigger":[1],"readMoreLink":[16],"openDirection":[513,"open-direction"],"isOpen":[32]}]]],["p-40883e25",[[257,"limel-info-tile",{"value":[520],"icon":[1],"label":[513],"prefix":[513],"suffix":[513],"disabled":[516],"badge":[520],"loading":[516],"link":[16],"progress":[16],"hasPrimarySlot":[32]}]]],["p-fce93153",[[0,"limel-drag-handle",{"dragDirection":[513,"drag-direction"],"tooltipOpenDirection":[513,"tooltip-open-direction"],"language":[513]}]]],["p-912f53a3",[[1,"limel-shortcut",{"icon":[513],"label":[513],"disabled":[516],"badge":[520],"link":[16]}]]],["p-644911cc",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"invalid":[516],"value":[516],"helperText":[513,"helper-text"],"readonlyLabels":[16],"fieldId":[32]},null,{"value":[{"valueWatcher":0}]}]]],["p-5f593160",[[257,"limel-tab-panel",{"tabs":[1040]},null,{"tabs":[{"tabsChanged":0}]}]]],["p-13ba3044",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[516],"disabled":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"lineNumbers":[516,"line-numbers"],"lineWrapping":[516,"line-wrapping"],"fold":[516],"lint":[516],"colorScheme":[513,"color-scheme"],"translationLanguage":[513,"translation-language"],"showCopyButton":[516,"show-copy-button"],"random":[32],"wasCopied":[32]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"readonly":[{"watchReadonly":0}],"invalid":[{"watchInvalid":0}],"required":[{"watchRequired":0}],"helperText":[{"watchHelperText":0}]}]]],["p-f49e5d8a",[[257,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]},null,{"open":[{"watchHandler":0}],"closingActions":[{"closingActionsChanged":0}]}]]],["p-33bd5212",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["p-5280d11e",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"required":[516],"invalid":[516],"displaysPercentageColors":[516,"displays-percentage-colors"],"unit":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32]},null,{"disabled":[{"watchDisabled":0}],"readonly":[{"watchReadonly":0}],"value":[{"watchValue":0}]}]]],["p-57c53ed4",[[257,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["p-bc4b4e46",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16],"errors":[16]},null,{"schema":[{"setSchema":0}]}]]],["p-78fffaa9",[[1,"limel-menu-item-meta",{"commandText":[1,"command-text"],"badge":[8],"showChevron":[4,"show-chevron"]}]]],["p-8eff8a18",[[0,"limel-radio-button-group",{"items":[16],"selectedItem":[16],"disabled":[516],"badgeIcons":[516,"badge-icons"],"maxLinesSecondaryText":[514,"max-lines-secondary-text"]}]]],["p-e78739e2",[[1,"limel-ai-avatar",{"isThinking":[516,"is-thinking"],"language":[513]}]]],["p-00e54ccf",[[1,"limel-config",{"config":[16]}]]],["p-16a5f421",[[257,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["p-b255e8e6",[[257,"limel-grid"]]],["p-97f719ae",[[1,"limel-icon",{"size":[513],"name":[513],"badge":[516]},null,{"name":[{"loadIcon":0}]}]]],["p-1b0eec07",[[17,"limel-text-editor",{"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"value":[513],"customElements":[16],"triggers":[16],"required":[516],"allowResize":[516,"allow-resize"],"ui":[513]}]]],["p-4bac6803",[[257,"limel-email-viewer",{"email":[16],"fallbackUrl":[513,"fallback-url"],"language":[513],"allowRemoteImages":[4,"allow-remote-images"],"allowRemoteImagesState":[32]},null,{"email":[{"resetAllowRemoteImages":0}]}]]],["p-444c7966",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"indeterminate":[516],"required":[516],"readonlyLabels":[16],"modified":[32]},null,{"checked":[{"handleCheckedChange":0}],"indeterminate":[{"handleIndeterminateChange":0}],"readonly":[{"handleReadonlyChange":0}]}]]],["p-4db1033c",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[1],"layout":[1],"pageSize":[2,"page-size"],"totalRows":[2,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[4,"movable-columns"],"sortableColumns":[4,"sortable-columns"],"loading":[4],"page":[2],"emptyMessage":[1,"empty-message"],"aggregates":[16],"selectable":[4],"selection":[16],"language":[513],"paginationLocation":[513,"pagination-location"]},null,{"totalRows":[{"totalRowsChanged":0}],"pageSize":[{"pageSizeChanged":0}],"page":[{"pageChanged":0}],"activeRow":[{"activeRowChanged":0}],"data":[{"updateData":0}],"columns":[{"updateColumns":0}],"aggregates":[{"updateAggregates":0}],"selection":[{"updateSelection":0}],"selectable":[{"updateSelectable":0}],"sortableColumns":[{"updateSortableColumns":0}],"sorting":[{"updateSorting":0}]}]]],["p-1c6dd14c",[[17,"limel-prosemirror-adapter",{"contentType":[1,"content-type"],"value":[1],"language":[513],"disabled":[516],"customElements":[16],"triggerCharacters":[16],"ui":[1],"view":[32],"actionBarItems":[32],"link":[32],"isLinkMenuOpen":[32]},null,{"value":[{"watchValue":0}]}]]],["p-911db0aa",[[17,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"placeholder":[513],"required":[516],"invalid":[516],"manualInput":[516,"manual-input"],"columnCount":[514,"column-count"],"palette":[16]}]]],["p-c5f15334",[[0,"limel-dock-button",{"item":[16],"expanded":[516],"useMobileLayout":[516,"use-mobile-layout"],"isOpen":[32]},null,{"isOpen":[{"openWatcher":0}]}]]],["p-10ba834c",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]],{"tabs":[{"tabsChanged":0}]}]]],["p-ee7d2cf9",[[257,"limel-callout",{"heading":[513],"icon":[513],"type":[513],"language":[1]}]]],["p-8118cd4f",[[257,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"],"subheadingDivider":[1,"subheading-divider"]}]]],["p-fdfecf3d",[[1,"limel-help-content",{"value":[1],"readMoreLink":[16]}]]],["p-198f3179",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4],"currentStep":[4,"current-step"]}]]],["p-d6d177bc",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"prefix":[513],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["p-d8936f4d",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1],"formatter":[16]}]]],["p-8c6dfb19",[[0,"limel-radio-button",{"checked":[516],"disabled":[516],"id":[1],"label":[1],"onChange":[16]}]]],["p-60f12574",[[1,"limel-tooltip",{"elementId":[513,"element-id"],"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514],"openDirection":[513,"open-direction"],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514]}],[257,"limel-portal",{"openDirection":[513,"open-direction"],"position":[513],"containerId":[513,"container-id"],"containerStyle":[16],"inheritParentWidth":[516,"inherit-parent-width"],"visible":[516],"anchor":[16]},null,{"visible":[{"onVisible":0}]}]]],["p-b04514b0",[[257,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"icon":[1],"invalid":[516],"actions":[16],"language":[513]}]]],["p-b8a31121",[[1,"limel-3d-hover-effect-glow"]]],["p-7dd4e4bb",[[257,"limel-file-dropzone",{"accept":[513],"disabled":[4],"text":[1],"helperText":[1,"helper-text"],"hasFileToDrop":[32]}],[257,"limel-file-input",{"accept":[513],"disabled":[516],"multiple":[516]}]]],["p-5da0315f",[[1,"limel-dynamic-label",{"value":[8],"defaultLabel":[16],"labels":[16]}]]],["p-268a695b",[[1,"limel-badge",{"label":[520]}]]],["p-b92431c8",[[257,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"surfaceWidth":[513,"surface-width"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"],"loading":[516],"currentSubMenu":[1040],"rootItem":[16],"searcher":[16],"searchPlaceholder":[1,"search-placeholder"],"emptyResultMessage":[1,"empty-result-message"],"loadingSubItems":[32],"searchValue":[32],"searchResults":[32]},null,{"items":[{"itemsWatcher":0}],"open":[{"openWatcher":0}]}],[1,"limel-breadcrumbs",{"items":[16],"divider":[1]}],[17,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"]},null,{"items":[{"itemsChanged":0}]}],[17,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"prefix":[513],"suffix":[513],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"locale":[513],"isFocused":[32],"wasInvalid":[32],"showCompletions":[32],"getSelectionStart":[64],"getSelectionEnd":[64],"getSelectionDirection":[64]},null,{"value":[{"valueWatcher":0}],"completions":[{"completionsWatcher":0}]}],[257,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}],[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}],[17,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]},null,{"type":[{"handleType":0}],"items":[{"itemsChanged":0}]}]]],["p-b13d7896",[[17,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"helperText":[513,"helper-text"],"disabled":[516],"readonly":[516],"invalid":[516],"inputType":[513,"input-type"],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"autocomplete":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"selectedChipIds":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]},null,{"value":[{"handleChangeChips":0}]}],[17,"limel-chip",{"language":[513],"text":[513],"icon":[1],"image":[16],"link":[16],"badge":[520],"disabled":[516],"readonly":[516],"selected":[516],"invalid":[516],"removable":[516],"type":[513],"loading":[516],"progress":[514],"identifier":[520],"size":[513],"menuItems":[16]}]]],["p-a855de67",[[17,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"justLoaded":[32]},null,{"loading":[{"loadingWatcher":0}]}]]],["p-854a3ffe",[[0,"limel-action-bar-overflow-menu",{"items":[16],"openDirection":[513,"open-direction"],"overFlowIcon":[16]}],[0,"limel-action-bar-item",{"item":[16],"isVisible":[516,"is-visible"],"selected":[516]}]]],["p-dd8f49ca",[[1,"limel-text-editor-link-menu",{"link":[16],"language":[513],"isOpen":[516,"is-open"]}],[1,"limel-action-bar",{"actions":[16],"language":[513],"accessibleLabel":[513,"accessible-label"],"layout":[513],"collapsible":[516],"openDirection":[513,"open-direction"],"overflowCutoff":[32],"actionBarIsShrunk":[32]}]]],["p-5def4700",[[1,"limel-linear-progress",{"language":[513],"value":[514],"indeterminate":[516],"accessibleLabel":[513,"accessible-label"]},null,{"value":[{"watchValue":0}]}]]],["p-889d0000",[[17,"limel-icon-button",{"icon":[1],"elevated":[516],"label":[513],"disabled":[516]}]]],["p-d9a7a188",[[1,"limel-markdown",{"value":[1],"whitelist":[16],"lazyLoadImages":[516,"lazy-load-images"],"removeEmptyParagraphs":[516,"remove-empty-paragraphs"]},null,{"value":[{"textChanged":0}],"removeEmptyParagraphs":[{"handleRemoveEmptyParagraphsChange":0}]}]]],["p-58176f7b",[[257,"limel-popover",{"open":[4],"openDirection":[513,"open-direction"]},null,{"open":[{"watchOpen":0}]}],[1,"limel-popover-surface",{"contentCollection":[16]}]]],["p-13d0ec04",[[260,"limel-notched-outline",{"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"label":[513],"labelId":[513,"label-id"],"hasValue":[516,"has-value"],"hasLeadingIcon":[516,"has-leading-icon"],"hasFloatingLabel":[516,"has-floating-label"]}],[1,"limel-helper-line",{"helperText":[513,"helper-text"],"length":[514],"maxLength":[514,"max-length"],"invalid":[516],"helperTextId":[513,"helper-text-id"]}]]]]'),e))));
1
+ import{p as e,g as l,b as a}from"./p-DBTJNfo7.js";export{s as setNonce}from"./p-DBTJNfo7.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await l(),a(JSON.parse('[["p-cc13084d",[[257,"limel-card",{"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"actions":[16],"clickable":[516],"orientation":[513],"canScrollUp":[32],"canScrollDown":[32]}]]],["p-caaab537",[[1,"limel-file",{"value":[16],"label":[513],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"accept":[513],"language":[1]}]]],["p-656b8f6e",[[1,"limel-file-viewer",{"url":[513],"filename":[513],"alt":[513],"allowFullscreen":[516,"allow-fullscreen"],"allowOpenInNewTab":[516,"allow-open-in-new-tab"],"allowDownload":[516,"allow-download"],"language":[1],"officeViewer":[513,"office-viewer"],"actions":[16],"isFullscreen":[32],"fileType":[32],"loading":[32],"fileUrl":[32],"email":[32]},null,{"url":[{"watchUrl":0}]}]]],["p-4610d398",[[0,"limel-list-item",{"language":[513],"value":[8],"text":[513],"secondaryText":[513,"secondary-text"],"disabled":[516],"icon":[1],"iconSize":[513,"icon-size"],"badgeIcon":[516,"badge-icon"],"selected":[516],"actions":[16],"primaryComponent":[16],"image":[16],"type":[513]}]]],["p-8e6a36a7",[[17,"limel-picker",{"disabled":[4],"readonly":[516],"label":[1],"searchLabel":[1,"search-label"],"helperText":[513,"helper-text"],"leadingIcon":[1,"leading-icon"],"emptyResultMessage":[1,"empty-result-message"],"required":[4],"invalid":[516],"value":[16],"searcher":[16],"allItems":[16],"multiple":[4],"delimiter":[513],"actions":[16],"actionPosition":[1,"action-position"],"actionScrollBehavior":[1,"action-scroll-behavior"],"badgeIcons":[516,"badge-icons"],"items":[32],"textValue":[32],"loading":[32],"chips":[32]},null,{"disabled":[{"onDisabledChange":0}],"value":[{"onChangeValue":0}]}]]],["p-e00a96bd",[[17,"limel-split-button",{"label":[513],"primary":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"items":[16]}]]],["p-3ad102a1",[[1,"limel-color-picker",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"tooltipLabel":[513,"tooltip-label"],"required":[516],"disabled":[516],"readonly":[516],"invalid":[516],"placeholder":[513],"manualInput":[516,"manual-input"],"palette":[16],"paletteColumnCount":[514,"palette-column-count"],"isOpen":[32]}]]],["p-d5bbfe2c",[[1,"limel-profile-picture",{"language":[513],"label":[513],"icon":[1],"helperText":[1,"helper-text"],"disabled":[516],"readonly":[516],"required":[516],"invalid":[516],"loading":[516],"value":[1],"imageFit":[513,"image-fit"],"accept":[513],"resize":[16],"objectUrl":[32],"imageError":[32],"isErrorMessagePopoverOpen":[32]},null,{"value":[{"handleValueChange":0}]}]]],["p-8ec92025",[[1,"limel-date-picker",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[16],"type":[513],"format":[513],"language":[513],"formatter":[16],"internalFormat":[32],"showPortal":[32]}]]],["p-d53b8de5",[[1,"limel-dock",{"dockItems":[16],"dockFooterItems":[16],"accessibleLabel":[513,"accessible-label"],"expanded":[516],"allowResize":[516,"allow-resize"],"mobileBreakPoint":[514,"mobile-break-point"],"useMobileLayout":[32]}]]],["p-73655c23",[[1,"limel-snackbar",{"open":[516],"message":[1],"timeout":[514],"actionText":[1,"action-text"],"dismissible":[4],"multiline":[4],"language":[1],"offset":[32],"isOpen":[32],"closing":[32],"show":[64]},[[0,"changeOffset","onChangeIndex"]],{"open":[{"watchOpen":0}]}]]],["p-50300a44",[[1,"limel-select",{"disabled":[516],"readonly":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"value":[16],"options":[16],"multiple":[4],"menuOpen":[32]},null,{"menuOpen":[{"watchOpen":0}]}]]],["p-accc6cc0",[[1,"limel-button-group",{"value":[16],"disabled":[516],"selectedButtonId":[32]},null,{"value":[{"valueChanged":0}]}]]],["p-eec6e88c",[[1,"limel-chart",{"language":[513],"accessibleLabel":[513,"accessible-label"],"accessibleItemsLabel":[513,"accessible-items-label"],"accessibleValuesLabel":[513,"accessible-values-label"],"displayAxisLabels":[516,"display-axis-labels"],"displayItemText":[516,"display-item-text"],"displayItemValue":[516,"display-item-value"],"items":[16],"type":[513],"orientation":[513],"maxValue":[514,"max-value"],"axisIncrement":[514,"axis-increment"],"loading":[516]},null,{"items":[{"handleChange":0}],"axisIncrement":[{"handleChange":0}],"maxValue":[{"handleChange":0}]}]]],["p-46b95d7c",[[1,"limel-help",{"value":[1],"trigger":[1],"readMoreLink":[16],"openDirection":[513,"open-direction"],"isOpen":[32]}]]],["p-40883e25",[[257,"limel-info-tile",{"value":[520],"icon":[1],"label":[513],"prefix":[513],"suffix":[513],"disabled":[516],"badge":[520],"loading":[516],"link":[16],"progress":[16],"hasPrimarySlot":[32]}]]],["p-fce93153",[[0,"limel-drag-handle",{"dragDirection":[513,"drag-direction"],"tooltipOpenDirection":[513,"tooltip-open-direction"],"language":[513]}]]],["p-912f53a3",[[1,"limel-shortcut",{"icon":[513],"label":[513],"disabled":[516],"badge":[520],"link":[16]}]]],["p-644911cc",[[1,"limel-switch",{"label":[513],"disabled":[516],"readonly":[516],"invalid":[516],"value":[516],"helperText":[513,"helper-text"],"readonlyLabels":[16],"fieldId":[32]},null,{"value":[{"valueWatcher":0}]}]]],["p-5f593160",[[257,"limel-tab-panel",{"tabs":[1040]},null,{"tabs":[{"tabsChanged":0}]}]]],["p-13ba3044",[[1,"limel-code-editor",{"value":[1],"language":[1],"readonly":[516],"disabled":[516],"invalid":[516],"required":[516],"label":[513],"helperText":[513,"helper-text"],"lineNumbers":[516,"line-numbers"],"lineWrapping":[516,"line-wrapping"],"fold":[516],"lint":[516],"colorScheme":[513,"color-scheme"],"translationLanguage":[513,"translation-language"],"showCopyButton":[516,"show-copy-button"],"random":[32],"wasCopied":[32]},null,{"value":[{"watchValue":0}],"disabled":[{"watchDisabled":0}],"readonly":[{"watchReadonly":0}],"invalid":[{"watchInvalid":0}],"required":[{"watchRequired":0}],"helperText":[{"watchHelperText":0}]}]]],["p-f49e5d8a",[[257,"limel-dialog",{"heading":[1],"fullscreen":[516],"open":[1540],"closingActions":[16]},null,{"open":[{"watchHandler":0}],"closingActions":[{"closingActionsChanged":0}]}]]],["p-33bd5212",[[1,"limel-progress-flow",{"flowItems":[16],"disabled":[4],"readonly":[4]}]]],["p-5280d11e",[[1,"limel-slider",{"disabled":[516],"readonly":[516],"factor":[514],"label":[513],"helperText":[513,"helper-text"],"required":[516],"invalid":[516],"displaysPercentageColors":[516,"displays-percentage-colors"],"unit":[513],"value":[514],"valuemax":[514],"valuemin":[514],"step":[514],"percentageClass":[32]},null,{"disabled":[{"watchDisabled":0}],"readonly":[{"watchReadonly":0}],"value":[{"watchValue":0}]}]]],["p-57c53ed4",[[257,"limel-banner",{"message":[513],"icon":[513],"isOpen":[32],"open":[64],"close":[64]}]]],["p-bc4b4e46",[[1,"limel-form",{"schema":[16],"value":[16],"disabled":[4],"propsFactory":[16],"transformErrors":[16],"errors":[16]},null,{"schema":[{"setSchema":0}]}]]],["p-78fffaa9",[[1,"limel-menu-item-meta",{"commandText":[1,"command-text"],"badge":[8],"showChevron":[4,"show-chevron"]}]]],["p-8eff8a18",[[0,"limel-radio-button-group",{"items":[16],"selectedItem":[16],"disabled":[516],"badgeIcons":[516,"badge-icons"],"maxLinesSecondaryText":[514,"max-lines-secondary-text"]}]]],["p-e78739e2",[[1,"limel-ai-avatar",{"isThinking":[516,"is-thinking"],"language":[513]}]]],["p-00e54ccf",[[1,"limel-config",{"config":[16]}]]],["p-16a5f421",[[257,"limel-flex-container",{"direction":[513],"justify":[513],"align":[513],"reverse":[516]}]]],["p-b255e8e6",[[257,"limel-grid"]]],["p-97f719ae",[[1,"limel-icon",{"size":[513],"name":[513],"badge":[516]},null,{"name":[{"loadIcon":0}]}]]],["p-1b0eec07",[[17,"limel-text-editor",{"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"value":[513],"customElements":[16],"triggers":[16],"required":[516],"allowResize":[516,"allow-resize"],"ui":[513]}]]],["p-4bac6803",[[257,"limel-email-viewer",{"email":[16],"fallbackUrl":[513,"fallback-url"],"language":[513],"allowRemoteImages":[4,"allow-remote-images"],"allowRemoteImagesState":[32]},null,{"email":[{"resetAllowRemoteImages":0}]}]]],["p-444c7966",[[1,"limel-checkbox",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"helperText":[513,"helper-text"],"checked":[516],"indeterminate":[516],"required":[516],"readonlyLabels":[16],"modified":[32]},null,{"checked":[{"handleCheckedChange":0}],"indeterminate":[{"handleIndeterminateChange":0}],"readonly":[{"handleReadonlyChange":0}]}]]],["p-4db1033c",[[1,"limel-table",{"data":[16],"columns":[16],"mode":[1],"layout":[1],"pageSize":[2,"page-size"],"totalRows":[2,"total-rows"],"sorting":[16],"activeRow":[1040],"movableColumns":[4,"movable-columns"],"sortableColumns":[4,"sortable-columns"],"loading":[4],"page":[2],"emptyMessage":[1,"empty-message"],"aggregates":[16],"selectable":[4],"selection":[16],"language":[513],"paginationLocation":[513,"pagination-location"]},null,{"totalRows":[{"totalRowsChanged":0}],"pageSize":[{"pageSizeChanged":0}],"page":[{"pageChanged":0}],"activeRow":[{"activeRowChanged":0}],"data":[{"updateData":0}],"columns":[{"updateColumns":0}],"aggregates":[{"updateAggregates":0}],"selection":[{"updateSelection":0}],"selectable":[{"updateSelectable":0}],"sortableColumns":[{"updateSortableColumns":0}],"sorting":[{"updateSorting":0}]}]]],["p-1c6dd14c",[[17,"limel-prosemirror-adapter",{"contentType":[1,"content-type"],"value":[1],"language":[513],"disabled":[516],"customElements":[16],"triggerCharacters":[16],"ui":[1],"view":[32],"actionBarItems":[32],"link":[32],"isLinkMenuOpen":[32]},null,{"value":[{"watchValue":0}]}]]],["p-911db0aa",[[17,"limel-color-picker-palette",{"value":[513],"label":[513],"helperText":[513,"helper-text"],"placeholder":[513],"required":[516],"invalid":[516],"manualInput":[516,"manual-input"],"columnCount":[514,"column-count"],"palette":[16]}]]],["p-c5f15334",[[0,"limel-dock-button",{"item":[16],"expanded":[516],"useMobileLayout":[516,"use-mobile-layout"],"isOpen":[32]},null,{"isOpen":[{"openWatcher":0}]}]]],["p-10ba834c",[[1,"limel-tab-bar",{"tabs":[1040],"canScrollLeft":[32],"canScrollRight":[32]},[[9,"resize","handleWindowResize"]],{"tabs":[{"tabsChanged":0}]}]]],["p-ee7d2cf9",[[257,"limel-callout",{"heading":[513],"icon":[513],"type":[513],"language":[1]}]]],["p-8118cd4f",[[257,"limel-header",{"icon":[1],"heading":[1],"subheading":[1],"supportingText":[1,"supporting-text"],"subheadingDivider":[1,"subheading-divider"]}]]],["p-fdfecf3d",[[1,"limel-help-content",{"value":[1],"readMoreLink":[16]}]]],["p-198f3179",[[0,"limel-progress-flow-item",{"item":[16],"disabled":[4],"readonly":[4],"currentStep":[4,"current-step"]}]]],["p-d6d177bc",[[1,"limel-circular-progress",{"value":[2],"maxValue":[2,"max-value"],"prefix":[513],"suffix":[1],"displayPercentageColors":[4,"display-percentage-colors"],"size":[513]}]]],["p-d8936f4d",[[1,"limel-flatpickr-adapter",{"value":[16],"type":[1],"format":[1],"isOpen":[4,"is-open"],"inputElement":[16],"language":[1],"formatter":[16]}]]],["p-8c6dfb19",[[0,"limel-radio-button",{"checked":[516],"disabled":[516],"id":[1],"label":[1],"onChange":[16]}]]],["p-60f12574",[[1,"limel-tooltip",{"elementId":[513,"element-id"],"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514],"openDirection":[513,"open-direction"],"open":[32]}],[1,"limel-tooltip-content",{"label":[513],"helperLabel":[513,"helper-label"],"maxlength":[514]}],[257,"limel-portal",{"openDirection":[513,"open-direction"],"position":[513],"containerId":[513,"container-id"],"containerStyle":[16],"inheritParentWidth":[516,"inherit-parent-width"],"visible":[516],"anchor":[16]},null,{"visible":[{"onVisible":0}]}]]],["p-b04514b0",[[257,"limel-collapsible-section",{"isOpen":[1540,"is-open"],"header":[513],"icon":[1],"invalid":[516],"actions":[16],"language":[513]}]]],["p-b8a31121",[[1,"limel-3d-hover-effect-glow"]]],["p-7dd4e4bb",[[257,"limel-file-dropzone",{"accept":[513],"disabled":[4],"text":[1],"helperText":[1,"helper-text"],"hasFileToDrop":[32]}],[257,"limel-file-input",{"accept":[513],"disabled":[516],"multiple":[516]}]]],["p-5da0315f",[[1,"limel-dynamic-label",{"value":[8],"defaultLabel":[16],"labels":[16]}]]],["p-268a695b",[[1,"limel-badge",{"label":[520]}]]],["p-b92431c8",[[257,"limel-menu",{"items":[16],"disabled":[516],"openDirection":[513,"open-direction"],"surfaceWidth":[513,"surface-width"],"open":[1540],"badgeIcons":[516,"badge-icons"],"gridLayout":[516,"grid-layout"],"loading":[516],"currentSubMenu":[1040],"rootItem":[16],"searcher":[16],"searchPlaceholder":[1,"search-placeholder"],"emptyResultMessage":[1,"empty-result-message"],"loadingSubItems":[32],"searchValue":[32],"searchResults":[32]},null,{"items":[{"itemsWatcher":0}],"open":[{"openWatcher":0}]}],[1,"limel-breadcrumbs",{"items":[16],"divider":[1]}],[17,"limel-menu-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"]},null,{"items":[{"itemsChanged":0}]}],[17,"limel-input-field",{"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"prefix":[513],"suffix":[513],"required":[516],"value":[513],"trailingIcon":[513,"trailing-icon"],"leadingIcon":[513,"leading-icon"],"pattern":[513],"type":[513],"formatNumber":[516,"format-number"],"step":[520],"max":[514],"min":[514],"maxlength":[514],"minlength":[514],"completions":[16],"showLink":[516,"show-link"],"locale":[513],"isFocused":[32],"wasInvalid":[32],"showCompletions":[32],"getSelectionStart":[64],"getSelectionEnd":[64],"getSelectionDirection":[64]},null,{"value":[{"valueWatcher":0}],"completions":[{"completionsWatcher":0}]}],[257,"limel-menu-surface",{"open":[4],"allowClicksElement":[16]}],[1,"limel-spinner",{"size":[513],"limeBranded":[4,"lime-branded"]}],[17,"limel-list",{"items":[16],"badgeIcons":[4,"badge-icons"],"iconSize":[1,"icon-size"],"type":[1],"maxLinesSecondaryText":[2,"max-lines-secondary-text"]},null,{"type":[{"handleType":0}],"items":[{"itemsChanged":0}]}]]],["p-b13d7896",[[17,"limel-chip-set",{"value":[16],"type":[513],"label":[513],"helperText":[513,"helper-text"],"disabled":[516],"readonly":[516],"invalid":[516],"inputType":[513,"input-type"],"maxItems":[514,"max-items"],"required":[516],"searchLabel":[513,"search-label"],"emptyInputOnBlur":[516,"empty-input-on-blur"],"clearAllButton":[4,"clear-all-button"],"leadingIcon":[513,"leading-icon"],"delimiter":[513],"autocomplete":[513],"language":[1],"editMode":[32],"textValue":[32],"blurred":[32],"inputChipIndexSelected":[32],"selectedChipIds":[32],"getEditMode":[64],"setFocus":[64],"emptyInput":[64]},null,{"value":[{"handleChangeChips":0}]}],[17,"limel-chip",{"language":[513],"text":[513],"icon":[1],"image":[16],"link":[16],"badge":[520],"disabled":[516],"readonly":[516],"selected":[516],"invalid":[516],"removable":[516],"type":[513],"loading":[516],"progress":[514],"identifier":[520],"size":[513],"menuItems":[16]}]]],["p-a855de67",[[17,"limel-button",{"label":[513],"primary":[516],"outlined":[516],"icon":[513],"disabled":[516],"loading":[516],"loadingFailed":[516,"loading-failed"],"justLoaded":[32]},null,{"loading":[{"loadingWatcher":0}]}]]],["p-854a3ffe",[[0,"limel-action-bar-overflow-menu",{"items":[16],"openDirection":[513,"open-direction"],"overFlowIcon":[16]}],[0,"limel-action-bar-item",{"item":[16],"isVisible":[516,"is-visible"],"selected":[516]}]]],["p-dd8f49ca",[[1,"limel-text-editor-link-menu",{"link":[16],"language":[513],"isOpen":[516,"is-open"]}],[1,"limel-action-bar",{"actions":[16],"language":[513],"accessibleLabel":[513,"accessible-label"],"layout":[513],"collapsible":[516],"openDirection":[513,"open-direction"],"overflowCutoff":[32],"actionBarIsShrunk":[32]}]]],["p-5def4700",[[1,"limel-linear-progress",{"language":[513],"value":[514],"indeterminate":[516],"accessibleLabel":[513,"accessible-label"]},null,{"value":[{"watchValue":0}]}]]],["p-889d0000",[[17,"limel-icon-button",{"icon":[1],"elevated":[516],"label":[513],"disabled":[516]}]]],["p-49204db4",[[1,"limel-markdown",{"value":[1],"whitelist":[16],"lazyLoadImages":[516,"lazy-load-images"],"removeEmptyParagraphs":[516,"remove-empty-paragraphs"]},null,{"value":[{"textChanged":0}],"removeEmptyParagraphs":[{"handleRemoveEmptyParagraphsChange":0}]}]]],["p-58176f7b",[[257,"limel-popover",{"open":[4],"openDirection":[513,"open-direction"]},null,{"open":[{"watchOpen":0}]}],[1,"limel-popover-surface",{"contentCollection":[16]}]]],["p-13d0ec04",[[260,"limel-notched-outline",{"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"label":[513],"labelId":[513,"label-id"],"hasValue":[516,"has-value"],"hasLeadingIcon":[516,"has-leading-icon"],"hasFloatingLabel":[516,"has-floating-label"]}],[1,"limel-helper-line",{"helperText":[513,"helper-text"],"length":[514],"maxLength":[514,"max-length"],"invalid":[516],"helperTextId":[513,"helper-text-id"]}]]]]'),e))));
@@ -0,0 +1 @@
1
+ import{r as e,h as t,H as o}from"./p-DBTJNfo7.js";import{m as r}from"./p-BRCcjfVu.js";import{g as a}from"./p-Dnt5w_Bp.js";import"./p-BFTU3MAI.js";import"./p-2kcqdtMr.js";class l{constructor(e){this.handleIntersection=e=>{for(const t of e)if(t.isIntersecting){const e=t.target,o=e.dataset.src;o&&(e.setAttribute("src",o),delete e.dataset.src),this.observer.unobserve(e)}},this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t)this.observer.observe(e)}disconnect(){this.observer.disconnect()}}function n(e,t){for(const o of t){const t=e.getAttribute(o);if(!t)continue;const r=i(t);void 0!==r&&(e[s(o)]=r)}}function i(e){const t=e.trim();if(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]"))try{return JSON.parse(t)}catch(e){try{const e=t.replaceAll("&#x22;",'"').replaceAll("&#34;",'"').replaceAll("&quot;",'"').replaceAll("&#x27;","'").replaceAll("&#39;","'").replaceAll("&apos;","'").replaceAll("&amp;","&");return JSON.parse(e)}catch(e){return}}}function s(e){return e.replaceAll(/-([a-z])/g,((e,t)=>t.toUpperCase()))}const d=class{constructor(t){e(this,t),this.value="",this.whitelist=a.markdownWhitelist,this.lazyLoadImages=!1,this.removeEmptyParagraphs=!0,this.imageIntersectionObserver=null}async textChanged(){var e,t;try{this.cleanupImageIntersectionObserver();const o=await r(this.value,{forceHardLineBreaks:!0,whitelist:null!==(e=this.whitelist)&&void 0!==e?e:[],lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});this.rootElement.innerHTML=o,function(e,t){if(e&&(null==t?void 0:t.length))for(const o of t){const t=e.querySelectorAll(o.tagName);for(const e of t)n(e,o.attributes)}}(this.rootElement,null!==(t=this.whitelist)&&void 0!==t?t:[]),this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleRemoveEmptyParagraphsChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return t(o,{key:"d7e3122596fa19c63e05d69855fbc693cb8c4fe7"},t("div",{key:"9a65798b0888a3d2d7a35c0d320408faa3d937b6",id:"markdown",ref:e=>this.rootElement=e}))}setupImageIntersectionObserver(){this.lazyLoadImages&&(this.imageIntersectionObserver=new l(this.rootElement))}cleanupImageIntersectionObserver(){this.imageIntersectionObserver&&(this.imageIntersectionObserver.disconnect(),this.imageIntersectionObserver=null)}static get watchers(){return{value:[{textChanged:0}],removeEmptyParagraphs:[{handleRemoveEmptyParagraphsChange:0}]}}};d.style='@charset "UTF-8";code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:var(--limel-theme-default-small-font-size);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:var(--limel-theme-default-font-size)}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:var(--limel-theme-default-font-size);word-break:break-word}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}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}: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:var(--limel-theme-default-font-size)}: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))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}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:var(--limel-theme-default-font-size);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}img{max-width:100%;border-radius:0.25rem}kbd{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));background-color:rgb(var(--contrast-200));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;padding:0.125rem 0.5rem;margin:0 0.25rem;box-shadow:var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;border-radius:0.125rem;border-style:solid;border-color:rgba(var(--contrast-600), 0.8);border-width:0 1px 0.125rem 1px}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto}';export{d as limel_markdown}
@@ -0,0 +1 @@
1
+ import{r as e,c as r,h as i,H as t,a as o}from"./p-DBTJNfo7.js";import{i as a}from"./p-CrvUOVvg.js";import{g as s}from"./p-CgNJbSP4.js";import{g as n}from"./p-5eP2N9QI.js";const d=class{constructor(i){e(this,i),this.actionSelected=r(this,"actionSelected"),this.actions=[],this.clickable=!1,this.orientation="portrait",this.canScrollUp=!1,this.canScrollDown=!1,this.setMarkdownElement=e=>{var r;e!==this.markdownElement&&(this.markdownElement&&(null===(r=this.markdownResizeObserver)||void 0===r||r.disconnect(),this.markdownElement.removeEventListener("scroll",this.checkIfScrollable)),this.markdownElement=e,this.markdownElement&&(this.markdownResizeObserver=new ResizeObserver(this.checkIfScrollable),this.markdownResizeObserver.observe(this.markdownElement),this.markdownElement.addEventListener("scroll",this.checkIfScrollable,{passive:!0}),this.checkIfScrollable()))},this.checkIfScrollable=()=>{if(!this.markdownElement)return;const e=this.markdownElement.scrollHeight,r=this.markdownElement.clientHeight,i=this.markdownElement.scrollTop,t=e>r,o=t&&!(i+r>=e-2),a=t&&!(i<=1);this.canScrollDown!==o&&(this.canScrollDown=o),this.canScrollUp!==a&&(this.canScrollUp=a)},this.handleActionSelect=e=>{e.stopPropagation(),a(e.detail)&&this.actionSelected.emit(e.detail)}}componentWillLoad(){const{handleMouseEnter:e,handleMouseLeave:r}=n(this.host);this.handleMouseEnter=e,this.handleMouseLeave=r}disconnectedCallback(){var e,r;null===(e=this.markdownResizeObserver)||void 0===e||e.disconnect(),null===(r=this.markdownElement)||void 0===r||r.removeEventListener("scroll",this.checkIfScrollable)}componentDidLoad(){this.setMarkdownElement(this.markdownElement)}render(){return i(t,{key:"a5b8b7c2bead5c54c7970b6d382704922c066e73",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},i("section",{key:"cb7c4392b7d92bc47ee533c24a1ca92818aa7076",tabindex:this.clickable?0:""},this.renderImage(),i("div",{key:"484d033da40562d5a460d629ba7cfa6116d9461d",class:"body"},this.renderHeader(),this.renderSlot(),this.renderValue(),this.renderActionBar()),i("limel-3d-hover-effect-glow",{key:"e86f33835e34306ec046d7c5fcf7fdb0f667fa86"})))}renderImage(){var e;if(null===(e=this.image)||void 0===e?void 0:e.src)return i("div",{class:"image-wrapper"},i("img",{src:this.image.src,alt:this.image.alt,loading:"lazy"}))}renderHeader(){if(this.heading||this.subheading||this.icon)return i("header",null,this.renderIcon(),i("div",{class:"headings"},this.renderHeading(),this.renderSubheading()))}renderIcon(){var e;const r=s(this.icon),t="string"==typeof this.icon||null===(e=this.icon)||void 0===e?void 0:e.color;if(r)return i("limel-icon",{style:{color:`${t}`},badge:!0,name:r})}renderHeading(){if(this.heading)return i("h1",{class:"title"},this.heading)}renderSubheading(){if(this.subheading)return i("h2",null,this.subheading)}renderSlot(){return i("slot",{name:"component"})}renderValue(){if(this.value)return i("div",{class:{"markdown-wrapper":!0,"can-scroll-up":this.canScrollUp,"can-scroll-down":this.canScrollDown}},i("limel-markdown",{class:"body-text",ref:this.setMarkdownElement,value:this.value}))}renderActionBar(){if(0!==this.actions.length)return i("limel-action-bar",{actions:this.actions,onItemSelected:this.handleActionSelect})}get host(){return o(this)}};d.style='@charset "UTF-8";*{box-sizing:border-box;min-width:0;min-height:0}:host(limel-card){display:flex;border-radius:var(--card-border-radius, 0.95rem)}section{box-sizing:border-box;display:flex;gap:0.5rem;flex-direction:column}:host(limel-card[orientation=landscape]) section{flex-direction:row}section{width:100%;border-radius:var(--card-border-radius, 0.95rem);border:1px solid rgb(var(--contrast-500));padding:0.25rem;background-color:var(--card-background-color, rgb(var(--contrast-300)))}section:hover{border-color:transparent;background-color:var(--card-background-color--hovered, var(--card-background-color, rgb(var(--contrast-200))))}.body{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}.image-wrapper{flex-shrink:0;display:flex;align-items:center;justify-content:center}:host(limel-card[orientation=portrait]) .image-wrapper{width:100%}:host(limel-card[orientation=landscape]) .image-wrapper{flex-shrink:0;max-width:40%;height:100%}:host(limel-card[orientation=landscape]) .image-wrapper img{height:100%}img{transition:filter 0.6s ease;object-fit:cover;border-radius:calc(var(--card-border-radius, 0.95rem) / 1.4);min-width:0.5rem;min-height:0.5rem;max-width:100%;max-height:100%}section:hover img,section:focus-visible img{transition-duration:0.2s;filter:saturate(1.3)}.markdown-wrapper{position:relative;flex-grow:1;display:flex;flex-direction:column}.markdown-wrapper limel-markdown{overflow-y:auto;flex-grow:1;padding:0.5rem 0.75rem}.markdown-wrapper::before{top:0;background:radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::after{bottom:0;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::before,.markdown-wrapper::after{content:"";pointer-events:none;position:absolute;right:0;left:0;height:0.75rem;opacity:0;transition:opacity 0.6s ease;background-repeat:no-repeat}.markdown-wrapper.can-scroll-up::before,.markdown-wrapper.can-scroll-down::after{opacity:1}header{flex-shrink:0;display:flex;justify-content:center;gap:0.5rem;padding:0.25rem 0.75rem}:host(limel-card[orientation=landscape]) header{padding-top:0.5rem}header:has(limel-icon){padding-left:0.25rem}header .headings{flex-grow:1;display:flex;flex-direction:column;gap:0.125rem}header .title{padding-right:1.25rem}header limel-icon{flex-shrink:0;width:2rem}header h1{font-size:1.125rem;font-weight:500;color:var(--card-heading-color, rgb(var(--contrast-1100)));letter-spacing:-0.03125rem}header h2{font-size:var(--limel-theme-default-font-size);font-weight:400;color:var(--card-subheading-color, rgb(var(--contrast-1000)))}header h1,header h2{word-break:break-word;hyphens:auto;-webkit-hyphens:auto;margin:0}limel-action-bar{flex-shrink:0;--action-bar-background-color:transparent;margin-left:auto}limel-3d-hover-effect-glow{border-radius:var(--card-border-radius, 0.95rem)}:host(limel-card){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-card){perspective:2000px}}section{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}section:focus{outline:none}section:hover,section:focus,section:focus-visible,section:focus-within{will-change:background-color, box-shadow, transform}section:hover,section:focus,section:focus-visible,section:active{transition-duration:0.2s}section:hover,section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}section:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}section:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}:host(limel-card[clickable]) section{cursor:pointer;box-shadow:var(--button-shadow-normal)}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}:host(limel-card[clickable]) section:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}';export{d as limel_card}
@@ -0,0 +1,18 @@
1
+ import { CustomElementDefinition } from '../../global/shared-types/custom-element.types';
2
+ /**
3
+ * After innerHTML is set on a container, custom elements receive all
4
+ * attribute values as strings. This function walks whitelisted custom
5
+ * elements and parses any attribute values that look like JSON objects
6
+ * or arrays, setting them as JS properties instead.
7
+ *
8
+ * This enables markdown content to include custom elements with complex
9
+ * props, e.g.:
10
+ * ```html
11
+ * <limel-chip text="GitHub" link='{"href":"https://github.com","target":"_blank"}'></limel-chip>
12
+ * ```
13
+ *
14
+ * @param container - The root element to search within.
15
+ * @param whitelist - The list of whitelisted custom element definitions.
16
+ */
17
+ export declare function hydrateCustomElements(container: HTMLElement | null | undefined, whitelist: CustomElementDefinition[] | null | undefined): void;
18
+ //# sourceMappingURL=hydrate-custom-elements.d.ts.map
@@ -16,6 +16,7 @@ import { CustomElementDefinition } from '../../global/shared-types/custom-elemen
16
16
  * @exampleComponent limel-example-markdown-blockquotes
17
17
  * @exampleComponent limel-example-markdown-horizontal-rule
18
18
  * @exampleComponent limel-example-markdown-custom-component
19
+ * @exampleComponent limel-example-markdown-custom-component-with-json-props
19
20
  * @exampleComponent limel-example-markdown-remove-empty-paragraphs
20
21
  * @exampleComponent limel-example-markdown-composite
21
22
  */
@@ -2361,6 +2361,7 @@ export namespace Components {
2361
2361
  * @exampleComponent limel-example-markdown-blockquotes
2362
2362
  * @exampleComponent limel-example-markdown-horizontal-rule
2363
2363
  * @exampleComponent limel-example-markdown-custom-component
2364
+ * @exampleComponent limel-example-markdown-custom-component-with-json-props
2364
2365
  * @exampleComponent limel-example-markdown-remove-empty-paragraphs
2365
2366
  * @exampleComponent limel-example-markdown-composite
2366
2367
  */
@@ -5321,6 +5322,7 @@ declare global {
5321
5322
  * @exampleComponent limel-example-markdown-blockquotes
5322
5323
  * @exampleComponent limel-example-markdown-horizontal-rule
5323
5324
  * @exampleComponent limel-example-markdown-custom-component
5325
+ * @exampleComponent limel-example-markdown-custom-component-with-json-props
5324
5326
  * @exampleComponent limel-example-markdown-remove-empty-paragraphs
5325
5327
  * @exampleComponent limel-example-markdown-composite
5326
5328
  */
@@ -8661,6 +8663,7 @@ declare namespace LocalJSX {
8661
8663
  * @exampleComponent limel-example-markdown-blockquotes
8662
8664
  * @exampleComponent limel-example-markdown-horizontal-rule
8663
8665
  * @exampleComponent limel-example-markdown-custom-component
8666
+ * @exampleComponent limel-example-markdown-custom-component-with-json-props
8664
8667
  * @exampleComponent limel-example-markdown-remove-empty-paragraphs
8665
8668
  * @exampleComponent limel-example-markdown-composite
8666
8669
  */
@@ -11703,6 +11706,7 @@ declare module "@stencil/core" {
11703
11706
  * @exampleComponent limel-example-markdown-blockquotes
11704
11707
  * @exampleComponent limel-example-markdown-horizontal-rule
11705
11708
  * @exampleComponent limel-example-markdown-custom-component
11709
+ * @exampleComponent limel-example-markdown-custom-component-with-json-props
11706
11710
  * @exampleComponent limel-example-markdown-remove-empty-paragraphs
11707
11711
  * @exampleComponent limel-example-markdown-composite
11708
11712
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "39.2.2",
3
+ "version": "39.3.1",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -1 +0,0 @@
1
- import{r as e,c as r,h as o,H as t,a as i}from"./p-DBTJNfo7.js";import{i as a}from"./p-CrvUOVvg.js";import{g as s}from"./p-CgNJbSP4.js";import{g as n}from"./p-5eP2N9QI.js";const d=class{constructor(o){e(this,o),this.actionSelected=r(this,"actionSelected"),this.actions=[],this.clickable=!1,this.orientation="portrait",this.canScrollUp=!1,this.canScrollDown=!1,this.setMarkdownElement=e=>{var r;e!==this.markdownElement&&(this.markdownElement&&(null===(r=this.markdownResizeObserver)||void 0===r||r.disconnect(),this.markdownElement.removeEventListener("scroll",this.checkIfScrollable)),this.markdownElement=e,this.markdownElement&&(this.markdownResizeObserver=new ResizeObserver(this.checkIfScrollable),this.markdownResizeObserver.observe(this.markdownElement),this.markdownElement.addEventListener("scroll",this.checkIfScrollable,{passive:!0}),this.checkIfScrollable()))},this.checkIfScrollable=()=>{if(!this.markdownElement)return;const e=this.markdownElement.scrollHeight,r=this.markdownElement.clientHeight,o=this.markdownElement.scrollTop,t=e>r,i=t&&!(o+r>=e-2),a=t&&!(o<=1);this.canScrollDown!==i&&(this.canScrollDown=i),this.canScrollUp!==a&&(this.canScrollUp=a)},this.handleActionSelect=e=>{e.stopPropagation(),a(e.detail)&&this.actionSelected.emit(e.detail)}}componentWillLoad(){const{handleMouseEnter:e,handleMouseLeave:r}=n(this.host);this.handleMouseEnter=e,this.handleMouseLeave=r}disconnectedCallback(){var e,r;null===(e=this.markdownResizeObserver)||void 0===e||e.disconnect(),null===(r=this.markdownElement)||void 0===r||r.removeEventListener("scroll",this.checkIfScrollable)}componentDidLoad(){this.setMarkdownElement(this.markdownElement)}render(){return o(t,{key:"a5b8b7c2bead5c54c7970b6d382704922c066e73",onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},o("section",{key:"cb7c4392b7d92bc47ee533c24a1ca92818aa7076",tabindex:this.clickable?0:""},this.renderImage(),o("div",{key:"484d033da40562d5a460d629ba7cfa6116d9461d",class:"body"},this.renderHeader(),this.renderSlot(),this.renderValue(),this.renderActionBar()),o("limel-3d-hover-effect-glow",{key:"e86f33835e34306ec046d7c5fcf7fdb0f667fa86"})))}renderImage(){var e;if(null===(e=this.image)||void 0===e?void 0:e.src)return o("img",{src:this.image.src,alt:this.image.alt,loading:"lazy"})}renderHeader(){if(this.heading||this.subheading||this.icon)return o("header",null,this.renderIcon(),o("div",{class:"headings"},this.renderHeading(),this.renderSubheading()))}renderIcon(){var e;const r=s(this.icon),t="string"==typeof this.icon||null===(e=this.icon)||void 0===e?void 0:e.color;if(r)return o("limel-icon",{style:{color:`${t}`},badge:!0,name:r})}renderHeading(){if(this.heading)return o("h1",{class:"title"},this.heading)}renderSubheading(){if(this.subheading)return o("h2",null,this.subheading)}renderSlot(){return o("slot",{name:"component"})}renderValue(){if(this.value)return o("div",{class:{"markdown-wrapper":!0,"can-scroll-up":this.canScrollUp,"can-scroll-down":this.canScrollDown}},o("limel-markdown",{class:"body-text",ref:this.setMarkdownElement,value:this.value}))}renderActionBar(){if(0!==this.actions.length)return o("limel-action-bar",{actions:this.actions,onItemSelected:this.handleActionSelect})}get host(){return i(this)}};d.style='@charset "UTF-8";*{box-sizing:border-box;min-width:0;min-height:0}:host(limel-card){display:flex;border-radius:var(--card-border-radius, 0.95rem)}section{box-sizing:border-box;display:flex;gap:0.5rem;flex-direction:column}:host(limel-card[orientation=landscape]) section{flex-direction:row}section{width:100%;border-radius:var(--card-border-radius, 0.95rem);border:1px solid rgb(var(--contrast-500));padding:0.25rem;background-color:var(--card-background-color, rgb(var(--contrast-300)))}section:hover{border-color:transparent;background-color:var(--card-background-color--hovered, var(--card-background-color, rgb(var(--contrast-200))))}.body{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}img{transition:filter 0.6s ease;object-fit:cover;border-radius:calc(var(--card-border-radius, 0.95rem) / 1.4)}:host(limel-card[orientation=portrait]) img{width:100%}:host(limel-card[orientation=landscape]) img{flex-shrink:0;max-width:40%;height:100%}section:hover img,section:focus-visible img{transition-duration:0.2s;filter:saturate(1.3)}.markdown-wrapper{position:relative;flex-grow:1;display:flex;flex-direction:column}.markdown-wrapper limel-markdown{overflow-y:auto;flex-grow:1;padding:0.5rem 0.75rem}.markdown-wrapper::before{top:0;background:radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::after{bottom:0;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0))}.markdown-wrapper::before,.markdown-wrapper::after{content:"";pointer-events:none;position:absolute;right:0;left:0;height:0.75rem;opacity:0;transition:opacity 0.6s ease;background-repeat:no-repeat}.markdown-wrapper.can-scroll-up::before,.markdown-wrapper.can-scroll-down::after{opacity:1}header{flex-shrink:0;display:flex;justify-content:center;gap:0.5rem;padding:0.25rem 0.75rem}:host(limel-card[orientation=landscape]) header{padding-top:0.5rem}header:has(limel-icon){padding-left:0.25rem}header .headings{flex-grow:1;display:flex;flex-direction:column;gap:0.125rem}header .title{padding-right:1.25rem}header limel-icon{flex-shrink:0;width:2rem}header h1{font-size:1.125rem;font-weight:500;color:var(--card-heading-color, rgb(var(--contrast-1100)));letter-spacing:-0.03125rem}header h2{font-size:var(--limel-theme-default-font-size);font-weight:400;color:var(--card-subheading-color, rgb(var(--contrast-1000)))}header h1,header h2{word-break:break-word;hyphens:auto;-webkit-hyphens:auto;margin:0}limel-action-bar{flex-shrink:0;--action-bar-background-color:transparent;margin-left:auto}limel-3d-hover-effect-glow{border-radius:var(--card-border-radius, 0.95rem)}:host(limel-card){isolation:isolate;transform-style:preserve-3d;perspective:1000px}@media (prefers-reduced-motion){:host(limel-card){perspective:2000px}}section{position:relative;transition-duration:0.8s;transition-property:transform, box-shadow, background-color;transition-timing-function:ease-out;transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg)}section:focus{outline:none}section:hover,section:focus,section:focus-visible,section:focus-within{will-change:background-color, box-shadow, transform}section:hover,section:focus,section:focus-visible,section:active{transition-duration:0.2s}section:hover,section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}section:hover{transform:scale3d(1.01, 1.01, 1.01) rotate3d(var(--limel-3d-hover-effect-rotate3d))}section:focus-visible{outline:none;transform:scale3d(1.01, 1.01, 1.01)}section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.5}@media (prefers-reduced-motion){section:hover limel-3d-hover-effect-glow{--limel-3d-hover-effect-glow-opacity:0.2}}:host(limel-card[clickable]) section{cursor:pointer;box-shadow:var(--button-shadow-normal)}:host(limel-card[clickable]) section:hover,:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--button-shadow-hovered), var(--shadow-depth-16)}:host(limel-card[clickable]) section:active{transform:scale3d(1, 1, 1) rotate3d(0, 0, 0, 0deg);box-shadow:var(--button-shadow-pressed)}:host(limel-card[clickable]) section:focus-visible{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-hovered)}:host(limel-card[clickable]) section:focus-visible:active{box-shadow:var(--shadow-depth-8-focused), var(--button-shadow-pressed)}';export{d as limel_card}
@@ -1 +0,0 @@
1
- import{r as e,h as t,H as o}from"./p-DBTJNfo7.js";import{m as r}from"./p-BRCcjfVu.js";import{g as a}from"./p-Dnt5w_Bp.js";import"./p-BFTU3MAI.js";import"./p-2kcqdtMr.js";class l{constructor(e){this.handleIntersection=e=>{for(const t of e)if(t.isIntersecting){const e=t.target,o=e.dataset.src;o&&(e.setAttribute("src",o),delete e.dataset.src),this.observer.unobserve(e)}},this.observer=new IntersectionObserver(this.handleIntersection);const t=e.querySelectorAll("img");for(const e of t)this.observer.observe(e)}disconnect(){this.observer.disconnect()}}const n=class{constructor(t){e(this,t),this.value="",this.whitelist=a.markdownWhitelist,this.lazyLoadImages=!1,this.removeEmptyParagraphs=!0,this.imageIntersectionObserver=null}async textChanged(){var e;try{this.cleanupImageIntersectionObserver();const t=await r(this.value,{forceHardLineBreaks:!0,whitelist:null!==(e=this.whitelist)&&void 0!==e?e:[],lazyLoadImages:this.lazyLoadImages,removeEmptyParagraphs:this.removeEmptyParagraphs});this.rootElement.innerHTML=t,this.setupImageIntersectionObserver()}catch(e){console.error(e)}}handleRemoveEmptyParagraphsChange(){return this.textChanged()}async componentDidLoad(){this.textChanged()}disconnectedCallback(){this.cleanupImageIntersectionObserver()}render(){return t(o,{key:"b1939b572c0a9ac59178497f56ebc469bc707d98"},t("div",{key:"f9dd27e5263281fad9e6d1da9d25d3ccd3a9990e",id:"markdown",ref:e=>this.rootElement=e}))}setupImageIntersectionObserver(){this.lazyLoadImages&&(this.imageIntersectionObserver=new l(this.rootElement))}cleanupImageIntersectionObserver(){this.imageIntersectionObserver&&(this.imageIntersectionObserver.disconnect(),this.imageIntersectionObserver=null)}static get watchers(){return{value:[{textChanged:0}],removeEmptyParagraphs:[{handleRemoveEmptyParagraphsChange:0}]}}};n.style='@charset "UTF-8";code{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-size:var(--limel-theme-default-small-font-size);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:var(--limel-theme-default-font-size)}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:var(--limel-theme-default-font-size);word-break:break-word}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}:host(limel-markdown:not(.no-table-styles)) tbody{border:1px solid rgb(var(--contrast-400));border-radius:0.25rem}: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:var(--limel-theme-default-font-size)}: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))}table{display:block;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}blockquote{position:relative;max-width:100%;margin:0.75rem 0;padding:0.5rem;border-left:0.25rem solid rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}blockquote:before,blockquote:after{position:absolute;line-height:0;font-size:2rem;opacity:0.4}blockquote:before{content:"“";left:-0.5rem;top:0.5rem}blockquote:after{content:"”";right:-0.25rem;bottom:-0.25rem}blockquote blockquote{padding-top:0;padding-right:0;padding-bottom:0;padding-left:0.25rem;border-color:rgb(var(--contrast-700));border-left-width:1px}blockquote blockquote:before,blockquote blockquote:after{display:none}blockquote:has(>blockquote){padding-left:0.25rem;padding-bottom:0}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:var(--limel-theme-default-font-size);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}img{max-width:100%;border-radius:0.25rem}kbd{font-family:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;font-weight:600;color:rgb(var(--contrast-1100));background-color:rgb(var(--contrast-200));white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:normal;padding:0.125rem 0.5rem;margin:0 0.25rem;box-shadow:var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;border-radius:0.125rem;border-style:solid;border-color:rgba(var(--contrast-600), 0.8);border-width:0 1px 0.125rem 1px}:host(limel-markdown.adjust-for-table-cell) img{max-height:1.25rem;vertical-align:middle}:host(limel-markdown.adjust-for-table-cell) p{display:inline}:host(limel-markdown.adjust-for-table-cell) h1,:host(limel-markdown.adjust-for-table-cell) h2,:host(limel-markdown.adjust-for-table-cell) h3,:host(limel-markdown.adjust-for-table-cell) h4,:host(limel-markdown.adjust-for-table-cell) h5,:host(limel-markdown.adjust-for-table-cell) h6{display:inline-block;vertical-align:bottom;font-size:var(--limel-theme-default-font-size);margin:0 0.25rem 0 0;letter-spacing:normal;font-weight:500}:host(limel-markdown.adjust-for-table-cell) h1:before,:host(limel-markdown.adjust-for-table-cell) h2:before,:host(limel-markdown.adjust-for-table-cell) h3:before,:host(limel-markdown.adjust-for-table-cell) h4:before,:host(limel-markdown.adjust-for-table-cell) h5:before,:host(limel-markdown.adjust-for-table-cell) h6:before{opacity:0.6;vertical-align:middle;font-size:0.5rem;border-radius:0.25rem 0 0 0.25rem;padding:0.25rem;padding-right:2rem;margin-right:-1.75rem;background:linear-gradient(to right, rgb(var(--contrast-800), 0.6), rgb(var(--contrast-800), 0))}:host(limel-markdown.adjust-for-table-cell) h1:before{content:"H1"}:host(limel-markdown.adjust-for-table-cell) h2:before{content:"H2"}:host(limel-markdown.adjust-for-table-cell) h3:before{content:"H3"}:host(limel-markdown.adjust-for-table-cell) h4:before{content:"H4"}:host(limel-markdown.adjust-for-table-cell) h5:before{content:"H5"}:host(limel-markdown.adjust-for-table-cell) h6:before{content:"H6"}:host(limel-markdown.adjust-for-table-cell) pre{margin:0}:host(limel-markdown.adjust-for-table-cell) pre>code{padding:0.125rem;margin:0}:host(limel-markdown.adjust-for-table-cell) dl{margin:0}:host(limel-markdown.adjust-for-table-cell) dl dt,:host(limel-markdown.adjust-for-table-cell) dl dd{padding:0.00625rem 0.125rem}*,*::before,*::after{box-sizing:border-box}* :where(:not(img,video,svg,canvas,iframe)),*::before :where(:not(img,video,svg,canvas,iframe)),*::after :where(:not(img,video,svg,canvas,iframe)){min-width:0;min-height:0}hr{border-top:1px solid rgb(var(--contrast-700))}.MsoNormal{margin:0}:host(limel-markdown.reset-img-height) #markdown img{height:auto}';export{n as limel_markdown}