@yadeck/slide-components-basic 0.1.1 → 0.1.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.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/panes.d.ts +19 -3
- package/dist/panes.d.ts.map +1 -1
- package/dist/panes.js +63 -4
- package/dist/panes.js.map +1 -1
- package/dist/styles.d.ts +1 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +16 -2
- package/dist/styles.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +12 -2
- package/src/panes.tsx +98 -7
- package/src/styles.ts +16 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmCA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmCA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,KAAK,qCAqDhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BlockLayout, DeckLayout, SlideLayout, definePlugin } from "@yadeck/slide-core";
|
|
2
2
|
import { BodyBlock, CardSlide, CodeBlock, DefaultBlock, DefaultDeck, HeaderSlide, HeadingBlock, ImageBlock, ItemBlock, ListBlock, NoteBlock, ProfileSlide, QuoteBlock, SectionHeaderSlide, StatBlock, TwoColumnSlide, VideoBlock, codeType, headerType, headingType, imageType, itemType, listType, profileType, quoteType, sectionHeaderType, statType, videoType, } from "./layouts.js";
|
|
3
3
|
import { FlowBlock, FlowBoxed, FlowFramed, FlowGrid, flowType } from "./flow.js";
|
|
4
|
-
import { ColumnsSlide, DefaultSlide } from "./panes.js";
|
|
4
|
+
import { ColumnsSlide, DefaultSlide, MainLeftSlide, MainRightSlide, columnsType } from "./panes.js";
|
|
5
5
|
import { BASIC_CSS, DEFAULT_THEME } from "./styles.js";
|
|
6
6
|
export * from "./layouts.js";
|
|
7
7
|
export * from "./panes.js";
|
|
@@ -24,7 +24,16 @@ export const basic = definePlugin((c) => {
|
|
|
24
24
|
c.bind(SlideLayout, ["section-header"], SectionHeaderSlide, { type: sectionHeaderType, description: "章扉。number と heading、body だけを描く" });
|
|
25
25
|
c.bind(SlideLayout, ["two-column"], TwoColumnSlide, { description: "2 列の対比。left を付けた block を左列、right を右列、どちらも無い block は前置きとして列の上に置く。列の見出しは heading left / heading right" });
|
|
26
26
|
c.bind(SlideLayout, ["card"], CardSlide, { description: "item をカードにして並べる(3 枚までは 1 行、4 枚は 2×2、5 枚以上は 3 列)。他の block は前置きとして上に置く" });
|
|
27
|
-
c.bind(SlideLayout, ["columns"], ColumnsSlide, {
|
|
27
|
+
c.bind(SlideLayout, ["columns"], ColumnsSlide, {
|
|
28
|
+
type: columnsType,
|
|
29
|
+
description: "pane を横一列に並べる(4 まで。5 以上は 3 列 × 2 行)。既定は等分。focus で主役の列を指定すると、その列を他の列の黄金比倍の幅にする",
|
|
30
|
+
});
|
|
31
|
+
c.bind(SlideLayout, ["main-left"], MainLeftSlide, {
|
|
32
|
+
description: "最初の pane を左に大きく置き、残りを右に縦に積む(ト型)。大きい側と積む側は黄金比(約 62:38)",
|
|
33
|
+
});
|
|
34
|
+
c.bind(SlideLayout, ["main-right"], MainRightSlide, {
|
|
35
|
+
description: "最後の pane を右に大きく置き、残りを左に縦に積む(ト型の逆)。説明や前提を左に、主役を右に置くとき。大きい側と積む側は黄金比(約 62:38)",
|
|
36
|
+
});
|
|
28
37
|
c.bind(BlockLayout, [], DefaultBlock, { description: "本文 1 行。markdown 可" });
|
|
29
38
|
c.bind(BlockLayout, ["heading"], HeadingBlock, { type: headingType, description: "見出し。slide の上部に置かれる" });
|
|
30
39
|
c.bind(BlockLayout, ["body"], BodyBlock, { description: "本文。markdown 可。複数行は段落になる" });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,EACZ,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EACL,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C,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE;QAC9C,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kDAAkD;KAChE,CAAC,CAAC;IACH,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACnF,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC,CAAC;IAC5G,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC,CAAC;IACxH,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC,CAAC;AAClG,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
package/dist/panes.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type BlockNode, type SlideNode, type SlideOf } from "@yadeck/slide-core";
|
|
2
3
|
import type { CSSProperties } from "react";
|
|
3
4
|
type Pane = {
|
|
4
5
|
kind: "text";
|
|
@@ -37,7 +38,22 @@ export declare const TextPane: ({ blocks }: {
|
|
|
37
38
|
export declare const DefaultSlide: (slide: SlideNode) => import("react").JSX.Element;
|
|
38
39
|
/** columns の列数。4 までは横一列、5 以上は 3 列で折り返す */
|
|
39
40
|
export declare function columnsFor(n: number): number;
|
|
40
|
-
/**
|
|
41
|
-
|
|
41
|
+
/**
|
|
42
|
+
* 主役と従の比。黄金比 φ。columns の focus では主役の列を他の列の φ 倍に、
|
|
43
|
+
* main-left / main-right では大きい区画と積む側を φ:1(約 62:38)に分ける
|
|
44
|
+
*/
|
|
45
|
+
export declare const PHI: number;
|
|
46
|
+
export declare const columnsType: z.ZodObject<{
|
|
47
|
+
focus: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
/** 列の幅の比。focus の列だけ φ、他は 1 */
|
|
50
|
+
export declare function columnWeights(cols: number, focusColumn: number | undefined): number[];
|
|
51
|
+
/**
|
|
52
|
+
* `columns`。pane を横一列に並べる(4 まで。5 以上は 3 列で折り返す)。
|
|
53
|
+
* 既定は等分。focus で主役を指定すると、主役の列を他の列の黄金比倍の幅にする
|
|
54
|
+
*/
|
|
55
|
+
export declare const ColumnsSlide: (slide: SlideOf<typeof columnsType>) => import("react").JSX.Element;
|
|
56
|
+
export declare const MainLeftSlide: (slide: SlideNode) => import("react").JSX.Element;
|
|
57
|
+
export declare const MainRightSlide: (slide: SlideNode) => import("react").JSX.Element;
|
|
42
58
|
export {};
|
|
43
59
|
//# sourceMappingURL=panes.d.ts.map
|
package/dist/panes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panes.d.ts","sourceRoot":"","sources":["../src/panes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"panes.d.ts","sourceRoot":"","sources":["../src/panes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAyB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACzG,OAAO,KAAK,EAAE,aAAa,EAAa,MAAM,OAAO,CAAC;AAuBtD,KAAK,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;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DF,eAAO,MAAM,aAAa,GAAI,OAAO,SAAS,gCAAgD,CAAC;AAC/F,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,gCAAiD,CAAC"}
|
package/dist/panes.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
import { Block, RichText, pick } from "@yadeck/slide-core";
|
|
3
4
|
import { Notes, PAGE, SlideHeading } from "./chrome.js";
|
|
4
5
|
import { codeChrome, codeSize } from "./layouts.js";
|
|
@@ -118,14 +119,72 @@ export const DefaultSlide = (slide) => {
|
|
|
118
119
|
export function columnsFor(n) {
|
|
119
120
|
return n <= 4 ? Math.max(1, n) : 3;
|
|
120
121
|
}
|
|
121
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* 主役と従の比。黄金比 φ。columns の focus では主役の列を他の列の φ 倍に、
|
|
124
|
+
* main-left / main-right では大きい区画と積む側を φ:1(約 62:38)に分ける
|
|
125
|
+
*/
|
|
126
|
+
export const PHI = (1 + Math.sqrt(5)) / 2;
|
|
127
|
+
export const columnsType = z.object({
|
|
128
|
+
focus: z
|
|
129
|
+
.number()
|
|
130
|
+
.int()
|
|
131
|
+
.min(1)
|
|
132
|
+
.optional()
|
|
133
|
+
.describe("主役にする列の番号(1 始まり。テキストはまとめて 1 つ、code / image / video / flow は 1 つずつ数える)。主役の列を他の列の黄金比倍(約 1.6 倍)の幅にする"),
|
|
134
|
+
});
|
|
135
|
+
/** 列の幅の比。focus の列だけ φ、他は 1 */
|
|
136
|
+
export function columnWeights(cols, focusColumn) {
|
|
137
|
+
return Array.from({ length: cols }, (_, i) => (i === focusColumn ? PHI : 1));
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* `columns`。pane を横一列に並べる(4 まで。5 以上は 3 列で折り返す)。
|
|
141
|
+
* 既定は等分。focus で主役を指定すると、主役の列を他の列の黄金比倍の幅にする
|
|
142
|
+
*/
|
|
122
143
|
export const ColumnsSlide = (slide) => {
|
|
123
144
|
const [heading, rest] = pick(slide.items, ["heading"]);
|
|
124
145
|
const panes = toPanes(rest);
|
|
125
146
|
const contentH = SLIDE_H - PAD_Y * 2 - (heading ? HEADING_H : 0) - (heading && slide.description ? DESCRIPTION_H : 0);
|
|
147
|
+
const contentW = SLIDE_W - PAD_X * 2;
|
|
126
148
|
const cols = columnsFor(panes.length);
|
|
127
149
|
const rows = Math.max(1, Math.ceil(panes.length / cols));
|
|
128
|
-
const
|
|
129
|
-
|
|
150
|
+
const focusColumn = slide.focus !== undefined && slide.focus <= panes.length ? (slide.focus - 1) % cols : undefined;
|
|
151
|
+
const weights = columnWeights(cols, focusColumn);
|
|
152
|
+
const total = weights.reduce((a, b) => a + b, 0);
|
|
153
|
+
const freeW = contentW - GAP * (cols - 1);
|
|
154
|
+
const h = (contentH - GAP * (rows - 1)) / rows;
|
|
155
|
+
const boxOf = (i) => ({ w: (freeW * weights[i % cols]) / total, h });
|
|
156
|
+
return (_jsxs("div", { className: `${PAGE} b-columns`, style: codeFitStyle(panes.map((pane, i) => ({ pane, box: boxOf(i) }))), children: [heading && _jsx(SlideHeading, { block: heading, description: slide.description }), _jsx("div", { className: "grid min-h-0 flex-1 gap-8", style: {
|
|
157
|
+
gridTemplateColumns: weights.map((w) => `minmax(0, ${w}fr)`).join(" "),
|
|
158
|
+
gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`,
|
|
159
|
+
}, children: panes.map((pane, i) => (_jsx(PaneView, { pane: pane, box: boxOf(i) }, i))) }), _jsx(Notes, { items: slide.items })] }));
|
|
130
160
|
};
|
|
161
|
+
/** 縦に積んだ pane の寸法(高さは paneWeights の比で分ける) */
|
|
162
|
+
function stackBoxes(w, h, panes) {
|
|
163
|
+
const weights = paneWeights(panes);
|
|
164
|
+
const total = weights.reduce((a, b) => a + b, 0);
|
|
165
|
+
const free = h - GAP * (panes.length - 1);
|
|
166
|
+
return weights.map((wt) => ({ w, h: (free * wt) / total, grow: wt }));
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* `main-left` / `main-right`。1 つの区画を大きく置き、残りを反対側に縦に積む(ト型とその逆)。
|
|
170
|
+
* main-left は最初の区画を左に、main-right は最後の区画を右に大きく置く(左から右へ読む順のまま)。
|
|
171
|
+
* 大きい区画と積む側は黄金比(約 62:38)で分ける
|
|
172
|
+
*/
|
|
173
|
+
function MainSideSlide({ slide, side }) {
|
|
174
|
+
const [heading, rest] = pick(slide.items, ["heading"]);
|
|
175
|
+
const panes = toPanes(rest);
|
|
176
|
+
const contentH = SLIDE_H - PAD_Y * 2 - (heading ? HEADING_H : 0) - (heading && slide.description ? DESCRIPTION_H : 0);
|
|
177
|
+
const free = SLIDE_W - PAD_X * 2 - GAP;
|
|
178
|
+
const main = side === "left" ? panes[0] : panes[panes.length - 1];
|
|
179
|
+
const others = side === "left" ? panes.slice(1) : panes.slice(0, -1);
|
|
180
|
+
const mainBox = { w: (free * PHI) / (PHI + 1), h: contentH };
|
|
181
|
+
const stack = stackBoxes(free - mainBox.w, contentH, others);
|
|
182
|
+
const placed = [...(main ? [{ pane: main, box: mainBox }] : []), ...others.map((pane, i) => ({ pane, box: stack[i] }))];
|
|
183
|
+
const mainView = main && _jsx(PaneView, { pane: main, box: others.length > 0 ? mainBox : { w: free + GAP, h: contentH } });
|
|
184
|
+
const stackView = (_jsx("div", { className: "flex min-h-0 min-w-0 flex-col gap-8", children: others.map((pane, i) => (_jsx(PaneView, { pane: pane, box: stack[i] }, i))) }));
|
|
185
|
+
const columns = others.length === 0 ? "minmax(0, 1fr)" : side === "left" ? `minmax(0, ${PHI}fr) minmax(0, 1fr)` : `minmax(0, 1fr) minmax(0, ${PHI}fr)`;
|
|
186
|
+
return (_jsxs("div", { className: `${PAGE} b-main-${side}`, style: codeFitStyle(placed), children: [heading && _jsx(SlideHeading, { block: heading, description: slide.description }), _jsx("div", { className: "grid min-h-0 flex-1 gap-8", style: { gridTemplateColumns: columns }, children: side === "left" ? (_jsxs(_Fragment, { children: [mainView, others.length > 0 && stackView] })) : (_jsxs(_Fragment, { children: [others.length > 0 && stackView, mainView] })) }), _jsx(Notes, { items: slide.items })] }));
|
|
187
|
+
}
|
|
188
|
+
export const MainLeftSlide = (slide) => _jsx(MainSideSlide, { slide: slide, side: "left" });
|
|
189
|
+
export const MainRightSlide = (slide) => _jsx(MainSideSlide, { slide: slide, side: "right" });
|
|
131
190
|
//# sourceMappingURL=panes.js.map
|
package/dist/panes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panes.js","sourceRoot":"","sources":["../src/panes.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAkC,MAAM,oBAAoB,CAAC;AAE3F,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;;;GAMG;AAEH,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,MAAM,OAAO,GAAG,GAAG,CAAC;AACpB,MAAM,KAAK,GAAG,EAAE,CAAC;AACjB,MAAM,KAAK,GAAG,EAAE,CAAC;AACjB,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;AAC1B,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,GAAG,GAAG,EAAE,CAAC;AAEf,mCAAmC;AACnC,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAIrD,SAAS,WAAW,CAAC,CAAY;IAC/B,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,C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EAC9B,QAAQ,IACR,CACJ,GACG,EACN,KAAC,KAAK,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAI,IACzB,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAC,MAAM,GAAG,CAAC;AAC/F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAC,OAAO,GAAG,CAAC"}
|
package/dist/styles.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export declare const DEFAULT_THEME = "\n@theme {\n --color-primary: #2a5bd7;\n
|
|
|
8
8
|
* utility を付けられない要素(RichText が生成する markdown 由来の p / ul / code など)のための最小 CSS。
|
|
9
9
|
* Layout 自体の見た目は layouts.tsx の className で持つ。
|
|
10
10
|
*/
|
|
11
|
-
export declare const BASIC_CSS = "\n@layer components {\n .yd-slide { font-family: var(--font-sans); color: var(--color-ink); font-size: var(--text-body); line-height: 1.5; }\n .b-body p { margin: 0 0 .6em; }\n .b-body p:last-child { margin-bottom: 0; }\n .b-body ul { list-style: disc; padding-left: 1.2em; }\n .b-body ol { list-style: decimal; padding-left: 1.2em; }\n .b-body li::marker { color: var(--color-accent); }\n /* \u672C\u6587\u4E2D\u306E\u30B3\u30FC\u30C9\u3002\u5408\u5B57(-> \u304C \u2192 \u306B\u306A\u308B\u7B49)\u306F\u539F\u6587\u3068\u9055\u3063\u3066\u898B\u3048\u308B\u306E\u3067\u5207\u308B */\n .yd-slide :not(pre) > code { font-family: var(--font-mono); font-size: .9em; font-variant-ligatures: none; background: color-mix(in srgb, var(--color-ink) 8%, transparent); padding: 0 .3em; border-radius: 4px; }\n .b-body a { color: var(--color-primary); text-decoration: underline; }\n\n /* code: pane \u306E\u5BF8\u6CD5(--pane-w / --pane-h)\u3068\u884C\u6570\u30FB\u6700\u5927\u884C\u9577\u304B\u3089\u3001\u53CE\u307E\u308B\u6700\u5927\u306E\u30D5\u30A9\u30F3\u30C8\u30B5\u30A4\u30BA\u3092\u9078\u3076 */\n .yd-slide { --pane-w: 1120px; --pane-h: 500px; }\n .b-code {\n font-size: max(14px, min(\n var(--text-body),\n calc((var(--pane-w) - 48px) / var(--code-cols, 40) / 0.62),\n calc((var(--pane-h) - var(--code-chrome, 40px)) / var(--code-rows, 10) / 1.375),\n var(--code-fit, 9999px)\n ));\n /* \u4E0B\u9650\u307E\u3067\u7E2E\u3081\u3066\u3082\u5165\u3089\u306A\u3044\u9577\u3044\u884C\u306F\u6298\u308A\u8FD4\u3059\u3002\u306F\u307F\u51FA\u3057\u3066\u8AAD\u3081\u306A\u3044\u3088\u308A\u3088\u3044 */\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n font-variant-ligatures: none;\n }\n .b-code .hljs { color: var(--color-code-ink); }\n .hljs-comment, .hljs-quote { color: #8b949e; font-style: italic; }\n .hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type, .hljs-built_in, .hljs-doctag, .hljs-meta { color: #ff7b72; }\n .hljs-string, .hljs-regexp, .hljs-addition, .hljs-attr, .hljs-meta .hljs-string { color: #a5d6ff; }\n .hljs-number, .hljs-symbol, .hljs-bullet, .hljs-link, .hljs-variable, .hljs-template-variable { color: #79c0ff; }\n .hljs-title, .hljs-section, .hljs-name, .hljs-selector-id, .hljs-selector-class, .hljs-function .hljs-title { color: #d2a8ff; }\n .hljs-attribute, .hljs-params, .hljs-property { color: #ffa657; }\n .hljs-emphasis { font-style: italic; }\n .hljs-strong { font-weight: bold; }\n .hljs-deletion { color: #ffa198; }\n\n /* ---- flow(\u624B\u9806)\u3002https://www.ameamelog.com/css-flow/ \u306E 5 \u30D1\u30BF\u30FC\u30F3\u3092\u79FB\u690D\u3002\u5BF8\u6CD5\u306F\u30B9\u30E9\u30A4\u30C9\u5411\u3051\u306B 1.5 \u500D ---- */\n .b-flow { --flow-grad: linear-gradient(to right, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 55%, white) 100%); margin: auto 0; padding: 0; list-style: none; width: 100%; }\n .b-flow > li { list-style: none; }\n .b-flow dl, .b-flow dd { margin: 0; }\n .b-flow dt { font-size: var(--text-h4); font-weight: 700; color: var(--color-primary); line-height: 1.3; }\n .b-flow dd { font-size: var(--text-small); color: color-mix(in srgb, var(--color-ink) 80%, transparent); line-height: 1.45; }\n .b-flow .phase { display: inline-block; margin-left: .6em; padding: .1em .7em; border-radius: 999px; background: color-mix(in srgb, var(--color-primary) 10%, transparent); font-size: var(--text-small); font-weight: 700; color: var(--color-primary); vertical-align: middle; }\n .b-flow .via { font-family: var(--font-mono); font-size: var(--text-small); font-weight: 700; color: var(--color-primary); white-space: nowrap; }\n .b-flow .icon { font-size: 18px; font-weight: 700; color: #fff; background: var(--flow-grad); }\n .b-flow.has-focus > li:not(.is-focus) { opacity: .35; }\n .b-flow > li.is-focus .icon { background: var(--color-accent); color: var(--color-ink); }\n .b-flow > li.is-focus dt { color: var(--color-ink); }\n\n /* 1 \u30AB\u30E9\u30E0\u69CB\u6210: \u5DE6\u306B STEP \u30D4\u30EB\u3001\u7E26\u30EC\u30FC\u30EB\u3001\u70B9\u3068\u70B9\u7DDA\u3001\u53F3\u306B\u898B\u51FA\u3057\u3068\u8AAC\u660E */\n .b-flow-rail { padding-left: 180px; position: relative; }\n .b-flow-rail::before { content: \"\"; width: 22px; height: 100%; background: color-mix(in srgb, var(--color-ink) 7%, transparent); margin-left: -11px; display: block; position: absolute; top: 0; left: 180px; }\n .b-flow-rail > li { position: relative; }\n .b-flow-rail > li:not(:last-child) { margin-bottom: 60px; }\n .b-flow-rail > li .icon { padding: 10px 28px; display: block; position: absolute; top: 0; left: -180px; z-index: 2; }\n .b-flow-rail > li .icon::after { content: \"\"; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent color-mix(in srgb, var(--color-primary) 55%, white); position: absolute; top: 50%; left: 100%; transform: translateY(-50%); }\n .b-flow-rail > li.is-focus .icon::after { border-left-color: var(--color-accent); }\n .b-flow-rail > li .via { position: absolute; top: -30px; left: 28px; transform: translateY(-50%); }\n .b-flow-rail > li dl { padding-left: 100px; position: relative; }\n .b-flow-rail > li dl::before, .b-flow-rail > li dl::after { content: \"\"; display: block; position: absolute; top: 24px; }\n .b-flow-rail > li dl::before { width: 11px; height: 11px; margin-top: -5px; background: var(--color-primary); border-radius: 50%; left: -6px; z-index: 1; }\n .b-flow-rail > li.is-focus dl::before { background: var(--color-accent); }\n .b-flow-rail > li dl::after { width: 72px; border-bottom: 2px dashed color-mix(in srgb, var(--color-ink) 40%, transparent); left: 8px; }\n .b-flow-rail > li dl dt { margin-bottom: 6px; }\n\n /* \u30DD\u30C3\u30D7: \u5439\u304D\u51FA\u3057\u306E\u756A\u53F7 + \u67A0\u30AB\u30FC\u30C9\u3092\u6A2A\u306B\u4E26\u3079\u3001\u9593\u306B \u203A */\n .b-flow-pop { --flow-gap: 56px; display: flex; justify-content: space-between; gap: var(--flow-gap); }\n .b-flow-pop > li { flex: 1 1 0; min-width: 0; position: relative; }\n .b-flow-pop > li .icon { font-family: var(--font-mono); font-size: 26px; line-height: 72px; width: 72px; background: var(--color-primary); margin: 0 auto 28px; display: block; border-radius: 50%; text-align: center; position: relative; letter-spacing: 2px; }\n .b-flow-pop > li .icon::before { content: \"\"; border: solid transparent; border-width: 12px; border-top-color: var(--color-primary); position: absolute; top: calc(100% - 3px); left: 50%; transform: translateX(-50%); }\n .b-flow-pop > li.is-focus .icon::before { border-top-color: var(--color-accent); }\n .b-flow-pop > li .via { position: absolute; top: 24px; right: calc(100% + var(--flow-gap) / 2 + 4px); transform: translateX(50%); }\n .b-flow-pop > li dl { padding: 32px 10px; word-break: auto-phrase; text-wrap: balance; border: 4px solid var(--color-primary); position: relative; text-align: center; height: calc(100% - 100px); }\n .b-flow-pop > li.is-focus dl { border-color: var(--color-accent); }\n /* \u7BB1\u306E\u9593\u306E \u203A\u3002\u9699\u9593(--flow-gap)\u306E\u4E2D\u592E\u306B\u7F6E\u304D\u3001\u67A0\u7DDA\u306B\u91CD\u306D\u306A\u3044 */\n .b-flow-pop > li:not(:last-child) dl::before { content: \"\"; width: 36px; height: 36px; display: block; border-top: 8px solid var(--color-primary); border-right: 8px solid var(--color-primary); position: absolute; top: 50%; left: calc(100% + var(--flow-gap) / 2 - 8px); transform: translate(-50%, -50%) rotate(45deg); }\n .b-flow-pop > li dl dt { margin-bottom: 10px; word-break: keep-all; }\n .b-flow-pop > li dl dt .phase { display: block; margin: 8px auto 0; padding: .15em .6em; font-size: 18px; width: fit-content; max-width: 100%; box-sizing: border-box; white-space: nowrap; }\n\n /* \u67A0\u7DDA\u3092\u4F7F\u3063\u305F\u30C7\u30B6\u30A4\u30F3: \u89D2\u4E38\u306E\u67A0\u3092\u7E26\u306B\u7A4D\u307F\u3001\u70B9\u7DDA\u3068 \u25BD \u3067\u3064\u306A\u3050 */\n .b-flow-boxed > li { position: relative; }\n .b-flow-boxed > li:not(:last-child) { margin-bottom: 40px; }\n .b-flow-boxed > li:not(:first-child)::before { content: \"\"; height: 60px; display: block; border-left: 5px dotted color-mix(in srgb, var(--color-ink) 15%, transparent); position: absolute; top: -40px; left: calc(12% + 40px); z-index: 1; }\n .b-flow-boxed > li .via { position: absolute; top: -20px; left: calc(12% + 72px); transform: translateY(-50%); }\n .b-flow-boxed > li dl { width: 100%; padding: 8px 36px; display: flex; align-items: center; border: 3px solid var(--color-primary); border-radius: 14px; position: relative; background: var(--color-surface); }\n .b-flow-boxed > li.is-focus dl { border-color: var(--color-accent); }\n .b-flow-boxed > li:not(:last-child) dl::before, .b-flow-boxed > li:not(:last-child) dl::after { content: \"\"; border: solid transparent; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); }\n .b-flow-boxed > li:not(:last-child) dl::before { border-width: 26px; border-top-color: var(--color-primary); }\n .b-flow-boxed > li.is-focus:not(:last-child) dl::before { border-top-color: var(--color-accent); }\n .b-flow-boxed > li:not(:last-child) dl::after { border-width: 23px; border-top-color: var(--color-surface); }\n .b-flow-boxed > li dl dt { flex: 0 0 24%; margin-right: 2vw; text-align: center; }\n .b-flow-boxed > li dl dt .icon { padding: 4px 14px; margin: 0 auto 6px; display: block; border-radius: 999px; width: fit-content; position: relative; z-index: 2; }\n .b-flow-boxed > li dl dd { flex: 1; }\n .b-flow-boxed > li dl dd .phase { display: block; width: fit-content; margin: 0 0 4px; }\n\n /* \u30B9\u30BF\u30A4\u30EA\u30C3\u30B7\u30E5: \u5168\u4F53\u3092 1 \u3064\u306E\u67A0\u3067\u56F2\u307F\u3001\u533A\u5207\u308A\u7DDA\u306B \u25BD */\n .b-flow-framed { border: 4px solid var(--color-primary); }\n .b-flow-framed > li { padding: 12px 36px; position: relative; }\n .b-flow-framed > li:not(:last-child) { border-bottom: 4px solid var(--color-primary); }\n .b-flow-framed > li:not(:last-child)::before, .b-flow-framed > li:not(:last-child)::after { content: \"\"; border: solid transparent; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 1; }\n .b-flow-framed > li:not(:last-child)::before { border-width: 26px; border-top-color: var(--color-primary); }\n .b-flow-framed > li:not(:last-child)::after { border-width: 21px; border-top-color: var(--color-surface); }\n .b-flow-framed > li .via { position: absolute; top: 0; left: calc(50% + 44px); transform: translateY(-50%); background: var(--color-surface); padding: 0 10px; z-index: 2; }\n .b-flow-framed > li dl { display: flex; align-items: center; }\n .b-flow-framed > li dl dt { flex: 0 0 24%; margin-right: 1vw; text-align: center; }\n .b-flow-framed > li dl dt .icon { padding: 4px 14px; margin: 0 auto 6px; display: block; border-radius: 999px; width: fit-content; }\n .b-flow-framed > li dl dd { flex: 1; }\n .b-flow-framed > li dl dd .phase { display: block; width: fit-content; margin: 0 0 4px; }\n\n /* 2 \u30AB\u30E9\u30E0\u69CB\u6210: \u53F3\u7AEF\u304C\u77E2\u5370\u306E\u67A0\u3092 2 \u5217\u306B */\n .b-flow-grid { display: flex; flex-wrap: wrap; gap: 48px 4%; }\n .b-flow-grid > li { padding: 28px 44px 24px 36px; flex: 0 0 48%; border: 3px solid var(--color-primary); position: relative; background: var(--color-surface); }\n .b-flow-grid > li.is-focus { border-color: var(--color-accent); }\n .b-flow-grid > li:not(:last-child)::before, .b-flow-grid > li:not(:last-child)::after { content: \"\"; border: solid transparent; position: absolute; top: 50%; left: 100%; transform: translateY(-50%); }\n .b-flow-grid > li:not(:last-child)::before { border-width: 30px; border-left-color: var(--color-primary); }\n .b-flow-grid > li.is-focus:not(:last-child)::before { border-left-color: var(--color-accent); }\n .b-flow-grid > li:not(:last-child)::after { border-width: 27px; border-left-color: var(--color-surface); }\n .b-flow-grid > li .icon { padding: 7px 28px; display: block; border-radius: 999px; position: absolute; top: -18px; left: -14px; z-index: 2; }\n .b-flow-grid > li .via { display: none; }\n .b-flow-grid > li dl dt { margin-bottom: 6px; }\n}\n";
|
|
11
|
+
export declare const BASIC_CSS = "\n@layer components {\n .yd-slide { font-family: var(--font-sans); color: var(--color-ink); font-size: var(--text-body); line-height: 1.5; }\n .b-body p { margin: 0 0 .6em; }\n .b-body p:last-child { margin-bottom: 0; }\n .b-body ul { list-style: disc; padding-left: 1.2em; }\n .b-body ol { list-style: decimal; padding-left: 1.2em; }\n .b-body li::marker { color: var(--color-accent); }\n /* \u672C\u6587\u4E2D\u306E\u30B3\u30FC\u30C9\u3002\u5408\u5B57(-> \u304C \u2192 \u306B\u306A\u308B\u7B49)\u306F\u539F\u6587\u3068\u9055\u3063\u3066\u898B\u3048\u308B\u306E\u3067\u5207\u308B */\n .yd-slide :not(pre) > code { font-family: var(--font-mono); font-size: .9em; font-variant-ligatures: none; background: color-mix(in srgb, var(--color-ink) 8%, transparent); padding: 0 .3em; border-radius: 4px; }\n .b-body a { color: var(--color-primary); text-decoration: underline; }\n\n /* code: pane \u306E\u5BF8\u6CD5(--pane-w / --pane-h)\u3068\u884C\u6570\u30FB\u6700\u5927\u884C\u9577\u304B\u3089\u3001\u53CE\u307E\u308B\u6700\u5927\u306E\u30D5\u30A9\u30F3\u30C8\u30B5\u30A4\u30BA\u3092\u9078\u3076 */\n .yd-slide { --pane-w: 1120px; --pane-h: 500px; }\n .b-code {\n font-size: max(14px, min(\n var(--text-body),\n calc((var(--pane-w) - 48px) / var(--code-cols, 40) / 0.62),\n calc((var(--pane-h) - var(--code-chrome, 40px)) / var(--code-rows, 10) / 1.375),\n var(--code-fit, 9999px)\n ));\n /* \u4E0B\u9650\u307E\u3067\u7E2E\u3081\u3066\u3082\u5165\u3089\u306A\u3044\u9577\u3044\u884C\u306F\u6298\u308A\u8FD4\u3059\u3002\u306F\u307F\u51FA\u3057\u3066\u8AAD\u3081\u306A\u3044\u3088\u308A\u3088\u3044 */\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n font-variant-ligatures: none;\n }\n .b-code .hljs { color: var(--color-code-ink); }\n .hljs-comment, .hljs-quote { color: #8b949e; font-style: italic; }\n .hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type, .hljs-built_in, .hljs-doctag, .hljs-meta { color: #ff7b72; }\n .hljs-string, .hljs-regexp, .hljs-addition, .hljs-attr, .hljs-meta .hljs-string { color: #a5d6ff; }\n .hljs-number, .hljs-symbol, .hljs-bullet, .hljs-link, .hljs-variable, .hljs-template-variable { color: #79c0ff; }\n .hljs-title, .hljs-section, .hljs-name, .hljs-selector-id, .hljs-selector-class, .hljs-function .hljs-title { color: #d2a8ff; }\n .hljs-attribute, .hljs-params, .hljs-property { color: #ffa657; }\n .hljs-emphasis { font-style: italic; }\n .hljs-strong { font-weight: bold; }\n .hljs-deletion { color: #ffa198; }\n\n /* ---- flow(\u624B\u9806)\u3002https://www.ameamelog.com/css-flow/ \u306E 5 \u30D1\u30BF\u30FC\u30F3\u3092\u79FB\u690D\u3002\u5BF8\u6CD5\u306F\u30B9\u30E9\u30A4\u30C9\u5411\u3051\u306B 1.5 \u500D ---- */\n .b-flow { --flow-grad: linear-gradient(to right, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 55%, white) 100%); margin: auto 0; padding: 0; list-style: none; width: 100%; }\n .b-flow > li { list-style: none; }\n .b-flow dl, .b-flow dd { margin: 0; }\n .b-flow dt { font-size: var(--text-h4); font-weight: 700; color: var(--color-primary); line-height: 1.3; }\n .b-flow dd { font-size: var(--text-small); color: color-mix(in srgb, var(--color-ink) 80%, transparent); line-height: 1.45; }\n .b-flow .phase { display: inline-block; margin-left: .6em; padding: .1em .7em; border-radius: 999px; background: color-mix(in srgb, var(--color-primary) 10%, transparent); font-size: var(--text-small); font-weight: 700; color: var(--color-primary); vertical-align: middle; }\n .b-flow .via { font-family: var(--font-mono); font-size: var(--text-small); font-weight: 700; color: var(--color-primary); white-space: nowrap; }\n .b-flow .icon { font-size: 18px; font-weight: 700; color: #fff; background: var(--flow-grad); }\n .b-flow.has-focus > li:not(.is-focus) { opacity: .35; }\n .b-flow > li.is-focus .icon { background: var(--color-accent); color: var(--color-ink); }\n .b-flow > li.is-focus dt { color: var(--color-ink); }\n\n /* 1 \u30AB\u30E9\u30E0\u69CB\u6210: \u5DE6\u306B STEP \u30D4\u30EB\u3001\u7E26\u30EC\u30FC\u30EB\u3001\u70B9\u3068\u70B9\u7DDA\u3001\u53F3\u306B\u898B\u51FA\u3057\u3068\u8AAC\u660E */\n .b-flow-rail { padding-left: 180px; position: relative; }\n .b-flow-rail::before { content: \"\"; width: 22px; height: 100%; background: color-mix(in srgb, var(--color-ink) 7%, transparent); margin-left: -11px; display: block; position: absolute; top: 0; left: 180px; }\n .b-flow-rail > li { position: relative; }\n .b-flow-rail > li:not(:last-child) { margin-bottom: 60px; }\n .b-flow-rail > li .icon { padding: 10px 28px; display: block; position: absolute; top: 0; left: -180px; z-index: 2; }\n .b-flow-rail > li .icon::after { content: \"\"; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent color-mix(in srgb, var(--color-primary) 55%, white); position: absolute; top: 50%; left: 100%; transform: translateY(-50%); }\n .b-flow-rail > li.is-focus .icon::after { border-left-color: var(--color-accent); }\n .b-flow-rail > li .via { position: absolute; top: -30px; left: 28px; transform: translateY(-50%); }\n .b-flow-rail > li dl { padding-left: 100px; position: relative; }\n .b-flow-rail > li dl::before, .b-flow-rail > li dl::after { content: \"\"; display: block; position: absolute; top: 24px; }\n .b-flow-rail > li dl::before { width: 11px; height: 11px; margin-top: -5px; background: var(--color-primary); border-radius: 50%; left: -6px; z-index: 1; }\n .b-flow-rail > li.is-focus dl::before { background: var(--color-accent); }\n .b-flow-rail > li dl::after { width: 72px; border-bottom: 2px dashed color-mix(in srgb, var(--color-ink) 40%, transparent); left: 8px; }\n .b-flow-rail > li dl dt { margin-bottom: 6px; }\n\n /* \u30DD\u30C3\u30D7: \u5439\u304D\u51FA\u3057\u306E\u756A\u53F7 + \u67A0\u30AB\u30FC\u30C9\u3092\u6A2A\u306B\u4E26\u3079\u3001\u9593\u306B \u203A */\n .b-flow-pop { --flow-gap: 56px; display: flex; justify-content: space-between; gap: var(--flow-gap); }\n .b-flow-pop > li { flex: 1 1 0; min-width: 0; position: relative; }\n .b-flow-pop > li .icon { font-family: var(--font-mono); font-size: 26px; line-height: 72px; width: 72px; background: var(--color-primary); margin: 0 auto 28px; display: block; border-radius: 50%; text-align: center; position: relative; letter-spacing: 2px; }\n .b-flow-pop > li .icon::before { content: \"\"; border: solid transparent; border-width: 12px; border-top-color: var(--color-primary); position: absolute; top: calc(100% - 3px); left: 50%; transform: translateX(-50%); }\n .b-flow-pop > li.is-focus .icon::before { border-top-color: var(--color-accent); }\n /* \u6BB5\u306E\u9593\u306E\u30E9\u30D9\u30EB\u306F\u3001\u756A\u53F7\u3069\u3046\u3057\u3092\u7D50\u3076\u70B9\u7DDA\u306E\u4E0A\u306B\u7F6E\u304F(\u756A\u53F7\u306E\u9593\u306F\u7BB1\u306E\u9593\u3088\u308A\u5E83\u304F\u3001\u9577\u3044\u30E9\u30D9\u30EB\u3082\u53CE\u307E\u308B)\u3002\n \u30E9\u30D9\u30EB\u304C 1 \u3064\u3067\u3082\u3042\u308C\u3070\u3001\u30E9\u30D9\u30EB\u306E\u7121\u3044\u6BB5\u306E\u9593\u306B\u3082\u70B9\u7DDA\u3092\u5F15\u3044\u3066\u305D\u308D\u3048\u308B */\n .b-flow-pop:has(> li > .via) > li:not(:first-child)::before { content: \"\"; position: absolute; top: 35px; right: calc(50% + 44px); width: calc(100% + var(--flow-gap) - 88px); border-top: 2px dashed color-mix(in srgb, var(--color-primary) 45%, transparent); }\n .b-flow-pop > li .via { position: absolute; top: 36px; right: calc(100% + var(--flow-gap) / 2); transform: translate(50%, -50%); background: var(--color-surface); padding: 0 10px; }\n .b-flow-pop > li dl { padding: 32px 10px; word-break: auto-phrase; text-wrap: balance; border: 4px solid var(--color-primary); position: relative; text-align: center; height: calc(100% - 100px); }\n .b-flow-pop > li.is-focus dl { border-color: var(--color-accent); }\n /* \u7BB1\u306E\u9593\u306E \u203A\u3002\u9699\u9593(--flow-gap)\u306E\u4E2D\u592E\u306B\u7F6E\u304D\u3001\u67A0\u7DDA\u306B\u91CD\u306D\u306A\u3044 */\n .b-flow-pop > li:not(:last-child) dl::before { content: \"\"; width: 36px; height: 36px; display: block; border-top: 8px solid var(--color-primary); border-right: 8px solid var(--color-primary); position: absolute; top: 50%; left: calc(100% + var(--flow-gap) / 2 - 8px); transform: translate(-50%, -50%) rotate(45deg); }\n .b-flow-pop > li dl dt { margin-bottom: 10px; word-break: keep-all; display: flex; flex-direction: column; align-items: center; }\n /* \u6BB5\u968E\u306E\u30D4\u30EB\u306F\u898B\u51FA\u3057\u306E\u4E0A\u306B\u7F6E\u304D\u3001\u898B\u51FA\u3057\u306E\u6298\u308A\u8FD4\u3057\u306B\u95A2\u4FC2\u306A\u304F\u7BB1\u306E\u4E0A\u7AEF\u306B\u305D\u308D\u3048\u308B */\n .b-flow-pop > li dt .phase { order: -1; margin: 0 0 12px; }\n .b-flow-pop > li dl dt .phase { display: block; margin: 8px auto 0; padding: .15em .6em; font-size: 18px; width: fit-content; max-width: 100%; box-sizing: border-box; white-space: nowrap; }\n\n /* \u67A0\u7DDA\u3092\u4F7F\u3063\u305F\u30C7\u30B6\u30A4\u30F3: \u89D2\u4E38\u306E\u67A0\u3092\u7E26\u306B\u7A4D\u307F\u3001\u70B9\u7DDA\u3068 \u25BD \u3067\u3064\u306A\u3050 */\n .b-flow-boxed > li { position: relative; }\n .b-flow-boxed > li:not(:last-child) { margin-bottom: 40px; }\n .b-flow-boxed > li:not(:first-child)::before { content: \"\"; height: 60px; display: block; border-left: 5px dotted color-mix(in srgb, var(--color-ink) 15%, transparent); position: absolute; top: -40px; left: calc(12% + 40px); z-index: 1; }\n .b-flow-boxed > li .via { position: absolute; top: -20px; left: calc(12% + 72px); transform: translateY(-50%); }\n .b-flow-boxed > li dl { width: 100%; padding: 8px 36px; display: flex; align-items: center; border: 3px solid var(--color-primary); border-radius: 14px; position: relative; background: var(--color-surface); }\n .b-flow-boxed > li.is-focus dl { border-color: var(--color-accent); }\n .b-flow-boxed > li:not(:last-child) dl::before, .b-flow-boxed > li:not(:last-child) dl::after { content: \"\"; border: solid transparent; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); }\n .b-flow-boxed > li:not(:last-child) dl::before { border-width: 26px; border-top-color: var(--color-primary); }\n .b-flow-boxed > li.is-focus:not(:last-child) dl::before { border-top-color: var(--color-accent); }\n .b-flow-boxed > li:not(:last-child) dl::after { border-width: 23px; border-top-color: var(--color-surface); }\n .b-flow-boxed > li dl dt { flex: 0 0 24%; margin-right: 2vw; text-align: center; }\n .b-flow-boxed > li dl dt .icon { padding: 4px 14px; margin: 0 auto 6px; display: block; border-radius: 999px; width: fit-content; position: relative; z-index: 2; }\n .b-flow-boxed > li dl dd { flex: 1; }\n .b-flow-boxed > li dl dd .phase { display: block; width: fit-content; margin: 0 0 4px; }\n\n /* \u30B9\u30BF\u30A4\u30EA\u30C3\u30B7\u30E5: \u5168\u4F53\u3092 1 \u3064\u306E\u67A0\u3067\u56F2\u307F\u3001\u533A\u5207\u308A\u7DDA\u306B \u25BD */\n .b-flow-framed { border: 4px solid var(--color-primary); }\n .b-flow-framed > li { padding: 12px 36px; position: relative; }\n .b-flow-framed > li:not(:last-child) { border-bottom: 4px solid var(--color-primary); }\n .b-flow-framed > li:not(:last-child)::before, .b-flow-framed > li:not(:last-child)::after { content: \"\"; border: solid transparent; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 1; }\n .b-flow-framed > li:not(:last-child)::before { border-width: 26px; border-top-color: var(--color-primary); }\n .b-flow-framed > li:not(:last-child)::after { border-width: 21px; border-top-color: var(--color-surface); }\n .b-flow-framed > li .via { position: absolute; top: 0; left: calc(50% + 44px); transform: translateY(-50%); background: var(--color-surface); padding: 0 10px; z-index: 2; }\n .b-flow-framed > li dl { display: flex; align-items: center; }\n .b-flow-framed > li dl dt { flex: 0 0 24%; margin-right: 1vw; text-align: center; }\n .b-flow-framed > li dl dt .icon { padding: 4px 14px; margin: 0 auto 6px; display: block; border-radius: 999px; width: fit-content; }\n .b-flow-framed > li dl dd { flex: 1; }\n .b-flow-framed > li dl dd .phase { display: block; width: fit-content; margin: 0 0 4px; }\n\n /* 2 \u30AB\u30E9\u30E0\u69CB\u6210: \u53F3\u7AEF\u304C\u77E2\u5370\u306E\u67A0\u3092 2 \u5217\u306B */\n .b-flow-grid { display: flex; flex-wrap: wrap; gap: 48px 4%; }\n .b-flow-grid > li { padding: 28px 44px 24px 36px; flex: 0 0 48%; border: 3px solid var(--color-primary); position: relative; background: var(--color-surface); }\n .b-flow-grid > li.is-focus { border-color: var(--color-accent); }\n .b-flow-grid > li:not(:last-child)::before, .b-flow-grid > li:not(:last-child)::after { content: \"\"; border: solid transparent; position: absolute; top: 50%; left: 100%; transform: translateY(-50%); }\n .b-flow-grid > li:not(:last-child)::before { border-width: 30px; border-left-color: var(--color-primary); }\n .b-flow-grid > li.is-focus:not(:last-child)::before { border-left-color: var(--color-accent); }\n .b-flow-grid > li:not(:last-child)::after { border-width: 27px; border-left-color: var(--color-surface); }\n .b-flow-grid > li .icon { padding: 7px 28px; display: block; border-radius: 999px; position: absolute; top: -18px; left: -14px; z-index: 2; }\n .b-flow-grid > li .via { display: none; }\n .b-flow-grid > li dl dt { margin-bottom: 6px; }\n}\n\n/* \u30DA\u30FC\u30B8\u756A\u53F7\u3068\u51FA\u5178\u3002core \u306E\u65E2\u5B9A(\u30EC\u30A4\u30E4\u30FC\u5916)\u3092\u4E0A\u66F8\u304D\u3059\u308B\u306E\u3067\u3001\u3053\u3053\u3082\u30EC\u30A4\u30E4\u30FC\u306E\u5916\u306B\u66F8\u304F\u3002\n \u30DA\u30FC\u30B8\u756A\u53F7\u306F\u8868\u7D19\u306B\u306F\u51FA\u3055\u306A\u3044\u3002\u5730\u306E\u6FC3\u3044\u7AE0\u6249\u3067\u306F\u3001\u3069\u3061\u3089\u3082\u767D\u3092\u8584\u304F\u3057\u3066\u8F09\u305B\u308B */\n.yd-page-number { font-family: var(--font-sans); font-size: 18px; color: var(--color-faint); }\n.yd-sources { font-family: var(--font-sans); color: var(--color-faint); padding-left: 3.2em; }\n.yd-sources::before { content: \"\u51FA\u5178\"; position: absolute; left: 0; top: 0; }\n.yd-slide:has(> .b-section) > .yd-sources { color: color-mix(in srgb, var(--color-surface) 55%, transparent); }\n.yd-slide:has(> .b-header) > .yd-page-number { display: none; }\n.yd-slide:has(> .b-section) > .yd-page-number { color: color-mix(in srgb, var(--color-surface) 55%, transparent); }\n";
|
|
12
12
|
//# sourceMappingURL=styles.d.ts.map
|
package/dist/styles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,aAAa,mlBAuBzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,aAAa,mlBAuBzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,grcAwIrB,CAAC"}
|
package/dist/styles.js
CHANGED
|
@@ -103,12 +103,17 @@ export const BASIC_CSS = `
|
|
|
103
103
|
.b-flow-pop > li .icon { font-family: var(--font-mono); font-size: 26px; line-height: 72px; width: 72px; background: var(--color-primary); margin: 0 auto 28px; display: block; border-radius: 50%; text-align: center; position: relative; letter-spacing: 2px; }
|
|
104
104
|
.b-flow-pop > li .icon::before { content: ""; border: solid transparent; border-width: 12px; border-top-color: var(--color-primary); position: absolute; top: calc(100% - 3px); left: 50%; transform: translateX(-50%); }
|
|
105
105
|
.b-flow-pop > li.is-focus .icon::before { border-top-color: var(--color-accent); }
|
|
106
|
-
|
|
106
|
+
/* 段の間のラベルは、番号どうしを結ぶ点線の上に置く(番号の間は箱の間より広く、長いラベルも収まる)。
|
|
107
|
+
ラベルが 1 つでもあれば、ラベルの無い段の間にも点線を引いてそろえる */
|
|
108
|
+
.b-flow-pop:has(> li > .via) > li:not(:first-child)::before { content: ""; position: absolute; top: 35px; right: calc(50% + 44px); width: calc(100% + var(--flow-gap) - 88px); border-top: 2px dashed color-mix(in srgb, var(--color-primary) 45%, transparent); }
|
|
109
|
+
.b-flow-pop > li .via { position: absolute; top: 36px; right: calc(100% + var(--flow-gap) / 2); transform: translate(50%, -50%); background: var(--color-surface); padding: 0 10px; }
|
|
107
110
|
.b-flow-pop > li dl { padding: 32px 10px; word-break: auto-phrase; text-wrap: balance; border: 4px solid var(--color-primary); position: relative; text-align: center; height: calc(100% - 100px); }
|
|
108
111
|
.b-flow-pop > li.is-focus dl { border-color: var(--color-accent); }
|
|
109
112
|
/* 箱の間の ›。隙間(--flow-gap)の中央に置き、枠線に重ねない */
|
|
110
113
|
.b-flow-pop > li:not(:last-child) dl::before { content: ""; width: 36px; height: 36px; display: block; border-top: 8px solid var(--color-primary); border-right: 8px solid var(--color-primary); position: absolute; top: 50%; left: calc(100% + var(--flow-gap) / 2 - 8px); transform: translate(-50%, -50%) rotate(45deg); }
|
|
111
|
-
.b-flow-pop > li dl dt { margin-bottom: 10px; word-break: keep-all; }
|
|
114
|
+
.b-flow-pop > li dl dt { margin-bottom: 10px; word-break: keep-all; display: flex; flex-direction: column; align-items: center; }
|
|
115
|
+
/* 段階のピルは見出しの上に置き、見出しの折り返しに関係なく箱の上端にそろえる */
|
|
116
|
+
.b-flow-pop > li dt .phase { order: -1; margin: 0 0 12px; }
|
|
112
117
|
.b-flow-pop > li dl dt .phase { display: block; margin: 8px auto 0; padding: .15em .6em; font-size: 18px; width: fit-content; max-width: 100%; box-sizing: border-box; white-space: nowrap; }
|
|
113
118
|
|
|
114
119
|
/* 枠線を使ったデザイン: 角丸の枠を縦に積み、点線と ▽ でつなぐ */
|
|
@@ -153,5 +158,14 @@ export const BASIC_CSS = `
|
|
|
153
158
|
.b-flow-grid > li .via { display: none; }
|
|
154
159
|
.b-flow-grid > li dl dt { margin-bottom: 6px; }
|
|
155
160
|
}
|
|
161
|
+
|
|
162
|
+
/* ページ番号と出典。core の既定(レイヤー外)を上書きするので、ここもレイヤーの外に書く。
|
|
163
|
+
ページ番号は表紙には出さない。地の濃い章扉では、どちらも白を薄くして載せる */
|
|
164
|
+
.yd-page-number { font-family: var(--font-sans); font-size: 18px; color: var(--color-faint); }
|
|
165
|
+
.yd-sources { font-family: var(--font-sans); color: var(--color-faint); padding-left: 3.2em; }
|
|
166
|
+
.yd-sources::before { content: "出典"; position: absolute; left: 0; top: 0; }
|
|
167
|
+
.yd-slide:has(> .b-section) > .yd-sources { color: color-mix(in srgb, var(--color-surface) 55%, transparent); }
|
|
168
|
+
.yd-slide:has(> .b-header) > .yd-page-number { display: none; }
|
|
169
|
+
.yd-slide:has(> .b-section) > .yd-page-number { color: color-mix(in srgb, var(--color-surface) 55%, transparent); }
|
|
156
170
|
`;
|
|
157
171
|
//# sourceMappingURL=styles.js.map
|
package/dist/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuB5B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuB5B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwIxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yadeck/slide-components-basic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "YADECK: standard layouts (title, section, auto pane layout, two-column, cards, columns, code, image, video, flow diagrams, notes)",
|
|
5
5
|
"homepage": "https://onfi.github.io/yadeck/",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"build": "tsc -b"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@yadeck/slide-core": "^0.1.
|
|
35
|
-
"@yadeck/slide-schema": "^0.1.
|
|
34
|
+
"@yadeck/slide-core": "^0.1.2",
|
|
35
|
+
"@yadeck/slide-schema": "^0.1.2",
|
|
36
36
|
"highlight.js": "^11.12.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
videoType,
|
|
31
31
|
} from "./layouts.js";
|
|
32
32
|
import { FlowBlock, FlowBoxed, FlowFramed, FlowGrid, flowType } from "./flow.js";
|
|
33
|
-
import { ColumnsSlide, DefaultSlide } from "./panes.js";
|
|
33
|
+
import { ColumnsSlide, DefaultSlide, MainLeftSlide, MainRightSlide, columnsType } from "./panes.js";
|
|
34
34
|
import { BASIC_CSS, DEFAULT_THEME } from "./styles.js";
|
|
35
35
|
|
|
36
36
|
export * from "./layouts.js";
|
|
@@ -57,7 +57,17 @@ export const basic = definePlugin((c) => {
|
|
|
57
57
|
c.bind(SlideLayout, ["section-header"], SectionHeaderSlide, { type: sectionHeaderType, description: "章扉。number と heading、body だけを描く" });
|
|
58
58
|
c.bind(SlideLayout, ["two-column"], TwoColumnSlide, { description: "2 列の対比。left を付けた block を左列、right を右列、どちらも無い block は前置きとして列の上に置く。列の見出しは heading left / heading right" });
|
|
59
59
|
c.bind(SlideLayout, ["card"], CardSlide, { description: "item をカードにして並べる(3 枚までは 1 行、4 枚は 2×2、5 枚以上は 3 列)。他の block は前置きとして上に置く" });
|
|
60
|
-
c.bind(SlideLayout, ["columns"], ColumnsSlide, {
|
|
60
|
+
c.bind(SlideLayout, ["columns"], ColumnsSlide, {
|
|
61
|
+
type: columnsType,
|
|
62
|
+
description: "pane を横一列に並べる(4 まで。5 以上は 3 列 × 2 行)。既定は等分。focus で主役の列を指定すると、その列を他の列の黄金比倍の幅にする",
|
|
63
|
+
});
|
|
64
|
+
c.bind(SlideLayout, ["main-left"], MainLeftSlide, {
|
|
65
|
+
description: "最初の pane を左に大きく置き、残りを右に縦に積む(ト型)。大きい側と積む側は黄金比(約 62:38)",
|
|
66
|
+
});
|
|
67
|
+
c.bind(SlideLayout, ["main-right"], MainRightSlide, {
|
|
68
|
+
description: "最後の pane を右に大きく置き、残りを左に縦に積む(ト型の逆)。説明や前提を左に、主役を右に置くとき。大きい側と積む側は黄金比(約 62:38)",
|
|
69
|
+
});
|
|
70
|
+
|
|
61
71
|
|
|
62
72
|
c.bind(BlockLayout, [], DefaultBlock, { description: "本文 1 行。markdown 可" });
|
|
63
73
|
c.bind(BlockLayout, ["heading"], HeadingBlock, { type: headingType, description: "見出し。slide の上部に置かれる" });
|
package/src/panes.tsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Block, RichText, pick, type BlockNode, type SlideNode, type SlideOf } from "@yadeck/slide-core";
|
|
2
3
|
import type { CSSProperties, ReactNode } from "react";
|
|
3
4
|
import { Notes, PAGE, SlideHeading } from "./chrome.js";
|
|
4
5
|
import { codeChrome, codeSize } from "./layouts.js";
|
|
@@ -190,26 +191,116 @@ export function columnsFor(n: number): number {
|
|
|
190
191
|
return n <= 4 ? Math.max(1, n) : 3;
|
|
191
192
|
}
|
|
192
193
|
|
|
193
|
-
/**
|
|
194
|
-
|
|
194
|
+
/**
|
|
195
|
+
* 主役と従の比。黄金比 φ。columns の focus では主役の列を他の列の φ 倍に、
|
|
196
|
+
* main-left / main-right では大きい区画と積む側を φ:1(約 62:38)に分ける
|
|
197
|
+
*/
|
|
198
|
+
export const PHI = (1 + Math.sqrt(5)) / 2;
|
|
199
|
+
|
|
200
|
+
export const columnsType = z.object({
|
|
201
|
+
focus: z
|
|
202
|
+
.number()
|
|
203
|
+
.int()
|
|
204
|
+
.min(1)
|
|
205
|
+
.optional()
|
|
206
|
+
.describe(
|
|
207
|
+
"主役にする列の番号(1 始まり。テキストはまとめて 1 つ、code / image / video / flow は 1 つずつ数える)。主役の列を他の列の黄金比倍(約 1.6 倍)の幅にする",
|
|
208
|
+
),
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
/** 列の幅の比。focus の列だけ φ、他は 1 */
|
|
212
|
+
export function columnWeights(cols: number, focusColumn: number | undefined): number[] {
|
|
213
|
+
return Array.from({ length: cols }, (_, i) => (i === focusColumn ? PHI : 1));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* `columns`。pane を横一列に並べる(4 まで。5 以上は 3 列で折り返す)。
|
|
218
|
+
* 既定は等分。focus で主役を指定すると、主役の列を他の列の黄金比倍の幅にする
|
|
219
|
+
*/
|
|
220
|
+
export const ColumnsSlide = (slide: SlideOf<typeof columnsType>) => {
|
|
195
221
|
const [heading, rest] = pick(slide.items, ["heading"]);
|
|
196
222
|
const panes = toPanes(rest);
|
|
197
223
|
const contentH = SLIDE_H - PAD_Y * 2 - (heading ? HEADING_H : 0) - (heading && slide.description ? DESCRIPTION_H : 0);
|
|
224
|
+
const contentW = SLIDE_W - PAD_X * 2;
|
|
198
225
|
const cols = columnsFor(panes.length);
|
|
199
226
|
const rows = Math.max(1, Math.ceil(panes.length / cols));
|
|
200
|
-
const
|
|
227
|
+
const focusColumn = slide.focus !== undefined && slide.focus <= panes.length ? (slide.focus - 1) % cols : undefined;
|
|
228
|
+
const weights = columnWeights(cols, focusColumn);
|
|
229
|
+
const total = weights.reduce((a, b) => a + b, 0);
|
|
230
|
+
const freeW = contentW - GAP * (cols - 1);
|
|
231
|
+
const h = (contentH - GAP * (rows - 1)) / rows;
|
|
232
|
+
const boxOf = (i: number): PaneBox => ({ w: (freeW * weights[i % cols]!) / total, h });
|
|
201
233
|
return (
|
|
202
|
-
<div className={`${PAGE} b-columns`} style={codeFitStyle(panes.map((pane) => ({ pane, box })))}>
|
|
234
|
+
<div className={`${PAGE} b-columns`} style={codeFitStyle(panes.map((pane, i) => ({ pane, box: boxOf(i) })))}>
|
|
203
235
|
{heading && <SlideHeading block={heading} description={slide.description} />}
|
|
204
236
|
<div
|
|
205
237
|
className="grid min-h-0 flex-1 gap-8"
|
|
206
|
-
style={{
|
|
238
|
+
style={{
|
|
239
|
+
gridTemplateColumns: weights.map((w) => `minmax(0, ${w}fr)`).join(" "),
|
|
240
|
+
gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`,
|
|
241
|
+
}}
|
|
207
242
|
>
|
|
208
243
|
{panes.map((pane, i) => (
|
|
209
|
-
<PaneView key={i} pane={pane} box={
|
|
244
|
+
<PaneView key={i} pane={pane} box={boxOf(i)} />
|
|
210
245
|
))}
|
|
211
246
|
</div>
|
|
212
247
|
<Notes items={slide.items} />
|
|
213
248
|
</div>
|
|
214
249
|
);
|
|
215
250
|
};
|
|
251
|
+
|
|
252
|
+
/** 縦に積んだ pane の寸法(高さは paneWeights の比で分ける) */
|
|
253
|
+
function stackBoxes(w: number, h: number, panes: Pane[]): PaneBox[] {
|
|
254
|
+
const weights = paneWeights(panes);
|
|
255
|
+
const total = weights.reduce((a, b) => a + b, 0);
|
|
256
|
+
const free = h - GAP * (panes.length - 1);
|
|
257
|
+
return weights.map((wt) => ({ w, h: (free * wt) / total, grow: wt }));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* `main-left` / `main-right`。1 つの区画を大きく置き、残りを反対側に縦に積む(ト型とその逆)。
|
|
262
|
+
* main-left は最初の区画を左に、main-right は最後の区画を右に大きく置く(左から右へ読む順のまま)。
|
|
263
|
+
* 大きい区画と積む側は黄金比(約 62:38)で分ける
|
|
264
|
+
*/
|
|
265
|
+
function MainSideSlide({ slide, side }: { slide: SlideNode; side: "left" | "right" }) {
|
|
266
|
+
const [heading, rest] = pick(slide.items, ["heading"]);
|
|
267
|
+
const panes = toPanes(rest);
|
|
268
|
+
const contentH = SLIDE_H - PAD_Y * 2 - (heading ? HEADING_H : 0) - (heading && slide.description ? DESCRIPTION_H : 0);
|
|
269
|
+
const free = SLIDE_W - PAD_X * 2 - GAP;
|
|
270
|
+
const main = side === "left" ? panes[0] : panes[panes.length - 1];
|
|
271
|
+
const others = side === "left" ? panes.slice(1) : panes.slice(0, -1);
|
|
272
|
+
const mainBox: PaneBox = { w: (free * PHI) / (PHI + 1), h: contentH };
|
|
273
|
+
const stack = stackBoxes(free - mainBox.w, contentH, others);
|
|
274
|
+
const placed = [...(main ? [{ pane: main, box: mainBox }] : []), ...others.map((pane, i) => ({ pane, box: stack[i]! }))];
|
|
275
|
+
const mainView = main && <PaneView pane={main} box={others.length > 0 ? mainBox : { w: free + GAP, h: contentH }} />;
|
|
276
|
+
const stackView = (
|
|
277
|
+
<div className="flex min-h-0 min-w-0 flex-col gap-8">
|
|
278
|
+
{others.map((pane, i) => (
|
|
279
|
+
<PaneView key={i} pane={pane} box={stack[i]!} />
|
|
280
|
+
))}
|
|
281
|
+
</div>
|
|
282
|
+
);
|
|
283
|
+
const columns = others.length === 0 ? "minmax(0, 1fr)" : side === "left" ? `minmax(0, ${PHI}fr) minmax(0, 1fr)` : `minmax(0, 1fr) minmax(0, ${PHI}fr)`;
|
|
284
|
+
return (
|
|
285
|
+
<div className={`${PAGE} b-main-${side}`} style={codeFitStyle(placed)}>
|
|
286
|
+
{heading && <SlideHeading block={heading} description={slide.description} />}
|
|
287
|
+
<div className="grid min-h-0 flex-1 gap-8" style={{ gridTemplateColumns: columns }}>
|
|
288
|
+
{side === "left" ? (
|
|
289
|
+
<>
|
|
290
|
+
{mainView}
|
|
291
|
+
{others.length > 0 && stackView}
|
|
292
|
+
</>
|
|
293
|
+
) : (
|
|
294
|
+
<>
|
|
295
|
+
{others.length > 0 && stackView}
|
|
296
|
+
{mainView}
|
|
297
|
+
</>
|
|
298
|
+
)}
|
|
299
|
+
</div>
|
|
300
|
+
<Notes items={slide.items} />
|
|
301
|
+
</div>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export const MainLeftSlide = (slide: SlideNode) => <MainSideSlide slide={slide} side="left" />;
|
|
306
|
+
export const MainRightSlide = (slide: SlideNode) => <MainSideSlide slide={slide} side="right" />;
|
package/src/styles.ts
CHANGED
|
@@ -104,12 +104,17 @@ export const BASIC_CSS = `
|
|
|
104
104
|
.b-flow-pop > li .icon { font-family: var(--font-mono); font-size: 26px; line-height: 72px; width: 72px; background: var(--color-primary); margin: 0 auto 28px; display: block; border-radius: 50%; text-align: center; position: relative; letter-spacing: 2px; }
|
|
105
105
|
.b-flow-pop > li .icon::before { content: ""; border: solid transparent; border-width: 12px; border-top-color: var(--color-primary); position: absolute; top: calc(100% - 3px); left: 50%; transform: translateX(-50%); }
|
|
106
106
|
.b-flow-pop > li.is-focus .icon::before { border-top-color: var(--color-accent); }
|
|
107
|
-
|
|
107
|
+
/* 段の間のラベルは、番号どうしを結ぶ点線の上に置く(番号の間は箱の間より広く、長いラベルも収まる)。
|
|
108
|
+
ラベルが 1 つでもあれば、ラベルの無い段の間にも点線を引いてそろえる */
|
|
109
|
+
.b-flow-pop:has(> li > .via) > li:not(:first-child)::before { content: ""; position: absolute; top: 35px; right: calc(50% + 44px); width: calc(100% + var(--flow-gap) - 88px); border-top: 2px dashed color-mix(in srgb, var(--color-primary) 45%, transparent); }
|
|
110
|
+
.b-flow-pop > li .via { position: absolute; top: 36px; right: calc(100% + var(--flow-gap) / 2); transform: translate(50%, -50%); background: var(--color-surface); padding: 0 10px; }
|
|
108
111
|
.b-flow-pop > li dl { padding: 32px 10px; word-break: auto-phrase; text-wrap: balance; border: 4px solid var(--color-primary); position: relative; text-align: center; height: calc(100% - 100px); }
|
|
109
112
|
.b-flow-pop > li.is-focus dl { border-color: var(--color-accent); }
|
|
110
113
|
/* 箱の間の ›。隙間(--flow-gap)の中央に置き、枠線に重ねない */
|
|
111
114
|
.b-flow-pop > li:not(:last-child) dl::before { content: ""; width: 36px; height: 36px; display: block; border-top: 8px solid var(--color-primary); border-right: 8px solid var(--color-primary); position: absolute; top: 50%; left: calc(100% + var(--flow-gap) / 2 - 8px); transform: translate(-50%, -50%) rotate(45deg); }
|
|
112
|
-
.b-flow-pop > li dl dt { margin-bottom: 10px; word-break: keep-all; }
|
|
115
|
+
.b-flow-pop > li dl dt { margin-bottom: 10px; word-break: keep-all; display: flex; flex-direction: column; align-items: center; }
|
|
116
|
+
/* 段階のピルは見出しの上に置き、見出しの折り返しに関係なく箱の上端にそろえる */
|
|
117
|
+
.b-flow-pop > li dt .phase { order: -1; margin: 0 0 12px; }
|
|
113
118
|
.b-flow-pop > li dl dt .phase { display: block; margin: 8px auto 0; padding: .15em .6em; font-size: 18px; width: fit-content; max-width: 100%; box-sizing: border-box; white-space: nowrap; }
|
|
114
119
|
|
|
115
120
|
/* 枠線を使ったデザイン: 角丸の枠を縦に積み、点線と ▽ でつなぐ */
|
|
@@ -154,4 +159,13 @@ export const BASIC_CSS = `
|
|
|
154
159
|
.b-flow-grid > li .via { display: none; }
|
|
155
160
|
.b-flow-grid > li dl dt { margin-bottom: 6px; }
|
|
156
161
|
}
|
|
162
|
+
|
|
163
|
+
/* ページ番号と出典。core の既定(レイヤー外)を上書きするので、ここもレイヤーの外に書く。
|
|
164
|
+
ページ番号は表紙には出さない。地の濃い章扉では、どちらも白を薄くして載せる */
|
|
165
|
+
.yd-page-number { font-family: var(--font-sans); font-size: 18px; color: var(--color-faint); }
|
|
166
|
+
.yd-sources { font-family: var(--font-sans); color: var(--color-faint); padding-left: 3.2em; }
|
|
167
|
+
.yd-sources::before { content: "出典"; position: absolute; left: 0; top: 0; }
|
|
168
|
+
.yd-slide:has(> .b-section) > .yd-sources { color: color-mix(in srgb, var(--color-surface) 55%, transparent); }
|
|
169
|
+
.yd-slide:has(> .b-header) > .yd-page-number { display: none; }
|
|
170
|
+
.yd-slide:has(> .b-section) > .yd-page-number { color: color-mix(in srgb, var(--color-surface) 55%, transparent); }
|
|
157
171
|
`;
|