required-doc 0.0.0 → 0.0.2

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.
Files changed (3) hide show
  1. package/dist/index.js +302 -277
  2. package/package.json +1 -1
  3. package/types.d.ts +2 -1
package/dist/index.js CHANGED
@@ -7,103 +7,84 @@ var w = /* @__PURE__ */ l({
7
7
  setup(e) {
8
8
  return (e, t) => (m(), r(y(re)));
9
9
  }
10
- }), T = [{
11
- id: "pc",
12
- label: "PC",
13
- frame: "pc",
14
- width: 1024
15
- }, {
16
- id: "phone",
17
- label: "Phone",
18
- frame: "phone",
19
- width: 360
20
- }], E = {
21
- light: {
22
- bg: "#f5f6f8",
23
- font: "#1f2937"
24
- },
25
- dark: {
26
- bg: "#131313",
27
- font: "#f3f3f3"
28
- }
29
- }, D = [], O = [], k = [], A = !0, j = T, M = E;
30
- function N(e) {
31
- D = e.components, O = e.pages, k = e.colors, A = e.options?.showThemeToggle ?? !0, j = e.options?.devices && e.options.devices.length > 0 ? e.options.devices : T, M = e.options?.baseColors ?? E;
10
+ }), T = [], E = [], D = [], O = !0, k = [], A;
11
+ function j(e) {
12
+ T = e.components, E = e.pages, D = e.colors, O = e.options?.showThemeToggle ?? !0, k = e.options?.devices ?? [], A = e.options?.baseColors;
32
13
  }
33
14
  function ae() {
34
- return A;
15
+ return O;
35
16
  }
36
17
  function oe() {
37
- return j;
18
+ return k;
38
19
  }
39
20
  function se() {
40
- return M;
21
+ return A;
41
22
  }
