@elmethis/vue 0.2.8 → 0.2.10
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/code/ElmCodeBlock.vue.d.ts +0 -2
- package/dist/components/code/ElmCodeBlock.vue.mjs +2 -2
- package/dist/components/code/ElmCodeBlock.vue2.mjs +5 -35
- package/dist/components/code/ElmCodeBlock.vue3.mjs +11 -14
- package/dist/components/form/ElmButton.vue.mjs +2 -2
- package/dist/components/form/ElmButton.vue2.mjs +6 -3
- package/dist/components/form/ElmButton.vue3.mjs +10 -9
- package/package.json +16 -10
|
@@ -28,7 +28,6 @@ declare function __VLS_template(): {
|
|
|
28
28
|
};
|
|
29
29
|
refs: {
|
|
30
30
|
target: HTMLDivElement;
|
|
31
|
-
tooltipRef: HTMLDivElement;
|
|
32
31
|
};
|
|
33
32
|
rootEl: HTMLDivElement;
|
|
34
33
|
};
|
|
@@ -37,7 +36,6 @@ declare const __VLS_component: import('vue').DefineComponent<ElmCodeBlockProps,
|
|
|
37
36
|
language: string;
|
|
38
37
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
38
|
target: HTMLDivElement;
|
|
40
|
-
tooltipRef: HTMLDivElement;
|
|
41
39
|
}, HTMLDivElement>;
|
|
42
40
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
43
41
|
export default _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(".v-enter-to[data-v-
|
|
6
|
+
elementStyle.appendChild(document.createTextNode(".v-enter-to[data-v-92929132],.v-leave-from[data-v-92929132]{opacity:1}.v-enter-active[data-v-92929132],.v-leave-active[data-v-92929132]{transition:opacity .15s}.v-enter-from[data-v-92929132],.v-leave-to[data-v-92929132]{opacity:0}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
@@ -17,7 +17,7 @@ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
|
17
17
|
const cssModules = {
|
|
18
18
|
"$style": style0
|
|
19
19
|
};
|
|
20
|
-
const ElmCodeBlock = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-
|
|
20
|
+
const ElmCodeBlock = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-92929132"]]);
|
|
21
21
|
export {
|
|
22
22
|
ElmCodeBlock as default
|
|
23
23
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent, ref,
|
|
1
|
+
import { defineComponent, ref, useSlots, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, createVNode, createBlock, resolveDynamicComponent, unref, h } from "vue";
|
|
2
2
|
import ElmLanguageIcon from "../icon/ElmLanguageIcon.vue.mjs";
|
|
3
3
|
import ElmInlineText from "../typography/ElmInlineText.vue.mjs";
|
|
4
4
|
import ElmDotLoadingIcon from "../icon/ElmDotLoadingIcon.vue.mjs";
|
|
5
|
-
import { useClipboard, useIntersectionObserver
|
|
5
|
+
import { useClipboard, useIntersectionObserver } from "@vueuse/core";
|
|
6
6
|
import { mdiClipboardCheckMultipleOutline, mdiClipboardMultipleOutline } from "@mdi/js";
|
|
7
7
|
import ElmMdiIcon from "../icon/ElmMdiIcon.vue.mjs";
|
|
8
8
|
import ElmShikiHighlighter from "./ElmShikiHighlighter.vue.mjs";
|
|
@@ -23,8 +23,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
useIntersectionObserver(target, ([{ isIntersecting }], _) => {
|
|
24
24
|
targetIsVisible.value = isIntersecting;
|
|
25
25
|
});
|
|
26
|
-
const tooltipElement = useTemplateRef("tooltipRef");
|
|
27
|
-
const isHovered = useElementHover(tooltipElement);
|
|
28
26
|
const slots = useSlots();
|
|
29
27
|
const renderCaption = () => {
|
|
30
28
|
if (props.caption) {
|
|
@@ -62,7 +60,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
60
|
], 2)
|
|
63
61
|
], 2),
|
|
64
62
|
createElementVNode("div", {
|
|
65
|
-
ref: "tooltipRef",
|
|
66
63
|
class: normalizeClass(_ctx.$style.header__right)
|
|
67
64
|
}, [
|
|
68
65
|
createVNode(ElmMdiIcon, {
|
|
@@ -72,36 +69,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
69
|
onClick: _cache[0] || (_cache[0] = () => {
|
|
73
70
|
unref(copy)(__props.code);
|
|
74
71
|
}),
|
|
75
|
-
icon: unref(copied) ? "mdi:clipboard-check-multiple-outline" : "mdi:clipboard-multiple-outline"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
default: withCtx(() => [
|
|
79
|
-
unref(copied) ? (openBlock(), createElementBlock("div", {
|
|
80
|
-
key: 0,
|
|
81
|
-
class: normalizeClass(_ctx.$style.tooltip)
|
|
82
|
-
}, [
|
|
83
|
-
createVNode(ElmMdiIcon, {
|
|
84
|
-
size: "1.25em",
|
|
85
|
-
d: unref(mdiClipboardCheckMultipleOutline),
|
|
86
|
-
class: normalizeClass(_ctx.$style["tooltip-check-icon"]),
|
|
87
|
-
color: "#449763"
|
|
88
|
-
}, null, 8, ["d", "class"]),
|
|
89
|
-
createVNode(ElmInlineText, { text: "Copied to Clipboard!" })
|
|
90
|
-
], 2)) : unref(isHovered) && !unref(copied) ? (openBlock(), createElementBlock("div", {
|
|
91
|
-
key: 1,
|
|
92
|
-
class: normalizeClass(_ctx.$style.tooltip)
|
|
93
|
-
}, [
|
|
94
|
-
createVNode(ElmMdiIcon, {
|
|
95
|
-
size: "1.25em",
|
|
96
|
-
d: unref(mdiClipboardMultipleOutline),
|
|
97
|
-
class: normalizeClass(_ctx.$style["tooltip-check-icon"]),
|
|
98
|
-
color: "#4c6da2"
|
|
99
|
-
}, null, 8, ["d", "class"]),
|
|
100
|
-
createVNode(ElmInlineText, { text: "Copy to Clipboard" })
|
|
101
|
-
], 2)) : createCommentVNode("", true)
|
|
102
|
-
]),
|
|
103
|
-
_: 1
|
|
104
|
-
})
|
|
72
|
+
icon: unref(copied) ? "mdi:clipboard-check-multiple-outline" : "mdi:clipboard-multiple-outline",
|
|
73
|
+
color: unref(copied) ? "#b69545" : void 0
|
|
74
|
+
}, null, 8, ["d", "class", "icon", "color"])
|
|
105
75
|
], 2)
|
|
106
76
|
], 2),
|
|
107
77
|
createElementVNode("div", {
|
|
@@ -3,32 +3,30 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(".
|
|
6
|
+
elementStyle.appendChild(document.createTextNode("._wrapper_9uvgf_1{margin-block:var(--margin-block);opacity:var(--opacity);display:flex;flex-direction:column;border-radius:.25rem;transition:background-color .4s,opacity .8s;background-color:#fff6;box-shadow:0 0 .125rem #3e434b4d}[data-theme=dark] ._wrapper_9uvgf_1{background-color:#2c3037e6;box-shadow:0 0 .125rem #0006}._header_9uvgf_16{box-sizing:border-box;width:calc(100% - 1rem);padding:.25rem .5rem .5rem;margin:.5rem;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;font-family:Source Code Pro,Menlo,Consolas,DejaVu Sans Mono,monospace;border-bottom:solid 1px rgba(62,67,75,.3)}[data-theme=dark] ._header_9uvgf_16{border-color:#bec2ca4d}._header__left_9uvgf_32{width:calc(100% - 2rem);display:flex;flex-direction:row;align-items:center;gap:.5rem}._caption_9uvgf_40{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._copy-icon_9uvgf_46{box-sizing:border-box;padding:.125rem;width:26px;height:26px;border-radius:.125rem;cursor:pointer;transition:background-color .2s;color:#000000b3}[data-theme=dark] ._copy-icon_9uvgf_46{color:#ffffffb3}._copy-icon_9uvgf_46:hover{background-color:#0000001a}[data-theme=dark] ._copy-icon_9uvgf_46:hover{background-color:#ffffff1a}._header__right_9uvgf_66{position:relative;display:flex;flex-direction:row;align-items:center;gap:.5rem}._code_9uvgf_74{position:relative;padding:.25rem 1rem 1rem;overflow-x:auto;scrollbar-width:thin;scrollbar-color:rgba(105,135,184,.3) rgba(105,135,184,.15)}._code-body_9uvgf_82{transition:opacity .2s}._fallback_9uvgf_86{position:absolute;top:0;left:0;height:100%;width:100%;box-sizing:border-box;padding:auto;display:flex;justify-content:center;align-items:center;transition:opacity .2s;pointer-events:none}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
10
10
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
|
-
const wrapper = "
|
|
14
|
-
const header = "
|
|
15
|
-
const header__left = "
|
|
16
|
-
const caption = "
|
|
17
|
-
const header__right = "
|
|
18
|
-
const code = "
|
|
19
|
-
const fallback = "
|
|
20
|
-
const tooltip = "_tooltip_1ysrf_101";
|
|
13
|
+
const wrapper = "_wrapper_9uvgf_1";
|
|
14
|
+
const header = "_header_9uvgf_16";
|
|
15
|
+
const header__left = "_header__left_9uvgf_32";
|
|
16
|
+
const caption = "_caption_9uvgf_40";
|
|
17
|
+
const header__right = "_header__right_9uvgf_66";
|
|
18
|
+
const code = "_code_9uvgf_74";
|
|
19
|
+
const fallback = "_fallback_9uvgf_86";
|
|
21
20
|
const style0 = {
|
|
22
21
|
wrapper,
|
|
23
22
|
header,
|
|
24
23
|
header__left,
|
|
25
24
|
caption,
|
|
26
|
-
"copy-icon": "_copy-
|
|
25
|
+
"copy-icon": "_copy-icon_9uvgf_46",
|
|
27
26
|
header__right,
|
|
28
27
|
code,
|
|
29
|
-
"code-body": "_code-
|
|
30
|
-
fallback
|
|
31
|
-
tooltip
|
|
28
|
+
"code-body": "_code-body_9uvgf_82",
|
|
29
|
+
fallback
|
|
32
30
|
};
|
|
33
31
|
export {
|
|
34
32
|
caption,
|
|
@@ -38,6 +36,5 @@ export {
|
|
|
38
36
|
header,
|
|
39
37
|
header__left,
|
|
40
38
|
header__right,
|
|
41
|
-
tooltip,
|
|
42
39
|
wrapper
|
|
43
40
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(".v-enter-to[data-v-
|
|
6
|
+
elementStyle.appendChild(document.createTextNode(".v-enter-to[data-v-01a0b0a9],.v-leave-from[data-v-01a0b0a9]{opacity:1}.v-enter-active[data-v-01a0b0a9],.v-leave-active[data-v-01a0b0a9]{transition:opacity .1s}.v-enter-from[data-v-01a0b0a9],.v-leave-to[data-v-01a0b0a9]{opacity:0}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
@@ -17,7 +17,7 @@ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
|
17
17
|
const cssModules = {
|
|
18
18
|
"$style": style0
|
|
19
19
|
};
|
|
20
|
-
const ElmButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-
|
|
20
|
+
const ElmButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-01a0b0a9"]]);
|
|
21
21
|
export {
|
|
22
22
|
ElmButton as default
|
|
23
23
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, onUnmounted, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createVNode, Transition, withCtx, createBlock, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, ref, onUnmounted, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createVNode, createElementVNode, Transition, withCtx, createBlock, renderSlot } from "vue";
|
|
2
2
|
import ElmDotLoadingIcon from "../icon/ElmDotLoadingIcon.vue.mjs";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "ElmButton",
|
|
@@ -39,7 +39,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
display: __props.block ? "flex" : "inline-flex",
|
|
40
40
|
width: __props.block ? "100%" : "auto",
|
|
41
41
|
cursor: __props.disabled ? "not-allowed" : __props.loading ? "progress" : "pointer",
|
|
42
|
-
"--opacity": __props.disabled ? 0.6 : void 0,
|
|
42
|
+
"--opacity": __props.disabled || __props.loading ? 0.6 : void 0,
|
|
43
43
|
"--color": __props.color
|
|
44
44
|
}),
|
|
45
45
|
onClick: handleClick
|
|
@@ -61,7 +61,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
], 2))
|
|
62
62
|
]),
|
|
63
63
|
_: 3
|
|
64
|
-
})
|
|
64
|
+
}),
|
|
65
|
+
createElementVNode("div", {
|
|
66
|
+
class: normalizeClass(_ctx.$style["button-ornament"])
|
|
67
|
+
}, null, 2)
|
|
65
68
|
], 6);
|
|
66
69
|
};
|
|
67
70
|
}
|
|
@@ -3,29 +3,30 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(
|
|
6
|
+
elementStyle.appendChild(document.createTextNode('._button_1ykfy_1{all:unset;position:relative;overflow:hidden;min-height:2.75rem;justify-content:center;align-items:center;gap:.5rem;border-radius:.25rem;box-sizing:border-box;padding:.5rem 1.5rem;line-height:1.5rem;border:solid 1px rgba(205,181,123,.6);-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;transition:opacity .2s,transform .2s;opacity:var(--opacity);box-shadow:0 0 .125rem #80808040}._button-ornament_1ykfy_21{position:absolute;content:"";bottom:-1px;right:-1px;height:1rem;width:1rem;background-color:#dbcaa099;clip-path:polygon(100% 0%,1000% 100%,0% 100%)}._normal_1ykfy_32{color:#0009;background-color:#fffc}[data-theme=dark] ._normal_1ykfy_32,._primary_1ykfy_41{color:#fff9;background-color:#3e434b}[data-theme=dark] ._primary_1ykfy_41{color:#0009;background-color:#fffc}._colored_1ykfy_50{background-color:var(--color)}._enable_1ykfy_54{transition:opacity .2s,transform .1s,box-shadow .2s}[data-theme=dark] ._enable_1ykfy_54:hover{transform:translate(-1px) translateY(-1px);opacity:.7;opacity:var(--opacity, .7)}[data-theme=dark] ._enable_1ykfy_54:active{transform:translate(1px) translateY(1px);opacity:.5;opacity:var(--opacity, .5)}._enable_1ykfy_54:hover{transform:translate(-1px) translateY(-1px);opacity:.7;opacity:var(--opacity, .7);box-shadow:.125rem .125rem .125rem #80808040}._enable_1ykfy_54:active{transform:translate(1px) translateY(1px);opacity:.5;opacity:var(--opacity, .5);box-shadow:-1px -1px .125rem #80808040}._flex_1ykfy_76{display:flex;justify-content:center;align-items:center;gap:.5rem}@keyframes _button-ripple_1ykfy_1{0%{transform:scale(0);opacity:1}50%{transform:scale(1.2);opacity:1}to{transform:scale(1.2);opacity:0}}._ripple_1ykfy_97{position:absolute;pointer-events:none;border-radius:50%;background-color:#cdb57b26;width:100%;aspect-ratio:1/1;transition:none;opacity:0;animation-name:_button-ripple_1ykfy_1;animation-duration:.3s;animation-fill-mode:both;animation-timing-function:ease-out}'));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
10
10
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
|
-
const button = "
|
|
14
|
-
const normal = "
|
|
15
|
-
const primary = "
|
|
16
|
-
const colored = "
|
|
17
|
-
const enable = "
|
|
18
|
-
const flex = "
|
|
19
|
-
const ripple = "
|
|
13
|
+
const button = "_button_1ykfy_1";
|
|
14
|
+
const normal = "_normal_1ykfy_32";
|
|
15
|
+
const primary = "_primary_1ykfy_41";
|
|
16
|
+
const colored = "_colored_1ykfy_50";
|
|
17
|
+
const enable = "_enable_1ykfy_54";
|
|
18
|
+
const flex = "_flex_1ykfy_76";
|
|
19
|
+
const ripple = "_ripple_1ykfy_97";
|
|
20
20
|
const style0 = {
|
|
21
21
|
button,
|
|
22
|
+
"button-ornament": "_button-ornament_1ykfy_21",
|
|
22
23
|
normal,
|
|
23
24
|
primary,
|
|
24
25
|
colored,
|
|
25
26
|
enable,
|
|
26
27
|
flex,
|
|
27
28
|
ripple,
|
|
28
|
-
"button-ripple": "_button-
|
|
29
|
+
"button-ripple": "_button-ripple_1ykfy_1"
|
|
29
30
|
};
|
|
30
31
|
export {
|
|
31
32
|
button,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elmethis/vue",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@mdi/js": "^7.4.47",
|
|
27
27
|
"@vueuse/core": "^14.1.0",
|
|
28
28
|
"fuse.js": "^7.1.0",
|
|
29
|
-
"katex": "^0.16.
|
|
30
|
-
"lodash-es": "^4.17.
|
|
29
|
+
"katex": "^0.16.28",
|
|
30
|
+
"lodash-es": "^4.17.23",
|
|
31
31
|
"marked": "^17.0.1",
|
|
32
32
|
"mermaid": "^11.12.2",
|
|
33
33
|
"nanoid": "^5.1.6",
|
|
@@ -35,9 +35,11 @@
|
|
|
35
35
|
"shiki": "^3.21.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@ag-ui/core": "^0.0.
|
|
39
|
-
"@notionhq/client": "^5.
|
|
40
|
-
"
|
|
38
|
+
"@ag-ui/core": "^0.0.43",
|
|
39
|
+
"@notionhq/client": "^5.9.0",
|
|
40
|
+
"storybook": "^10.2.2",
|
|
41
|
+
"@storybook/addon-docs": "^10.2.2",
|
|
42
|
+
"@storybook/vue3-vite": "10.2.2",
|
|
41
43
|
"@types/json-schema": "^7.0.15",
|
|
42
44
|
"@types/katex": "^0.16.8",
|
|
43
45
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -47,18 +49,22 @@
|
|
|
47
49
|
"jarkup-ts": "^0.6.0",
|
|
48
50
|
"openapi-types": "^12.1.3",
|
|
49
51
|
"postcss": "^8.5.6",
|
|
50
|
-
"postcss-preset-env": "^11.1.
|
|
51
|
-
"sass": "^1.97.
|
|
52
|
+
"postcss-preset-env": "^11.1.2",
|
|
53
|
+
"sass": "^1.97.3",
|
|
52
54
|
"vite": "^7.3.1",
|
|
53
55
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
54
56
|
"vite-plugin-dts": "^4.5.4",
|
|
55
|
-
"vue-tsc": "^3.2.
|
|
57
|
+
"vue-tsc": "^3.2.4",
|
|
58
|
+
"@vue/tsconfig": "^0.8.1",
|
|
59
|
+
"typescript": "^5.9.3"
|
|
56
60
|
},
|
|
57
61
|
"peerDependencies": {
|
|
58
62
|
"vue": "^3.4.0"
|
|
59
63
|
},
|
|
60
64
|
"scripts": {
|
|
61
65
|
"build": "vue-tsc && vite build",
|
|
62
|
-
"check": "vue-tsc -p tsconfig.app.json"
|
|
66
|
+
"check": "vue-tsc -p tsconfig.app.json",
|
|
67
|
+
"storybook": "storybook dev -p 6006 --no-open",
|
|
68
|
+
"build-storybook": "storybook build"
|
|
63
69
|
}
|
|
64
70
|
}
|