@elmethis/core 1.0.0-alpha.189 → 1.0.0-alpha.190

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.
Files changed (154) hide show
  1. package/dist/components/badge/ElmTag.vue2.mjs +1 -1
  2. package/dist/components/code/ElmCodeBlock.stories.d.ts +2 -0
  3. package/dist/components/code/ElmCodeBlock.vue.d.ts +22 -1
  4. package/dist/components/code/ElmCodeBlock.vue.mjs +2 -2
  5. package/dist/components/code/ElmCodeBlock.vue2.mjs +13 -5
  6. package/dist/components/containments/ElmModal.vue.d.ts +1 -1
  7. package/dist/components/containments/ElmModal.vue.mjs +2 -2
  8. package/dist/components/containments/ElmSnackbar.vue2.mjs +1 -1
  9. package/dist/components/containments/ElmSnackbarContainer.vue.mjs +2 -2
  10. package/dist/components/containments/ElmToggle.vue.d.ts +9 -5
  11. package/dist/components/containments/ElmToggle.vue.mjs +2 -2
  12. package/dist/components/containments/ElmToggle.vue2.mjs +35 -3
  13. package/dist/components/containments/ElmToggle.vue3.mjs +10 -6
  14. package/dist/components/containments/ElmTooltip.vue.mjs +2 -2
  15. package/dist/components/containments/useSnackbarState.d.ts +1 -1
  16. package/dist/components/data/ElmStatusMessage.vue.d.ts +1 -1
  17. package/dist/components/data/ElmStatusMessage.vue.mjs +2 -2
  18. package/dist/components/data/ElmStatusMessage.vue2.mjs +1 -1
  19. package/dist/components/{headings/ElmHeading4.stories.d.ts → fallback/ElmUnsupportedBlock.stories.d.ts} +2 -2
  20. package/dist/components/fallback/ElmUnsupportedBlock.vue.d.ts +5 -0
  21. package/dist/components/fallback/ElmUnsupportedBlock.vue.mjs +10 -0
  22. package/dist/components/fallback/ElmUnsupportedBlock.vue2.mjs +46 -0
  23. package/dist/components/fallback/ElmUnsupportedBlock.vue3.mjs +29 -0
  24. package/dist/components/form/ElmButton.vue.mjs +2 -2
  25. package/dist/components/form/ElmCheckbox.vue2.mjs +1 -1
  26. package/dist/components/form/ElmTextField.vue2.mjs +1 -1
  27. package/dist/components/icon/ElmArrowIcon.vue.d.ts +1 -1
  28. package/dist/components/icon/ElmBookmarkIcon.vue2.mjs +1 -1
  29. package/dist/components/{inline → icon}/ElmInlineIcon.vue.d.ts +6 -0
  30. package/dist/components/icon/ElmInlineIcon.vue2.mjs +27 -0
  31. package/dist/components/icon/ElmInlineIcon.vue3.mjs +20 -0
  32. package/dist/components/icon/ElmLanguageIcon.vue.mjs +2 -2
  33. package/dist/components/icon/ElmLoginIcon.vue2.mjs +1 -1
  34. package/dist/components/media/ElmBlockImage.vue.mjs +2 -2
  35. package/dist/components/media/ElmBlockImage.vue2.mjs +14 -5
  36. package/dist/components/media/ElmBlockImage.vue3.mjs +10 -9
  37. package/dist/components/media/ElmFile.vue2.mjs +1 -1
  38. package/dist/components/media/ElmFile.vue3.mjs +6 -6
  39. package/dist/components/media/ElmImage.vue.mjs +2 -2
  40. package/dist/components/media/ElmImage.vue2.mjs +1 -1
  41. package/dist/components/navigation/ElmBookmark.vue.d.ts +1 -1
  42. package/dist/components/navigation/ElmBookmark.vue2.mjs +1 -1
  43. package/dist/components/navigation/ElmBreadcrumb.vue2.mjs +1 -1
  44. package/dist/components/navigation/ElmPagetop.vue.d.ts +1 -1
  45. package/dist/components/navigation/ElmTableOfContents.vue2.mjs +1 -1
  46. package/dist/components/others/ElmColorSample.vue.mjs +2 -2
  47. package/dist/components/others/ElmJsonComponentRenderer.stories.d.ts +23 -0
  48. package/dist/components/others/ElmJsonComponentRenderer.vue.d.ts +6 -0
  49. package/dist/components/others/ElmJsonComponentRenderer.vue.mjs +10 -0
  50. package/dist/components/others/ElmJsonComponentRenderer.vue2.mjs +217 -0
  51. package/dist/components/others/ElmJsonComponentRenderer.vue3.mjs +21 -0
  52. package/dist/components/table/ElmTable.vue.d.ts +21 -2
  53. package/dist/components/table/ElmTable.vue.mjs +5 -14
  54. package/dist/components/table/ElmTable.vue2.mjs +40 -5
  55. package/dist/components/table/ElmTable.vue3.mjs +27 -0
  56. package/dist/components/table/ElmTableBody.vue.d.ts +5 -2
  57. package/dist/components/table/ElmTableCell.vue.d.ts +5 -2
  58. package/dist/components/table/ElmTableCell.vue.mjs +2 -2
  59. package/dist/components/table/ElmTableHeader.vue.d.ts +5 -2
  60. package/dist/components/table/ElmTableHeader.vue3.mjs +1 -1
  61. package/dist/components/table/ElmTableRow.vue.d.ts +5 -2
  62. package/dist/components/table/ElmTableRow.vue.mjs +5 -2
  63. package/dist/components/typography/ElmBlockQuote.vue.d.ts +1 -0
  64. package/dist/components/typography/ElmBlockQuote.vue2.mjs +41 -4
  65. package/dist/components/typography/ElmBlockQuote.vue3.mjs +10 -4
  66. package/dist/components/typography/ElmCallout.vue.d.ts +1 -1
  67. package/dist/components/typography/ElmCallout.vue2.mjs +1 -1
  68. package/dist/components/{headings/ElmHeading1.stories.d.ts → typography/ElmHeading.stories.d.ts} +3 -2
  69. package/dist/components/typography/ElmHeading.vue.d.ts +49 -0
  70. package/dist/components/typography/ElmHeading.vue.mjs +10 -0
  71. package/dist/components/typography/ElmHeading.vue2.mjs +72 -0
  72. package/dist/components/typography/ElmHeading.vue3.mjs +39 -0
  73. package/dist/components/{inline → typography}/ElmInlineText.stories.d.ts +2 -0
  74. package/dist/components/{inline → typography}/ElmInlineText.vue.d.ts +12 -0
  75. package/dist/components/typography/ElmInlineText.vue2.mjs +95 -0
  76. package/dist/components/typography/ElmInlineText.vue3.mjs +29 -0
  77. package/dist/components/typography/ElmList.stories.d.ts +8 -0
  78. package/dist/components/typography/ElmList.vue.d.ts +31 -0
  79. package/dist/components/typography/ElmList.vue.mjs +36 -0
  80. package/dist/components/typography/ElmList.vue3.mjs +17 -0
  81. package/dist/hooks/useTyping.d.ts +1 -1
  82. package/dist/index.d.ts +12 -28
  83. package/dist/index.mjs +72 -89
  84. package/dist/node_modules/.pnpm/@mdi_js@7.4.47/node_modules/@mdi/js/mdi.mjs +14 -0
  85. package/package.json +8 -6
  86. package/dist/components/headings/ElmHeading1.vue.d.ts +0 -28
  87. package/dist/components/headings/ElmHeading1.vue.mjs +0 -10
  88. package/dist/components/headings/ElmHeading1.vue2.mjs +0 -43
  89. package/dist/components/headings/ElmHeading1.vue3.mjs +0 -20
  90. package/dist/components/headings/ElmHeading2.stories.d.ts +0 -6
  91. package/dist/components/headings/ElmHeading2.vue.d.ts +0 -28
  92. package/dist/components/headings/ElmHeading2.vue.mjs +0 -10
  93. package/dist/components/headings/ElmHeading2.vue2.mjs +0 -49
  94. package/dist/components/headings/ElmHeading2.vue3.mjs +0 -23
  95. package/dist/components/headings/ElmHeading3.stories.d.ts +0 -6
  96. package/dist/components/headings/ElmHeading3.vue.d.ts +0 -28
  97. package/dist/components/headings/ElmHeading3.vue.mjs +0 -10
  98. package/dist/components/headings/ElmHeading3.vue2.mjs +0 -39
  99. package/dist/components/headings/ElmHeading3.vue3.mjs +0 -20
  100. package/dist/components/headings/ElmHeading4.vue.d.ts +0 -26
  101. package/dist/components/headings/ElmHeading4.vue.mjs +0 -10
  102. package/dist/components/headings/ElmHeading4.vue2.mjs +0 -31
  103. package/dist/components/headings/ElmHeading4.vue3.mjs +0 -20
  104. package/dist/components/headings/ElmHeading5.stories.d.ts +0 -6
  105. package/dist/components/headings/ElmHeading5.vue.d.ts +0 -26
  106. package/dist/components/headings/ElmHeading5.vue.mjs +0 -10
  107. package/dist/components/headings/ElmHeading5.vue2.mjs +0 -31
  108. package/dist/components/headings/ElmHeading5.vue3.mjs +0 -20
  109. package/dist/components/headings/ElmHeading6.stories.d.ts +0 -6
  110. package/dist/components/headings/ElmHeading6.vue.d.ts +0 -26
  111. package/dist/components/headings/ElmHeading6.vue.mjs +0 -10
  112. package/dist/components/headings/ElmHeading6.vue2.mjs +0 -31
  113. package/dist/components/headings/ElmHeading6.vue3.mjs +0 -20
  114. package/dist/components/inline/ElmInlineIcon.vue2.mjs +0 -21
  115. package/dist/components/inline/ElmInlineIcon.vue3.mjs +0 -20
  116. package/dist/components/inline/ElmInlineLink.stories.d.ts +0 -9
  117. package/dist/components/inline/ElmInlineLink.vue.d.ts +0 -38
  118. package/dist/components/inline/ElmInlineLink.vue.mjs +0 -10
  119. package/dist/components/inline/ElmInlineLink.vue2.mjs +0 -55
  120. package/dist/components/inline/ElmInlineLink.vue3.mjs +0 -23
  121. package/dist/components/inline/ElmInlineRuby.stories.d.ts +0 -6
  122. package/dist/components/inline/ElmInlineRuby.vue.d.ts +0 -19
  123. package/dist/components/inline/ElmInlineRuby.vue.mjs +0 -29
  124. package/dist/components/inline/ElmInlineRuby.vue2.mjs +0 -4
  125. package/dist/components/inline/ElmInlineText.vue2.mjs +0 -57
  126. package/dist/components/inline/ElmInlineText.vue3.mjs +0 -23
  127. package/dist/components/renderer/ElmJsonRenderer.stories.d.ts +0 -20
  128. package/dist/components/renderer/ElmJsonRenderer.vue.d.ts +0 -200
  129. package/dist/components/renderer/ElmJsonRenderer.vue.mjs +0 -150
  130. package/dist/components/renderer/ElmJsonRenderer.vue2.mjs +0 -4
  131. package/dist/components/typography/ElmBulletedList.stories.d.ts +0 -7
  132. package/dist/components/typography/ElmBulletedList.vue.d.ts +0 -23
  133. package/dist/components/typography/ElmBulletedList.vue.mjs +0 -27
  134. package/dist/components/typography/ElmBulletedList.vue3.mjs +0 -17
  135. package/dist/components/typography/ElmListItem.stories.d.ts +0 -6
  136. package/dist/components/typography/ElmListItem.vue.d.ts +0 -19
  137. package/dist/components/typography/ElmListItem.vue.mjs +0 -10
  138. package/dist/components/typography/ElmListItem.vue2.mjs +0 -16
  139. package/dist/components/typography/ElmListItem.vue3.mjs +0 -20
  140. package/dist/components/typography/ElmNumberedList.stories.d.ts +0 -7
  141. package/dist/components/typography/ElmNumberedList.vue.d.ts +0 -23
  142. package/dist/components/typography/ElmNumberedList.vue.mjs +0 -27
  143. package/dist/components/typography/ElmNumberedList.vue3.mjs +0 -17
  144. /package/dist/components/{inline → icon}/ElmInlineIcon.stories.d.ts +0 -0
  145. /package/dist/components/{inline → icon}/ElmInlineIcon.vue.mjs +0 -0
  146. /package/dist/components/others/{ElmTemplate.stories.d.ts → ElmTyping.stories.d.ts} +0 -0
  147. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.stories.d.ts +0 -0
  148. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.vue.d.ts +0 -0
  149. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.vue.mjs +0 -0
  150. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.vue2.mjs +0 -0
  151. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.vue3.mjs +0 -0
  152. /package/dist/components/{inline → typography}/ElmInlineText.vue.mjs +0 -0
  153. /package/dist/components/{inline → typography}/ElmTypingAnimation.stories.d.ts +0 -0
  154. /package/dist/components/{inline → typography}/ElmTypingAnimation.vue.d.ts +0 -0