42
- function ce() {
43
- return D;
23
+ function M() {
24
+ return T;
44
25
  }
45
- function P() {
46
- return O;
26
+ function ce() {
27
+ return E;
47
28
  }
48
- function F() {
49
- return k;
29
+ function N() {
30
+ return D;
50
31
  }
51
- function le(e, t) {
52
- return [...D, ...O].find((n) => n.kind === e && n.name === t);
32
+ function P(e, t) {
33
+ return [...T, ...E].find((n) => n.kind === e && n.name === t);
53
34
  }
54
35
  //#endregion
55
36
  //#region src/lib/theme.ts
56
- var I = h(!1);
57
- ne(I, (e) => {
37
+ var F = h(!1);
38
+ ne(F, (e) => {
58
39
  document.documentElement.classList.toggle("dark", e);
59
40
  }, { immediate: !0 });
60
- function ue() {
41
+ function le() {
61
42
  return {
62
- isDark: I,
43
+ isDark: F,
63
44
  toggle: () => {
64
- I.value = !I.value;
45
+ F.value = !F.value;
65
46
  }
66
47
  };
67
48
  }
68
49
  //#endregion
69
50
  //#region src/catalog/CatalogView.vue?vue&type=script&setup=true&lang.ts
70
- var de = { class: "mx-auto min-h-screen max-w-3xl p-8" }, fe = { class: "mb-8 flex items-center" }, pe = { class: "mb-10" }, me = { class: "space-y-2" }, he = { class: "font-bold dark:text-gray-100" }, ge = { class: "ml-1 text-xs text-gray-400" }, _e = { class: "text-sm text-gray-500 dark:text-gray-400" }, ve = { class: "mb-10" }, ye = { class: "space-y-2" }, be = { class: "font-bold dark:text-gray-100" }, xe = { class: "ml-1 text-xs text-gray-400" }, Se = { class: "text-sm text-gray-500 dark:text-gray-400" }, Ce = { class: "mb-2 rounded-lg border border-gray-300 bg-white p-4 dark:border-gray-700 dark:bg-gray-800" }, we = { class: "space-y-2 text-sm" }, Te = { class: "flex gap-3" }, Ee = { class: "font-bold dark:text-gray-100" }, De = { class: "flex gap-3" }, Oe = { class: "flex-1" }, ke = { class: "space-y-1" }, Ae = { class: "space-y-2" }, je = "block rounded-lg border border-gray-300 bg-white p-4 transition hover:border-blue-500 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-400", Me = /* @__PURE__ */ l({
51
+ var I = { class: "mx-auto min-h-screen max-w-3xl p-8" }, ue = { class: "mb-8 flex items-center" }, L = { class: "mb-10" }, de = { class: "space-y-2" }, fe = { class: "font-bold dark:text-gray-100" }, pe = { class: "ml-1 text-xs text-gray-400" }, me = { class: "text-sm text-gray-500 dark:text-gray-400" }, he = { class: "mb-10" }, R = { class: "space-y-2" }, z = { class: "font-bold dark:text-gray-100" }, ge = { class: "ml-1 text-xs text-gray-400" }, B = { class: "text-sm text-gray-500 dark:text-gray-400" }, _e = { class: "mb-2 rounded-lg border border-gray-300 bg-white p-4 dark:border-gray-700 dark:bg-gray-800" }, ve = { class: "space-y-2 text-sm" }, ye = { class: "flex gap-3" }, be = { class: "font-bold dark:text-gray-100" }, xe = { class: "flex gap-3" }, Se = { class: "flex-1" }, Ce = { class: "space-y-1" }, we = { class: "space-y-2" }, Te = "block rounded-lg border border-gray-300 bg-white p-4 transition hover:border-blue-500 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-400", Ee = /* @__PURE__ */ l({
71
52
  __name: "CatalogView",
72
53
  setup(t) {
73
- let { isDark: n, toggle: r } = ue(), l = ae(), u = oe(), f = ce(), p = P();
54
+ let { isDark: n, toggle: r } = le(), l = ae(), u = oe(), f = M(), p = ce();
74
55
  function ee(e) {
75
- return `${e.width}px`;
56
+ return e.minWidth === e.maxWidth ? `${e.maxWidth}px` : `${e.minWidth}–${e.maxWidth}px`;
76
57
  }
77
- return (t, h) => (m(), a("div", de, [
78
- o("div", fe, [h[1] ||= o("h1", { class: "text-2xl font-bold dark:text-gray-100" }, "要件書カタログ", -1), y(l) ? (m(), a("button", {
58
+ return (t, h) => (m(), a("div", I, [
59
+ o("div", ue, [h[1] ||= o("h1", { class: "text-2xl font-bold dark:text-gray-100" }, "要件書カタログ", -1), y(l) ? (m(), a("button", {
79
60
  key: 0,
80
61
  type: "button",
81
62
  class: "ml-auto rounded-md border border-gray-300 px-3 py-1 text-xs font-bold text-gray-600 transition hover:bg-gray-100 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-800",
82
63
  onClick: h[0] ||= (...e) => y(r) && y(r)(...e)
83
64
  }, v(y(n) ? "ライトモード" : "ダークモード"), 1)) : i("", !0)]),
84
- o("section", pe, [h[2] ||= o("h2", { class: "mb-3 text-lg font-bold text-gray-700 dark:text-gray-300" }, "ページ", -1), o("ul", me, [(m(!0), a(e, null, g(y(p), (e) => (m(), a("li", { key: e.name }, [c(y(x), {
65
+ o("section", L, [h[2] ||= o("h2", { class: "mb-3 text-lg font-bold text-gray-700 dark:text-gray-300" }, "ページ", -1), o("ul", de, [(m(!0), a(e, null, g(y(p), (e) => (m(), a("li", { key: e.name }, [c(y(x), {
85
66
  to: `/pages/${e.name}`,
86
- class: d(je)
67
+ class: d(Te)
87
68
  }, {
88
- default: b(() => [o("div", he, [s(v(e.title) + " ", 1), o("span", ge, "(" + v(e.latest) + ")", 1)]), o("div", _e, v(e.desc), 1)]),
69
+ default: b(() => [o("div", fe, [s(v(e.title) + " ", 1), o("span", pe, "(" + v(e.latest) + ")", 1)]), o("div", me, v(e.desc), 1)]),
89
70
  _: 2
90
71
  }, 1032, ["to"])]))), 128))])]),
91
- o("section", ve, [h[3] ||= o("h2", { class: "mb-3 text-lg font-bold text-gray-700 dark:text-gray-300" }, "コンポーネント", -1), o("ul", ye, [(m(!0), a(e, null, g(y(f), (e) => (m(), a("li", { key: e.name }, [c(y(x), {
72
+ o("section", he, [h[3] ||= o("h2", { class: "mb-3 text-lg font-bold text-gray-700 dark:text-gray-300" }, "コンポーネント", -1), o("ul", R, [(m(!0), a(e, null, g(y(f), (e) => (m(), a("li", { key: e.name }, [c(y(x), {
92
73
  to: `/components/${e.name}`,
93
- class: d(je)
74
+ class: d(Te)
94
75
  }, {
95
- default: b(() => [o("div", be, [s(v(e.title) + " ", 1), o("span", xe, "(" + v(e.latest) + ")", 1)]), o("div", Se, v(e.desc), 1)]),
76
+ default: b(() => [o("div", z, [s(v(e.title) + " ", 1), o("span", ge, "(" + v(e.latest) + ")", 1)]), o("div", B, v(e.desc), 1)]),
96
77
  _: 2
97
78
  }, 1032, ["to"])]))), 128))])]),
98
79
  o("section", null, [
99
80
  h[8] ||= o("h2", { class: "mb-3 text-lg font-bold text-gray-700 dark:text-gray-300" }, "デザイン", -1),
100
- o("div", Ce, [h[6] ||= o("div", { class: "mb-2 text-xs font-bold uppercase tracking-wide text-gray-400" }, "表示設定", -1), o("dl", we, [o("div", Te, [h[4] ||= o("dt", { class: "w-28 shrink-0 text-gray-500 dark:text-gray-400" }, "ダークモード切替", -1), o("dd", Ee, v(y(l) ? "表示" : "非表示"), 1)]), o("div", De, [h[5] ||= o("dt", { class: "w-28 shrink-0 text-gray-500 dark:text-gray-400" }, "端末", -1), o("dd", Oe, [o("ul", ke, [(m(!0), a(e, null, g(y(u), (e) => (m(), a("li", {
81
+ o("div", _e, [h[6] ||= o("div", { class: "mb-2 text-xs font-bold uppercase tracking-wide text-gray-400" }, "表示設定", -1), o("dl", ve, [o("div", ye, [h[4] ||= o("dt", { class: "w-28 shrink-0 text-gray-500 dark:text-gray-400" }, "ダークモード切替", -1), o("dd", be, v(y(l) ? "表示" : "非表示"), 1)]), o("div", xe, [h[5] ||= o("dt", { class: "w-28 shrink-0 text-gray-500 dark:text-gray-400" }, "端末", -1), o("dd", Se, [o("ul", Ce, [(m(!0), a(e, null, g(y(u), (e) => (m(), a("li", {
101
82
  key: e.id,
102
83
  class: "font-mono text-xs text-gray-700 dark:text-gray-200"
103
84
  }, v(e.label) + "(" + v(e.frame) + ") / 幅: " + v(ee(e)), 1))), 128))])])])])]),
104
- o("ul", Ae, [o("li", null, [c(y(x), {
85
+ o("ul", we, [o("li", null, [c(y(x), {
105
86
  to: "/colors",
106
- class: d(je)
87
+ class: d(Te)
107
88
  }, {
108
89
  default: b(() => [...h[7] ||= [o("div", { class: "font-bold dark:text-gray-100" }, "カラー", -1), o("div", { class: "text-sm text-gray-500 dark:text-gray-400" }, "accentColor 等の色定義一覧", -1)]]),
109
90
  _: 1
@@ -114,7 +95,7 @@ var de = { class: "mx-auto min-h-screen max-w-3xl p-8" }, fe = { class: "mb-8 fl
114
95
  });
115
96
  //#endregion
116
97
  //#region node_modules/marked/lib/marked.esm.js
117
- function Ne() {
98
+ function De() {
118
99
  return {
119
100
  async: !1,
120
101
  breaks: !1,
@@ -128,22 +109,22 @@ function Ne() {
128
109
  walkTokens: null
129
110
  };
130
111
  }
131
- var L = Ne();
132
- function Pe(e) {
133
- L = e;
112
+ var V = De();
113
+ function Oe(e) {
114
+ V = e;
134
115
  }
135
- var R = { exec: () => null };
136
- function z(e, t = "") {
116
+ var H = { exec: () => null };
117
+ function U(e, t = "") {
137
118
  let n = typeof e == "string" ? e : e.source, r = {
138
119
  replace: (e, t) => {
139
120
  let i = typeof t == "string" ? t : t.source;
140
- return i = i.replace(B.caret, "$1"), n = n.replace(e, i), r;
121
+ return i = i.replace(W.caret, "$1"), n = n.replace(e, i), r;
141
122
  },
142
123
  getRegex: () => new RegExp(n, t)
143
124
  };
144
125
  return r;
145
126
  }
146
- var B = {
127
+ var W = {
147
128
  codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
148
129
  outputLinkReplace: /\\([\[\]])/g,
149
130
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -200,111 +181,111 @@ var B = {
200
181
  fencesBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`),
201
182
  headingBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}#`),
202
183
  htmlBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i")
203
- }, Fe = /^(?:[ \t]*(?:\n|$))+/, Ie = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Le = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, V = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Re = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ze = /(?:[*+-]|\d{1,9}[.)])/, Be = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ve = z(Be).replace(/bull/g, ze).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), He = z(Be).replace(/bull/g, ze).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Ue = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, We = /^[^\n]+/, Ge = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Ke = z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ge).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), qe = z(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ze).getRegex(), H = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Je = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ye = z("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Je).replace("tag", H).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Xe = z(Ue).replace("hr", V).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex(), Ze = {
204
- blockquote: z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Xe).getRegex(),
205
- code: Ie,
206
- def: Ke,
207
- fences: Le,
208
- heading: Re,
209
- hr: V,
210
- html: Ye,
211
- lheading: Ve,
212
- list: qe,
213
- newline: Fe,
214
- paragraph: Xe,
215
- table: R,
216
- text: We
217
- }, Qe = z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", V).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex(), $e = {
218
- ...Ze,
219
- lheading: He,
220
- table: Qe,
221
- paragraph: z(Ue).replace("hr", V).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Qe).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex()
222
- }, et = {
223
- ...Ze,
224
- html: z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Je).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
184
+ }, ke = /^(?:[ \t]*(?:\n|$))+/, Ae = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, je = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, G = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Me = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ne = /(?:[*+-]|\d{1,9}[.)])/, Pe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Fe = U(Pe).replace(/bull/g, Ne).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Ie = U(Pe).replace(/bull/g, Ne).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Le = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Re = /^[^\n]+/, ze = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Be = U(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ze).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ve = U(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ne).getRegex(), K = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", He = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ue = U("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", He).replace("tag", K).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), We = U(Le).replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", K).getRegex(), Ge = {
185
+ blockquote: U(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", We).getRegex(),
186
+ code: Ae,
187
+ def: Be,
188
+ fences: je,
189
+ heading: Me,
190
+ hr: G,
191
+ html: Ue,
192
+ lheading: Fe,
193
+ list: Ve,
194
+ newline: ke,
195
+ paragraph: We,
196
+ table: H,
197
+ text: Re
198
+ }, Ke = U("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", K).getRegex(), qe = {
199
+ ...Ge,
200
+ lheading: Ie,
201
+ table: Ke,
202
+ paragraph: U(Le).replace("hr", G).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ke).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", K).getRegex()
203
+ }, Je = {
204
+ ...Ge,
205
+ html: U("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", He).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
225
206
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
226
207
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
227
- fences: R,
208
+ fences: H,
228
209
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
229
- paragraph: z(Ue).replace("hr", V).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Ve).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
230
- }, tt = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, nt = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, rt = /^( {2,}|\\)\n(?!\s*$)/, it = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, U = /[\p{P}\p{S}]/u, at = /[\s\p{P}\p{S}]/u, ot = /[^\s\p{P}\p{S}]/u, st = z(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, at).getRegex(), ct = /(?!~)[\p{P}\p{S}]/u, lt = /(?!~)[\s\p{P}\p{S}]/u, ut = /(?:[^\s\p{P}\p{S}]|~)/u, dt = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, ft = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, pt = z(ft, "u").replace(/punct/g, U).getRegex(), mt = z(ft, "u").replace(/punct/g, ct).getRegex(), ht = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", gt = z(ht, "gu").replace(/notPunctSpace/g, ot).replace(/punctSpace/g, at).replace(/punct/g, U).getRegex(), _t = z(ht, "gu").replace(/notPunctSpace/g, ut).replace(/punctSpace/g, lt).replace(/punct/g, ct).getRegex(), vt = z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ot).replace(/punctSpace/g, at).replace(/punct/g, U).getRegex(), yt = z(/\\(punct)/, "gu").replace(/punct/g, U).getRegex(), bt = z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), xt = z(Je).replace("(?:-->|$)", "-->").getRegex(), St = z("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", xt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), W = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Ct = z(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", W).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), wt = z(/^!?\[(label)\]\[(ref)\]/).replace("label", W).replace("ref", Ge).getRegex(), Tt = z(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ge).getRegex(), Et = {
231
- _backpedal: R,
232
- anyPunctuation: yt,
233
- autolink: bt,
234
- blockSkip: dt,
235
- br: rt,
236
- code: nt,
237
- del: R,
238
- emStrongLDelim: pt,
239
- emStrongRDelimAst: gt,
240
- emStrongRDelimUnd: vt,
241
- escape: tt,
242
- link: Ct,
243
- nolink: Tt,
244
- punctuation: st,
245
- reflink: wt,
246
- reflinkSearch: z("reflink|nolink(?!\\()", "g").replace("reflink", wt).replace("nolink", Tt).getRegex(),
247
- tag: St,
248
- text: it,
249
- url: R
250
- }, Dt = {
251
- ...Et,
252
- link: z(/^!?\[(label)\]\((.*?)\)/).replace("label", W).getRegex(),
253
- reflink: z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", W).getRegex()
254
- }, Ot = {
255
- ...Et,
256
- emStrongRDelimAst: _t,
257
- emStrongLDelim: mt,
258
- url: z(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
210
+ paragraph: U(Le).replace("hr", G).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Fe).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
211
+ }, Ye = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Xe = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ze = /^( {2,}|\\)\n(?!\s*$)/, Qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, $e = /[\p{P}\p{S}]/u, et = /[\s\p{P}\p{S}]/u, tt = /[^\s\p{P}\p{S}]/u, nt = U(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, et).getRegex(), rt = /(?!~)[\p{P}\p{S}]/u, it = /(?!~)[\s\p{P}\p{S}]/u, at = /(?:[^\s\p{P}\p{S}]|~)/u, ot = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, st = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ct = U(st, "u").replace(/punct/g, $e).getRegex(), lt = U(st, "u").replace(/punct/g, rt).getRegex(), ut = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", dt = U(ut, "gu").replace(/notPunctSpace/g, tt).replace(/punctSpace/g, et).replace(/punct/g, $e).getRegex(), ft = U(ut, "gu").replace(/notPunctSpace/g, at).replace(/punctSpace/g, it).replace(/punct/g, rt).getRegex(), pt = U("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, tt).replace(/punctSpace/g, et).replace(/punct/g, $e).getRegex(), mt = U(/\\(punct)/, "gu").replace(/punct/g, $e).getRegex(), ht = U(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), gt = U(He).replace("(?:-->|$)", "-->").getRegex(), _t = U("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", gt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), vt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, yt = U(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), bt = U(/^!?\[(label)\]\[(ref)\]/).replace("label", vt).replace("ref", ze).getRegex(), xt = U(/^!?\[(ref)\](?:\[\])?/).replace("ref", ze).getRegex(), St = {
212
+ _backpedal: H,
213
+ anyPunctuation: mt,
214
+ autolink: ht,
215
+ blockSkip: ot,
216
+ br: Ze,
217
+ code: Xe,
218
+ del: H,
219
+ emStrongLDelim: ct,
220
+ emStrongRDelimAst: dt,
221
+ emStrongRDelimUnd: pt,
222
+ escape: Ye,
223
+ link: yt,
224
+ nolink: xt,
225
+ punctuation: nt,
226
+ reflink: bt,
227
+ reflinkSearch: U("reflink|nolink(?!\\()", "g").replace("reflink", bt).replace("nolink", xt).getRegex(),
228
+ tag: _t,
229
+ text: Qe,
230
+ url: H
231
+ }, Ct = {
232
+ ...St,
233
+ link: U(/^!?\[(label)\]\((.*?)\)/).replace("label", vt).getRegex(),
234
+ reflink: U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vt).getRegex()
235
+ }, wt = {
236
+ ...St,
237
+ emStrongRDelimAst: ft,
238
+ emStrongLDelim: lt,
239
+ url: U(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
259
240
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
260
241
  del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
261
242
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
262
- }, kt = {
263
- ...Ot,
264
- br: z(rt).replace("{2,}", "*").getRegex(),
265
- text: z(Ot.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
266
- }, G = {
267
- normal: Ze,
268
- gfm: $e,
269
- pedantic: et
270
- }, K = {
271
- normal: Et,
272
- gfm: Ot,
273
- breaks: kt,
274
- pedantic: Dt
275
- }, At = {
243
+ }, Tt = {
244
+ ...wt,
245
+ br: U(Ze).replace("{2,}", "*").getRegex(),
246
+ text: U(wt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
247
+ }, Et = {
248
+ normal: Ge,
249
+ gfm: qe,
250
+ pedantic: Je
251
+ }, q = {
252
+ normal: St,
253
+ gfm: wt,
254
+ breaks: Tt,
255
+ pedantic: Ct
256
+ }, Dt = {
276
257
  "&": "&amp;",
277
258
  "<": "&lt;",
278
259
  ">": "&gt;",
279
260
  "\"": "&quot;",
280
261
  "'": "&#39;"
281
- }, jt = (e) => At[e];
282
- function q(e, t) {
262
+ }, Ot = (e) => Dt[e];
263
+ function J(e, t) {
283
264
  if (t) {
284
- if (B.escapeTest.test(e)) return e.replace(B.escapeReplace, jt);
285
- } else if (B.escapeTestNoEncode.test(e)) return e.replace(B.escapeReplaceNoEncode, jt);
265
+ if (W.escapeTest.test(e)) return e.replace(W.escapeReplace, Ot);
266
+ } else if (W.escapeTestNoEncode.test(e)) return e.replace(W.escapeReplaceNoEncode, Ot);
286
267
  return e;
287
268
  }
288
- function Mt(e) {
269
+ function kt(e) {
289
270
  try {
290
- e = encodeURI(e).replace(B.percentDecode, "%");
271
+ e = encodeURI(e).replace(W.percentDecode, "%");
291
272
  } catch {
292
273
  return null;
293
274
  }
294
275
  return e;
295
276
  }
296
- function Nt(e, t) {
297
- let n = e.replace(B.findPipe, (e, t, n) => {
277
+ function At(e, t) {
278
+ let n = e.replace(W.findPipe, (e, t, n) => {
298
279
  let r = !1, i = t;
299
280
  for (; --i >= 0 && n[i] === "\\";) r = !r;
300
281
  return r ? "|" : " |";
301
- }).split(B.splitPipe), r = 0;
282
+ }).split(W.splitPipe), r = 0;
302
283
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
303
284
  else for (; n.length < t;) n.push("");
304
- for (; r < n.length; r++) n[r] = n[r].trim().replace(B.slashPipe, "|");
285
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(W.slashPipe, "|");
305
286
  return n;
306
287
  }
307
- function J(e, t, n) {
288
+ function Y(e, t, n) {
308
289
  let r = e.length;
309
290
  if (r === 0) return "";
310
291
  let i = 0;
@@ -316,7 +297,7 @@ function J(e, t, n) {
316
297
  }
317
298
  return e.slice(0, r - i);
318
299
  }
319
- function Pt(e, t) {
300
+ function jt(e, t) {
320
301
  if (e.indexOf(t[1]) === -1) return -1;
321
302
  let n = 0;
322
303
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
@@ -324,7 +305,7 @@ function Pt(e, t) {
324
305
  else if (e[r] === t[1] && (n--, n < 0)) return r;
325
306
  return n > 0 ? -2 : -1;
326
307
  }
327
- function Ft(e, t, n, r, i) {
308
+ function Mt(e, t, n, r, i) {
328
309
  let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
329
310
  r.state.inLink = !0;
330
311
  let c = {
@@ -337,7 +318,7 @@ function Ft(e, t, n, r, i) {
337
318
  };
338
319
  return r.state.inLink = !1, c;
339
320
  }
340
- function It(e, t, n) {
321
+ function Nt(e, t, n) {
341
322
  let r = e.match(n.other.indentCodeCompensation);
342
323
  if (r === null) return t;
343
324
  let i = r[1];
@@ -348,12 +329,12 @@ function It(e, t, n) {
348
329
  return r.length >= i.length ? e.slice(i.length) : e;
349
330
  }).join("\n");
350
331
  }
351
- var Y = class {
332
+ var Pt = class {
352
333
  options;
353
334
  rules;
354
335
  lexer;
355
336
  constructor(e) {
356
- this.options = e || L;
337
+ this.options = e || V;
357
338
  }
358
339
  space(e) {
359
340
  let t = this.rules.block.newline.exec(e);
@@ -370,14 +351,14 @@ var Y = class {
370
351
  type: "code",
371
352
  raw: t[0],
372
353
  codeBlockStyle: "indented",
373
- text: this.options.pedantic ? e : J(e, "\n")
354
+ text: this.options.pedantic ? e : Y(e, "\n")
374
355
  };
375
356
  }
376
357
  }
377
358
  fences(e) {
378
359
  let t = this.rules.block.fences.exec(e);
379
360
  if (t) {
380
- let e = t[0], n = It(e, t[3] || "", this.rules);
361
+ let e = t[0], n = Nt(e, t[3] || "", this.rules);
381
362
  return {
382
363
  type: "code",
383
364
  raw: e,
@@ -391,7 +372,7 @@ var Y = class {
391
372
  if (t) {
392
373
  let e = t[2].trim();
393
374
  if (this.rules.other.endingHash.test(e)) {
394
- let t = J(e, "#");
375
+ let t = Y(e, "#");
395
376
  (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
396
377
  }
397
378
  return {
@@ -407,13 +388,13 @@ var Y = class {
407
388
  let t = this.rules.block.hr.exec(e);
408
389
  if (t) return {
409
390
  type: "hr",
410
- raw: J(t[0], "\n")
391
+ raw: Y(t[0], "\n")
411
392
  };
412
393
  }
413
394
  blockquote(e) {
414
395
  let t = this.rules.block.blockquote.exec(e);
415
396
  if (t) {
416
- let e = J(t[0], "\n").split("\n"), n = "", r = "", i = [];
397
+ let e = Y(t[0], "\n").split("\n"), n = "", r = "", i = [];
417
398
  for (; e.length > 0;) {
418
399
  let t = !1, a = [], o;
419
400
  for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
@@ -527,7 +508,7 @@ ${c}` : c;
527
508
  table(e) {
528
509
  let t = this.rules.block.table.exec(e);
529
510
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
530
- let n = Nt(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
511
+ let n = At(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
531
512
  type: "table",
532
513
  raw: t[0],
533
514
  header: [],
@@ -542,7 +523,7 @@ ${c}` : c;
542
523
  header: !0,
543
524
  align: a.align[e]
544
525
  });
545
- for (let e of i) a.rows.push(Nt(e, a.header.length).map((e, t) => ({
526
+ for (let e of i) a.rows.push(At(e, a.header.length).map((e, t) => ({
546
527
  text: e,
547
528
  tokens: this.lexer.inline(e),
548
529
  header: !1,
@@ -607,10 +588,10 @@ ${c}` : c;
607
588
  let e = t[2].trim();
608
589
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
609
590
  if (!this.rules.other.endAngleBracket.test(e)) return;
610
- let t = J(e.slice(0, -1), "\\");
591
+ let t = Y(e.slice(0, -1), "\\");
611
592
  if ((e.length - t.length) % 2 == 0) return;
612
593
  } else {
613
- let e = Pt(t[2], "()");
594
+ let e = jt(t[2], "()");
614
595
  if (e === -2) return;
615
596
  if (e > -1) {
616
597
  let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
@@ -622,7 +603,7 @@ ${c}` : c;
622
603
  let e = this.rules.other.pedanticHrefTitle.exec(n);
623
604
  e && (n = e[1], r = e[3]);
624
605
  } else r = t[3] ? t[3].slice(1, -1) : "";
625
- return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), Ft(t, {
606
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), Mt(t, {
626
607
  href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
627
608
  title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
628
609
  }, t[0], this.lexer, this.rules);
@@ -640,7 +621,7 @@ ${c}` : c;
640
621
  text: e
641
622
  };
642
623
  }
643
- return Ft(n, e, n[0], this.lexer, this.rules);
624
+ return Mt(n, e, n[0], this.lexer, this.rules);
644
625
  }
645
626
  }
646
627
  emStrong(e, t, n = "") {
@@ -766,22 +747,22 @@ ${c}` : c;
766
747
  tokenizer;
767
748
  inlineQueue;
768
749
  constructor(e) {
769
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || L, this.options.tokenizer = this.options.tokenizer || new Y(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
750
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || V, this.options.tokenizer = this.options.tokenizer || new Pt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
770
751
  inLink: !1,
771
752
  inRawBlock: !1,
772
753
  top: !0
773
754
  };
774
755
  let t = {
775
- other: B,
776
- block: G.normal,
777
- inline: K.normal
756
+ other: W,
757
+ block: Et.normal,
758
+ inline: q.normal
778
759
  };
779
- this.options.pedantic ? (t.block = G.pedantic, t.inline = K.pedantic) : this.options.gfm && (t.block = G.gfm, this.options.breaks ? t.inline = K.breaks : t.inline = K.gfm), this.tokenizer.rules = t;
760
+ this.options.pedantic ? (t.block = Et.pedantic, t.inline = q.pedantic) : this.options.gfm && (t.block = Et.gfm, this.options.breaks ? t.inline = q.breaks : t.inline = q.gfm), this.tokenizer.rules = t;
780
761
  }
781
762
  static get rules() {
782
763
  return {
783
- block: G,
784
- inline: K
764
+ block: Et,
765
+ inline: q
785
766
  };
786
767
  }
787
768
  static lex(t, n) {
@@ -791,7 +772,7 @@ ${c}` : c;
791
772
  return new e(n).inlineTokens(t);
792
773
  }
793
774
  lex(e) {
794
- e = e.replace(B.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
775
+ e = e.replace(W.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
795
776
  for (let e = 0; e < this.inlineQueue.length; e++) {
796
777
  let t = this.inlineQueue[e];
797
778
  this.inlineTokens(t.src, t.tokens);
@@ -799,7 +780,7 @@ ${c}` : c;
799
780
  return this.inlineQueue = [], this.tokens;
800
781
  }
801
782
  blockTokens(e, t = [], n = !1) {
802
- for (this.options.pedantic && (e = e.replace(B.tabCharGlobal, " ").replace(B.spaceLine, "")); e;) {
783
+ for (this.options.pedantic && (e = e.replace(W.tabCharGlobal, " ").replace(W.spaceLine, "")); e;) {
803
784
  let r;
804
785
  if (this.options.extensions?.block?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
805
786
  if (r = this.tokenizer.space(e)) {
@@ -967,18 +948,18 @@ ${c}` : c;
967
948
  }
968
949
  return t;
969
950
  }
970
- }, Lt = class {
951
+ }, Ft = class {
971
952
  options;
972
953
  parser;
973
954
  constructor(e) {
974
- this.options = e || L;
955
+ this.options = e || V;
975
956
  }
976
957
  space(e) {
977
958
  return "";
978
959
  }
979
960
  code({ text: e, lang: t, escaped: n }) {
980
- let r = (t || "").match(B.notSpaceStart)?.[0], i = e.replace(B.endingNewline, "") + "\n";
981
- return r ? "<pre><code class=\"language-" + q(r) + "\">" + (n ? i : q(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : q(i, !0)) + "</code></pre>\n";
961
+ let r = (t || "").match(W.notSpaceStart)?.[0], i = e.replace(W.endingNewline, "") + "\n";
962
+ return r ? "<pre><code class=\"language-" + J(r) + "\">" + (n ? i : J(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : J(i, !0)) + "</code></pre>\n";
982
963
  }
983
964
  blockquote({ tokens: e }) {
984
965
  return `<blockquote>
@@ -1008,7 +989,7 @@ ${this.parser.parse(e)}</blockquote>
1008
989
  let t = "";
1009
990
  if (e.task) {
1010
991
  let n = this.checkbox({ checked: !!e.checked });
1011
- e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " + q(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = !0)) : e.tokens.unshift({
992
+ e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " + J(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = !0)) : e.tokens.unshift({
1012
993
  type: "text",
1013
994
  raw: n + " ",
1014
995
  text: n + " ",
@@ -1055,7 +1036,7 @@ ${e}</tr>
1055
1036
  return `<em>${this.parser.parseInline(e)}</em>`;
1056
1037
  }
1057
1038
  codespan({ text: e }) {
1058
- return `<code>${q(e, !0)}</code>`;
1039
+ return `<code>${J(e, !0)}</code>`;
1059
1040
  }
1060
1041
  br(e) {
1061
1042
  return "<br>";
@@ -1064,24 +1045,24 @@ ${e}</tr>
1064
1045
  return `<del>${this.parser.parseInline(e)}</del>`;
1065
1046
  }
1066
1047
  link({ href: e, title: t, tokens: n }) {
1067
- let r = this.parser.parseInline(n), i = Mt(e);
1048
+ let r = this.parser.parseInline(n), i = kt(e);
1068
1049
  if (i === null) return r;
1069
1050
  e = i;
1070
1051
  let a = "<a href=\"" + e + "\"";
1071
- return t && (a += " title=\"" + q(t) + "\""), a += ">" + r + "</a>", a;
1052
+ return t && (a += " title=\"" + J(t) + "\""), a += ">" + r + "</a>", a;
1072
1053
  }
1073
1054
  image({ href: e, title: t, text: n, tokens: r }) {
1074
1055
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
1075
- let i = Mt(e);
1076
- if (i === null) return q(n);
1056
+ let i = kt(e);
1057
+ if (i === null) return J(n);
1077
1058
  e = i;
1078
1059
  let a = `<img src="${e}" alt="${n}"`;
1079
- return t && (a += ` title="${q(t)}"`), a += ">", a;
1060
+ return t && (a += ` title="${J(t)}"`), a += ">", a;
1080
1061
  }
1081
1062
  text(e) {
1082
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : q(e.text);
1063
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : J(e.text);
1083
1064
  }
1084
- }, Rt = class {
1065
+ }, It = class {
1085
1066
  strong({ text: e }) {
1086
1067
  return e;
1087
1068
  }
@@ -1114,7 +1095,7 @@ ${e}</tr>
1114
1095
  renderer;
1115
1096
  textRenderer;
1116
1097
  constructor(e) {
1117
- this.options = e || L, this.options.renderer = this.options.renderer || new Lt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Rt();
1098
+ this.options = e || V, this.options.renderer = this.options.renderer || new Ft(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new It();
1118
1099
  }
1119
1100
  static parse(t, n) {
1120
1101
  return new e(n).parse(t);
@@ -1261,11 +1242,11 @@ ${e}</tr>
1261
1242
  }
1262
1243
  return n;
1263
1244
  }
1264
- }, zt = class {
1245
+ }, Lt = class {
1265
1246
  options;
1266
1247
  block;
1267
1248
  constructor(e) {
1268
- this.options = e || L;
1249
+ this.options = e || V;
1269
1250
  }
1270
1251
  static passThroughHooks = /* @__PURE__ */ new Set([
1271
1252
  "preprocess",
@@ -1288,16 +1269,16 @@ ${e}</tr>
1288
1269
  return this.block ? Z.parse : Z.parseInline;
1289
1270
  }
1290
1271
  }, Q = new class {
1291
- defaults = Ne();
1272
+ defaults = De();
1292
1273
  options = this.setOptions;
1293
1274
  parse = this.parseMarkdown(!0);
1294
1275
  parseInline = this.parseMarkdown(!1);
1295
1276
  Parser = Z;
1296
- Renderer = Lt;
1297
- TextRenderer = Rt;
1277
+ Renderer = Ft;
1278
+ TextRenderer = It;
1298
1279
  Lexer = X;
1299
- Tokenizer = Y;
1300
- Hooks = zt;
1280
+ Tokenizer = Pt;
1281
+ Hooks = Lt;
1301
1282
  constructor(...e) {
1302
1283
  this.use(...e);
1303
1284
  }
@@ -1348,7 +1329,7 @@ ${e}</tr>
1348
1329
  }
1349
1330
  "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
1350
1331
  }), n.extensions = t), e.renderer) {
1351
- let t = this.defaults.renderer || new Lt(this.defaults);
1332
+ let t = this.defaults.renderer || new Ft(this.defaults);
1352
1333
  for (let n in e.renderer) {
1353
1334
  if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
1354
1335
  if (["options", "parser"].includes(n)) continue;
@@ -1361,7 +1342,7 @@ ${e}</tr>
1361
1342
  n.renderer = t;
1362
1343
  }
1363
1344
  if (e.tokenizer) {
1364
- let t = this.defaults.tokenizer || new Y(this.defaults);
1345
+ let t = this.defaults.tokenizer || new Pt(this.defaults);
1365
1346
  for (let n in e.tokenizer) {
1366
1347
  if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
1367
1348
  if ([
@@ -1378,12 +1359,12 @@ ${e}</tr>
1378
1359
  n.tokenizer = t;
1379
1360
  }
1380
1361
  if (e.hooks) {
1381
- let t = this.defaults.hooks || new zt();
1362
+ let t = this.defaults.hooks || new Lt();
1382
1363
  for (let n in e.hooks) {
1383
1364
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
1384
1365
  if (["options", "block"].includes(n)) continue;
1385
1366
  let r = n, i = e.hooks[r], a = t[r];
1386
- zt.passThroughHooks.has(n) ? t[r] = (e) => {
1367
+ Lt.passThroughHooks.has(n) ? t[r] = (e) => {
1387
1368
  if (this.defaults.async) return Promise.resolve(i.call(t, e)).then((e) => a.call(t, e));
1388
1369
  let n = i.call(t, e);
1389
1370
  return a.call(t, n);
@@ -1445,7 +1426,7 @@ ${e}</tr>
1445
1426
  onError(e, t) {
1446
1427
  return (n) => {
1447
1428
  if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
1448
- let e = "<p>An error occurred:</p><pre>" + q(n.message + "", !0) + "</pre>";
1429
+ let e = "<p>An error occurred:</p><pre>" + J(n.message + "", !0) + "</pre>";
1449
1430
  return t ? Promise.resolve(e) : e;
1450
1431
  }
1451
1432
  if (t) return Promise.reject(n);
@@ -1459,100 +1440,144 @@ function $(e, t) {
1459
1440
  //#endregion
1460
1441
  //#region src/lib/markdown.ts
1461
1442
  $.options = $.setOptions = function(e) {
1462
- return Q.setOptions(e), $.defaults = Q.defaults, Pe($.defaults), $;
1463
- }, $.getDefaults = Ne, $.defaults = L, $.use = function(...e) {
1464
- return Q.use(...e), $.defaults = Q.defaults, Pe($.defaults), $;
1443
+ return Q.setOptions(e), $.defaults = Q.defaults, Oe($.defaults), $;
1444
+ }, $.getDefaults = De, $.defaults = V, $.use = function(...e) {
1445
+ return Q.use(...e), $.defaults = Q.defaults, Oe($.defaults), $;
1465
1446
  }, $.walkTokens = function(e, t) {
1466
1447
  return Q.walkTokens(e, t);
1467
- }, $.parseInline = Q.parseInline, $.Parser = Z, $.parser = Z.parse, $.Renderer = Lt, $.TextRenderer = Rt, $.Lexer = X, $.lexer = X.lex, $.Tokenizer = Y, $.Hooks = zt, $.parse = $, $.options, $.setOptions, $.use, $.walkTokens, $.parseInline, Z.parse, X.lex, $.setOptions({
1448
+ }, $.parseInline = Q.parseInline, $.Parser = Z, $.parser = Z.parse, $.Renderer = Ft, $.TextRenderer = It, $.Lexer = X, $.lexer = X.lex, $.Tokenizer = Pt, $.Hooks = Lt, $.parse = $, $.options, $.setOptions, $.use, $.walkTokens, $.parseInline, Z.parse, X.lex, $.setOptions({
1468
1449
  gfm: !0,
1469
1450
  breaks: !1
1470
1451
  });
1471
- function Bt(e) {
1452
+ function Rt(e) {
1472
1453
  return $.parse(e, { async: !1 });
1473
1454
  }
1474
1455
  //#endregion
1475
1456
  //#region src/ReqScreen.vue?vue&type=script&setup=true&lang.ts
1476
- var Vt = {
1457
+ var zt = {
1477
1458
  key: 0,
1478
1459
  class: "min-h-screen p-6"
1479
- }, Ht = { class: "mb-5 flex items-center gap-4 rounded-lg border border-gray-200 bg-white px-5 py-3 text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100" }, Ut = { class: "text-lg font-bold" }, Wt = { class: "ml-auto flex items-center gap-3" }, Gt = { class: "grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-6" }, Kt = { class: "rounded-lg border border-gray-300 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" }, qt = { class: "mb-3 flex items-center justify-between" }, Jt = {
1460
+ }, Bt = { class: "mb-5 flex items-center gap-4 rounded-lg border border-gray-200 bg-white px-5 py-3 text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100" }, Vt = { class: "text-lg font-bold" }, Ht = { class: "ml-auto flex items-center gap-3" }, Ut = { class: "grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-6" }, Wt = { class: "rounded-lg border border-gray-300 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" }, Gt = { class: "mb-3 flex items-center justify-between" }, Kt = { class: "flex items-center gap-3" }, qt = {
1480
1461
  key: 0,
1462
+ class: "font-mono text-xs text-gray-500 dark:text-gray-400"
1463
+ }, Jt = {
1464
+ key: 0,
1465
+ class: "text-gray-400"
1466
+ }, Yt = {
1467
+ key: 1,
1481
1468
  class: "inline-flex overflow-hidden rounded-md border border-gray-300 text-xs font-bold dark:border-gray-600"
1482
- }, Yt = ["onClick"], Xt = { class: "rounded-md bg-white p-4 transition-colors dark:bg-gray-800" }, Zt = {
1469
+ }, Xt = ["onClick"], Zt = { class: "rounded-md bg-white p-4 transition-colors dark:bg-gray-800" }, Qt = {
1483
1470
  key: 0,
1484
1471
  class: "w-full"
1485
- }, Qt = { class: "rounded-[2.5rem] bg-black p-3 shadow-xl" }, $t = { class: "relative overflow-hidden rounded-[1.8rem]" }, en = {
1472
+ }, $t = { class: "rounded-[2.5rem] bg-black p-3 shadow-xl" }, en = { class: "relative overflow-hidden rounded-[1.8rem]" }, tn = {
1486
1473
  key: 0,
1487
1474
  class: "pointer-events-none absolute left-1/2 top-0 z-10 h-6 w-28 -translate-x-1/2 rounded-b-2xl bg-black"
1488
- }, tn = {
1475
+ }, nn = {
1489
1476
  key: 1,
1490
1477
  class: "w-full overflow-hidden rounded-xl border-2 border-gray-300 shadow-sm dark:border-gray-700"
1491
- }, nn = { class: "rounded-lg border border-gray-300 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" }, rn = ["innerHTML"], an = /* @__PURE__ */ l({
1478
+ }, rn = { class: "rounded-lg border border-gray-300 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" }, an = ["innerHTML"], on = /* @__PURE__ */ l({
1492
1479
  __name: "ReqScreen",
1493
1480
  props: {
1494
1481
  title: {},
1495
1482
  doc: {}
1496
1483
  },
1497
1484
  setup(n) {
1498
- let r = n, l = t(() => Bt(r.doc)), { isDark: te, toggle: re } = ue(), ie = ae(), S = oe(), C = h(S[0]?.id ?? ""), w = t(() => S.find((e) => e.id === C.value) ?? S[0]);
1485
+ let r = n, l = t(() => Rt(r.doc)), { isDark: te, toggle: re } = le(), ie = ae(), S = oe(), C = h(S[0]?.id ?? ""), w = t(() => S.find((e) => e.id === C.value) ?? S[0]);
1499
1486
  function T(e) {
1500
1487
  return `${e}px`;
1501
1488
  }
1502
1489
  let E = se(), D = t(() => {
1490
+ if (!E) return {};
1503
1491
  let e = te.value ? E.dark : E.light;
1504
1492
  return {
1505
1493
  background: e.bg,
1506
1494
  color: e.font
1507
1495
  };
1508
- }), O = h(null), k = h(null), A = h(0), j = h(0), M = t(() => {
1509
- let e = w.value?.width ?? 0;
1496
+ }), O = h(null), k = h(null), A = h(0), j = h(0), M = h({});
1497
+ function ce(e) {
1498
+ let t = M.value[e.id] ?? e.minWidth;
1499
+ return Math.min(e.maxWidth, Math.max(e.minWidth, t));
1500
+ }
1501
+ let N = t(() => w.value ? ce(w.value) : 0), P = t(() => !!w.value && w.value.minWidth < w.value.maxWidth), F = t(() => {
1502
+ let e = N.value;
1510
1503
  return !e || A.value === 0 ? 1 : Math.min(1, A.value / e);
1511
- }), N = t(() => w.value ? w.value.width * M.value : 0), ce = t(() => j.value * M.value), P = null;
1512
- function F() {
1504
+ }), I = t(() => N.value ? N.value * F.value : 0), ue = t(() => j.value * F.value), L = h(!1), de = 0, fe = 0;
1505
+ function pe(e) {
1506
+ let t = w.value;
1507
+ return t ? Math.min(t.maxWidth, Math.max(t.minWidth, e)) : e;
1508
+ }
1509
+ function me(e) {
1510
+ let t = w.value;
1511
+ t && (M.value = {
1512
+ ...M.value,
1513
+ [t.id]: pe(e)
1514
+ });
1515
+ }
1516
+ function he(e) {
1517
+ if (!w.value || !P.value) return;
1518
+ e.preventDefault(), L.value = !0, de = e.clientX, fe = N.value, document.body.style.userSelect = "none", document.body.style.cursor = "ew-resize";
1519
+ function t(e) {
1520
+ let t = (e.clientX - de) / F.value;
1521
+ me(fe + t);
1522
+ }
1523
+ function n() {
1524
+ L.value = !1, document.body.style.userSelect = "", document.body.style.cursor = "", window.removeEventListener("mousemove", t), window.removeEventListener("mouseup", n), u(z);
1525
+ }
1526
+ window.addEventListener("mousemove", t), window.addEventListener("mouseup", n);
1527
+ }
1528
+ let R = null;
1529
+ function z() {
1513
1530
  O.value && (A.value = O.value.clientWidth), k.value && (j.value = k.value.offsetHeight);
1514
1531
  }
1515
- function le() {
1516
- P?.disconnect(), O.value && P?.observe(O.value), k.value && P?.observe(k.value);
1532
+ function ge() {
1533
+ R?.disconnect(), O.value && R?.observe(O.value), k.value && R?.observe(k.value);
1517
1534
  }
1518
- let I = h(!1);
1519
- function de(e) {
1520
- e.key === "Escape" && (I.value = !1);
1535
+ let B = h(!1);
1536
+ function _e(e) {
1537
+ e.key === "Escape" && (B.value = !1);
1521
1538
  }
1522
1539
  return ee(() => {
1523
- P = new ResizeObserver(() => F()), le(), F(), window.addEventListener("keydown", de);
1540
+ R = new ResizeObserver(() => z()), ge(), z(), window.addEventListener("keydown", _e);
1524
1541
  }), p(() => {
1525
- P?.disconnect(), window.removeEventListener("keydown", de);
1526
- }), ne([C, I], () => u(() => {
1527
- le(), F();
1528
- })), (t, r) => I.value ? (m(), a("div", {
1542
+ R?.disconnect(), window.removeEventListener("keydown", _e);
1543
+ }), ne([
1544
+ C,
1545
+ B,
1546
+ N
1547
+ ], () => u(() => {
1548
+ ge(), z();
1549
+ })), (t, r) => B.value ? (m(), a("div", {
1529
1550
  key: 1,
1530
1551
  class: "fixed inset-0 z-50 overflow-auto",
1531
1552
  style: f(D.value)
1532
1553
  }, [o("button", {
1533
1554
  type: "button",
1534
1555
  class: "fixed right-4 top-4 z-10 rounded-md border border-gray-300 bg-white px-3 py-1 text-xs font-bold text-gray-700 shadow-sm transition hover:bg-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-100 dark:hover:bg-gray-700",
1535
- onClick: r[2] ||= (e) => I.value = !1
1556
+ onClick: r[2] ||= (e) => B.value = !1
1536
1557
  }, " 閉じる(Esc) "), o("div", {
1537
1558
  ref_key: "areaRef",
1538
1559
  ref: O,
1539
1560
  class: "min-h-full"
1540
1561
  }, [w.value ? (m(), a("div", {
1541
1562
  key: 0,
1542
- class: "mx-auto overflow-hidden",
1563
+ class: "relative mx-auto overflow-hidden",
1543
1564
  style: f({
1544
- width: N.value ? `${N.value}px` : "",
1545
- height: j.value ? `${ce.value}px` : "auto"
1565
+ width: I.value ? `${I.value}px` : "",
1566
+ height: j.value ? `${ue.value}px` : "auto"
1546
1567
  })
1547
1568
  }, [o("div", {
1548
1569
  ref_key: "contentRef",
1549
1570
  ref: k,
1550
1571
  class: "origin-top-left",
1551
1572
  style: f({
1552
- width: T(w.value.width),
1553
- transform: `scale(${M.value})`
1573
+ width: T(N.value),
1574
+ transform: `scale(${F.value})`
1554
1575
  })
1555
- }, [_(t.$slots, "mock")], 4)], 4)) : i("", !0)], 512)], 4)) : (m(), a("div", Vt, [o("header", Ht, [
1576
+ }, [_(t.$slots, "mock")], 4), P.value ? (m(), a("div", {
1577
+ key: 0,
1578
+ class: "absolute inset-y-0 -right-1 z-20 flex w-3 cursor-ew-resize items-center justify-center opacity-60 hover:opacity-100",
1579
+ onMousedown: he
1580
+ }, [...r[8] ||= [o("div", { class: "h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500" }, null, -1)]], 32)) : i("", !0)], 4)) : i("", !0)], 512)], 4)) : (m(), a("div", zt, [o("header", Bt, [
1556
1581
  c(y(x), {
1557
1582
  to: "/catalog",
1558
1583
  class: "text-sm text-gray-500 underline hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-100"
@@ -1560,14 +1585,14 @@ var Vt = {
1560
1585
  default: b(() => [...r[3] ||= [s(" ← 一覧 ", -1)]]),
1561
1586
  _: 1
1562
1587
  }),
1563
- o("h1", Ut, v(n.title), 1),
1564
- o("div", Wt, [
1588
+ o("h1", Vt, v(n.title), 1),
1589
+ o("div", Ht, [
1565
1590
  _(t.$slots, "toolbar"),
1566
1591
  o("button", {
1567
1592
  type: "button",
1568
1593
  class: "rounded-md border border-gray-300 px-3 py-1 text-xs font-bold text-gray-600 transition hover:bg-gray-100 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700",
1569
- onClick: r[0] ||= (e) => I.value = !I.value
1570
- }, v(I.value ? "要件を表示" : "プレビュー"), 1),
1594
+ onClick: r[0] ||= (e) => B.value = !B.value
1595
+ }, v(B.value ? "要件を表示" : "プレビュー"), 1),
1571
1596
  y(ie) ? (m(), a("button", {
1572
1597
  key: 0,
1573
1598
  type: "button",
@@ -1575,48 +1600,52 @@ var Vt = {
1575
1600
  onClick: r[1] ||= (...e) => y(re) && y(re)(...e)
1576
1601
  }, v(y(te) ? "ライトモード" : "ダークモード"), 1)) : i("", !0)
1577
1602
  ])
1578
- ]), o("div", Gt, [o("section", Kt, [o("div", qt, [r[4] ||= o("span", { class: "text-xs font-bold uppercase tracking-wide text-gray-400" }, " 画面 mock ", -1), y(S).length > 1 ? (m(), a("div", Jt, [(m(!0), a(e, null, g(y(S), (e) => (m(), a("button", {
1603
+ ]), o("div", Ut, [o("section", Wt, [o("div", Gt, [r[4] ||= o("span", { class: "text-xs font-bold uppercase tracking-wide text-gray-400" }, " 画面 mock ", -1), o("div", Kt, [w.value ? (m(), a("span", qt, [s(v(N.value) + "px ", 1), P.value ? (m(), a("span", Jt, "(" + v(w.value.minWidth) + "–" + v(w.value.maxWidth) + ")", 1)) : i("", !0)])) : i("", !0), y(S).length > 1 ? (m(), a("div", Yt, [(m(!0), a(e, null, g(y(S), (e) => (m(), a("button", {
1579
1604
  key: e.id,
1580
1605
  type: "button",
1581
1606
  class: d(["px-3 py-1 transition", C.value === e.id ? "bg-gray-800 text-white dark:bg-gray-200 dark:text-gray-900" : "text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"]),
1582
1607
  onClick: (t) => C.value = e.id
1583
- }, v(e.label), 11, Yt))), 128))])) : i("", !0)]), o("div", Xt, [o("div", {
1608
+ }, v(e.label), 11, Xt))), 128))])) : i("", !0)])]), o("div", Zt, [o("div", {
1584
1609
  ref_key: "areaRef",
1585
1610
  ref: O
1586
1611
  }, [w.value ? (m(), a("div", {
1587
1612
  key: 0,
1588
- class: "mx-auto overflow-hidden",
1613
+ class: "relative mx-auto overflow-hidden",
1589
1614
  style: f({
1590
- width: N.value ? `${N.value}px` : "",
1591
- height: j.value ? `${ce.value}px` : "auto"
1615
+ width: I.value ? `${I.value}px` : "",
1616
+ height: j.value ? `${ue.value}px` : "auto"
1592
1617
  })
1593
1618
  }, [o("div", {
1594
1619
  ref_key: "contentRef",
1595
1620
  ref: k,
1596
1621
  class: "origin-top-left",
1597
1622
  style: f({
1598
- width: T(w.value.width),
1599
- transform: `scale(${M.value})`
1623
+ width: T(N.value),
1624
+ transform: `scale(${F.value})`
1600
1625
  })
1601
- }, [w.value.frame === "phone" || w.value.frame === "tablet" ? (m(), a("div", Zt, [o("div", Qt, [o("div", $t, [w.value.frame === "phone" ? (m(), a("div", en)) : i("", !0), o("div", {
1626
+ }, [w.value.frame === "phone" || w.value.frame === "tablet" ? (m(), a("div", Qt, [o("div", $t, [o("div", en, [w.value.frame === "phone" ? (m(), a("div", tn)) : i("", !0), o("div", {
1602
1627
  class: d(["px-4 pb-6", w.value.frame === "phone" ? "pt-9" : "pt-6"]),
1603
1628
  style: f(D.value)
1604
- }, [_(t.$slots, "mock"), r[5] ||= o("div", { class: "mx-auto mt-6 h-1 w-24 rounded-full bg-gray-300 dark:bg-gray-600" }, null, -1)], 6)])])])) : (m(), a("div", tn, [r[6] ||= o("div", { class: "flex items-center gap-2 border-b border-gray-300 bg-gray-800 px-3 py-2 dark:border-gray-700" }, [
1629
+ }, [_(t.$slots, "mock"), r[5] ||= o("div", { class: "mx-auto mt-6 h-1 w-24 rounded-full bg-gray-300 dark:bg-gray-600" }, null, -1)], 6)])])])) : (m(), a("div", nn, [r[6] ||= o("div", { class: "flex items-center gap-2 border-b border-gray-300 bg-gray-800 px-3 py-2 dark:border-gray-700" }, [
1605
1630
  o("span", { class: "h-3 w-3 rounded-full bg-red-400" }),
1606
1631
  o("span", { class: "h-3 w-3 rounded-full bg-yellow-400" }),
1607
1632
  o("span", { class: "h-3 w-3 rounded-full bg-green-400" })
1608
1633
  ], -1), o("div", {
1609
1634
  class: "p-4",
1610
1635
  style: f(D.value)
1611
- }, [_(t.$slots, "mock")], 4)]))], 4)], 4)) : i("", !0)], 512)])]), o("section", nn, [r[7] ||= o("div", { class: "mb-3 text-xs font-bold uppercase tracking-wide text-gray-400" }, " 要件 ", -1), o("div", {
1636
+ }, [_(t.$slots, "mock")], 4)]))], 4), P.value ? (m(), a("div", {
1637
+ key: 0,
1638
+ class: d(["absolute inset-y-0 -right-1 z-20 flex w-3 cursor-ew-resize items-center justify-center", L.value ? "opacity-100" : "opacity-60 hover:opacity-100"]),
1639
+ onMousedown: he
1640
+ }, [o("div", { class: d(["h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500", L.value ? "bg-blue-500 dark:bg-blue-400" : ""]) }, null, 2)], 34)) : i("", !0)], 4)) : i("", !0)], 512)])]), o("section", rn, [r[7] ||= o("div", { class: "mb-3 text-xs font-bold uppercase tracking-wide text-gray-400" }, " 要件 ", -1), o("div", {
1612
1641
  class: "req-md",
1613
1642
  innerHTML: l.value
1614
- }, null, 8, rn)])])]));
1643
+ }, null, 8, an)])])]));
1615
1644
  }
1616
- }), on = { class: "flex items-center gap-2 text-sm" }, sn = ["value"], cn = ["value"], ln = ["innerHTML"], un = {
1645
+ }), sn = { class: "flex items-center gap-2 text-sm" }, cn = ["value"], ln = ["value"], un = ["innerHTML"], dn = {
1617
1646
  key: 1,
1618
1647
  class: "p-8"
1619
- }, dn = { class: "text-gray-600" }, fn = /* @__PURE__ */ l({
1648
+ }, fn = { class: "text-gray-600" }, pn = /* @__PURE__ */ l({
1620
1649
  __name: "ReqPageView",
1621
1650
  props: {
1622
1651
  kind: {},
@@ -1624,30 +1653,30 @@ var Vt = {
1624
1653
  ver: {}
1625
1654
  },
1626
1655
  setup(n) {
1627
- let i = n, l = C(), u = t(() => le(i.kind, i.name)), d = t(() => i.ver || u.value?.latest || ""), f = t(() => u.value?.versions[d.value]), p = t(() => u.value ? Object.keys(u.value.versions) : []);
1656
+ let i = n, l = C(), u = t(() => P(i.kind, i.name)), d = t(() => i.ver || u.value?.latest || ""), f = t(() => u.value?.versions[d.value]), p = t(() => u.value ? Object.keys(u.value.versions) : []);
1628
1657
  function ee(e) {
1629
1658
  let t = e.target.value;
1630
1659
  l.push(`/${i.kind}s/${i.name}/${t}`);
1631
1660
  }
1632
- return (t, i) => u.value && f.value ? (m(), r(an, {
1661
+ return (t, i) => u.value && f.value ? (m(), r(on, {
1633
1662
  key: 0,
1634
1663
  title: u.value.title,
1635
1664
  doc: f.value.req
1636
1665
  }, {
1637
- toolbar: b(() => [o("label", on, [i[0] ||= o("span", { class: "text-gray-500 dark:text-gray-400" }, "バージョン", -1), o("select", {
1666
+ toolbar: b(() => [o("label", sn, [i[0] ||= o("span", { class: "text-gray-500 dark:text-gray-400" }, "バージョン", -1), o("select", {
1638
1667
  value: d.value,
1639
1668
  class: "rounded border border-gray-300 bg-white px-2 py-1 text-gray-800 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100",
1640
1669
  onChange: ee
1641
1670
  }, [(m(!0), a(e, null, g(p.value, (e) => (m(), a("option", {
1642
1671
  key: e,
1643
1672
  value: e
1644
- }, v(e), 9, cn))), 128))], 40, sn)])]),
1673
+ }, v(e), 9, ln))), 128))], 40, cn)])]),
1645
1674
  mock: b(() => [typeof f.value.view == "string" ? (m(), a("div", {
1646
1675
  key: 0,
1647
1676
  innerHTML: f.value.view
1648
- }, null, 8, ln)) : (m(), r(te(f.value.view), { key: 1 }))]),
1677
+ }, null, 8, un)) : (m(), r(te(f.value.view), { key: 1 }))]),
1649
1678
  _: 1
1650
- }, 8, ["title", "doc"])) : (m(), a("div", un, [o("p", dn, "該当するアイテムが見つかりません: " + v(n.kind) + " / " + v(n.name), 1), c(y(x), {
1679
+ }, 8, ["title", "doc"])) : (m(), a("div", dn, [o("p", fn, "該当するアイテムが見つかりません: " + v(n.kind) + " / " + v(n.name), 1), c(y(x), {
1651
1680
  to: "/catalog",
1652
1681
  class: "text-blue-600 underline"
1653
1682
  }, {
@@ -1655,28 +1684,24 @@ var Vt = {
1655
1684
  _: 1
1656
1685
  })]));
1657
1686
  }
1658
- }), pn = { class: "min-h-screen p-6" }, mn = { class: "mb-5 flex items-center gap-4 rounded-lg border border-gray-200 bg-white px-5 py-3 text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100" }, hn = { class: "rounded-lg bg-gray-50 p-5 transition-colors dark:bg-gray-900" }, gn = { class: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4" }, _n = { class: "p-3" }, vn = { class: "font-mono text-sm font-bold dark:text-gray-100" }, yn = { class: "mt-1 space-y-0.5 font-mono text-xs" }, bn = {
1687
+ }), mn = { class: "min-h-screen p-6" }, hn = { class: "mb-5 flex items-center gap-4 rounded-lg border border-gray-200 bg-white px-5 py-3 text-gray-800 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-100" }, gn = { class: "rounded-lg bg-gray-50 p-5 transition-colors dark:bg-gray-900" }, _n = { class: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4" }, vn = { class: "p-3" }, yn = { class: "font-mono text-sm font-bold dark:text-gray-100" }, bn = { class: "mt-1 space-y-0.5 font-mono text-xs" }, xn = {
1659
1688
  key: 0,
1660
1689
  class: "mt-1 text-xs text-gray-600 dark:text-gray-400"
1661
- }, xn = /* @__PURE__ */ l({
1690
+ }, Sn = /* @__PURE__ */ l({
1662
1691
  __name: "ColorsView",
1663
1692
  setup(t) {
1664
- let { isDark: n, toggle: r } = ue(), l = ae(), u = se(), p = [
1665
- {
1666
- name: "baseBg",
1667
- light: u.light.bg,
1668
- dark: u.dark.bg,
1669
- desc: "モック画面の背景"
1670
- },
1671
- {
1672
- name: "baseFont",
1673
- light: u.light.font,
1674
- dark: u.dark.font,
1675
- desc: "モックの基本文字色"
1676
- },
1677
- ...F()
1678
- ];
1679
- return (t, u) => (m(), a("div", pn, [o("header", mn, [
1693
+ let { isDark: n, toggle: r } = le(), l = ae(), u = se(), p = [...u ? [{
1694
+ name: "baseBg",
1695
+ light: u.light.bg,
1696
+ dark: u.dark.bg,
1697
+ desc: "モック画面の背景"
1698
+ }, {
1699
+ name: "baseFont",
1700
+ light: u.light.font,
1701
+ dark: u.dark.font,
1702
+ desc: "モックの基本文字色"
1703
+ }] : [], ...N()];
1704
+ return (t, u) => (m(), a("div", mn, [o("header", hn, [
1680
1705
  c(y(x), {
1681
1706
  to: "/catalog",
1682
1707
  class: "text-sm text-gray-500 underline hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-100"
@@ -1691,22 +1716,22 @@ var Vt = {
1691
1716
  class: "ml-auto rounded-md border border-gray-300 px-3 py-1 text-xs font-bold text-gray-600 transition hover:bg-gray-100 dark:border-gray-600 dark:text-gray-300 dark:hover:bg-gray-700",
1692
1717
  onClick: u[0] ||= (...e) => y(r) && y(r)(...e)
1693
1718
  }, v(y(n) ? "ライトモード" : "ダークモード"), 1)) : i("", !0)
1694
- ]), o("div", hn, [o("div", gn, [(m(), a(e, null, g(p, (e) => o("div", {
1719
+ ]), o("div", gn, [o("div", _n, [(m(), a(e, null, g(p, (e) => o("div", {
1695
1720
  key: e.name,
1696
1721
  class: "overflow-hidden rounded-lg border border-gray-300 bg-white dark:border-gray-700 dark:bg-gray-800"
1697
1722
  }, [o("div", {
1698
1723
  class: "h-24 w-full border-b border-gray-200 dark:border-gray-700",
1699
1724
  style: f({ background: y(n) ? e.dark : e.light })
1700
- }, null, 4), o("div", _n, [
1701
- o("div", vn, v(e.name), 1),
1702
- o("div", yn, [o("div", { class: d(y(n) ? "text-gray-500" : "font-bold text-gray-700") }, " light: " + v(e.light), 3), o("div", { class: d(y(n) ? "font-bold text-gray-200" : "text-gray-500") }, " dark: " + v(e.dark), 3)]),
1703
- e.desc ? (m(), a("div", bn, v(e.desc), 1)) : i("", !0)
1725
+ }, null, 4), o("div", vn, [
1726
+ o("div", yn, v(e.name), 1),
1727
+ o("div", bn, [o("div", { class: d(y(n) ? "text-gray-500" : "font-bold text-gray-700") }, " light: " + v(e.light), 3), o("div", { class: d(y(n) ? "font-bold text-gray-200" : "text-gray-500") }, " dark: " + v(e.dark), 3)]),
1728
+ e.desc ? (m(), a("div", xn, v(e.desc), 1)) : i("", !0)
1704
1729
  ])])), 64))])])]));
1705
1730
  }
1706
1731
  });
1707
1732
  //#endregion
1708
1733
  //#region src/router.ts
1709
- function Sn() {
1734
+ function Cn() {
1710
1735
  return ie({
1711
1736
  history: S(),
1712
1737
  routes: [
@@ -1717,17 +1742,17 @@ function Sn() {
1717
1742
  {
1718
1743
  path: "/catalog",
1719
1744
  name: "catalog",
1720
- component: Me
1745
+ component: Ee
1721
1746
  },
1722
1747
  {
1723
1748
  path: "/colors",
1724
1749
  name: "colors",
1725
- component: xn
1750
+ component: Sn
1726
1751
  },
1727
1752
  {
1728
1753
  path: "/components/:name/:ver?",
1729
1754
  name: "component",
1730
- component: fn,
1755
+ component: pn,
1731
1756
  props: (e) => ({
1732
1757
  kind: "component",
1733
1758
  name: e.params.name,
@@ -1737,7 +1762,7 @@ function Sn() {
1737
1762
  {
1738
1763
  path: "/pages/:name/:ver?",
1739
1764
  name: "page",
1740
- component: fn,
1765
+ component: pn,
1741
1766
  props: (e) => ({
1742
1767
  kind: "page",
1743
1768
  name: e.params.name,
@@ -1749,10 +1774,10 @@ function Sn() {
1749
1774
  }
1750
1775
  //#endregion
1751
1776
  //#region src/createSpecViewer.ts
1752
- function Cn(e) {
1753
- N(e);
1777
+ function wn(e) {
1778
+ j(e);
1754
1779
  let t = n(w);
1755
- return t.use(Sn()), t;
1780
+ return t.use(Cn()), t;
1756
1781
  }
1757
1782
  //#endregion
1758
- export { Cn as createSpecViewer };
1783
+ export { wn as createSpecViewer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "required-doc",
3
- "version": "0.0.0",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "files": ["dist", "style.css", "types.d.ts"],
6
6
  "main": "./dist/index.js",
package/types.d.ts CHANGED
@@ -27,7 +27,8 @@ export interface DeviceConfig {
27
27
  id: string
28
28
  label: string
29
29
  frame: 'pc' | 'phone' | 'tablet'
30
- width: number
30
+ minWidth: number
31
+ maxWidth: number
31
32
  }
32
33
 
33
34
  export interface BaseColorSet {