@elmethis/core 0.2.4 → 0.2.5

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.
@@ -2,7 +2,7 @@ import { defineComponent, ref, createElementBlock, openBlock, normalizeStyle, no
2
2
  import ElmInlineText from "../typography/ElmInlineText.vue.mjs";
3
3
  import { useIntersectionObserver } from "@vueuse/core";
4
4
  import ElmMdiIcon from "../icon/ElmMdiIcon.vue.mjs";
5
- import { mdiHome, mdiFileDocument, mdiFolderOpen, mdiChevronRight } from "@mdi/js";
5
+ import { mdiHome, mdiApplicationOutline, mdiFolderOpen, mdiChevronRight } from "@mdi/js";
6
6
  const _hoisted_1 = ["onClick"];
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "ElmBreadcrumb",
@@ -31,16 +31,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
31
  onClick: link.onClick
32
32
  }, [
33
33
  createVNode(ElmMdiIcon, {
34
- d: index === 0 ? unref(mdiHome) : index === _ctx.links.length - 1 ? unref(mdiFileDocument) : unref(mdiFolderOpen),
34
+ d: index === 0 ? unref(mdiHome) : index === _ctx.links.length - 1 ? unref(mdiApplicationOutline) : unref(mdiFolderOpen),
35
35
  size: "1.25em",
36
- class: normalizeClass(_ctx.$style.fade),
36
+ class: normalizeClass(_ctx.$style.text),
37
37
  style: normalizeStyle({
38
38
  "--delay": `${index * 100}ms`
39
39
  })
40
40
  }, null, 8, ["d", "class", "style"]),
41
41
  createVNode(ElmInlineText, {
42
42
  text: link.text,
43
- class: normalizeClass(_ctx.$style.fade),
43
+ class: normalizeClass(_ctx.$style.text),
44
44
  style: normalizeStyle({
45
45
  "--delay": `${index * 100 + 50}ms`
46
46
  })
@@ -50,8 +50,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
50
  key: 0,
51
51
  d: unref(mdiChevronRight),
52
52
  size: "1em",
53
- color: "gray",
54
- class: normalizeClass(_ctx.$style.fade),
53
+ color: "#b69545",
54
+ class: normalizeClass(_ctx.$style.text),
55
55
  style: normalizeStyle({ "--delay": `${index * 100 + 100}ms` })
56
56
  }, null, 8, ["d", "class", "style"])) : createCommentVNode("", true)
57
57
  ], 64);
