required-doc 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +169 -134
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { Fragment as e, computed as t, createApp as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, nextTick as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as p, onMounted as ee, openBlock as m, ref as h, renderList as g, renderSlot as _, resolveDynamicComponent as te, toDisplayString as v, unref as y, watch as ne, withCtx as b } from "vue";
|
|
2
|
-
import { RouterLink as x, RouterView as re, createRouter as ie, createWebHistory as
|
|
2
|
+
import { RouterLink as x, RouterView as re, createRouter as ie, createWebHistory as ae, useRouter as S } from "vue-router";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/App.vue
|
|
5
|
-
var
|
|
5
|
+
var C = /* @__PURE__ */ l({
|
|
6
6
|
__name: "App",
|
|
7
7
|
setup(e) {
|
|
8
8
|
return (e, t) => (m(), r(y(re)));
|
|
9
9
|
}
|
|
10
|
-
}),
|
|
11
|
-
function
|
|
12
|
-
|
|
10
|
+
}), w = [], T = [], E = [], D = !0, O = [], k;
|
|
11
|
+
function oe(e) {
|
|
12
|
+
w = e.components, T = e.pages, E = e.colors, D = e.options?.showThemeToggle ?? !0, O = e.options?.devices ?? [], k = e.options?.baseColors;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function se() {
|
|
15
|
+
return D;
|
|
16
|
+
}
|
|
17
|
+
function ce() {
|
|
15
18
|
return O;
|
|
16
19
|
}
|
|
17
|
-
function
|
|
20
|
+
function le() {
|
|
18
21
|
return k;
|
|
19
22
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
23
|
+
function A() {
|
|
24
|
+
return w;
|
|
22
25
|
}
|
|
23
|
-
function
|
|
26
|
+
function ue() {
|
|
24
27
|
return T;
|
|
25
28
|
}
|
|
26
|
-
function
|
|
29
|
+
function de() {
|
|
27
30
|
return E;
|
|
28
31
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
function de(e, t) {
|
|
33
|
-
return [...T, ...E].find((n) => n.kind === e && n.name === t);
|
|
32
|
+
function fe(e, t) {
|
|
33
|
+
return [...w, ...T].find((n) => n.kind === e && n.name === t);
|
|
34
34
|
}
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region src/lib/theme.ts
|
|
37
|
-
var
|
|
38
|
-
ne(
|
|
37
|
+
var j = h(!1);
|
|
38
|
+
ne(j, (e) => {
|
|
39
39
|
document.documentElement.classList.toggle("dark", e);
|
|
40
40
|
}, { immediate: !0 });
|
|
41
|
-
function
|
|
41
|
+
function pe() {
|
|
42
42
|
return {
|
|
43
|
-
isDark:
|
|
43
|
+
isDark: j,
|
|
44
44
|
toggle: () => {
|
|
45
|
-
|
|
45
|
+
j.value = !j.value;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/catalog/CatalogView.vue?vue&type=script&setup=true&lang.ts
|
|
51
|
-
var
|
|
51
|
+
var M = { class: "mx-auto min-h-screen max-w-3xl p-8" }, N = { class: "mb-8 flex items-center" }, me = { class: "mb-10" }, he = { class: "space-y-2" }, ge = { class: "font-bold dark:text-gray-100" }, P = { 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" }, F = { class: "mb-2 rounded-lg border border-gray-300 bg-white p-4 dark:border-gray-700 dark:bg-gray-800" }, I = { class: "space-y-2 text-sm" }, Ce = { class: "flex gap-3" }, we = { class: "font-bold dark:text-gray-100" }, Te = { class: "flex gap-3" }, Ee = { class: "flex-1" }, De = { class: "space-y-1" }, Oe = { class: "space-y-2" }, ke = "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", Ae = /* @__PURE__ */ l({
|
|
52
52
|
__name: "CatalogView",
|
|
53
53
|
setup(t) {
|
|
54
|
-
let { isDark: n, toggle: r } =
|
|
54
|
+
let { isDark: n, toggle: r } = pe(), l = se(), u = ce(), f = A(), p = ue();
|
|
55
55
|
function ee(e) {
|
|
56
56
|
return e.minWidth === e.maxWidth ? `${e.maxWidth}px` : `${e.minWidth}–${e.maxWidth}px`;
|
|
57
57
|
}
|
|
58
|
-
return (t, h) => (m(), a("div",
|
|
58
|
+
return (t, h) => (m(), a("div", M, [
|
|
59
59
|
o("div", N, [h[1] ||= o("h1", { class: "text-2xl font-bold dark:text-gray-100" }, "要件書カタログ", -1), y(l) ? (m(), a("button", {
|
|
60
60
|
key: 0,
|
|
61
61
|
type: "button",
|
|
@@ -1453,47 +1453,71 @@ function Rt(e) {
|
|
|
1453
1453
|
return $.parse(e, { async: !1 });
|
|
1454
1454
|
}
|
|
1455
1455
|
//#endregion
|
|
1456
|
-
//#region src/
|
|
1456
|
+
//#region src/MockDeviceFrame.vue?vue&type=script&setup=true&lang.ts
|
|
1457
1457
|
var zt = {
|
|
1458
|
+
key: 0,
|
|
1459
|
+
class: "inline-block"
|
|
1460
|
+
}, Bt = { class: "rounded-[2.5rem] bg-black p-3 shadow-xl" }, Vt = {
|
|
1461
|
+
key: 0,
|
|
1462
|
+
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"
|
|
1463
|
+
}, Ht = /* @__PURE__ */ l({
|
|
1464
|
+
__name: "MockDeviceFrame",
|
|
1465
|
+
props: {
|
|
1466
|
+
frame: {},
|
|
1467
|
+
screenWidth: {},
|
|
1468
|
+
baseStyle: {}
|
|
1469
|
+
},
|
|
1470
|
+
setup(e) {
|
|
1471
|
+
function t(e) {
|
|
1472
|
+
return `${e}px`;
|
|
1473
|
+
}
|
|
1474
|
+
return (n, r) => e.frame === "phone" || e.frame === "tablet" ? (m(), a("div", zt, [o("div", Bt, [o("div", {
|
|
1475
|
+
class: "relative overflow-hidden rounded-[1.8rem]",
|
|
1476
|
+
style: f({
|
|
1477
|
+
width: t(e.screenWidth),
|
|
1478
|
+
...e.baseStyle
|
|
1479
|
+
})
|
|
1480
|
+
}, [
|
|
1481
|
+
e.frame === "phone" ? (m(), a("div", Vt)) : i("", !0),
|
|
1482
|
+
_(n.$slots, "default"),
|
|
1483
|
+
r[0] ||= o("div", { class: "pointer-events-none absolute bottom-2 left-1/2 z-10 h-1 w-24 -translate-x-1/2 rounded-full bg-gray-300 dark:bg-gray-600" }, null, -1)
|
|
1484
|
+
], 4)])])) : (m(), a("div", {
|
|
1485
|
+
key: 1,
|
|
1486
|
+
class: "inline-block overflow-hidden rounded-xl border-2 border-gray-300 shadow-sm dark:border-gray-700",
|
|
1487
|
+
style: f({ width: t(e.screenWidth) })
|
|
1488
|
+
}, [r[1] ||= o("div", { class: "flex items-center gap-2 border-b border-gray-300 bg-gray-800 px-3 py-2 dark:border-gray-700" }, [
|
|
1489
|
+
o("span", { class: "h-3 w-3 rounded-full bg-red-400" }),
|
|
1490
|
+
o("span", { class: "h-3 w-3 rounded-full bg-yellow-400" }),
|
|
1491
|
+
o("span", { class: "h-3 w-3 rounded-full bg-green-400" })
|
|
1492
|
+
], -1), o("div", { style: f(e.baseStyle) }, [_(n.$slots, "default")], 4)], 4));
|
|
1493
|
+
}
|
|
1494
|
+
}), Ut = {
|
|
1458
1495
|
key: 0,
|
|
1459
1496
|
class: "min-h-screen p-6"
|
|
1460
|
-
},
|
|
1497
|
+
}, Wt = { 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" }, Gt = { class: "text-lg font-bold" }, Kt = { class: "ml-auto flex items-center gap-3" }, qt = { class: "grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-6" }, Jt = { class: "rounded-lg border border-gray-300 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" }, Yt = { class: "mb-3 flex items-center justify-between" }, Xt = { class: "flex items-center gap-3" }, Zt = {
|
|
1461
1498
|
key: 0,
|
|
1462
1499
|
class: "font-mono text-xs text-gray-500 dark:text-gray-400"
|
|
1463
|
-
},
|
|
1500
|
+
}, Qt = {
|
|
1464
1501
|
key: 0,
|
|
1465
1502
|
class: "text-gray-400"
|
|
1466
|
-
},
|
|
1467
|
-
key: 0,
|
|
1468
|
-
class: "w-full"
|
|
1469
|
-
}, Qt = { class: "rounded-[2.5rem] bg-black p-3 shadow-xl" }, $t = { class: "relative overflow-hidden rounded-[1.8rem]" }, en = {
|
|
1470
|
-
key: 0,
|
|
1471
|
-
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"
|
|
1472
|
-
}, tn = {
|
|
1473
|
-
key: 1,
|
|
1474
|
-
class: "w-full overflow-hidden rounded-xl border-2 border-gray-300 shadow-sm dark:border-gray-700"
|
|
1475
|
-
}, nn = { class: "rounded-lg border border-gray-300 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" }, rn = ["innerHTML"], an = {
|
|
1503
|
+
}, $t = ["onClick"], en = { class: "rounded-md bg-white p-4 transition-colors dark:bg-gray-800" }, tn = { class: "rounded-lg border border-gray-300 bg-white p-6 dark:border-gray-700 dark:bg-gray-800" }, nn = ["innerHTML"], rn = {
|
|
1476
1504
|
key: 1,
|
|
1477
1505
|
class: "fixed inset-0 z-50 overflow-auto bg-[#e8eaed] dark:bg-[#141414]"
|
|
1478
|
-
},
|
|
1506
|
+
}, an = /* @__PURE__ */ l({
|
|
1479
1507
|
__name: "ReqScreen",
|
|
1480
1508
|
props: {
|
|
1481
1509
|
title: {},
|
|
1482
1510
|
doc: {}
|
|
1483
1511
|
},
|
|
1484
1512
|
setup(n) {
|
|
1485
|
-
let
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
}
|
|
1489
|
-
let E = ce(), D = t(() => {
|
|
1490
|
-
if (!E) return {};
|
|
1491
|
-
let e = te.value ? E.dark : E.light;
|
|
1513
|
+
let l = n, te = t(() => Rt(l.doc)), { isDark: re, toggle: ie } = pe(), ae = se(), S = ce(), C = h(S[0]?.id ?? ""), w = t(() => S.find((e) => e.id === C.value) ?? S[0]), T = le(), E = t(() => {
|
|
1514
|
+
if (!T) return {};
|
|
1515
|
+
let e = re.value ? T.dark : T.light;
|
|
1492
1516
|
return {
|
|
1493
1517
|
background: e.bg,
|
|
1494
1518
|
color: e.font
|
|
1495
1519
|
};
|
|
1496
|
-
}),
|
|
1520
|
+
}), D = h(null), O = h(null), k = h(0), oe = h(0), A = h(!1), ue = h(null), de = t(() => {
|
|
1497
1521
|
let e = w.value;
|
|
1498
1522
|
return e ? {
|
|
1499
1523
|
min: e.minWidth,
|
|
@@ -1503,33 +1527,33 @@ var zt = {
|
|
|
1503
1527
|
max: 0
|
|
1504
1528
|
};
|
|
1505
1529
|
});
|
|
1506
|
-
function
|
|
1530
|
+
function fe() {
|
|
1507
1531
|
let e = w.value;
|
|
1508
1532
|
if (!e) return 0;
|
|
1509
|
-
let t =
|
|
1533
|
+
let t = ue.value ?? e.minWidth;
|
|
1510
1534
|
return Math.min(e.maxWidth, Math.max(e.minWidth, t));
|
|
1511
1535
|
}
|
|
1512
|
-
let
|
|
1536
|
+
let j = t(() => fe()), M = t(() => {
|
|
1513
1537
|
let e = w.value;
|
|
1514
1538
|
return !!e && e.minWidth < e.maxWidth;
|
|
1515
1539
|
}), N = t(() => {
|
|
1516
|
-
if (
|
|
1517
|
-
let e =
|
|
1518
|
-
return !e ||
|
|
1519
|
-
}), me = t(() =>
|
|
1540
|
+
if (A.value) return 1;
|
|
1541
|
+
let e = j.value;
|
|
1542
|
+
return !e || k.value === 0 ? 1 : Math.min(1, k.value / e);
|
|
1543
|
+
}), me = t(() => j.value ? j.value * N.value : 0), he = t(() => oe.value * N.value), ge = t(() => A.value && j.value > 0 && k.value > 0 && j.value < k.value), P = h(!1), _e = 0, ve = 0, ye = 1;
|
|
1520
1544
|
function be(e) {
|
|
1521
1545
|
let t = w.value;
|
|
1522
|
-
t && (
|
|
1546
|
+
t && (ue.value = Math.min(t.maxWidth, Math.max(t.minWidth, e)));
|
|
1523
1547
|
}
|
|
1524
1548
|
function xe(e) {
|
|
1525
|
-
let t =
|
|
1549
|
+
let t = j.value;
|
|
1526
1550
|
C.value = e, be(t);
|
|
1527
1551
|
}
|
|
1528
1552
|
function Se(e) {
|
|
1529
|
-
if (
|
|
1553
|
+
if (!w.value || !M.value) return;
|
|
1530
1554
|
e.preventDefault(), e.stopPropagation();
|
|
1531
1555
|
let t = e.currentTarget;
|
|
1532
|
-
t.setPointerCapture(e.pointerId), P.value = !0, _e = e.clientX, ve =
|
|
1556
|
+
t.setPointerCapture(e.pointerId), P.value = !0, _e = e.clientX, ve = j.value, ye = N.value, document.body.style.userSelect = "none", document.body.style.cursor = "ew-resize";
|
|
1533
1557
|
function n(e) {
|
|
1534
1558
|
if (!e.isPrimary) return;
|
|
1535
1559
|
let t = (e.clientX - _e) / ye;
|
|
@@ -1542,13 +1566,13 @@ var zt = {
|
|
|
1542
1566
|
}
|
|
1543
1567
|
let F = null;
|
|
1544
1568
|
function I() {
|
|
1545
|
-
|
|
1569
|
+
D.value && (k.value = D.value.clientWidth), O.value && (oe.value = O.value.offsetHeight);
|
|
1546
1570
|
}
|
|
1547
1571
|
function Ce() {
|
|
1548
|
-
F?.disconnect(),
|
|
1572
|
+
F?.disconnect(), D.value && F?.observe(D.value), O.value && F?.observe(O.value);
|
|
1549
1573
|
}
|
|
1550
1574
|
function we(e) {
|
|
1551
|
-
e.key === "Escape" && (
|
|
1575
|
+
e.key === "Escape" && (A.value = !1);
|
|
1552
1576
|
}
|
|
1553
1577
|
return ee(() => {
|
|
1554
1578
|
F = new ResizeObserver(() => I()), Ce(), I(), window.addEventListener("keydown", we);
|
|
@@ -1556,53 +1580,65 @@ var zt = {
|
|
|
1556
1580
|
F?.disconnect(), window.removeEventListener("keydown", we);
|
|
1557
1581
|
}), ne([
|
|
1558
1582
|
C,
|
|
1559
|
-
|
|
1560
|
-
|
|
1583
|
+
A,
|
|
1584
|
+
j
|
|
1561
1585
|
], () => u(() => {
|
|
1562
1586
|
Ce(), I();
|
|
1563
|
-
})), (t,
|
|
1587
|
+
})), (t, l) => A.value ? (m(), a("div", rn, [o("button", {
|
|
1564
1588
|
type: "button",
|
|
1565
1589
|
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",
|
|
1566
|
-
onClick:
|
|
1590
|
+
onClick: l[2] ||= (e) => A.value = !1
|
|
1567
1591
|
}, " 閉じる(Esc) "), o("div", {
|
|
1568
1592
|
ref_key: "areaRef",
|
|
1569
|
-
ref:
|
|
1570
|
-
class: "flex min-h-full justify-center"
|
|
1593
|
+
ref: D,
|
|
1594
|
+
class: "flex min-h-full w-full justify-center"
|
|
1571
1595
|
}, [w.value ? (m(), a("div", {
|
|
1572
1596
|
key: 0,
|
|
1573
|
-
class: d(["relative shrink-0", ge.value ? "border border-gray-300 shadow-lg dark:border-gray-600" : ""])
|
|
1574
|
-
style: f({ width: T(M.value) })
|
|
1597
|
+
class: d(["relative w-fit shrink-0", ge.value ? "border border-gray-300 shadow-lg dark:border-gray-600" : ""])
|
|
1575
1598
|
}, [o("div", {
|
|
1576
1599
|
ref_key: "contentRef",
|
|
1577
|
-
ref:
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1600
|
+
ref: O,
|
|
1601
|
+
class: "w-fit"
|
|
1602
|
+
}, [w.value ? (m(), r(Ht, {
|
|
1603
|
+
key: 0,
|
|
1604
|
+
frame: w.value.frame,
|
|
1605
|
+
"screen-width": j.value,
|
|
1606
|
+
"base-style": E.value
|
|
1607
|
+
}, {
|
|
1608
|
+
default: b(() => [_(t.$slots, "mock")]),
|
|
1609
|
+
_: 3
|
|
1610
|
+
}, 8, [
|
|
1611
|
+
"frame",
|
|
1612
|
+
"screen-width",
|
|
1613
|
+
"base-style"
|
|
1614
|
+
])) : i("", !0)], 512), M.value ? (m(), a("div", {
|
|
1615
|
+
key: 0,
|
|
1616
|
+
class: d(["absolute inset-y-0 -right-1 z-20 flex w-3 cursor-ew-resize touch-none items-center justify-center opacity-60 hover:opacity-100", P.value ? "opacity-100" : ""]),
|
|
1617
|
+
onPointerdown: Se
|
|
1618
|
+
}, [o("div", { class: d(["h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500", P.value ? "bg-blue-500 dark:bg-blue-400" : ""]) }, null, 2)], 34)) : i("", !0)], 2)) : i("", !0)], 512)])) : (m(), a("div", Ut, [o("header", Wt, [
|
|
1583
1619
|
c(y(x), {
|
|
1584
1620
|
to: "/catalog",
|
|
1585
1621
|
class: "text-sm text-gray-500 underline hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-100"
|
|
1586
1622
|
}, {
|
|
1587
|
-
default: b(() => [...
|
|
1623
|
+
default: b(() => [...l[3] ||= [s(" ← 一覧 ", -1)]]),
|
|
1588
1624
|
_: 1
|
|
1589
1625
|
}),
|
|
1590
|
-
o("h1",
|
|
1591
|
-
o("div",
|
|
1626
|
+
o("h1", Gt, v(n.title), 1),
|
|
1627
|
+
o("div", Kt, [
|
|
1592
1628
|
_(t.$slots, "toolbar"),
|
|
1593
1629
|
o("button", {
|
|
1594
1630
|
type: "button",
|
|
1595
1631
|
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",
|
|
1596
|
-
onClick:
|
|
1597
|
-
}, v(
|
|
1598
|
-
y(
|
|
1632
|
+
onClick: l[0] ||= (e) => A.value = !A.value
|
|
1633
|
+
}, v(A.value ? "要件を表示" : "プレビュー"), 1),
|
|
1634
|
+
y(ae) ? (m(), a("button", {
|
|
1599
1635
|
key: 0,
|
|
1600
1636
|
type: "button",
|
|
1601
1637
|
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",
|
|
1602
|
-
onClick:
|
|
1603
|
-
}, v(y(
|
|
1638
|
+
onClick: l[1] ||= (...e) => y(ie) && y(ie)(...e)
|
|
1639
|
+
}, v(y(re) ? "ライトモード" : "ダークモード"), 1)) : i("", !0)
|
|
1604
1640
|
])
|
|
1605
|
-
]), o("div",
|
|
1641
|
+
]), o("div", qt, [o("section", Jt, [o("div", Yt, [l[4] ||= o("span", { class: "text-xs font-bold uppercase tracking-wide text-gray-400" }, " 画面 mock ", -1), o("div", Xt, [w.value ? (m(), a("span", Zt, [s(v(j.value) + "px ", 1), M.value ? (m(), a("span", Qt, " (" + v(de.value.min) + "–" + v(de.value.max) + ") ", 1)) : i("", !0)])) : i("", !0), y(S).length > 1 ? (m(), a("div", {
|
|
1606
1642
|
key: 1,
|
|
1607
1643
|
class: d(["inline-flex overflow-hidden rounded-md border border-gray-300 text-xs font-bold dark:border-gray-600", P.value ? "pointer-events-none" : ""])
|
|
1608
1644
|
}, [(m(!0), a(e, null, g(y(S), (e) => (m(), a("button", {
|
|
@@ -1610,47 +1646,46 @@ var zt = {
|
|
|
1610
1646
|
type: "button",
|
|
1611
1647
|
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"]),
|
|
1612
1648
|
onClick: (t) => xe(e.id)
|
|
1613
|
-
}, v(e.label), 11,
|
|
1649
|
+
}, v(e.label), 11, $t))), 128))], 2)) : i("", !0)])]), o("div", en, [o("div", {
|
|
1614
1650
|
ref_key: "areaRef",
|
|
1615
|
-
ref:
|
|
1651
|
+
ref: D
|
|
1616
1652
|
}, [w.value ? (m(), a("div", {
|
|
1617
1653
|
key: 0,
|
|
1618
1654
|
class: "relative mx-auto overflow-hidden",
|
|
1619
1655
|
style: f({
|
|
1620
1656
|
width: me.value ? `${me.value}px` : "",
|
|
1621
|
-
height:
|
|
1657
|
+
height: oe.value ? `${he.value}px` : "auto"
|
|
1622
1658
|
})
|
|
1623
1659
|
}, [o("div", {
|
|
1624
1660
|
ref_key: "contentRef",
|
|
1625
|
-
ref:
|
|
1626
|
-
class: "origin-top-left",
|
|
1627
|
-
style: f({
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
}, [_(t.$slots, "mock")], 4)]))], 4), pe.value ? (m(), a("div", {
|
|
1661
|
+
ref: O,
|
|
1662
|
+
class: "origin-top-left w-fit",
|
|
1663
|
+
style: f({ transform: `scale(${N.value})` })
|
|
1664
|
+
}, [w.value ? (m(), r(Ht, {
|
|
1665
|
+
key: 0,
|
|
1666
|
+
frame: w.value.frame,
|
|
1667
|
+
"screen-width": j.value,
|
|
1668
|
+
"base-style": E.value
|
|
1669
|
+
}, {
|
|
1670
|
+
default: b(() => [_(t.$slots, "mock")]),
|
|
1671
|
+
_: 3
|
|
1672
|
+
}, 8, [
|
|
1673
|
+
"frame",
|
|
1674
|
+
"screen-width",
|
|
1675
|
+
"base-style"
|
|
1676
|
+
])) : i("", !0)], 4), M.value ? (m(), a("div", {
|
|
1642
1677
|
key: 0,
|
|
1643
1678
|
class: d(["absolute inset-y-0 -right-1 z-20 flex w-3 cursor-ew-resize touch-none items-center justify-center", P.value ? "opacity-100" : "opacity-60 hover:opacity-100"]),
|
|
1644
1679
|
onPointerdown: Se
|
|
1645
|
-
}, [o("div", { class: d(["h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500", P.value ? "bg-blue-500 dark:bg-blue-400" : ""]) }, null, 2)], 34)) : i("", !0)], 4)) : i("", !0)], 512)])]), o("section",
|
|
1680
|
+
}, [o("div", { class: d(["h-10 w-1 rounded-full bg-gray-400 dark:bg-gray-500", P.value ? "bg-blue-500 dark:bg-blue-400" : ""]) }, null, 2)], 34)) : i("", !0)], 4)) : i("", !0)], 512)])]), o("section", tn, [l[5] ||= o("div", { class: "mb-3 text-xs font-bold uppercase tracking-wide text-gray-400" }, " 要件 ", -1), o("div", {
|
|
1646
1681
|
class: "req-md",
|
|
1647
|
-
innerHTML:
|
|
1648
|
-
}, null, 8,
|
|
1682
|
+
innerHTML: te.value
|
|
1683
|
+
}, null, 8, nn)])])]));
|
|
1649
1684
|
}
|
|
1650
|
-
}),
|
|
1685
|
+
}), on = { class: "flex items-center gap-2 text-sm" }, sn = ["value"], cn = ["value"], ln = ["innerHTML"], un = {
|
|
1651
1686
|
key: 1,
|
|
1652
1687
|
class: "p-8"
|
|
1653
|
-
},
|
|
1688
|
+
}, dn = { class: "text-gray-600" }, fn = /* @__PURE__ */ l({
|
|
1654
1689
|
__name: "ReqPageView",
|
|
1655
1690
|
props: {
|
|
1656
1691
|
kind: {},
|
|
@@ -1658,30 +1693,30 @@ var zt = {
|
|
|
1658
1693
|
ver: {}
|
|
1659
1694
|
},
|
|
1660
1695
|
setup(n) {
|
|
1661
|
-
let i = n, l =
|
|
1696
|
+
let i = n, l = S(), u = t(() => fe(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) : []);
|
|
1662
1697
|
function ee(e) {
|
|
1663
1698
|
let t = e.target.value;
|
|
1664
1699
|
l.push(`/${i.kind}s/${i.name}/${t}`);
|
|
1665
1700
|
}
|
|
1666
|
-
return (t, i) => u.value && f.value ? (m(), r(
|
|
1701
|
+
return (t, i) => u.value && f.value ? (m(), r(an, {
|
|
1667
1702
|
key: 0,
|
|
1668
1703
|
title: u.value.title,
|
|
1669
1704
|
doc: f.value.req
|
|
1670
1705
|
}, {
|
|
1671
|
-
toolbar: b(() => [o("label",
|
|
1706
|
+
toolbar: b(() => [o("label", on, [i[0] ||= o("span", { class: "text-gray-500 dark:text-gray-400" }, "バージョン", -1), o("select", {
|
|
1672
1707
|
value: d.value,
|
|
1673
1708
|
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",
|
|
1674
1709
|
onChange: ee
|
|
1675
1710
|
}, [(m(!0), a(e, null, g(p.value, (e) => (m(), a("option", {
|
|
1676
1711
|
key: e,
|
|
1677
1712
|
value: e
|
|
1678
|
-
}, v(e), 9,
|
|
1713
|
+
}, v(e), 9, cn))), 128))], 40, sn)])]),
|
|
1679
1714
|
mock: b(() => [typeof f.value.view == "string" ? (m(), a("div", {
|
|
1680
1715
|
key: 0,
|
|
1681
1716
|
innerHTML: f.value.view
|
|
1682
|
-
}, null, 8,
|
|
1717
|
+
}, null, 8, ln)) : (m(), r(te(f.value.view), { key: 1 }))]),
|
|
1683
1718
|
_: 1
|
|
1684
|
-
}, 8, ["title", "doc"])) : (m(), a("div",
|
|
1719
|
+
}, 8, ["title", "doc"])) : (m(), a("div", un, [o("p", dn, "該当するアイテムが見つかりません: " + v(n.kind) + " / " + v(n.name), 1), c(y(x), {
|
|
1685
1720
|
to: "/catalog",
|
|
1686
1721
|
class: "text-blue-600 underline"
|
|
1687
1722
|
}, {
|
|
@@ -1689,13 +1724,13 @@ var zt = {
|
|
|
1689
1724
|
_: 1
|
|
1690
1725
|
})]));
|
|
1691
1726
|
}
|
|
1692
|
-
}),
|
|
1727
|
+
}), 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 = {
|
|
1693
1728
|
key: 0,
|
|
1694
1729
|
class: "mt-1 text-xs text-gray-600 dark:text-gray-400"
|
|
1695
|
-
},
|
|
1730
|
+
}, xn = /* @__PURE__ */ l({
|
|
1696
1731
|
__name: "ColorsView",
|
|
1697
1732
|
setup(t) {
|
|
1698
|
-
let { isDark: n, toggle: r } =
|
|
1733
|
+
let { isDark: n, toggle: r } = pe(), l = se(), u = le(), p = [...u ? [{
|
|
1699
1734
|
name: "baseBg",
|
|
1700
1735
|
light: u.light.bg,
|
|
1701
1736
|
dark: u.dark.bg,
|
|
@@ -1705,8 +1740,8 @@ var zt = {
|
|
|
1705
1740
|
light: u.light.font,
|
|
1706
1741
|
dark: u.dark.font,
|
|
1707
1742
|
desc: "モックの基本文字色"
|
|
1708
|
-
}] : [], ...
|
|
1709
|
-
return (t, u) => (m(), a("div",
|
|
1743
|
+
}] : [], ...de()];
|
|
1744
|
+
return (t, u) => (m(), a("div", pn, [o("header", mn, [
|
|
1710
1745
|
c(y(x), {
|
|
1711
1746
|
to: "/catalog",
|
|
1712
1747
|
class: "text-sm text-gray-500 underline hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-100"
|
|
@@ -1721,24 +1756,24 @@ var zt = {
|
|
|
1721
1756
|
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",
|
|
1722
1757
|
onClick: u[0] ||= (...e) => y(r) && y(r)(...e)
|
|
1723
1758
|
}, v(y(n) ? "ライトモード" : "ダークモード"), 1)) : i("", !0)
|
|
1724
|
-
]), o("div",
|
|
1759
|
+
]), o("div", hn, [o("div", gn, [(m(), a(e, null, g(p, (e) => o("div", {
|
|
1725
1760
|
key: e.name,
|
|
1726
1761
|
class: "overflow-hidden rounded-lg border border-gray-300 bg-white dark:border-gray-700 dark:bg-gray-800"
|
|
1727
1762
|
}, [o("div", {
|
|
1728
1763
|
class: "h-24 w-full border-b border-gray-200 dark:border-gray-700",
|
|
1729
1764
|
style: f({ background: y(n) ? e.dark : e.light })
|
|
1730
|
-
}, null, 4), o("div",
|
|
1731
|
-
o("div",
|
|
1732
|
-
o("div",
|
|
1733
|
-
e.desc ? (m(), a("div",
|
|
1765
|
+
}, null, 4), o("div", _n, [
|
|
1766
|
+
o("div", vn, v(e.name), 1),
|
|
1767
|
+
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)]),
|
|
1768
|
+
e.desc ? (m(), a("div", bn, v(e.desc), 1)) : i("", !0)
|
|
1734
1769
|
])])), 64))])])]));
|
|
1735
1770
|
}
|
|
1736
1771
|
});
|
|
1737
1772
|
//#endregion
|
|
1738
1773
|
//#region src/router.ts
|
|
1739
|
-
function
|
|
1774
|
+
function Sn() {
|
|
1740
1775
|
return ie({
|
|
1741
|
-
history:
|
|
1776
|
+
history: ae(),
|
|
1742
1777
|
routes: [
|
|
1743
1778
|
{
|
|
1744
1779
|
path: "/",
|
|
@@ -1752,12 +1787,12 @@ function Cn() {
|
|
|
1752
1787
|
{
|
|
1753
1788
|
path: "/colors",
|
|
1754
1789
|
name: "colors",
|
|
1755
|
-
component:
|
|
1790
|
+
component: xn
|
|
1756
1791
|
},
|
|
1757
1792
|
{
|
|
1758
1793
|
path: "/components/:name/:ver?",
|
|
1759
1794
|
name: "component",
|
|
1760
|
-
component:
|
|
1795
|
+
component: fn,
|
|
1761
1796
|
props: (e) => ({
|
|
1762
1797
|
kind: "component",
|
|
1763
1798
|
name: e.params.name,
|
|
@@ -1767,7 +1802,7 @@ function Cn() {
|
|
|
1767
1802
|
{
|
|
1768
1803
|
path: "/pages/:name/:ver?",
|
|
1769
1804
|
name: "page",
|
|
1770
|
-
component:
|
|
1805
|
+
component: fn,
|
|
1771
1806
|
props: (e) => ({
|
|
1772
1807
|
kind: "page",
|
|
1773
1808
|
name: e.params.name,
|
|
@@ -1779,10 +1814,10 @@ function Cn() {
|
|
|
1779
1814
|
}
|
|
1780
1815
|
//#endregion
|
|
1781
1816
|
//#region src/createSpecViewer.ts
|
|
1782
|
-
function
|
|
1783
|
-
|
|
1784
|
-
let t = n(
|
|
1785
|
-
return t.use(
|
|
1817
|
+
function Cn(e) {
|
|
1818
|
+
oe(e);
|
|
1819
|
+
let t = n(C);
|
|
1820
|
+
return t.use(Sn()), t;
|
|
1786
1821
|
}
|
|
1787
1822
|
//#endregion
|
|
1788
|
-
export {
|
|
1823
|
+
export { Cn as createSpecViewer };
|