@elmethis/core 1.0.0-alpha.160 → 1.0.0-alpha.161
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/dist/components/inline/ElmInlineIcon.css +32 -0
- package/dist/components/inline/ElmInlineIcon.vue.mjs +10 -0
- package/dist/components/inline/ElmInlineIcon.vue2.mjs +21 -0
- package/dist/components/inline/ElmInlineIcon.vue3.mjs +8 -0
- package/dist/components/renderer/ElmJsonRenderer.vue.mjs +98 -0
- package/dist/components/renderer/ElmJsonRenderer.vue2.mjs +4 -0
- package/dist/components/renderer/ElmJsonRendererAsync.vue.d.ts +3 -0
- package/dist/components/renderer/ElmJsonRendererAsync.vue.mjs +24 -0
- package/dist/components/renderer/ElmJsonRendererAsync.vue2.mjs +4 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +28 -24
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
._icon_egf7j_1 {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
padding-inline: 0.125rem;
|
|
5
|
+
display: inline-block;
|
|
6
|
+
vertical-align: middle;
|
|
7
|
+
height: 1.5em;
|
|
8
|
+
}
|
|
9
|
+
._icon_egf7j_1::-moz-selection {
|
|
10
|
+
filter: brightness(1000%);
|
|
11
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
12
|
+
background-color: var(--color, rgba(0, 0, 0, 0.25));
|
|
13
|
+
}
|
|
14
|
+
._icon_egf7j_1::selection {
|
|
15
|
+
filter: brightness(1000%);
|
|
16
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
17
|
+
background-color: var(--color, rgba(0, 0, 0, 0.25));
|
|
18
|
+
}
|
|
19
|
+
[data-theme=dark] ._icon_egf7j_1 {
|
|
20
|
+
color: rgba(255, 255, 255, 0.7);
|
|
21
|
+
color: var(--color, rgba(255, 255, 255, 0.7));
|
|
22
|
+
}
|
|
23
|
+
[data-theme=dark] ._icon_egf7j_1::-moz-selection {
|
|
24
|
+
color: rgba(0, 0, 0, 0.7);
|
|
25
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
26
|
+
background-color: var(--color, rgba(255, 255, 255, 0.25));
|
|
27
|
+
}
|
|
28
|
+
[data-theme=dark] ._icon_egf7j_1::selection {
|
|
29
|
+
color: rgba(0, 0, 0, 0.7);
|
|
30
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
31
|
+
background-color: var(--color, rgba(255, 255, 255, 0.25));
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import _sfc_main from "./ElmInlineIcon.vue2.mjs";
|
|
2
|
+
import style0 from "./ElmInlineIcon.vue3.mjs";
|
|
3
|
+
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
const cssModules = {
|
|
5
|
+
"$style": style0
|
|
6
|
+
};
|
|
7
|
+
const ElmInlineIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
|
|
8
|
+
export {
|
|
9
|
+
ElmInlineIcon as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass } from "vue";
|
|
2
|
+
const _hoisted_1 = ["src", "alt"];
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "ElmInlineIcon",
|
|
5
|
+
props: {
|
|
6
|
+
src: {},
|
|
7
|
+
alt: {}
|
|
8
|
+
},
|
|
9
|
+
setup(__props) {
|
|
10
|
+
return (_ctx, _cache) => {
|
|
11
|
+
return openBlock(), createElementBlock("img", {
|
|
12
|
+
class: normalizeClass(_ctx.$style.icon),
|
|
13
|
+
src: _ctx.src,
|
|
14
|
+
alt: _ctx.alt
|
|
15
|
+
}, null, 10, _hoisted_1);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
_sfc_main as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { defineComponent, markRaw, createBlock, openBlock, resolveDynamicComponent, h } from "vue";
|
|
2
|
+
import ElmInlineText from "../inline/ElmInlineText.vue.mjs";
|
|
3
|
+
import ElmInlineLink from "../inline/ElmInlineLink.vue.mjs";
|
|
4
|
+
import ElmInlineIcon from "../inline/ElmInlineIcon.vue.mjs";
|
|
5
|
+
import ElmCallout from "../typography/ElmCallout.vue.mjs";
|
|
6
|
+
import _sfc_main$5 from "../typography/ElmBulletedList.vue.mjs";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import _sfc_main$4 from "../typography/ElmNumberedList.vue.mjs";
|
|
9
|
+
/* empty css */
|
|
10
|
+
import ElmListItem from "../typography/ElmListItem.vue.mjs";
|
|
11
|
+
import ElmBlockQuote from "../typography/ElmBlockQuote.vue.mjs";
|
|
12
|
+
import ElmDivider from "../typography/ElmDivider.vue.mjs";
|
|
13
|
+
import ElmHeading1 from "../headings/ElmHeading1.vue.mjs";
|
|
14
|
+
import ElmHeading2 from "../headings/ElmHeading2.vue.mjs";
|
|
15
|
+
import ElmHeading3 from "../headings/ElmHeading3.vue.mjs";
|
|
16
|
+
import ElmHeading4 from "../headings/ElmHeading4.vue.mjs";
|
|
17
|
+
import ElmHeading5 from "../headings/ElmHeading5.vue.mjs";
|
|
18
|
+
import ElmHeading6 from "../headings/ElmHeading6.vue.mjs";
|
|
19
|
+
import ElmCodeBlock from "../code/ElmCodeBlock.vue.mjs";
|
|
20
|
+
import ElmParagraph from "../typography/ElmParagraph.vue.mjs";
|
|
21
|
+
import ElmTable from "../table/ElmTable.vue.mjs";
|
|
22
|
+
import _sfc_main$3 from "../table/ElmTableHeader.vue.mjs";
|
|
23
|
+
/* empty css */
|
|
24
|
+
import _sfc_main$2 from "../table/ElmTableBody.vue.mjs";
|
|
25
|
+
/* empty css */
|
|
26
|
+
import _sfc_main$1 from "../table/ElmTableRow.vue.mjs";
|
|
27
|
+
import ElmTableCell from "../table/ElmTableCell.vue.mjs";
|
|
28
|
+
import ElmKatex from "../code/ElmKatex.vue.mjs";
|
|
29
|
+
import ElmImage from "../media/ElmImage.vue.mjs";
|
|
30
|
+
import ElmBookmark from "../navigation/ElmBookmark.vue.mjs";
|
|
31
|
+
import ElmToggle from "../containments/ElmToggle.vue.mjs";
|
|
32
|
+
import ElmCheckbox from "../form/ElmCheckbox.vue.mjs";
|
|
33
|
+
import ElmFile from "../media/ElmFile.vue.mjs";
|
|
34
|
+
import ElmColumn from "../containments/ElmColumn.vue.mjs";
|
|
35
|
+
import ElmColumnList from "../containments/ElmColumnList.vue.mjs";
|
|
36
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
37
|
+
__name: "ElmJsonRenderer",
|
|
38
|
+
props: {
|
|
39
|
+
json: {}
|
|
40
|
+
},
|
|
41
|
+
setup(__props) {
|
|
42
|
+
const componentMap = {
|
|
43
|
+
ElmInlineText: markRaw(ElmInlineText),
|
|
44
|
+
ElmInlineLink: markRaw(ElmInlineLink),
|
|
45
|
+
ElmInlineIcon: markRaw(ElmInlineIcon),
|
|
46
|
+
ElmCallout: markRaw(ElmCallout),
|
|
47
|
+
ElmBulletedList: markRaw(_sfc_main$5),
|
|
48
|
+
ElmNumberedList: markRaw(_sfc_main$4),
|
|
49
|
+
ElmListItem: markRaw(ElmListItem),
|
|
50
|
+
ElmBlockQuote: markRaw(ElmBlockQuote),
|
|
51
|
+
ElmDivider: markRaw(ElmDivider),
|
|
52
|
+
ElmHeading1: markRaw(ElmHeading1),
|
|
53
|
+
ElmHeading2: markRaw(ElmHeading2),
|
|
54
|
+
ElmHeading3: markRaw(ElmHeading3),
|
|
55
|
+
ElmHeading4: markRaw(ElmHeading4),
|
|
56
|
+
ElmHeading5: markRaw(ElmHeading5),
|
|
57
|
+
ElmHeading6: markRaw(ElmHeading6),
|
|
58
|
+
ElmCodeBlock: markRaw(ElmCodeBlock),
|
|
59
|
+
ElmParagraph: markRaw(ElmParagraph),
|
|
60
|
+
ElmTable: markRaw(ElmTable),
|
|
61
|
+
ElmTableHeader: markRaw(_sfc_main$3),
|
|
62
|
+
ElmTableBody: markRaw(_sfc_main$2),
|
|
63
|
+
ElmTableRow: markRaw(_sfc_main$1),
|
|
64
|
+
ElmTableCell: markRaw(ElmTableCell),
|
|
65
|
+
ElmKatex: markRaw(ElmKatex),
|
|
66
|
+
ElmImage: markRaw(ElmImage),
|
|
67
|
+
ElmBookmark: markRaw(ElmBookmark),
|
|
68
|
+
ElmToggle: markRaw(ElmToggle),
|
|
69
|
+
ElmCheckbox: markRaw(ElmCheckbox),
|
|
70
|
+
ElmFile: markRaw(ElmFile),
|
|
71
|
+
ElmColumn: markRaw(ElmColumn),
|
|
72
|
+
ElmColumnList: markRaw(ElmColumnList)
|
|
73
|
+
};
|
|
74
|
+
const render = (json) => {
|
|
75
|
+
const vnodes = [];
|
|
76
|
+
for (const component of json) {
|
|
77
|
+
vnodes.push(
|
|
78
|
+
h(
|
|
79
|
+
componentMap[component.type],
|
|
80
|
+
{ ...component.props, key: component.id },
|
|
81
|
+
() => {
|
|
82
|
+
if (component.children != null) {
|
|
83
|
+
return render(component.children);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
return vnodes;
|
|
90
|
+
};
|
|
91
|
+
return (_ctx, _cache) => {
|
|
92
|
+
return openBlock(), createBlock(resolveDynamicComponent(() => render(_ctx.json)));
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
export {
|
|
97
|
+
_sfc_main as default
|
|
98
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ElmJsonRendererProps } from './ElmJsonRenderer.vue';
|
|
2
|
+
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>;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent, ref, onMounted, nextTick, h, createBlock, openBlock, resolveDynamicComponent } from "vue";
|
|
2
|
+
import _sfc_main$1 from "./ElmJsonRenderer.vue.mjs";
|
|
3
|
+
import ElmBlockFallback from "../fallback/ElmBlockFallback.vue.mjs";
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "ElmJsonRendererAsync",
|
|
6
|
+
props: {
|
|
7
|
+
json: {}
|
|
8
|
+
},
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
const vnode = ref(null);
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
nextTick(() => {
|
|
14
|
+
vnode.value = h(_sfc_main$1, { json: props.json });
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
return (_ctx, _cache) => {
|
|
18
|
+
return vnode.value != null ? (openBlock(), createBlock(resolveDynamicComponent(() => vnode.value), { key: 0 })) : (openBlock(), createBlock(ElmBlockFallback, { key: 1 }));
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
_sfc_main as default
|
|
24
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -96,6 +96,9 @@ export type { ElmColorSampleProps } from './components/others/ElmColorSample.vue
|
|
|
96
96
|
export { default as ElmColorSample } from './components/others/ElmColorSample.vue';
|
|
97
97
|
export type { ElmColorTableProps } from './components/others/ElmColorTable.vue';
|
|
98
98
|
export { default as ElmColorTable } from './components/others/ElmColorTable.vue';
|
|
99
|
+
export type { ElmJsonRendererProps } from './components/renderer/ElmJsonRenderer.vue';
|
|
100
|
+
export { default as ElmJsonRenderer } from './components/renderer/ElmJsonRenderer.vue';
|
|
101
|
+
export { default as ElmJsonRendererAsync } from './components/renderer/ElmJsonRendererAsync.vue';
|
|
99
102
|
export type { ElmTableProps } from './components/table/ElmTable.vue';
|
|
100
103
|
export { default as ElmTable } from './components/table/ElmTable.vue';
|
|
101
104
|
export type { ElmTableHeaderProps } from './components/table/ElmTableHeader.vue';
|
package/dist/index.mjs
CHANGED
|
@@ -47,33 +47,35 @@ import { default as default47 } from "./components/navigation/ElmPagetop.vue.mjs
|
|
|
47
47
|
import { default as default48 } from "./components/navigation/ElmTableOfContents.vue.mjs";
|
|
48
48
|
import { default as default49 } from "./components/others/ElmColorSample.vue.mjs";
|
|
49
49
|
import { default as default50 } from "./components/others/ElmColorTable.vue.mjs";
|
|
50
|
-
import { default as default51 } from "./components/
|
|
51
|
-
import { default as default52 } from "./components/
|
|
50
|
+
import { default as default51 } from "./components/renderer/ElmJsonRenderer.vue.mjs";
|
|
51
|
+
import { default as default52 } from "./components/renderer/ElmJsonRendererAsync.vue.mjs";
|
|
52
|
+
import { default as default53 } from "./components/table/ElmTable.vue.mjs";
|
|
53
|
+
import { default as default54 } from "./components/table/ElmTableHeader.vue.mjs";
|
|
52
54
|
/* empty css */
|
|
53
|
-
import { default as
|
|
55
|
+
import { default as default55 } from "./components/table/ElmTableBody.vue.mjs";
|
|
54
56
|
/* empty css */
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as
|
|
57
|
-
import { default as
|
|
58
|
-
import { default as
|
|
57
|
+
import { default as default56 } from "./components/table/ElmTableRow.vue.mjs";
|
|
58
|
+
import { default as default57 } from "./components/table/ElmTableCell.vue.mjs";
|
|
59
|
+
import { default as default58 } from "./components/typography/ElmBlockQuote.vue.mjs";
|
|
60
|
+
import { default as default59 } from "./components/typography/ElmBulletedList.vue.mjs";
|
|
59
61
|
/* empty css */
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
62
|
+
import { default as default60 } from "./components/typography/ElmCallout.vue.mjs";
|
|
63
|
+
import { default as default61 } from "./components/typography/ElmDivider.vue.mjs";
|
|
64
|
+
import { default as default62 } from "./components/typography/ElmNumberedList.vue.mjs";
|
|
63
65
|
/* empty css */
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
+
import { default as default63 } from "./components/typography/ElmParagraph.vue.mjs";
|
|
67
|
+
import { default as default64 } from "./components/typography/ElmListItem.vue.mjs";
|
|
66
68
|
export {
|
|
67
69
|
default33 as ElmArrowIcon,
|
|
68
70
|
default2 as ElmBadge,
|
|
69
71
|
default19 as ElmBlockFallback,
|
|
70
|
-
|
|
72
|
+
default58 as ElmBlockQuote,
|
|
71
73
|
default45 as ElmBookmark,
|
|
72
74
|
default34 as ElmBookmarkIcon,
|
|
73
75
|
default46 as ElmBreadcrumb,
|
|
74
|
-
|
|
76
|
+
default59 as ElmBulletedList,
|
|
75
77
|
default21 as ElmButton,
|
|
76
|
-
|
|
78
|
+
default60 as ElmCallout,
|
|
77
79
|
default22 as ElmCheckbox,
|
|
78
80
|
default4 as ElmCodeBlock,
|
|
79
81
|
default49 as ElmColorSample,
|
|
@@ -82,7 +84,7 @@ export {
|
|
|
82
84
|
default7 as ElmColumnList,
|
|
83
85
|
default35 as ElmCubeIcon,
|
|
84
86
|
default8 as ElmDesktopWindow,
|
|
85
|
-
|
|
87
|
+
default61 as ElmDivider,
|
|
86
88
|
default36 as ElmDotLoadingIcon,
|
|
87
89
|
default43 as ElmFile,
|
|
88
90
|
default32 as ElmFragmentIdentifier,
|
|
@@ -96,15 +98,17 @@ export {
|
|
|
96
98
|
default40 as ElmInlineLink,
|
|
97
99
|
default41 as ElmInlineRuby,
|
|
98
100
|
default42 as ElmInlineText,
|
|
101
|
+
default51 as ElmJsonRenderer,
|
|
102
|
+
default52 as ElmJsonRendererAsync,
|
|
99
103
|
default5 as ElmKatex,
|
|
100
104
|
default37 as ElmLanguageIcon,
|
|
101
|
-
|
|
105
|
+
default64 as ElmListItem,
|
|
102
106
|
default38 as ElmLoginIcon,
|
|
103
107
|
default9 as ElmModal,
|
|
104
108
|
default16 as ElmMultiProgress,
|
|
105
|
-
|
|
109
|
+
default62 as ElmNumberedList,
|
|
106
110
|
default47 as ElmPagetop,
|
|
107
|
-
|
|
111
|
+
default63 as ElmParagraph,
|
|
108
112
|
default10 as ElmParallax,
|
|
109
113
|
default15 as ElmProgress,
|
|
110
114
|
default18 as ElmRectangleWave,
|
|
@@ -113,12 +117,12 @@ export {
|
|
|
113
117
|
default20 as ElmSpinner,
|
|
114
118
|
default17 as ElmStatusMessage,
|
|
115
119
|
default23 as ElmSwitch,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
default53 as ElmTable,
|
|
121
|
+
default55 as ElmTableBody,
|
|
122
|
+
default57 as ElmTableCell,
|
|
123
|
+
default54 as ElmTableHeader,
|
|
120
124
|
default48 as ElmTableOfContents,
|
|
121
|
-
|
|
125
|
+
default56 as ElmTableRow,
|
|
122
126
|
default3 as ElmTag,
|
|
123
127
|
default24 as ElmTextField,
|
|
124
128
|
default13 as ElmToggle,
|