@@ -3,22 +3,22 @@
3
3
  try {
4
4
  if (typeof document != "undefined") {
5
5
  var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode("._container_18a0d_1{display:flex;flex-direction:row;align-items:center;gap:.5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}._container_18a0d_1 ._link-container_18a0d_8{display:flex;flex-direction:row;align-items:center;gap:.5rem;box-sizing:border-box;padding:.25rem;border-radius:.25rem;cursor:pointer;transition:background-color .2s,transform .2s}._container_18a0d_1 ._link-container_18a0d_8:hover{background-color:#6987b833;transform:translate(-1px) translateY(-1px)}._container_18a0d_1 ._link-container_18a0d_8:active{background-color:#59b57c33;transform:translate(1px) translateY(1px)}._fade_18a0d_28{opacity:var(--opacity);transition:opacity .2s;transition-delay:var(--delay)}"));
6
+ elementStyle.appendChild(document.createTextNode("._container_xsa12_1{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}._link-container_xsa12_10{display:flex;flex-direction:row;align-items:center;gap:0;box-sizing:border-box;padding:.25rem;border-radius:.25rem;cursor:pointer;transition:background-color .1s,opacity .1s,transform .1s}._link-container_xsa12_10:hover{background-color:#868e9c33;transform:translate(-1px) translateY(-1px)}._link-container_xsa12_10:active{opacity:.5;transform:translate(1px) translateY(1px)}._text_xsa12_30{opacity:var(--opacity);transition:opacity .2s;transition-delay:var(--delay);padding:0 .25rem}"));
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 container = "_container_18a0d_1";
14
- const fade = "_fade_18a0d_28";
13
+ const container = "_container_xsa12_1";
14
+ const text = "_text_xsa12_30";
15
15
  const style0 = {
16
16
  container,
17
- "link-container": "_link-container_18a0d_8",
18
- fade
17
+ "link-container": "_link-container_xsa12_10",
18
+ text
19
19
  };
20
20
  export {
21
21
  container,
22
22
  style0 as default,
23
- fade
23
+ text
24
24
  };
@@ -4,5 +4,5 @@ export interface ElmFragmentIdentifierProps {
4
4
  */
5
5
  id: string;
6
6
  }
7
- declare const _default: import('vue').DefineComponent<ElmFragmentIdentifierProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmFragmentIdentifierProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
7
+ declare const _default: import('vue').DefineComponent<ElmFragmentIdentifierProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmFragmentIdentifierProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
8
8
  export default _default;
@@ -1,7 +1,4 @@
1
- import { defineComponent, onMounted, nextTick, createElementBlock, openBlock, normalizeClass, createVNode, unref } from "vue";
2
- import { useClipboard } from "@vueuse/core";
3
- import ElmMdiIcon from "../icon/ElmMdiIcon.vue.mjs";
4
- import { mdiAnchor, mdiLinkVariant } from "@mdi/js";
1
+ import { defineComponent, onMounted, nextTick, createElementBlock, openBlock, normalizeClass } from "vue";
5
2
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
3
  __name: "ElmFragmentIdentifier",
7
4
  props: {
@@ -17,13 +14,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
14
  target.scrollIntoView({ behavior: "smooth" });
18
15
  }
19
16
  };
20
- const handleLinkClick = (id) => {
21
- const url = new URL(window.location.href);
22
- url.hash = id;
23
- window.history.replaceState(null, "", url.toString());
24
- copy(window.location.href);
25
- };
26
- const { copy } = useClipboard();
27
17
  onMounted(() => {
28
18
  nextTick(() => {
29
19
  const hash = window.location.hash;
@@ -36,24 +26,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
36
26
  });
37
27
  });
38
28
  return (_ctx, _cache) => {
39
- return openBlock(), createElementBlock("div", {
40
- class: normalizeClass(_ctx.$style.fragment)
41
- }, [
42
- createVNode(ElmMdiIcon, {
43
- size: "1.25rem",
44
- color: "#6987b8",
45
- d: unref(mdiAnchor),
46
- class: normalizeClass(_ctx.$style.icon),
47
- onClick: _cache[0] || (_cache[0] = ($event) => handleHashClick(_ctx.id))
48
- }, null, 8, ["d", "class"]),
49
- createVNode(ElmMdiIcon, {
50
- size: "1.25rem",
51
- color: "#6987b8",
52
- d: unref(mdiLinkVariant),
53
- class: normalizeClass(_ctx.$style.icon),
54
- onClick: _cache[1] || (_cache[1] = ($event) => handleLinkClick(_ctx.id))
55
- }, null, 8, ["d", "class"])
56
- ], 2);
29
+ return openBlock(), createElementBlock("span", {
30
+ class: normalizeClass(_ctx.$style.fragment),
31
+ onClick: _cache[0] || (_cache[0] = ($event) => handleHashClick(_ctx.id))
32
+ }, "#", 2);
57
33
  };
58
34
  }
59
35
  });
