@elmethis/core 1.0.0-alpha.159 → 1.0.0-alpha.160
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/badge/ElmBadge.css +11 -0
- package/dist/components/badge/ElmTag.css +29 -0
- package/dist/components/code/ElmCodeBlock.css +58 -0
- package/dist/components/code/ElmKatex.css +28 -0
- package/dist/components/code/ElmKatex.vue2.mjs +14 -5
- package/dist/components/code/ElmShikiHighlighter.css +4 -0
- package/dist/components/code/ElmShikiHighlighter2.css +23 -0
- package/dist/components/containments/ElmColumn.css +3 -0
- package/dist/components/containments/ElmColumnList.css +5 -0
- package/dist/components/containments/ElmDesktopWindow.css +27 -0
- package/dist/components/containments/ElmModal.css +12 -0
- package/dist/components/containments/ElmModal2.css +33 -0
- package/dist/components/containments/ElmParallax.css +14 -0
- package/dist/components/containments/ElmSnackbar.css +56 -0
- package/dist/components/containments/ElmSnackbarContainer.css +9 -0
- package/dist/components/containments/ElmSnackbarContainer2.css +20 -0
- package/dist/components/containments/ElmToggle.css +13 -0
- package/dist/components/containments/ElmToggle2.css +43 -0
- package/dist/components/containments/ElmTooltip.css +14 -0
- package/dist/components/containments/ElmTooltip2.css +15 -0
- package/dist/components/data/ElmMultiProgress.css +23 -0
- package/dist/components/data/ElmProgress.css +84 -0
- package/dist/components/data/ElmStatusMessage.css +12 -0
- package/dist/components/data/ElmStatusMessage2.css +9 -0
- package/dist/components/fallback/ElmBlockFallback.css +7 -0
- package/dist/components/fallback/ElmRectangleWave.css +33 -0
- package/dist/components/fallback/ElmSpinner.css +25 -0
- package/dist/components/form/ElmButton.css +12 -0
- package/dist/components/form/ElmButton2.css +65 -0
- package/dist/components/form/ElmCheckbox.css +67 -0
- package/dist/components/form/ElmSwitch.css +42 -0
- package/dist/components/form/ElmTextField.css +163 -0
- package/dist/components/form/ElmTotp.css +60 -0
- package/dist/components/headings/ElmFragmentIdentifier.css +20 -0
- package/dist/components/headings/ElmHeading1.css +56 -0
- package/dist/components/headings/ElmHeading2.css +72 -0
- package/dist/components/headings/ElmHeading3.css +42 -0
- package/dist/components/headings/ElmHeading4.css +25 -0
- package/dist/components/headings/ElmHeading5.css +25 -0
- package/dist/components/headings/ElmHeading6.css +25 -0
- package/dist/components/icon/ElmArrowIcon.css +44 -0
- package/dist/components/icon/ElmBookmarkIcon.css +40 -0
- package/dist/components/icon/ElmCubeIcon.css +38 -0
- package/dist/components/icon/ElmDotLoadingIcon.css +41 -0
- package/dist/components/icon/ElmLanguageIcon.css +12 -0
- package/dist/components/icon/ElmLanguageIcon2.css +9 -0
- package/dist/components/icon/ElmLoginIcon.css +16 -0
- package/dist/components/icon/ElmToggleTheme.css +18 -0
- package/dist/components/icon/languages/Bash.css +6 -0
- package/dist/components/inline/ElmInlineLink.css +36 -0
- package/dist/components/inline/ElmInlineText.css +41 -0
- package/dist/components/media/ElmFile.css +52 -0
- package/dist/components/media/ElmImage.css +12 -0
- package/dist/components/media/ElmImage2.css +51 -0
- package/dist/components/navigation/ElmBookmark.css +104 -0
- package/dist/components/navigation/ElmBreadcrumb.css +46 -0
- package/dist/components/navigation/ElmPagetop.css +105 -0
- package/dist/components/navigation/ElmTableOfContents.css +33 -0
- package/dist/components/others/ElmColorSample.css +12 -0
- package/dist/components/others/ElmColorSample2.css +34 -0
- package/dist/components/others/ElmColorTable.css +26 -0
- package/dist/components/table/ElmTable.css +6 -0
- package/dist/components/table/ElmTableBody.css +48 -0
- package/dist/components/table/ElmTableCell.css +16 -0
- package/dist/components/table/ElmTableHeader.css +40 -0
- package/dist/components/typography/ElmBlockQuote.css +12 -0
- package/dist/components/typography/ElmBulletedList.css +21 -0
- package/dist/components/typography/ElmCallout.css +33 -0
- package/dist/components/typography/ElmDivider.css +40 -0
- package/dist/components/typography/ElmListItem.css +3 -0
- package/dist/components/typography/ElmNumberedList.css +26 -0
- package/dist/components/typography/ElmParagraph.css +25 -0
- package/dist/index.d.ts +0 -5
- package/dist/index.mjs +29 -49
- package/dist/node_modules/.pnpm/katex@0.16.21/node_modules/katex/dist/katex.min.css +1 -0
- package/package.json +2 -3
- package/dist/components/inline/ElmInlineIcon.vue.mjs +0 -10
- package/dist/components/inline/ElmInlineIcon.vue2.mjs +0 -21
- package/dist/components/inline/ElmInlineIcon.vue3.mjs +0 -8
- package/dist/components/renderer/ElmJsonRenderer.vue.mjs +0 -98
- package/dist/components/renderer/ElmJsonRenderer.vue2.mjs +0 -4
- package/dist/components/renderer/ElmJsonRendererAsync.vue.d.ts +0 -3
- package/dist/components/renderer/ElmJsonRendererAsync.vue.mjs +0 -24
- package/dist/components/renderer/ElmJsonRendererAsync.vue2.mjs +0 -4
- package/dist/hooks/useTyping.mjs +0 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elmethis/core",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.160",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
"postcss-preset-env": "^10.1.5",
|
|
56
56
|
"sass": "^1.86.0",
|
|
57
57
|
"storybook": "^8.6.11",
|
|
58
|
-
"vite": "^6.2.
|
|
59
|
-
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
58
|
+
"vite": "^6.2.4",
|
|
60
59
|
"vite-plugin-dts": "^4.5.3",
|
|
61
60
|
"vue-tsc": "^2.2.8"
|
|
62
61
|
},
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
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;
|
|
@@ -1,24 +0,0 @@
|
|
|
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/hooks/useTyping.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { onKeyStroke } from "@vueuse/core";
|
|
2
|
-
import { ref } from "vue";
|
|
3
|
-
function useTyping() {
|
|
4
|
-
const targetString = ref(null);
|
|
5
|
-
const targetArray = ref([]);
|
|
6
|
-
const currentCharIndex = ref(0);
|
|
7
|
-
const mistakes = ref(0);
|
|
8
|
-
const isFinished = ref(false);
|
|
9
|
-
const start = (target) => {
|
|
10
|
-
isFinished.value = false;
|
|
11
|
-
currentCharIndex.value = 0;
|
|
12
|
-
targetString.value = target;
|
|
13
|
-
targetArray.value = target.split("").map((char) => ({ char, status: "default" }));
|
|
14
|
-
targetArray.value[0].status = "current";
|
|
15
|
-
};
|
|
16
|
-
onKeyStroke((event) => {
|
|
17
|
-
if (targetArray.value[currentCharIndex.value] != null && !isFinished.value && event.key.length === 1) {
|
|
18
|
-
if (event.key === targetArray.value[currentCharIndex.value].char) {
|
|
19
|
-
targetArray.value[currentCharIndex.value].status = "typed";
|
|
20
|
-
if (currentCharIndex.value === targetArray.value.length - 1) {
|
|
21
|
-
isFinished.value = true;
|
|
22
|
-
} else {
|
|
23
|
-
currentCharIndex.value += 1;
|
|
24
|
-
targetArray.value[currentCharIndex.value] = targetArray.value[currentCharIndex.value];
|
|
25
|
-
targetArray.value[currentCharIndex.value].status = "current";
|
|
26
|
-
}
|
|
27
|
-
} else {
|
|
28
|
-
mistakes.value += 1;
|
|
29
|
-
targetArray.value[currentCharIndex.value].status = "incorrect";
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
return { start, targetArray, isFinished, mistakes };
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
useTyping
|
|
37
|
-
};
|