@ncukondo/slide-generation 0.1.0

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.
@@ -0,0 +1,94 @@
1
+ name: table
2
+ description: "基本テーブル"
3
+ category: data
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - headers
10
+ - rows
11
+ properties:
12
+ title:
13
+ type: string
14
+ description: "スライドタイトル"
15
+ caption:
16
+ type: string
17
+ description: "テーブルキャプション(オプション)"
18
+ headers:
19
+ type: array
20
+ minItems: 1
21
+ description: "ヘッダー行"
22
+ items:
23
+ type: string
24
+ align:
25
+ type: array
26
+ description: "各列の配置(left, center, right)"
27
+ items:
28
+ type: string
29
+ enum:
30
+ - left
31
+ - center
32
+ - right
33
+ rows:
34
+ type: array
35
+ minItems: 1
36
+ description: "データ行"
37
+ items:
38
+ type: array
39
+ items:
40
+ type: string
41
+
42
+ example:
43
+ title: "製品比較表"
44
+ caption: "2024年Q1時点のデータ"
45
+ headers: ["製品名", "価格", "評価"]
46
+ align: ["left", "right", "center"]
47
+ rows:
48
+ - ["製品A", "¥10,000", "★★★★☆"]
49
+ - ["製品B", "¥15,000", "★★★★★"]
50
+ - ["製品C", "¥8,000", "★★★☆☆"]
51
+
52
+ output: |
53
+ # {{ content.title }}
54
+
55
+ {%- if content.caption %}
56
+
57
+ *{{ content.caption }}*
58
+
59
+ {%- endif %}
60
+
61
+ {% macro escape_pipe(text) %}{{ text | replace("|", "\\|") }}{% endmacro %}
62
+ {% macro align_marker(alignment) %}{% if alignment == 'center' %}:---:{% elif alignment == 'right' %}---:{% else %}:---{% endif %}{% endmacro %}
63
+ | {% for header in content.headers %}{{ escape_pipe(header) }} | {% endfor %}
64
+
65
+ |{% for header in content.headers %} {% if content.align and content.align[loop.index0] %}{{ align_marker(content.align[loop.index0]) }}{% else %}---{% endif %} |{% endfor %}
66
+
67
+ {% for row in content.rows %}| {% for cell in row %}{{ escape_pipe(cell) }} | {% endfor %}
68
+
69
+ {% endfor %}
70
+
71
+ css: |
72
+ .table-slide table {
73
+ width: 100%;
74
+ border-collapse: collapse;
75
+ margin-top: 1em;
76
+ }
77
+ .table-slide th,
78
+ .table-slide td {
79
+ border: 1px solid #ddd;
80
+ padding: 0.5em 1em;
81
+ text-align: left;
82
+ }
83
+ .table-slide th {
84
+ background-color: #f5f5f5;
85
+ font-weight: bold;
86
+ }
87
+ .table-slide tr:nth-child(even) {
88
+ background-color: #fafafa;
89
+ }
90
+ .table-slide caption {
91
+ font-style: italic;
92
+ margin-bottom: 0.5em;
93
+ color: #666;
94
+ }
@@ -0,0 +1,71 @@
1
+ name: cycle-diagram
2
+ description: "循環図(3〜6要素対応)"
3
+ category: diagrams
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - nodes
10
+ properties:
11
+ title:
12
+ type: string
13
+ description: "スライドタイトル"
14
+ nodes:
15
+ type: array
16
+ minItems: 3
17
+ maxItems: 6
18
+ description: "循環図のノード"
19
+ items:
20
+ type: object
21
+ required:
22
+ - label
23
+ properties:
24
+ label:
25
+ type: string
26
+ description: "ノードのラベル"
27
+ icon:
28
+ type: string
29
+ description: "アイコン参照"
30
+ color:
31
+ type: string
32
+ pattern: "^#[0-9A-Fa-f]{6}$"
33
+ default: "#666666"
34
+ description: "ノードの色"
35
+
36
+ example:
37
+ title: "PDCAサイクル"
38
+ nodes:
39
+ - { label: "Plan", icon: "planning", color: "#4CAF50" }
40
+ - { label: "Do", icon: "action", color: "#2196F3" }
41
+ - { label: "Check", icon: "analysis", color: "#FF9800" }
42
+ - { label: "Act", icon: "improvement", color: "#9C27B0" }
43
+
44
+ output: |
45
+ <!-- _class: diagram-slide cycle-slide -->
46
+
47
+ # {{ content.title }}
48
+
49
+ <div class="cycle-container cycle-{{ content.nodes | length }}">
50
+ {%- for node in content.nodes %}
51
+ <div class="cycle-node" style="--node-color: {{ node.color | default('#666666') }}; --node-index: {{ loop.index0 }};">
52
+ {%- if node.icon %}
53
+ <span class="node-icon">{{ icons.render(node.icon) }}</span>
54
+ {%- endif %}
55
+ <span class="node-label">{{ node.label }}</span>
56
+ </div>
57
+ {%- endfor %}
58
+ </div>
59
+
60
+ css: |
61
+ .cycle-container {
62
+ display: flex;
63
+ justify-content: center;
64
+ align-items: center;
65
+ position: relative;
66
+ }
67
+ .cycle-node {
68
+ background: var(--node-color);
69
+ border-radius: 50%;
70
+ padding: 1em;
71
+ }
@@ -0,0 +1,141 @@
1
+ name: flow-chart
2
+ description: "フローチャート"
3
+ category: diagrams
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - steps
10
+ properties:
11
+ title:
12
+ type: string
13
+ description: "スライドタイトル"
14
+ steps:
15
+ type: array
16
+ minItems: 2
17
+ description: "フローチャートのステップ"
18
+ items:
19
+ type: object
20
+ required:
21
+ - label
22
+ properties:
23
+ label:
24
+ type: string
25
+ description: "ステップのラベル"
26
+ type:
27
+ type: string
28
+ enum:
29
+ - start
30
+ - process
31
+ - decision
32
+ - end
33
+ default: process
34
+ description: "ステップの種類"
35
+ icon:
36
+ type: string
37
+ description: "アイコン参照"
38
+ color:
39
+ type: string
40
+ pattern: "^#[0-9A-Fa-f]{6}$"
41
+ default: "#2196F3"
42
+ description: "ステップの色"
43
+ branches:
44
+ type: array
45
+ description: "分岐(decision タイプの場合)"
46
+ items:
47
+ type: object
48
+ required:
49
+ - condition
50
+ - target
51
+ properties:
52
+ condition:
53
+ type: string
54
+ description: "分岐条件"
55
+ target:
56
+ type: string
57
+ description: "分岐先のラベル"
58
+ direction:
59
+ type: string
60
+ enum:
61
+ - vertical
62
+ - horizontal
63
+ default: vertical
64
+ description: "フローの方向"
65
+
66
+ example:
67
+ title: "承認フロー"
68
+ direction: vertical
69
+ steps:
70
+ - { label: "申請", type: "start", color: "#4CAF50" }
71
+ - { label: "上司確認", type: "process" }
72
+ - { label: "承認?", type: "decision", branches: [{ condition: "Yes", target: "完了" }, { condition: "No", target: "差し戻し" }] }
73
+ - { label: "差し戻し", type: "process", color: "#FF5722" }
74
+ - { label: "完了", type: "end", color: "#9C27B0" }
75
+
76
+ output: |
77
+ <!-- _class: diagram-slide flow-slide -->
78
+
79
+ # {{ content.title }}
80
+
81
+ <div class="flow-container flow-{{ content.direction | default('vertical') }}">
82
+ {%- for step in content.steps %}
83
+ <div class="flow-step flow-{{ step.type | default('process') }}" style="--step-color: {{ step.color | default('#2196F3') }};">
84
+ {%- if step.icon %}
85
+ <span class="step-icon">{{ icons.render(step.icon) }}</span>
86
+ {%- endif %}
87
+ <span class="step-label">{{ step.label }}</span>
88
+ {%- if step.branches %}
89
+ <div class="step-branches">
90
+ {%- for branch in step.branches %}
91
+ <span class="branch-label">{{ branch.condition }}: {{ branch.target }}</span>
92
+ {%- endfor %}
93
+ </div>
94
+ {%- endif %}
95
+ </div>
96
+ {%- if not loop.last %}
97
+ <div class="flow-arrow">→</div>
98
+ {%- endif %}
99
+ {%- endfor %}
100
+ </div>
101
+
102
+ css: |
103
+ .flow-container {
104
+ display: flex;
105
+ justify-content: center;
106
+ align-items: center;
107
+ gap: 0.5em;
108
+ flex-wrap: wrap;
109
+ }
110
+ .flow-container.flow-vertical {
111
+ flex-direction: column;
112
+ }
113
+ .flow-container.flow-horizontal {
114
+ flex-direction: row;
115
+ }
116
+ .flow-step {
117
+ background: var(--step-color);
118
+ color: white;
119
+ padding: 1em 1.5em;
120
+ border-radius: 8px;
121
+ text-align: center;
122
+ }
123
+ .flow-step.flow-start,
124
+ .flow-step.flow-end {
125
+ border-radius: 24px;
126
+ }
127
+ .flow-step.flow-decision {
128
+ transform: rotate(45deg);
129
+ padding: 1.5em;
130
+ }
131
+ .flow-step.flow-decision .step-label {
132
+ transform: rotate(-45deg);
133
+ display: block;
134
+ }
135
+ .flow-arrow {
136
+ font-size: 1.5em;
137
+ color: #666;
138
+ }
139
+ .flow-vertical .flow-arrow {
140
+ transform: rotate(90deg);
141
+ }
@@ -0,0 +1,117 @@
1
+ name: hierarchy
2
+ description: "階層図・組織図"
3
+ category: diagrams
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - root
10
+ properties:
11
+ title:
12
+ type: string
13
+ description: "スライドタイトル"
14
+ root:
15
+ type: object
16
+ required:
17
+ - label
18
+ description: "ルートノード"
19
+ properties:
20
+ label:
21
+ type: string
22
+ description: "ノードのラベル"
23
+ icon:
24
+ type: string
25
+ description: "アイコン参照"
26
+ color:
27
+ type: string
28
+ pattern: "^#[0-9A-Fa-f]{6}$"
29
+ default: "#2196F3"
30
+ description: "ノードの色"
31
+ children:
32
+ type: array
33
+ description: "子ノードの配列"
34
+
35
+ example:
36
+ title: "組織図"
37
+ root:
38
+ label: "CEO"
39
+ icon: "user"
40
+ color: "#1976D2"
41
+ children:
42
+ - label: "CTO"
43
+ color: "#388E3C"
44
+ children:
45
+ - { label: "開発部" }
46
+ - { label: "インフラ部" }
47
+ - label: "CFO"
48
+ color: "#F57C00"
49
+ children:
50
+ - { label: "経理部" }
51
+ - { label: "財務部" }
52
+ - label: "COO"
53
+ color: "#7B1FA2"
54
+ children:
55
+ - { label: "営業部" }
56
+ - { label: "マーケ部" }
57
+
58
+ output: |
59
+ <!-- _class: diagram-slide hierarchy-slide -->
60
+
61
+ # {{ content.title }}
62
+
63
+ {% macro renderNode(node, depth) %}
64
+ <div class="hierarchy-node depth-{{ depth }}" style="--node-color: {{ node.color | default('#2196F3') }};">
65
+ <div class="node-content">
66
+ {%- if node.icon %}
67
+ <span class="node-icon">{{ icons.render(node.icon) }}</span>
68
+ {%- endif %}
69
+ <span class="node-label">{{ node.label }}</span>
70
+ </div>
71
+ {%- if node.children %}
72
+ <div class="node-children">
73
+ {%- for child in node.children %}
74
+ {{ renderNode(child, depth + 1) }}
75
+ {%- endfor %}
76
+ </div>
77
+ {%- endif %}
78
+ </div>
79
+ {% endmacro %}
80
+
81
+ <div class="hierarchy-container">
82
+ {{ renderNode(content.root, 0) }}
83
+ </div>
84
+
85
+ css: |
86
+ .hierarchy-container {
87
+ display: flex;
88
+ justify-content: center;
89
+ padding: 1em;
90
+ }
91
+ .hierarchy-node {
92
+ display: flex;
93
+ flex-direction: column;
94
+ align-items: center;
95
+ }
96
+ .node-content {
97
+ background: var(--node-color);
98
+ color: white;
99
+ padding: 0.75em 1.25em;
100
+ border-radius: 8px;
101
+ text-align: center;
102
+ margin-bottom: 1em;
103
+ }
104
+ .node-children {
105
+ display: flex;
106
+ gap: 1em;
107
+ position: relative;
108
+ }
109
+ .node-children::before {
110
+ content: '';
111
+ position: absolute;
112
+ top: -0.5em;
113
+ left: 50%;
114
+ width: 1px;
115
+ height: 0.5em;
116
+ background: #ccc;
117
+ }
@@ -0,0 +1,163 @@
1
+ name: matrix
2
+ description: "2x2マトリクス"
3
+ category: diagrams
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - quadrants
10
+ properties:
11
+ title:
12
+ type: string
13
+ description: "スライドタイトル"
14
+ xAxis:
15
+ type: object
16
+ properties:
17
+ label:
18
+ type: string
19
+ description: "X軸のラベル"
20
+ low:
21
+ type: string
22
+ description: "X軸の低い側のラベル"
23
+ high:
24
+ type: string
25
+ description: "X軸の高い側のラベル"
26
+ yAxis:
27
+ type: object
28
+ properties:
29
+ label:
30
+ type: string
31
+ description: "Y軸のラベル"
32
+ low:
33
+ type: string
34
+ description: "Y軸の低い側のラベル"
35
+ high:
36
+ type: string
37
+ description: "Y軸の高い側のラベル"
38
+ quadrants:
39
+ type: array
40
+ minItems: 4
41
+ maxItems: 4
42
+ description: "4つの象限(左上、右上、左下、右下の順)"
43
+ items:
44
+ type: object
45
+ required:
46
+ - label
47
+ properties:
48
+ label:
49
+ type: string
50
+ description: "象限のラベル"
51
+ color:
52
+ type: string
53
+ pattern: "^#[0-9A-Fa-f]{6}$"
54
+ default: "#E3F2FD"
55
+ description: "象限の背景色"
56
+ items:
57
+ type: array
58
+ description: "象限内の項目"
59
+ items:
60
+ type: string
61
+
62
+ example:
63
+ title: "アイゼンハワー・マトリクス"
64
+ xAxis:
65
+ label: "緊急度"
66
+ low: "低"
67
+ high: "高"
68
+ yAxis:
69
+ label: "重要度"
70
+ low: "低"
71
+ high: "高"
72
+ quadrants:
73
+ - label: "第2象限:計画"
74
+ color: "#C8E6C9"
75
+ items: ["長期目標", "スキル開発"]
76
+ - label: "第1象限:実行"
77
+ color: "#FFCDD2"
78
+ items: ["締切タスク", "危機対応"]
79
+ - label: "第4象限:削除"
80
+ color: "#F5F5F5"
81
+ items: ["時間の浪費", "些細な作業"]
82
+ - label: "第3象限:委任"
83
+ color: "#FFF9C4"
84
+ items: ["割り込み", "一部の会議"]
85
+
86
+ output: |
87
+ <!-- _class: diagram-slide matrix-slide -->
88
+
89
+ # {{ content.title }}
90
+
91
+ <div class="matrix-container">
92
+ {%- if content.yAxis %}
93
+ <div class="matrix-y-axis">
94
+ <span class="axis-label">{{ content.yAxis.label | default('') }}</span>
95
+ <span class="axis-high">{{ content.yAxis.high | default('高') }}</span>
96
+ <span class="axis-low">{{ content.yAxis.low | default('低') }}</span>
97
+ </div>
98
+ {%- endif %}
99
+ <div class="matrix-grid">
100
+ {%- for quadrant in content.quadrants %}
101
+ <div class="matrix-quadrant quadrant-{{ loop.index }}" style="--quadrant-color: {{ quadrant.color | default('#E3F2FD') }};">
102
+ <span class="quadrant-label">{{ quadrant.label }}</span>
103
+ {%- if quadrant.items %}
104
+ <ul class="quadrant-items">
105
+ {%- for item in quadrant.items %}
106
+ <li>{{ item }}</li>
107
+ {%- endfor %}
108
+ </ul>
109
+ {%- endif %}
110
+ </div>
111
+ {%- endfor %}
112
+ </div>
113
+ {%- if content.xAxis %}
114
+ <div class="matrix-x-axis">
115
+ <span class="axis-low">{{ content.xAxis.low | default('低') }}</span>
116
+ <span class="axis-label">{{ content.xAxis.label | default('') }}</span>
117
+ <span class="axis-high">{{ content.xAxis.high | default('高') }}</span>
118
+ </div>
119
+ {%- endif %}
120
+ </div>
121
+
122
+ css: |
123
+ .matrix-container {
124
+ display: grid;
125
+ grid-template-columns: auto 1fr;
126
+ grid-template-rows: 1fr auto;
127
+ gap: 0.5em;
128
+ height: 80%;
129
+ }
130
+ .matrix-grid {
131
+ display: grid;
132
+ grid-template-columns: 1fr 1fr;
133
+ grid-template-rows: 1fr 1fr;
134
+ gap: 2px;
135
+ }
136
+ .matrix-quadrant {
137
+ background: var(--quadrant-color);
138
+ padding: 1em;
139
+ display: flex;
140
+ flex-direction: column;
141
+ }
142
+ .quadrant-label {
143
+ font-weight: bold;
144
+ margin-bottom: 0.5em;
145
+ }
146
+ .quadrant-items {
147
+ font-size: 0.9em;
148
+ margin: 0;
149
+ padding-left: 1.2em;
150
+ }
151
+ .matrix-x-axis,
152
+ .matrix-y-axis {
153
+ display: flex;
154
+ align-items: center;
155
+ justify-content: space-between;
156
+ font-size: 0.8em;
157
+ color: #666;
158
+ }
159
+ .matrix-y-axis {
160
+ flex-direction: column;
161
+ writing-mode: vertical-rl;
162
+ transform: rotate(180deg);
163
+ }