@@ -3,21 +3,18 @@
3
3
  try {
4
4
  if (typeof document != "undefined") {
5
5
  var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode("._fragment_e7xfw_1{display:flex;justify-content:flex-end;align-items:center}._icon_e7xfw_7{padding:.25rem;border-radius:.25rem;transition:background-color .2s;cursor:pointer}._icon_e7xfw_7:hover{background-color:#0000001a}[data-theme=dark] ._icon_e7xfw_7:hover{background-color:#ffffff1a}"));
6
+ elementStyle.appendChild(document.createTextNode("._fragment_1kofp_1{font-size:1rem;width:1rem;height:1rem;padding:.125rem;margin-inline-start:.5rem;border-radius:.125rem;display:inline-flex;justify-content:center;align-items:center;color:#b69545;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:1;transition:background-color .2s,opacity .1s,transform .1s}._fragment_1kofp_1:hover{background-color:#868e9c33}._fragment_1kofp_1:active{opacity:.5;transform:translate(1px) translateY(1px)}"));
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 fragment = "_fragment_e7xfw_1";
14
- const icon = "_icon_e7xfw_7";
13
+ const fragment = "_fragment_1kofp_1";
15
14
  const style0 = {
16
- fragment,
17
- icon
15
+ fragment
18
16
  };
19
17
  export {
20
18
  style0 as default,
21
- fragment,
22
- icon
19
+ fragment
23
20
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, useSlots, createElementBlock, openBlock, Fragment, createBlock, createCommentVNode, resolveDynamicComponent, normalizeStyle, unref, normalizeClass, withCtx, h } from "vue";
1
+ import { defineComponent, ref, useSlots, createBlock, openBlock, resolveDynamicComponent, normalizeStyle, unref, normalizeClass, withCtx, createCommentVNode, createElementBlock, h } from "vue";
2
2
  import { useIntersectionObserver } from "@vueuse/core";
3
3
  import { kebabCase } from "lodash-es";
4
4
  import ElmFragmentIdentifier from "./ElmFragmentIdentifier.vue.mjs";
@@ -38,37 +38,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
38
38
  }
39
39
  };
40
40
  return (_ctx, _cache) => {
41
- return openBlock(), createElementBlock(Fragment, null, [
42
- (openBlock(), createBlock(resolveDynamicComponent(`h${_ctx.level}`), {
43
- ref_key: "target",
44
- ref: target,
45
- class: normalizeClass([
46
- _ctx.$style[`h${_ctx.level}`],
47
- _ctx.$style["heading-common"],
48
- unref(headingStyle).heading
49
- ]),
50
- id: _ctx.id ?? unref(kebabCase)(_ctx.text),
51
- style: normalizeStyle({
52
- "--font-size": _ctx.size ?? `${unref(SIZE_MAP)[_ctx.level]}rem`,
53
- "--scale": targetIsVisible.value ? 1 : 0,
54
- "--opacity": targetIsVisible.value ? 1 : 0
55
- })
56
- }, {
57
- default: withCtx(() => [
58
- (openBlock(), createBlock(resolveDynamicComponent(() => renderSlots()))),
59
- _ctx.level === 2 ? (openBlock(), createElementBlock("span", {
60
- key: 0,
61
- class: normalizeClass(_ctx.$style["h2__underline"]),
62
- "aria-hidden": ""
63
- }, null, 2)) : createCommentVNode("", true)
64
- ]),
65
- _: 1
66
- }, 8, ["class", "id", "style"])),
67
- !_ctx.disableFragmentIdentifier ? (openBlock(), createBlock(ElmFragmentIdentifier, {
68
- key: 0,
69
- id: _ctx.id ?? unref(kebabCase)(_ctx.text)
70
- }, null, 8, ["id"])) : createCommentVNode("", true)
71
- ], 64);
41
+ return openBlock(), createBlock(resolveDynamicComponent(`h${_ctx.level}`), {
42
+ ref_key: "target",
43
+ ref: target,
44
+ class: normalizeClass([
45
+ _ctx.$style[`h${_ctx.level}`],
46
+ _ctx.$style["heading-common"],
47
+ unref(headingStyle).heading
48
+ ]),
49
+ id: _ctx.id ?? unref(kebabCase)(_ctx.text),
50
+ style: normalizeStyle({
51
+ "--font-size": _ctx.size ?? `${unref(SIZE_MAP)[_ctx.level]}rem`,
52
+ "--scale": targetIsVisible.value ? 1 : 0,
53
+ "--opacity": targetIsVisible.value ? 1 : 0
54
+ })
55
+ }, {
56
+ default: withCtx(() => [
57
+ (openBlock(), createBlock(resolveDynamicComponent(() => renderSlots()))),
58
+ !_ctx.disableFragmentIdentifier ? (openBlock(), createBlock(ElmFragmentIdentifier, {
59
+ key: 0,
60
+ id: _ctx.id ?? unref(kebabCase)(_ctx.text)
61
+ }, null, 8, ["id"])) : createCommentVNode("", true),
62
+ _ctx.level === 2 ? (openBlock(), createElementBlock("span", {
63
+ key: 1,
64
+ class: normalizeClass(_ctx.$style["h2__underline"]),
65
+ "aria-hidden": ""
66
+ }, null, 2)) : createCommentVNode("", true)
67
+ ]),
68
+ _: 1
69
+ }, 8, ["class", "id", "style"]);
72
70
  };
