@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,167 @@
1
+ name: timeline
2
+ description: "タイムライン"
3
+ category: diagrams
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - events
10
+ properties:
11
+ title:
12
+ type: string
13
+ description: "スライドタイトル"
14
+ events:
15
+ type: array
16
+ minItems: 2
17
+ description: "タイムラインのイベント"
18
+ items:
19
+ type: object
20
+ required:
21
+ - date
22
+ - label
23
+ properties:
24
+ date:
25
+ type: string
26
+ description: "日付や時期"
27
+ label:
28
+ type: string
29
+ description: "イベントのラベル"
30
+ description:
31
+ type: string
32
+ description: "イベントの説明"
33
+ icon:
34
+ type: string
35
+ description: "アイコン参照"
36
+ color:
37
+ type: string
38
+ pattern: "^#[0-9A-Fa-f]{6}$"
39
+ default: "#2196F3"
40
+ description: "イベントの色"
41
+ direction:
42
+ type: string
43
+ enum:
44
+ - horizontal
45
+ - vertical
46
+ default: horizontal
47
+ description: "タイムラインの方向"
48
+
49
+ example:
50
+ title: "プロジェクト計画"
51
+ direction: horizontal
52
+ events:
53
+ - date: "Q1"
54
+ label: "企画"
55
+ description: "要件定義・設計"
56
+ color: "#4CAF50"
57
+ - date: "Q2"
58
+ label: "開発"
59
+ description: "実装・単体テスト"
60
+ color: "#2196F3"
61
+ - date: "Q3"
62
+ label: "テスト"
63
+ description: "結合・システムテスト"
64
+ color: "#FF9800"
65
+ - date: "Q4"
66
+ label: "リリース"
67
+ description: "本番展開・運用開始"
68
+ color: "#9C27B0"
69
+
70
+ output: |
71
+ <!-- _class: diagram-slide timeline-slide -->
72
+
73
+ # {{ content.title }}
74
+
75
+ <div class="timeline-container timeline-{{ content.direction | default('horizontal') }}">
76
+ <div class="timeline-line"></div>
77
+ {%- for event in content.events %}
78
+ <div class="timeline-event" style="--event-color: {{ event.color | default('#2196F3') }};">
79
+ <div class="event-marker">
80
+ {%- if event.icon %}
81
+ {{ icons.render(event.icon) }}
82
+ {%- endif %}
83
+ </div>
84
+ <div class="event-content">
85
+ <span class="event-date">{{ event.date }}</span>
86
+ <span class="event-label">{{ event.label }}</span>
87
+ {%- if event.description %}
88
+ <span class="event-description">{{ event.description }}</span>
89
+ {%- endif %}
90
+ </div>
91
+ </div>
92
+ {%- endfor %}
93
+ </div>
94
+
95
+ css: |
96
+ .timeline-container {
97
+ position: relative;
98
+ display: flex;
99
+ padding: 2em;
100
+ }
101
+ .timeline-container.timeline-horizontal {
102
+ flex-direction: row;
103
+ justify-content: space-between;
104
+ align-items: flex-start;
105
+ }
106
+ .timeline-container.timeline-vertical {
107
+ flex-direction: column;
108
+ gap: 2em;
109
+ }
110
+ .timeline-line {
111
+ position: absolute;
112
+ background: #ccc;
113
+ }
114
+ .timeline-horizontal .timeline-line {
115
+ top: 3em;
116
+ left: 2em;
117
+ right: 2em;
118
+ height: 2px;
119
+ }
120
+ .timeline-vertical .timeline-line {
121
+ left: 3em;
122
+ top: 2em;
123
+ bottom: 2em;
124
+ width: 2px;
125
+ }
126
+ .timeline-event {
127
+ display: flex;
128
+ flex-direction: column;
129
+ align-items: center;
130
+ position: relative;
131
+ z-index: 1;
132
+ }
133
+ .timeline-vertical .timeline-event {
134
+ flex-direction: row;
135
+ gap: 1em;
136
+ }
137
+ .event-marker {
138
+ width: 16px;
139
+ height: 16px;
140
+ border-radius: 50%;
141
+ background: var(--event-color);
142
+ border: 2px solid white;
143
+ box-shadow: 0 0 0 2px var(--event-color);
144
+ }
145
+ .event-content {
146
+ display: flex;
147
+ flex-direction: column;
148
+ align-items: center;
149
+ text-align: center;
150
+ margin-top: 1em;
151
+ }
152
+ .timeline-vertical .event-content {
153
+ align-items: flex-start;
154
+ text-align: left;
155
+ margin-top: 0;
156
+ }
157
+ .event-date {
158
+ font-weight: bold;
159
+ color: var(--event-color);
160
+ }
161
+ .event-label {
162
+ font-size: 1.1em;
163
+ }
164
+ .event-description {
165
+ font-size: 0.85em;
166
+ color: #666;
167
+ }
@@ -0,0 +1,94 @@
1
+ name: gallery
2
+ description: "画像ギャラリー"
3
+ category: layouts
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - images
10
+ properties:
11
+ title:
12
+ type: string
13
+ description: "スライドタイトル"
14
+ images:
15
+ type: array
16
+ minItems: 1
17
+ description: "画像配列"
18
+ items:
19
+ type: object
20
+ required:
21
+ - src
22
+ properties:
23
+ src:
24
+ type: string
25
+ description: "画像パス"
26
+ alt:
27
+ type: string
28
+ description: "代替テキスト"
29
+ caption:
30
+ type: string
31
+ description: "キャプション"
32
+ columns:
33
+ type: integer
34
+ minimum: 2
35
+ maximum: 6
36
+ default: 3
37
+ description: "列数"
38
+
39
+ example:
40
+ title: "製品ラインナップ"
41
+ columns: 3
42
+ images:
43
+ - src: "product1.png"
44
+ alt: "製品A"
45
+ caption: "スタンダードモデル"
46
+ - src: "product2.png"
47
+ alt: "製品B"
48
+ caption: "プロフェッショナルモデル"
49
+ - src: "product3.png"
50
+ alt: "製品C"
51
+ caption: "エンタープライズモデル"
52
+
53
+ output: |
54
+ <!-- _class: gallery-slide -->
55
+
56
+ # {{ content.title }}
57
+
58
+ <div class="gallery-container gallery-cols-{{ content.columns | default(3) }}">
59
+ {%- for image in content.images %}
60
+ <figure class="gallery-item">
61
+ ![{{ image.alt | default('') }}]({{ image.src }})
62
+ {%- if image.caption %}
63
+ <figcaption>{{ image.caption }}</figcaption>
64
+ {%- endif %}
65
+ </figure>
66
+ {%- endfor %}
67
+ </div>
68
+
69
+ css: |
70
+ .gallery-slide .gallery-container {
71
+ display: grid;
72
+ gap: 1em;
73
+ width: 100%;
74
+ justify-items: center;
75
+ }
76
+ .gallery-slide .gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
77
+ .gallery-slide .gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
78
+ .gallery-slide .gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
79
+ .gallery-slide .gallery-cols-5 { grid-template-columns: repeat(5, 1fr); }
80
+ .gallery-slide .gallery-cols-6 { grid-template-columns: repeat(6, 1fr); }
81
+ .gallery-slide .gallery-item {
82
+ text-align: center;
83
+ margin: 0;
84
+ }
85
+ .gallery-slide .gallery-item img {
86
+ max-width: 100%;
87
+ height: auto;
88
+ border-radius: 4px;
89
+ }
90
+ .gallery-slide .gallery-item figcaption {
91
+ font-size: 0.85em;
92
+ color: #666;
93
+ margin-top: 0.5em;
94
+ }
@@ -0,0 +1,105 @@
1
+ name: image-text
2
+ description: "画像+テキストレイアウト"
3
+ category: layouts
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - image
10
+ - text
11
+ properties:
12
+ title:
13
+ type: string
14
+ description: "スライドタイトル"
15
+ image:
16
+ type: string
17
+ description: "画像パス"
18
+ alt:
19
+ type: string
20
+ description: "画像の代替テキスト(アクセシビリティ用)"
21
+ caption:
22
+ type: string
23
+ description: "画像キャプション"
24
+ text:
25
+ oneOf:
26
+ - type: string
27
+ - type: array
28
+ items:
29
+ type: string
30
+ description: "テキストコンテンツ"
31
+ imagePosition:
32
+ type: string
33
+ enum:
34
+ - left
35
+ - right
36
+ default: left
37
+ description: "画像の位置"
38
+ ratio:
39
+ type: string
40
+ pattern: "^\\d+:\\d+$"
41
+ default: "50:50"
42
+ description: "画像とテキストの幅比率"
43
+
44
+ example:
45
+ title: "製品紹介"
46
+ image: "product-photo.png"
47
+ alt: "製品の外観写真"
48
+ caption: "新製品のデザイン"
49
+ text:
50
+ - "高品質な素材を使用"
51
+ - "エルゴノミクスデザイン"
52
+ - "3年保証付き"
53
+ imagePosition: left
54
+
55
+ output: |
56
+ <!-- _class: image-text-slide image-{{ content.imagePosition | default('left') }} -->
57
+
58
+ # {{ content.title }}
59
+
60
+ <div class="image-text-container">
61
+ <div class="image-section">
62
+ ![{{ content.alt | default(content.title) }}]({{ content.image }})
63
+ {%- if content.caption %}
64
+ <p class="image-caption">{{ content.caption }}</p>
65
+ {%- endif %}
66
+ </div>
67
+ <div class="text-section">
68
+ {%- if content.text is iterable and content.text is not string %}
69
+ {%- for item in content.text %}
70
+ - {{ item }}
71
+ {%- endfor %}
72
+ {%- else %}
73
+ {{ content.text }}
74
+ {%- endif %}
75
+ </div>
76
+ </div>
77
+
78
+ css: |
79
+ .image-text-slide .image-text-container {
80
+ display: flex;
81
+ gap: 2em;
82
+ align-items: center;
83
+ height: 80%;
84
+ }
85
+ .image-text-slide.image-right .image-text-container {
86
+ flex-direction: row-reverse;
87
+ }
88
+ .image-text-slide .image-section {
89
+ flex: 1;
90
+ text-align: center;
91
+ }
92
+ .image-text-slide .image-section img {
93
+ max-width: 100%;
94
+ max-height: 400px;
95
+ object-fit: contain;
96
+ }
97
+ .image-text-slide .image-caption {
98
+ font-style: italic;
99
+ color: #666;
100
+ margin-top: 0.5em;
101
+ font-size: 0.9em;
102
+ }
103
+ .image-text-slide .text-section {
104
+ flex: 1;
105
+ }
@@ -0,0 +1,101 @@
1
+ name: three-column
2
+ description: "3カラムレイアウト"
3
+ category: layouts
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - columns
10
+ properties:
11
+ title:
12
+ type: string
13
+ description: "スライドタイトル"
14
+ columns:
15
+ type: array
16
+ minItems: 2
17
+ maxItems: 4
18
+ description: "カラム配列"
19
+ items:
20
+ type: object
21
+ required:
22
+ - content
23
+ properties:
24
+ title:
25
+ type: string
26
+ description: "カラムタイトル(オプション)"
27
+ icon:
28
+ type: string
29
+ description: "アイコン参照(オプション)"
30
+ content:
31
+ oneOf:
32
+ - type: string
33
+ - type: array
34
+ items:
35
+ type: string
36
+ description: "カラムのコンテンツ"
37
+
38
+ example:
39
+ title: "3つのポイント"
40
+ columns:
41
+ - title: "ポイント1"
42
+ icon: "idea"
43
+ content: "最初のポイントの説明"
44
+ - title: "ポイント2"
45
+ icon: "growth"
46
+ content: "2番目のポイントの説明"
47
+ - title: "ポイント3"
48
+ icon: "success"
49
+ content: "3番目のポイントの説明"
50
+
51
+ output: |
52
+ <!-- _class: three-column-slide -->
53
+
54
+ # {{ content.title }}
55
+
56
+ <div class="column-container column-count-{{ content.columns | length }}">
57
+ {%- for column in content.columns %}
58
+ <div class="column">
59
+ {%- if column.icon %}
60
+ <span class="column-icon">{{ icons.render(column.icon) }}</span>
61
+ {%- endif %}
62
+ {%- if column.title %}
63
+ <h3 class="column-title">{{ column.title }}</h3>
64
+ {%- endif %}
65
+ <div class="column-content">
66
+ {%- if column.content is iterable and column.content is not string %}
67
+ {%- for item in column.content %}
68
+ - {{ item }}
69
+ {%- endfor %}
70
+ {%- else %}
71
+ {{ column.content }}
72
+ {%- endif %}
73
+ </div>
74
+ </div>
75
+ {%- endfor %}
76
+ </div>
77
+
78
+ css: |
79
+ .three-column-slide .column-container {
80
+ display: flex;
81
+ gap: 1.5em;
82
+ width: 100%;
83
+ justify-content: space-between;
84
+ }
85
+ .three-column-slide .column {
86
+ flex: 1;
87
+ text-align: center;
88
+ padding: 1em;
89
+ }
90
+ .three-column-slide .column-icon {
91
+ font-size: 2em;
92
+ display: block;
93
+ margin-bottom: 0.5em;
94
+ }
95
+ .three-column-slide .column-title {
96
+ font-weight: bold;
97
+ margin-bottom: 0.5em;
98
+ }
99
+ .three-column-slide .column-content {
100
+ text-align: left;
101
+ }
@@ -0,0 +1,85 @@
1
+ name: two-column
2
+ description: "2カラムレイアウト"
3
+ category: layouts
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ - left
10
+ - right
11
+ properties:
12
+ title:
13
+ type: string
14
+ description: "スライドタイトル"
15
+ left:
16
+ oneOf:
17
+ - type: string
18
+ - type: array
19
+ items:
20
+ type: string
21
+ description: "左カラムのコンテンツ(文字列または配列)"
22
+ right:
23
+ oneOf:
24
+ - type: string
25
+ - type: array
26
+ items:
27
+ type: string
28
+ description: "右カラムのコンテンツ(文字列または配列)"
29
+ ratio:
30
+ type: string
31
+ pattern: "^\\d+:\\d+$"
32
+ default: "50:50"
33
+ description: "左右の幅比率(例: 60:40)"
34
+
35
+ example:
36
+ title: "2カラム比較"
37
+ left:
38
+ - "左側のポイント1"
39
+ - "左側のポイント2"
40
+ right:
41
+ - "右側のポイント1"
42
+ - "右側のポイント2"
43
+ ratio: "50:50"
44
+
45
+ output: |
46
+ <!-- _class: two-column-slide -->
47
+
48
+ # {{ content.title }}
49
+
50
+ {% set leftRatio = content.ratio.split(':')[0] if content.ratio else '50' %}
51
+ {% set rightRatio = content.ratio.split(':')[1] if content.ratio else '50' %}
52
+ <div class="two-column-container" style="--left-ratio: {{ leftRatio }}; --right-ratio: {{ rightRatio }};">
53
+ <div class="column-left">
54
+ {%- if content.left is iterable and content.left is not string %}
55
+ {%- for item in content.left %}
56
+ - {{ item }}
57
+ {%- endfor %}
58
+ {%- else %}
59
+ {{ content.left }}
60
+ {%- endif %}
61
+ </div>
62
+ <div class="column-right">
63
+ {%- if content.right is iterable and content.right is not string %}
64
+ {%- for item in content.right %}
65
+ - {{ item }}
66
+ {%- endfor %}
67
+ {%- else %}
68
+ {{ content.right }}
69
+ {%- endif %}
70
+ </div>
71
+ </div>
72
+
73
+ css: |
74
+ .two-column-slide .two-column-container {
75
+ display: flex;
76
+ gap: 2em;
77
+ width: 100%;
78
+ height: 80%;
79
+ }
80
+ .two-column-slide .column-left {
81
+ flex: var(--left-ratio, 50);
82
+ }
83
+ .two-column-slide .column-right {
84
+ flex: var(--right-ratio, 50);
85
+ }
@@ -0,0 +1,132 @@
1
+ name: bibliography
2
+ description: "参考文献スライド"
3
+ category: special
4
+
5
+ schema:
6
+ type: object
7
+ required:
8
+ - title
9
+ properties:
10
+ title:
11
+ type: string
12
+ description: "スライドタイトル"
13
+ references:
14
+ type: array
15
+ description: "参考文献リスト"
16
+ items:
17
+ type: object
18
+ required:
19
+ - id
20
+ - title
21
+ properties:
22
+ id:
23
+ type: string
24
+ description: "引用ID"
25
+ authors:
26
+ type: array
27
+ items:
28
+ type: string
29
+ description: "著者リスト"
30
+ title:
31
+ type: string
32
+ description: "タイトル"
33
+ year:
34
+ type: integer
35
+ description: "出版年"
36
+ journal:
37
+ type: string
38
+ description: "ジャーナル名"
39
+ publisher:
40
+ type: string
41
+ description: "出版社"
42
+ volume:
43
+ type: string
44
+ description: "巻号"
45
+ pages:
46
+ type: string
47
+ description: "ページ"
48
+ url:
49
+ type: string
50
+ description: "URL"
51
+ doi:
52
+ type: string
53
+ description: "DOI"
54
+ autoGenerate:
55
+ type: boolean
56
+ default: false
57
+ description: "プレゼンテーション内の引用から自動生成"
58
+ sortBy:
59
+ type: string
60
+ enum:
61
+ - author
62
+ - year
63
+ - title
64
+ default: author
65
+ description: "ソート順"
66
+
67
+ example:
68
+ title: "参考文献"
69
+ sortBy: author
70
+ references:
71
+ - id: knuth1984
72
+ authors:
73
+ - "Knuth, D. E."
74
+ title: "Literate Programming"
75
+ year: 1984
76
+ journal: "The Computer Journal"
77
+ volume: "27(2)"
78
+ pages: "97-111"
79
+ - id: martin2008
80
+ authors:
81
+ - "Martin, R. C."
82
+ title: "Clean Code: A Handbook of Agile Software Craftsmanship"
83
+ year: 2008
84
+ publisher: "Prentice Hall"
85
+
86
+ output: |
87
+ <!-- _class: bibliography-slide -->
88
+
89
+ # {{ content.title }}
90
+
91
+ <div class="references-list">
92
+ {%- for ref in content.references %}
93
+ <div class="reference-item" id="ref-{{ ref.id }}">
94
+ <span class="reference-marker">[{{ loop.index }}]</span>
95
+ <span class="reference-content">
96
+ {%- if ref.authors %}{{ ref.authors | join(', ') }}{% endif %}
97
+ {%- if ref.year %} ({{ ref.year }}).{% endif %}
98
+ <em>{{ ref.title }}</em>.
99
+ {%- if ref.journal %} {{ ref.journal }}.{% endif %}
100
+ {%- if ref.volume %} {{ ref.volume }}{% endif %}
101
+ {%- if ref.pages %}, pp. {{ ref.pages }}{% endif %}
102
+ {%- if ref.publisher %} {{ ref.publisher }}.{% endif %}
103
+ {%- if ref.doi %} DOI: {{ ref.doi }}{% endif %}
104
+ {%- if ref.url %} <{{ ref.url }}>{% endif %}
105
+ </span>
106
+ </div>
107
+ {%- endfor %}
108
+ </div>
109
+
110
+ css: |
111
+ .bibliography-slide .references-list {
112
+ font-size: 0.85em;
113
+ line-height: 1.6;
114
+ }
115
+ .bibliography-slide .reference-item {
116
+ display: flex;
117
+ margin-bottom: 0.8em;
118
+ padding-left: 1em;
119
+ text-indent: -1em;
120
+ }
121
+ .bibliography-slide .reference-marker {
122
+ font-weight: bold;
123
+ color: #333;
124
+ min-width: 2em;
125
+ margin-right: 0.5em;
126
+ }
127
+ .bibliography-slide .reference-content {
128
+ flex: 1;
129
+ }
130
+ .bibliography-slide .reference-content em {
131
+ font-style: italic;
132
+ }