@@ -1,55 +0,0 @@
1
- import { defineComponent, ref, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createTextVNode, createVNode, toDisplayString, unref } from "vue";
2
- import { Icon } from "@iconify/vue";
3
- const _hoisted_1 = ["href", "target"];
4
- const _hoisted_2 = ["src"];
5
- const _sfc_main = /* @__PURE__ */ defineComponent({
6
- __name: "ElmInlineLink",
7
- props: {
8
- text: {},
9
- href: {},
10
- favicon: {},
11
- size: { default: "1rem" },
12
- openInNewTab: { type: Boolean, default: true },
13
- iconType: {},
14
- onClick: {}
15
- },
16
- setup(__props) {
17
- const props = __props;
18
- function handleClick(event) {
19
- if (props.onClick) {
20
- event.preventDefault();
21
- props.onClick();
22
- }
23
- }
24
- const faviconSrc = ref(props.favicon);
25
- const handleError = () => {
26
- faviconSrc.value = `data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="gray" d="M17.9 17.39c-.26-.8-1.01-1.39-1.9-1.39h-1v-3a1 1 0 0 0-1-1H8v-2h2a1 1 0 0 0 1-1V7h2a2 2 0 0 0 2-2v-.41a7.984 7.984 0 0 1 2.9 12.8M11 19.93c-3.95-.49-7-3.85-7-7.93c0-.62.08-1.22.21-1.79L9 15v1a2 2 0 0 0 2 2m1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2"/></svg>`;
27
- };
28
- return (_ctx, _cache) => {
29
- return openBlock(), createElementBlock("a", {
30
- class: normalizeClass(_ctx.$style.link),
31
- href: _ctx.href,
32
- style: normalizeStyle({ "--font-size": _ctx.size }),
33
- target: _ctx.openInNewTab ? "_blank" : void 0,
34
- rel: "noopener noreferrer",
35
- onClick: handleClick
36
- }, [
37
- faviconSrc.value ? (openBlock(), createElementBlock("img", {
38
- key: 0,
39
- src: faviconSrc.value,
40
- alt: "favicon",
41
- onError: handleError,
42
- class: normalizeClass(_ctx.$style.icon)
43
- }, null, 42, _hoisted_2)) : createCommentVNode("", true),
44
- createTextVNode(" " + toDisplayString(_ctx.text ?? _ctx.href) + " ", 1),
45
- createVNode(unref(Icon), {
46
- icon: _ctx.iconType != null ? _ctx.iconType === "internal" ? "mdi:chevron-right" : "mdi:external-link" : _ctx.openInNewTab ? "mdi:external-link" : "mdi:chevron-right",
47
- class: normalizeClass(_ctx.$style.icon)
48
- }, null, 8, ["icon", "class"])
49
- ], 14, _hoisted_1);
50
- };
51
- }
52
- });
53
- export {
54
- _sfc_main as default
55
- };
@@ -1,23 +0,0 @@
1
- (function() {
2
- "use strict";
3
- try {
4
- if (typeof document != "undefined") {
5
- var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode("._link_eebb0_1{all:unset;box-sizing:border-box;padding:0 .25rem;font-size:var(--font-size);display:inline-flex;align-items:center;gap:.25rem;cursor:pointer;color:#6987b8;border-radius:.125rem .125rem 0 0;border-bottom:dashed 1px #6987b8;transition:background-color .2s,color .2s}._link_eebb0_1:hover{background-color:#6987b833}._link_eebb0_1:active{color:#59b57c;background-color:#59b57c33}._link_eebb0_1:visited{color:#9771bd;border-bottom:dashed 1px #9771bd}._link_eebb0_1:visited:hover{background-color:#9771bd33}._link_eebb0_1:visited:active{color:#59b57c;background-color:#59b57c33}._link_eebb0_1 ._icon_eebb0_33{width:var(--font-size);height:var(--font-size)}"));
7
- document.head.appendChild(elementStyle);
8
- }
9
- } catch (e) {
10
- console.error("vite-plugin-css-injected-by-js", e);
11
- }
12
- })();
13
- const link = "_link_eebb0_1";
14
- const icon = "_icon_eebb0_33";
15
- const style0 = {
16
- link,
17
- icon
18
- };
19
- export {
20
- style0 as default,
21
- icon,
22
- link
23
- };
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
2
- import { default as ElmInlineRuby } from './ElmInlineRuby.vue';
3
- declare const meta: Meta<typeof ElmInlineRuby>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Primary: Story;
@@ -1,19 +0,0 @@
1
- import { Property } from 'csstype';
2
- export interface ElmInlineRubyProps {
3
- /**
4
- * The text to display.
5
- */
6
- text: string;
7
- /**
8
- * Specifies the color of the text.
9
- *
10
- * e.g.) `'red'`, `'#ff0000'`, `'rgba(255, 0, 0, 0.5)'`
11
- */
12
- color?: Property.BackgroundColor;
13
- /**
14
- * The ruby text to display.
15
- */
16
- ruby: string;
17
- }
18
- declare const _default: import('vue').DefineComponent<ElmInlineRubyProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmInlineRubyProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
19
- export default _default;
@@ -1,29 +0,0 @@
1
- import { defineComponent, createElementBlock, openBlock, createVNode, createElementVNode } from "vue";
2
- import ElmInlineText from "./ElmInlineText.vue.mjs";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "ElmInlineRuby",
5
- props: {
6
- text: {},
7
- color: {},
8
- ruby: {}
9
- },
10
- setup(__props) {
11
- return (_ctx, _cache) => {
12
- return openBlock(), createElementBlock("ruby", null, [
13
- createVNode(ElmInlineText, {
14
- text: _ctx.text,
15
- color: _ctx.color
16
- }, null, 8, ["text", "color"]),
17
- createElementVNode("rt", null, [
18
- createVNode(ElmInlineText, {
19
- text: _ctx.ruby,
20
- color: _ctx.color
21
- }, null, 8, ["text", "color"])
22
- ])
23
- ]);
24
- };
25
- }
26
- });
27
- export {
28
- _sfc_main as default
29
- };
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./ElmInlineRuby.vue.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,57 +0,0 @@
1
- import { defineComponent, useCssModule, createBlock, openBlock, resolveDynamicComponent, h } from "vue";
2
- import { getLuminance } from "polished";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "ElmInlineText",
5
- props: {
6
- text: {},
7
- color: {},
8
- size: {},
9
- bold: { type: Boolean, default: false },
10
- italic: { type: Boolean, default: false },
11
- underline: { type: Boolean, default: false },
12
- strikethrough: { type: Boolean, default: false },
13
- code: { type: Boolean, default: false },
14
- backgroundColor: {}
15
- },
16
- setup(__props) {
17
- const props = __props;
18
- const style = useCssModule();
19
- const render = () => {
20
- const backgroundColor = props.backgroundColor != null ? getLuminance(props.backgroundColor) < 0.5 ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.7)" : void 0;
21
- let vnode = h(
22
- "span",
23
- {
24
- class: style.text,
25
- style: {
26
- "--color": props.color ?? backgroundColor,
27
- "--font-size": props.size,
28
- "--background-color": props.backgroundColor
29
- }
30
- },
31
- props.text
32
- );
33
- if (props.strikethrough) {
34
- vnode = h("del", {}, vnode);
35
- }
36
- if (props.italic) {
37
- vnode = h("em", {}, vnode);
38
- }
39
- if (props.underline) {
40
- vnode = h("ins", {}, vnode);
41
- }
42
- if (props.bold) {
43
- vnode = h("strong", {}, vnode);
44
- }
45
- if (props.code) {
46
- vnode = h("code", { class: style.code }, vnode);
47
- }
48
- return vnode;
49
- };
50
- return (_ctx, _cache) => {
51
- return openBlock(), createBlock(resolveDynamicComponent(render()));
52
- };
53
- }
54
- });
55
- export {
56
- _sfc_main as default
57
- };
@@ -1,23 +0,0 @@
1
- (function() {
2
- "use strict";
3
- try {
4
- if (typeof document != "undefined") {
5
- var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode('._text_8qsji_1{padding:0;margin:0;color:#000000b3;color:var(--color, rgba(0, 0, 0, .7));font-size:inherit;font-size:var(--font-size, inherit);line-height:1rem;line-height:var(--font-size, 1rem);background-color:var(--background-color)}._text_8qsji_1::-moz-selection{color:#ffffffb3;background-color:#000000b3;background-color:var(--color, rgba(0, 0, 0, .7))}._text_8qsji_1::selection{color:#ffffffb3;background-color:#000000b3;background-color:var(--color, rgba(0, 0, 0, .7))}[data-theme=dark] ._text_8qsji_1{color:#ffffffb3;color:var(--color, rgba(255, 255, 255, .7))}[data-theme=dark] ._text_8qsji_1::-moz-selection{color:#000000b3;background-color:#ffffffb3;background-color:var(--color, rgba(255, 255, 255, .7))}[data-theme=dark] ._text_8qsji_1::selection{color:#000000b3;background-color:#ffffffb3;background-color:var(--color, rgba(255, 255, 255, .7))}._code_8qsji_21{margin-inline:.25rem;padding:2px .5em;font-size:calc(1rem - 2px);border-radius:.125rem;background-color:#00000013;font-family:"Source Code Pro" monospace}'));
7
- document.head.appendChild(elementStyle);
8
- }
9
- } catch (e) {
10
- console.error("vite-plugin-css-injected-by-js", e);
11
- }
12
- })();
13
- const text = "_text_8qsji_1";
14
- const code = "_code_8qsji_21";
15
- const style0 = {
16
- text,
17
- code
18
- };
19
- export {
20
- code,
21
- style0 as default,
22
- text
23
- };
@@ -1,20 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
2
- import { default as ElmJsonRenderer } from './ElmJsonRenderer.vue';
3
- declare const meta: Meta<typeof ElmJsonRenderer>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Primary: Story;
7
- export declare const InlineIcon: Story;
8
- export declare const Callout: Story;
9
- export declare const BulletedList: Story;
10
- export declare const NumberedList: Story;
11
- export declare const Blockquote: Story;
12
- export declare const Divider: Story;
13
- export declare const Headings: Story;
14
- export declare const CodeBlock: Story;
15
- export declare const Paragraph: Story;
16
- export declare const Table: Story;
17
- export declare const Katex: Story;
18
- export declare const Image: Story;
19
- export declare const Bookmark: Story;
20
- export declare const Full: Story;
@@ -1,200 +0,0 @@
1
- import { ElmInlineTextProps } from '../inline/ElmInlineText.vue';
2
- import { ElmInlineLinkProps } from '../inline/ElmInlineLink.vue';
3
- import { ElmInlineIconProps } from '../inline/ElmInlineIcon.vue';
4
- import { ElmCalloutProps } from '../typography/ElmCallout.vue';
5
- import { ElmBulletedListProps } from '../typography/ElmBulletedList.vue';
6
- import { ElmNumberedListProps } from '../typography/ElmNumberedList.vue';
7
- import { ElmListItemProps } from '../typography/ElmListItem.vue';
8
- import { ElmBlockQuoteProps } from '../typography/ElmBlockQuote.vue';
9
- import { ElmDividerProps } from '../typography/ElmDivider.vue';
10
- import { ElmHeading1Props } from '../headings/ElmHeading1.vue';
11
- import { ElmHeading2Props } from '../headings/ElmHeading2.vue';
12
- import { ElmHeading3Props } from '../headings/ElmHeading3.vue';
13
- import { ElmHeading4Props } from '../headings/ElmHeading4.vue';
14
- import { ElmHeading5Props } from '../headings/ElmHeading5.vue';
15
- import { ElmHeading6Props } from '../headings/ElmHeading6.vue';
16
- import { ElmCodeBlockProps } from '../code/ElmCodeBlock.vue';
17
- import { ElmParagraphProps } from '../typography/ElmParagraph.vue';
18
- import { ElmTableProps } from '../table/ElmTable.vue';
19
- import { ElmTableHeaderProps } from '../table/ElmTableHeader.vue';
20
- import { ElmTableBodyProps } from '../table/ElmTableBody.vue';
21
- import { ElmTableRowProps } from '../table/ElmTableRow.vue';
22
- import { ElmTableCellProps } from '../table/ElmTableCell.vue';
23
- import { ElmKatexProps } from '../code/ElmKatex.vue';
24
- import { ElmImageProps } from '../media/ElmImage.vue';
25
- import { ElmBlockImageProps } from '../media/ElmBlockImage.vue';
26
- import { ElmBookmarkProps } from '../navigation/ElmBookmark.vue';
27
- import { ElmToggleProps } from '../containments/ElmToggle.vue';
28
- import { ElmCheckboxProps } from '../form/ElmCheckbox.vue';
29
- import { ElmFileProps } from '../media/ElmFile.vue';
30
- import { ElmColumnProps } from '../containments/ElmColumn.vue';
31
- import { ElmColumnListProps } from '../containments/ElmColumnList.vue';
32
- type ComponentType = 'ElmInlineText' | 'ElmInlineLink' | 'ElmInlineIcon' | 'ElmCallout' | 'ElmBulletedList' | 'ElmNumberedList' | 'ElmListItem' | 'ElmBlockQuote' | 'ElmDivider' | 'ElmHeading1' | 'ElmHeading2' | 'ElmHeading3' | 'ElmHeading4' | 'ElmHeading5' | 'ElmHeading6' | 'ElmCodeBlock' | 'ElmParagraph' | 'ElmTable' | 'ElmTableHeader' | 'ElmTableBody' | 'ElmTableRow' | 'ElmTableCell' | 'ElmKatex' | 'ElmImage' | 'ElmBlockImage' | 'ElmBookmark' | 'ElmToggle' | 'ElmCheckbox' | 'ElmFile' | 'ElmColumn' | 'ElmColumnList';
33
- type ComponentProps = ElmInlineTextProps | ElmInlineLinkProps | ElmInlineIconProps | ElmCalloutProps | ElmBulletedListProps | ElmNumberedListProps | ElmListItemProps | ElmBlockQuoteProps | ElmDividerProps | ElmHeading1Props | ElmHeading2Props | ElmHeading3Props | ElmHeading4Props | ElmHeading5Props | ElmHeading6Props | ElmCodeBlockProps | ElmParagraphProps | ElmTableProps | ElmTableHeaderProps | ElmTableBodyProps | ElmTableRowProps | ElmTableCellProps | ElmKatexProps | ElmImageProps | ElmBlockImageProps | ElmBookmarkProps | ElmToggleProps | ElmCheckboxProps | ElmFileProps | ElmColumnProps | ElmColumnListProps;
34
- interface JsonComponentBase {
35
- type: ComponentType;
36
- id?: string;
37
- props?: ComponentProps;
38
- children?: JsonComponent[];
39
- }
40
- interface ElmInlineTextJsonComponent extends JsonComponentBase {
41
- type: 'ElmInlineText';
42
- id?: string;
43
- props?: ElmInlineTextProps;
44
- }
45
- interface ElmInlineLinkJsonComponent extends JsonComponentBase {
46
- type: 'ElmInlineLink';
47
- id?: string;
48
- props?: ElmInlineLinkProps;
49
- }
50
- interface ElmInlineIconJsonComponent extends JsonComponentBase {
51
- type: 'ElmInlineIcon';
52
- id?: string;
53
- props?: ElmInlineIconProps;
54
- }
55
- interface ElmCalloutJsonComponent extends JsonComponentBase {
56
- type: 'ElmCallout';
57
- id?: string;
58
- props?: ElmCalloutProps;
59
- }
60
- interface ElmBulletedListJsonComponent extends JsonComponentBase {
61
- type: 'ElmBulletedList';
62
- id?: string;
63
- props?: ElmBulletedListProps;
64
- }
65
- interface ElmNumberedListJsonComponent extends JsonComponentBase {
66
- type: 'ElmNumberedList';
67
- id?: string;
68
- props?: ElmNumberedListProps;
69
- }
70
- interface ElmListItemJsonComponent extends JsonComponentBase {
71
- type: 'ElmListItem';
72
- id?: string;
73
- props?: ElmListItemProps;
74
- }
75
- interface ElmBlockQuoteJsonComponent extends JsonComponentBase {
76
- type: 'ElmBlockQuote';
77
- id?: string;
78
- props?: ElmBlockQuoteProps;
79
- }
80
- interface ElmDividerJsonComponent extends JsonComponentBase {
81
- type: 'ElmDivider';
82
- id?: string;
83
- props?: ElmDividerProps;
84
- }
85
- interface ElmHeading1JsonComponent extends JsonComponentBase {
86
- type: 'ElmHeading1';
87
- id?: string;
88
- props?: ElmHeading1Props;
89
- }
90
- interface ElmHeading2JsonComponent extends JsonComponentBase {
91
- type: 'ElmHeading2';
92
- id?: string;
93
- props?: ElmHeading2Props;
94
- }
95
- interface ElmHeading3JsonComponent extends JsonComponentBase {
96
- type: 'ElmHeading3';
97
- id?: string;
98
- props?: ElmHeading3Props;
99
- }
100
- interface ElmHeading4JsonComponent extends JsonComponentBase {
101
- type: 'ElmHeading4';
102
- id?: string;
103
- props?: ElmHeading4Props;
104
- }
105
- interface ElmHeading5JsonComponent extends JsonComponentBase {
106
- type: 'ElmHeading5';
107
- id?: string;
108
- props?: ElmHeading5Props;
109
- }
110
- interface ElmHeading6JsonComponent extends JsonComponentBase {
111
- type: 'ElmHeading6';
112
- id?: string;
113
- props?: ElmHeading6Props;
114
- }
115
- interface ElmCodeBlockJsonComponent extends JsonComponentBase {
116
- type: 'ElmCodeBlock';
117
- id?: string;
118
- props?: ElmCodeBlockProps;
119
- }
120
- interface ElmParagraphJsonComponent extends JsonComponentBase {
121
- type: 'ElmParagraph';
122
- id?: string;
123
- props?: ElmParagraphProps;
124
- }
125
- interface ElmTableJsonComponent extends JsonComponentBase {
126
- type: 'ElmTable';
127
- id?: string;
128
- props?: ElmTableProps;
129
- }
130
- interface ElmTableHeaderJsonComponent extends JsonComponentBase {
131
- type: 'ElmTableHeader';
132
- id?: string;
133
- props?: ElmTableHeaderProps;
134
- }
135
- interface ElmTableBodyJsonComponent extends JsonComponentBase {
136
- type: 'ElmTableBody';
137
- id?: string;
138
- props?: ElmTableBodyProps;
139
- }
140
- interface ElmTableRowJsonComponent extends JsonComponentBase {
141
- type: 'ElmTableRow';
142
- id?: string;
143
- props?: ElmTableRowProps;
144
- }
145
- interface ElmTableCellJsonComponent extends JsonComponentBase {
146
- type: 'ElmTableCell';
147
- id?: string;
148
- props?: ElmTableCellProps;
149
- }
150
- interface ElmKatexJsonComponent extends JsonComponentBase {
151
- type: 'ElmKatex';
152
- id?: string;
153
- props?: ElmKatexProps;
154
- }
155
- interface ElmImageJsonComponent extends JsonComponentBase {
156
- type: 'ElmImage';
157
- id?: string;
158
- props?: ElmImageProps;
159
- }
160
- interface ElmBlockImageJsonComponent extends JsonComponentBase {
161
- type: 'ElmBlockImage';
162
- id?: string;
163
- props?: ElmBlockImageProps;
164
- }
165
- interface ElmBookmarkJsonComponent extends JsonComponentBase {
166
- type: 'ElmBookmark';
167
- id?: string;
168
- props?: ElmBookmarkProps;
169
- }
170
- interface ElmToggleJsonComponent extends JsonComponentBase {
171
- type: 'ElmToggle';
172
- id?: string;
173
- props?: ElmToggleProps;
174
- }
175
- interface ElmCheckboxJsonComponent extends JsonComponentBase {
176
- type: 'ElmCheckbox';
177
- id?: string;
178
- props?: ElmCheckboxProps;
179
- }
180
- interface ElmFileJsonComponent extends JsonComponentBase {
181
- type: 'ElmFile';
182
- id?: string;
183
- props?: ElmFileProps;
184
- }
185
- interface ElmColumnJsonComponent extends JsonComponentBase {
186
- type: 'ElmColumn';
187
- id?: string;
188
- props?: ElmColumnProps;
189
- }
190
- interface ElmColumnListJsonComponent extends JsonComponentBase {
191
- type: 'ElmColumnList';
192
- id?: string;
193
- props?: ElmColumnListProps;
194
- }
195
- type JsonComponent = ElmInlineTextJsonComponent | ElmInlineLinkJsonComponent | ElmInlineIconJsonComponent | ElmCalloutJsonComponent | ElmBulletedListJsonComponent | ElmNumberedListJsonComponent | ElmListItemJsonComponent | ElmBlockQuoteJsonComponent | ElmDividerJsonComponent | ElmHeading1JsonComponent | ElmHeading2JsonComponent | ElmHeading3JsonComponent | ElmHeading4JsonComponent | ElmHeading5JsonComponent | ElmHeading6JsonComponent | ElmCodeBlockJsonComponent | ElmParagraphJsonComponent | ElmTableJsonComponent | ElmTableHeaderJsonComponent | ElmTableBodyJsonComponent | ElmTableRowJsonComponent | ElmTableCellJsonComponent | ElmKatexJsonComponent | ElmImageJsonComponent | ElmBlockImageJsonComponent | ElmBookmarkJsonComponent | ElmToggleJsonComponent | ElmCheckboxJsonComponent | ElmFileJsonComponent | ElmColumnJsonComponent | ElmColumnListJsonComponent;
196
- export interface ElmJsonRendererProps {
197
- json: JsonComponent[];
198
- }
199
- declare const _default: import('vue').DefineComponent<ElmJsonRendererProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmJsonRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
200
- export default _default;
@@ -1,150 +0,0 @@
1
- import { defineComponent, defineAsyncComponent, markRaw, createBlock, openBlock, resolveDynamicComponent, h } from "vue";
2
- const _sfc_main = /* @__PURE__ */ defineComponent({
3
- __name: "ElmJsonRenderer",
4
- props: {
5
- json: {}
6
- },
7
- setup(__props) {
8
- const ElmInlineText = defineAsyncComponent(
9
- () => import("../inline/ElmInlineText.vue.mjs")
10
- );
11
- const ElmInlineLink = defineAsyncComponent(
12
- () => import("../inline/ElmInlineLink.vue.mjs")
13
- );
14
- const ElmInlineIcon = defineAsyncComponent(
15
- () => import("../inline/ElmInlineIcon.vue.mjs")
16
- );
17
- const ElmCallout = defineAsyncComponent(
18
- () => import("../typography/ElmCallout.vue.mjs")
19
- );
20
- const ElmBulletedList = defineAsyncComponent(
21
- () => import("../typography/ElmBulletedList.vue3.mjs")
22
- );
23
- const ElmNumberedList = defineAsyncComponent(
24
- () => import("../typography/ElmNumberedList.vue3.mjs")
25
- );
26
- const ElmListItem = defineAsyncComponent(
27
- () => import("../typography/ElmListItem.vue.mjs")
28
- );
29
- const ElmBlockQuote = defineAsyncComponent(
30
- () => import("../typography/ElmBlockQuote.vue.mjs")
31
- );
32
- const ElmDivider = defineAsyncComponent(
33
- () => import("../typography/ElmDivider.vue.mjs")
34
- );
35
- const ElmHeading1 = defineAsyncComponent(
36
- () => import("../headings/ElmHeading1.vue.mjs")
37
- );
38
- const ElmHeading2 = defineAsyncComponent(
39
- () => import("../headings/ElmHeading2.vue.mjs")
40
- );
41
- const ElmHeading3 = defineAsyncComponent(
42
- () => import("../headings/ElmHeading3.vue.mjs")
43
- );
44
- const ElmHeading4 = defineAsyncComponent(
45
- () => import("../headings/ElmHeading4.vue.mjs")
46
- );
47
- const ElmHeading5 = defineAsyncComponent(
48
- () => import("../headings/ElmHeading5.vue.mjs")
49
- );
50
- const ElmHeading6 = defineAsyncComponent(
51
- () => import("../headings/ElmHeading6.vue.mjs")
52
- );
53
- const ElmCodeBlock = defineAsyncComponent(
54
- () => import("../code/ElmCodeBlock.vue.mjs")
55
- );
56
- const ElmParagraph = defineAsyncComponent(
57
- () => import("../typography/ElmParagraph.vue.mjs")
58
- );
59
- const ElmTable = defineAsyncComponent(() => import("../table/ElmTable.vue.mjs"));
60
- const ElmTableHeader = defineAsyncComponent(
61
- () => import("../table/ElmTableHeader.vue3.mjs")
62
- );
63
- const ElmTableBody = defineAsyncComponent(
64
- () => import("../table/ElmTableBody.vue3.mjs")
65
- );
66
- const ElmTableRow = defineAsyncComponent(
67
- () => import("../table/ElmTableRow.vue2.mjs")
68
- );
69
- const ElmTableCell = defineAsyncComponent(
70
- () => import("../table/ElmTableCell.vue.mjs")
71
- );
72
- const ElmKatex = defineAsyncComponent(() => import("../code/ElmKatex.vue.mjs"));
73
- const ElmImage = defineAsyncComponent(() => import("../media/ElmImage.vue.mjs"));
74
- const ElmBlockImage = defineAsyncComponent(
75
- () => import("../media/ElmBlockImage.vue.mjs")
76
- );
77
- const ElmBookmark = defineAsyncComponent(
78
- () => import("../navigation/ElmBookmark.vue.mjs")
79
- );
80
- const ElmToggle = defineAsyncComponent(
81
- () => import("../containments/ElmToggle.vue.mjs")
82
- );
83
- const ElmCheckbox = defineAsyncComponent(
84
- () => import("../form/ElmCheckbox.vue.mjs")
85
- );
86
- const ElmFile = defineAsyncComponent(() => import("../media/ElmFile.vue.mjs"));
87
- const ElmColumn = defineAsyncComponent(
88
- () => import("../containments/ElmColumn.vue.mjs")
89
- );
90
- const ElmColumnList = defineAsyncComponent(
91
- () => import("../containments/ElmColumnList.vue.mjs")
92
- );
93
- const componentMap = {
94
- ElmInlineText: markRaw(ElmInlineText),
95
- ElmInlineLink: markRaw(ElmInlineLink),
96
- ElmInlineIcon: markRaw(ElmInlineIcon),
97
- ElmCallout: markRaw(ElmCallout),
98
- ElmBulletedList: markRaw(ElmBulletedList),
99
- ElmNumberedList: markRaw(ElmNumberedList),
100
- ElmListItem: markRaw(ElmListItem),
101
- ElmBlockQuote: markRaw(ElmBlockQuote),
102
- ElmDivider: markRaw(ElmDivider),
103
- ElmHeading1: markRaw(ElmHeading1),
104
- ElmHeading2: markRaw(ElmHeading2),
105
- ElmHeading3: markRaw(ElmHeading3),
106
- ElmHeading4: markRaw(ElmHeading4),
107
- ElmHeading5: markRaw(ElmHeading5),
108
- ElmHeading6: markRaw(ElmHeading6),
109
- ElmCodeBlock: markRaw(ElmCodeBlock),
110
- ElmParagraph: markRaw(ElmParagraph),
111
- ElmTable: markRaw(ElmTable),
112
- ElmTableHeader: markRaw(ElmTableHeader),
113
- ElmTableBody: markRaw(ElmTableBody),
114
- ElmTableRow: markRaw(ElmTableRow),
115
- ElmTableCell: markRaw(ElmTableCell),
116
- ElmKatex: markRaw(ElmKatex),
117
- ElmImage: markRaw(ElmImage),
118
- ElmBlockImage: markRaw(ElmBlockImage),
119
- ElmBookmark: markRaw(ElmBookmark),
120
- ElmToggle: markRaw(ElmToggle),
121
- ElmCheckbox: markRaw(ElmCheckbox),
122
- ElmFile: markRaw(ElmFile),
123
- ElmColumn: markRaw(ElmColumn),
124
- ElmColumnList: markRaw(ElmColumnList)
125
- };
126
- const render = (json) => {
127
- const vnodes = [];
128
- for (const component of json) {
129
- vnodes.push(
130
- h(
131
- componentMap[component.type],
132
- { ...component.props, key: component.id },
133
- () => {
134
- if (component.children != null) {
135
- return render(component.children);
136
- }
137
- }
138
- )
139
- );
140
- }
141
- return vnodes;
142
- };
143
- return (_ctx, _cache) => {
144
- return openBlock(), createBlock(resolveDynamicComponent(() => render(_ctx.json)));
145
- };
146
- }
147
- });
148
- export {
149
- _sfc_main as default
150
- };
@@ -1,4 +0,0 @@
1
- import _sfc_main from "./ElmJsonRenderer.vue.mjs";
2
- export {
3
- _sfc_main as default
4
- };
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/vue3';
2
- import { default as ElmBulletedList } from './ElmBulletedList.vue';
3
- declare const meta: Meta<typeof ElmBulletedList>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Primary: Story;
7
- export declare const Nested: Story;
@@ -1,23 +0,0 @@
1
- export interface ElmBulletedListProps {
2
- }
3
- declare function __VLS_template(): {
4
- attrs: Partial<{}>;
5
- slots: {
6
- default?(_: {}): any;
7
- };
8
- refs: {
9
- target: HTMLUListElement;
10
- };
11
- rootEl: HTMLUListElement;
12
- };
13
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
- declare const __VLS_component: import('vue').DefineComponent<ElmBulletedListProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmBulletedListProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
15
- target: HTMLUListElement;
16
- }, HTMLUListElement>;
17
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
- export default _default;
19
- type __VLS_WithTemplateSlots<T, S> = T & {
20
- new (): {
21
- $slots: S;
22
- };
23
- };
@@ -1,27 +0,0 @@
1
- import { defineComponent, ref, createElementBlock, openBlock, normalizeStyle, renderSlot } from "vue";
2
- import { useIntersectionObserver } from "@vueuse/core";
3
- const _sfc_main = /* @__PURE__ */ defineComponent({
4
- __name: "ElmBulletedList",
5
- setup(__props) {
6
- const target = ref(null);
7
- const targetIsVisible = ref(false);
8
- useIntersectionObserver(target, ([{ isIntersecting }], _) => {
9
- targetIsVisible.value = isIntersecting;
10
- });
11
- return (_ctx, _cache) => {
12
- return openBlock(), createElementBlock("ul", {
13
- ref_key: "target",
14
- ref: target,
15
- class: "elmethis-bulleted-list",
16
- style: normalizeStyle({
17
- "--opacity": targetIsVisible.value ? 1 : 0
18
- })
19
- }, [
20
- renderSlot(_ctx.$slots, "default")
21
- ], 4);
22
- };
23
- }
24
- });
25
- export {
26
- _sfc_main as default
27
- };