73
71
  }
74
72
  });
@@ -3,22 +3,22 @@
3
3
  try {
4
4
  if (typeof document != "undefined") {
5
5
  var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode('._heading-common_1kxg6_1{margin-block-start:1.5rem;position:relative;font-size:var(--font-size);line-height:var(--font-size);opacity:var(--opacity);transition:color .4s,opacity .8s}._h1_1kxg6_10{margin-block-start:.5rem}._h1_1kxg6_10:after{position:absolute;content:"";bottom:-10px;left:0;width:100%;height:.25px;background-color:#00000080;transition:transform .8s;transform:scaleX(var(--scale))}[data-theme=dark] ._h1_1kxg6_10:after{background-color:#ffffff80}._h1_1kxg6_10:before{position:absolute;content:"";bottom:-12px;left:45%;width:10%;height:2px;background-color:#0009;transition:transform .8s;transform:scaleY(var(--scale));transform-origin:top}[data-theme=dark] ._h1_1kxg6_10:before{background-color:#fff9}._h2_1kxg6_43:after{position:absolute;content:"";right:2px;bottom:-4px;width:6px;height:8px;opacity:.8;transform:skew(-25deg);background-color:#000c}[data-theme=dark] ._h2_1kxg6_43:after{background-color:#fffc}._h2_1kxg6_43:before{position:absolute;content:"";right:10px;bottom:-4px;width:6px;height:8px;opacity:.8;transform:skew(-25deg);background-color:#000c}[data-theme=dark] ._h2_1kxg6_43:before{background-color:#fffc}._h2__underline_1kxg6_71{overflow:hidden;position:absolute;content:"";bottom:-6px;left:0;width:100%;height:.25px;background-color:#00000080;transition:transform .8s;transform:scaleX(var(--scale));transform-origin:left}[data-theme=dark] ._h2__underline_1kxg6_71{background-color:#ffffff80}._h3_1kxg6_88{box-sizing:border-box;padding-left:.75rem}._h3_1kxg6_88:after{position:absolute;content:"";width:3px;height:50%;top:25%;left:0;background-color:#000c}[data-theme=dark] ._h3_1kxg6_88:after{background-color:#fffc}._h4_1kxg6_105,._h5_1kxg6_109,._h6_1kxg6_113{position:relative}'));
6
+ elementStyle.appendChild(document.createTextNode('._heading-common_1sxzn_1{margin-block:1.5rem;position:relative;font-size:var(--font-size);line-height:var(--font-size);opacity:var(--opacity);transition:color .4s,opacity .8s}._h1_1sxzn_10:after{position:absolute;content:"";bottom:-10px;left:0;width:100%;height:.25px;background-color:#00000080;transition:transform .8s;transform:scaleX(var(--scale))}[data-theme=dark] ._h1_1sxzn_10:after{background-color:#ffffff80}._h1_1sxzn_10:before{position:absolute;content:"";bottom:-12px;left:45%;width:10%;height:2px;background-color:#0009;transition:transform .8s;transform:scaleY(var(--scale));transform-origin:top}[data-theme=dark] ._h1_1sxzn_10:before{background-color:#fff9}._h2_1sxzn_40:after{position:absolute;content:"";right:2px;bottom:-4px;width:6px;height:8px;opacity:.8;transform:skew(-25deg);background-color:#000c}[data-theme=dark] ._h2_1sxzn_40:after{background-color:#fffc}._h2_1sxzn_40:before{position:absolute;content:"";right:10px;bottom:-4px;width:6px;height:8px;opacity:.8;transform:skew(-25deg);background-color:#000c}[data-theme=dark] ._h2_1sxzn_40:before{background-color:#fffc}._h2__underline_1sxzn_68{overflow:hidden;position:absolute;content:"";bottom:-6px;left:0;width:100%;height:.25px;background-color:#00000080;transition:transform .8s;transform:scaleX(var(--scale));transform-origin:left}[data-theme=dark] ._h2__underline_1sxzn_68{background-color:#ffffff80}._h3_1sxzn_85{box-sizing:border-box;padding-left:.75rem}._h3_1sxzn_85:after{position:absolute;content:"";width:3px;height:50%;top:25%;left:0;background-color:#000c}[data-theme=dark] ._h3_1sxzn_85:after{background-color:#fffc}._h4_1sxzn_102,._h5_1sxzn_106,._h6_1sxzn_110{position:relative}'));
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 h1 = "_h1_1kxg6_10";
14
- const h2 = "_h2_1kxg6_43";
15
- const h2__underline = "_h2__underline_1kxg6_71";
16
- const h3 = "_h3_1kxg6_88";
17
- const h4 = "_h4_1kxg6_105";
18
- const h5 = "_h5_1kxg6_109";
19
- const h6 = "_h6_1kxg6_113";
13
+ const h1 = "_h1_1sxzn_10";
14
+ const h2 = "_h2_1sxzn_40";
15
+ const h2__underline = "_h2__underline_1sxzn_68";
16
+ const h3 = "_h3_1sxzn_85";
17
+ const h4 = "_h4_1sxzn_102";
18
+ const h5 = "_h5_1sxzn_106";
19
+ const h6 = "_h6_1sxzn_110";
20
20
  const style0 = {
21
- "heading-common": "_heading-common_1kxg6_1",
21
+ "heading-common": "_heading-common_1sxzn_1",
22
22
  h1,
23
23
  h2,
24
24
  h2__underline,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elmethis/core",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@mdi/js": "^7.4.47",
27
- "@vueuse/core": "^13.2.0",
27
+ "@vueuse/core": "^13.3.0",
28
28
  "katex": "^0.16.22",
29
29
  "lodash-es": "^4.17.21",
30
30
  "nanoid": "^5.1.5",
@@ -32,8 +32,8 @@
32
32
  "shiki": "^3.4.2"
33
33
  },
34
34
  "devDependencies": {
35
- "@notionhq/client": "^3.0.1",
36
- "@storybook/vue3": "^8.6.14",
35
+ "@notionhq/client": "^3.1.3",
36
+ "@storybook/vue3": "^9.0.4",
37
37
  "@types/json-schema": "^7.0.15",
38
38
  "@types/katex": "^0.16.7",
39
39
  "@types/lodash-es": "^4.17.12",
@@ -42,9 +42,9 @@
42
42
  "csstype": "^3.1.3",
43
43
  "jarkup-ts": "^0.4.1",
44
44
  "openapi-types": "^12.1.3",
45
- "postcss": "^8.5.3",
46
- "postcss-preset-env": "^10.1.6",
47
- "sass": "^1.89.0",
45
+ "postcss": "^8.5.4",
46
+ "postcss-preset-env": "^10.2.0",
47
+ "sass": "^1.89.1",
48
48
  "vite": "^6.3.5",
49
49
  "vite-plugin-css-injected-by-js": "^3.5.2",
50
50
  "vite-plugin-dts": "^4.5.4",