@sit-onyx/mdc 0.1.0-dev-20260407073908 → 0.1.0-dev-20260407091048

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/README.md CHANGED
@@ -7,3 +7,9 @@
7
7
  # @sit-onyx/mdc
8
8
 
9
9
  Wrapper for the [@nuxtjs/mdc](https://github.com/nuxt-content/mdc) package using the onyx design system created by [Schwarz IT](https://it.schwarz).
10
+
11
+ <br />
12
+
13
+ ## Documentation
14
+
15
+ You can find our documentation [here](https://storybook.onyx.schwarz/?path=/docs/documentation-markdownrenderer--docs).
@@ -19,7 +19,11 @@ declare function __VLS_template(): {
19
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
20
  declare const __VLS_component: import('vue', { with: { "resolution-mode": "import" } }).DefineComponent<OnyxMarkdownRendererProps, {
21
21
  parserResult: import('vue', { with: { "resolution-mode": "import" } }).Ref<MDCParserResult | undefined, MDCParserResult | undefined>;
22
- }, {}, {}, {}, import('vue', { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import('vue', { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import('vue', { with: { "resolution-mode": "import" } }).PublicProps, Readonly<OnyxMarkdownRendererProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue', { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
22
+ }, {}, {}, {}, import('vue', { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import('vue', { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
23
+ resolve: () => any;
24
+ }, string, import('vue', { with: { "resolution-mode": "import" } }).PublicProps, Readonly<OnyxMarkdownRendererProps> & Readonly<{
25
+ onResolve?: (() => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import('vue', { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
23
27
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
28
  export default _default;
25
29
  type __VLS_WithTemplateSlots<T, S> = T & {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Suspense as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineAsyncComponent as ee, defineComponent as c, inject as l, mergeProps as u, normalizeClass as d, openBlock as f, provide as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, useAttrs as te, useId as v, useTemplateRef as y, watch as ne, withCtx as b } from "vue";
2
- import { OnyxAccordion as re, OnyxAccordionItem as ie, OnyxCodeTab as ae, OnyxCodeTabs as oe, OnyxHeadline as x, OnyxLink as S, OnyxSeparator as C, OnyxTable as w, injectI18n as T, isInternalLink as E, useDensity as D } from "sit-onyx";
1
+ import { Suspense as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineAsyncComponent as ee, defineComponent as c, inject as l, mergeProps as u, nextTick as te, normalizeClass as d, openBlock as f, provide as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, useAttrs as ne, useId as v, useTemplateRef as y, watch as re, withCtx as b } from "vue";
2
+ import { OnyxAccordion as x, OnyxAccordionItem as ie, OnyxCodeTab as ae, OnyxCodeTabs as oe, OnyxHeadline as S, OnyxLink as C, OnyxSeparator as w, OnyxTable as T, injectI18n as E, isInternalLink as D, useDensity as se } from "sit-onyx";
3
3
  //#endregion
4
4
  //#region src/components/prose/ProseA.vue
5
5
  var O = /* @__PURE__ */ c({
@@ -10,7 +10,7 @@ var O = /* @__PURE__ */ c({
10
10
  },
11
11
  setup(e) {
12
12
  let t = e;
13
- return (e, n) => (f(), r(_(S), u(t, { target: _(E)(t.href) ? t.target : "_blank" }), {
13
+ return (e, n) => (f(), r(_(C), u(t, { target: _(D)(t.href) ? t.target : "_blank" }), {
14
14
  default: b(() => [h(e.$slots, "default")]),
15
15
  _: 3
16
16
  }, 16, ["target"]));
@@ -19,28 +19,28 @@ var O = /* @__PURE__ */ c({
19
19
  let n = e.__vccOpts || e;
20
20
  for (let [e, r] of t) n[e] = r;
21
21
  return n;
22
- }, se = {}, ce = { "aria-hidden": "true" };
22
+ }, ce = {}, le = { "aria-hidden": "true" };
23
23
  function A(e, t) {
24
- return f(), a("br", ce);
24
+ return f(), a("br", le);
25
25
  }
26
- var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]]), le = { class: "onyx-text--small" }, M = /* @__PURE__ */ k(/* @__PURE__ */ c({
26
+ var j = /* @__PURE__ */ k(ce, [["render", A], ["__scopeId", "data-v-d52859e7"]]), ue = { class: "onyx-text--small" }, M = /* @__PURE__ */ k(/* @__PURE__ */ c({
27
27
  __name: "ProseCode",
28
28
  setup(e) {
29
- return (e, t) => (f(), a("code", le, [h(e.$slots, "default", {}, void 0, !0)]));
29
+ return (e, t) => (f(), a("code", ue, [h(e.$slots, "default", {}, void 0, !0)]));
30
30
  }
31
- }), [["__scopeId", "data-v-3d53c5e9"]]), N = Symbol(), P = Symbol(), ue = { class: "header" }, F = { class: "header__placeholder" }, I = {
31
+ }), [["__scopeId", "data-v-3d53c5e9"]]), N = Symbol(), P = Symbol(), de = { class: "header" }, F = { class: "header__placeholder" }, I = {
32
32
  ref: "header",
33
33
  class: "header__content"
34
34
  }, L = /* @__PURE__ */ k(/* @__PURE__ */ c({
35
35
  __name: "ProseDetails",
36
36
  setup(e) {
37
- let { t } = T(), n = v();
38
- return p(P, { headerRef: y("header") }), (e, i) => (f(), r(_(re), {
37
+ let { t } = E(), n = v();
38
+ return p(P, { headerRef: y("header") }), (e, i) => (f(), r(_(x), {
39
39
  class: "accordion",
40
40
  type: "card"
41
41
  }, {
42
42
  default: b(() => [s(_(ie), { value: _(n) }, {
43
- header: b(() => [o("div", ue, [o("span", F, g(_(t)("accordion.toggle")), 1), o("span", I, null, 512)])]),
43
+ header: b(() => [o("div", de, [o("span", F, g(_(t)("accordion.toggle")), 1), o("span", I, null, 512)])]),
44
44
  default: b(() => [h(e.$slots, "default", {}, void 0, !0)]),
45
45
  _: 3
46
46
  }, 8, ["value"])]),
@@ -52,7 +52,7 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
52
52
  props: { id: {} },
53
53
  setup(e) {
54
54
  let t = e;
55
- return (e, n) => (f(), r(_(x), {
55
+ return (e, n) => (f(), r(_(S), {
56
56
  is: "h1",
57
57
  hash: t.id
58
58
  }, {
@@ -65,7 +65,7 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
65
65
  props: { id: {} },
66
66
  setup(e) {
67
67
  let t = e;
68
- return (e, n) => (f(), r(_(x), {
68
+ return (e, n) => (f(), r(_(S), {
69
69
  is: "h2",
70
70
  hash: t.id
71
71
  }, {
@@ -78,7 +78,7 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
78
78
  props: { id: {} },
79
79
  setup(e) {
80
80
  let t = e;
81
- return (e, n) => (f(), r(_(x), {
81
+ return (e, n) => (f(), r(_(S), {
82
82
  is: "h3",
83
83
  hash: t.id
84
84
  }, {
@@ -91,7 +91,7 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
91
91
  props: { id: {} },
92
92
  setup(e) {
93
93
  let t = e;
94
- return (e, n) => (f(), r(_(x), {
94
+ return (e, n) => (f(), r(_(S), {
95
95
  is: "h4",
96
96
  hash: t.id
97
97
  }, {
@@ -104,7 +104,7 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
104
104
  props: { id: {} },
105
105
  setup(e) {
106
106
  let t = e;
107
- return (e, n) => (f(), r(_(x), {
107
+ return (e, n) => (f(), r(_(S), {
108
108
  is: "h5",
109
109
  hash: t.id
110
110
  }, {
@@ -117,7 +117,7 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
117
117
  props: { id: {} },
118
118
  setup(e) {
119
119
  let t = e;
120
- return (e, n) => (f(), r(_(x), {
120
+ return (e, n) => (f(), r(_(S), {
121
121
  is: "h6",
122
122
  hash: t.id
123
123
  }, {
@@ -128,7 +128,7 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
128
128
  }), [["__scopeId", "data-v-e10c9588"]]), W = /* @__PURE__ */ k(/* @__PURE__ */ c({
129
129
  __name: "ProseHr",
130
130
  setup(e) {
131
- return (e, t) => (f(), r(_(C), { class: "separator" }));
131
+ return (e, t) => (f(), r(_(w), { class: "separator" }));
132
132
  }
133
133
  }), [["__scopeId", "data-v-88aee9af"]]), G = /* @__PURE__ */ k(/* @__PURE__ */ c({
134
134
  __name: "ProseOl",
@@ -187,7 +187,7 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
187
187
  return p(N, {
188
188
  headRef: y("head"),
189
189
  bodyRef: y("body")
190
- }), (e, t) => (f(), r(_(w), {
190
+ }), (e, t) => (f(), r(_(T), {
191
191
  class: "table",
192
192
  striped: "",
193
193
  "with-vertical-borders": ""
@@ -220,27 +220,28 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
220
220
  setup(e) {
221
221
  return (e, t) => (f(), a("ul", null, [h(e.$slots, "default", {}, void 0, !0)]));
222
222
  }
223
- }), [["__scopeId", "data-v-17a11577"]]), de = /* @__PURE__ */ c({
223
+ }), [["__scopeId", "data-v-17a11577"]]), fe = /* @__PURE__ */ c({
224
224
  __name: "OnyxMarkdownRenderer",
225
225
  props: {
226
226
  density: {},
227
227
  markdown: {},
228
228
  options: {}
229
229
  },
230
- setup(t, { expose: n }) {
231
- let a = t, { densityClass: o } = D(a), s = m(!1), c = m(), l = async () => {
230
+ emits: ["resolve"],
231
+ setup(t, { expose: n, emit: a }) {
232
+ let o = t, s = a, { densityClass: c } = se(o), l = m(!1), d = m(), p = async () => {
232
233
  let { parseMarkdown: e } = await import("./runtime-BpOoakXC.js");
233
234
  return e;
234
- }, d = ee(() => import("./MDCRenderer-DZNu39aU.js"));
235
- ne(() => a.markdown, async () => {
236
- s.value = !0;
235
+ }, g = ee(() => import("./MDCRenderer-DZNu39aU.js"));
236
+ re(() => o.markdown, async () => {
237
+ l.value = !0;
237
238
  try {
238
- c.value = await (await l())(a.markdown, a.options);
239
+ d.value = await (await p())(o.markdown, o.options);
239
240
  } finally {
240
- s.value = !1;
241
+ l.value = !1;
241
242
  }
242
243
  }, { immediate: !0 });
243
- let p = {
244
+ let v = {
244
245
  a: O,
245
246
  br: j,
246
247
  code: M,
@@ -260,18 +261,20 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
260
261
  thead: Q,
261
262
  tbody: Z,
262
263
  ul: $
263
- }, g = te();
264
- return n({ parserResult: c }), (t, n) => (f(), r(e, null, {
264
+ }, y = ne(), x = async () => {
265
+ await te(), s("resolve");
266
+ };
267
+ return n({ parserResult: d }), (t, n) => (f(), r(e, { onResolve: x }, {
265
268
  fallback: b(() => [h(t.$slots, "loading")]),
266
- default: b(() => [s.value ? h(t.$slots, "loading", { key: 0 }) : c.value ? (f(), r(_(d), u({ key: 1 }, _(g), {
269
+ default: b(() => [l.value ? h(t.$slots, "loading", { key: 0 }) : d.value ? (f(), r(_(g), u({ key: 1 }, _(y), {
267
270
  class: [
268
271
  "onyx-component",
269
272
  "onyx-markdown-renderer",
270
- _(o)
273
+ _(c)
271
274
  ],
272
- body: c.value.body,
273
- data: c.value.data,
274
- components: p
275
+ body: d.value.body,
276
+ data: d.value.data,
277
+ components: v
275
278
  }), null, 16, [
276
279
  "class",
277
280
  "body",
@@ -282,4 +285,4 @@ var j = /* @__PURE__ */ k(se, [["render", A], ["__scopeId", "data-v-d52859e7"]])
282
285
  }
283
286
  });
284
287
  //#endregion
285
- export { de as OnyxMarkdownRenderer, O as ProseA, j as ProseBr, M as ProseCode, L as ProseDetails, R as ProseH1, z as ProseH2, B as ProseH3, V as ProseH4, H as ProseH5, U as ProseH6, W as ProseHr, G as ProseOl, K as ProseP, J as ProsePre, Y as ProseSummary, X as ProseTable, Z as ProseTbody, Q as ProseThead, $ as ProseUl };
288
+ export { fe as OnyxMarkdownRenderer, O as ProseA, j as ProseBr, M as ProseCode, L as ProseDetails, R as ProseH1, z as ProseH2, B as ProseH3, V as ProseH4, H as ProseH5, U as ProseH6, W as ProseHr, G as ProseOl, K as ProseP, J as ProsePre, Y as ProseSummary, X as ProseTable, Z as ProseTbody, Q as ProseThead, $ as ProseUl };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sit-onyx/mdc",
3
3
  "description": "Wrapper for the @nuxtjs/mdc package using the onyx design system created by Schwarz IT",
4
- "version": "0.1.0-dev-20260407073908",
4
+ "version": "0.1.0-dev-20260407091048",
5
5
  "type": "module",
6
6
  "author": "Schwarz IT KG",
7
7
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  "peerDependencies": {
33
33
  "@nuxtjs/mdc": ">= 0.20.2",
34
34
  "vue": ">= 3.5.0",
35
- "sit-onyx": "^1.12.0-dev-20260407073908"
35
+ "sit-onyx": "^1.12.0-dev-20260407091048"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@axe-core/playwright": "^4.11.1",
@@ -42,7 +42,7 @@
42
42
  "@vue/compiler-dom": "3.5.31",
43
43
  "@sit-onyx/playwright-utils": "^1.2.1",
44
44
  "@sit-onyx/shared": "^0.1.0",
45
- "sit-onyx": "^1.12.0-dev-20260407073908"
45
+ "sit-onyx": "^1.12.0-dev-20260407091048"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "vite build",