@stonedeck/core 0.7.2 → 0.7.5
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/emitter.d.ts.map +1 -1
- package/dist/emitter.js +3 -36
- package/dist/emitter.js.map +1 -1
- package/dist/layouts/registry.json +1 -1
- package/dist/models/ir.d.ts +2 -3
- package/dist/models/ir.d.ts.map +1 -1
- package/dist/parser/tokenizer.js +2 -0
- package/dist/parser/tokenizer.js.map +1 -1
- package/dist/resolver/theme-loader.d.ts +3 -1
- package/dist/resolver/theme-loader.d.ts.map +1 -1
- package/dist/resolver/theme-loader.js +45 -2
- package/dist/resolver/theme-loader.js.map +1 -1
- package/package.json +2 -4
- package/src/emitter.ts +3 -35
- package/src/layouts/registry.json +1 -1
- package/src/models/ir.ts +2 -3
- package/src/parser/tokenizer.ts +2 -0
- package/src/resolver/theme-loader.ts +51 -2
- package/src/themes/academico_v2.yaml +55 -0
- package/src/themes/corporativo_v2.yaml +55 -0
- package/src/themes/dark_mode_v2.yaml +54 -0
- package/src/themes/default_v2.yaml +58 -0
- package/src/themes/minimalista_v2.yaml +56 -0
- package/src/themes/moderno_v2.yaml +56 -0
- package/src/themes/tech_blue.yaml +56 -0
- package/test/verify_clipping.html +338 -0
- package/test/verify_clipping.md +14 -0
- package/test/verify_theme.ts +24 -0
- package/test/verify_theme_runner.js +34 -0
- package/test/verify_variants.html +348 -0
- package/test/verify_variants.md +40 -0
- package/dist/resolver/metrics.d.ts +0 -27
- package/dist/resolver/metrics.d.ts.map +0 -1
- package/dist/resolver/metrics.js +0 -43
- package/dist/resolver/metrics.js.map +0 -1
- package/src/resolver/metrics.ts +0 -64
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: "Default Theme V2"
|
|
2
|
+
tokens:
|
|
3
|
+
colors:
|
|
4
|
+
primary: "#FFFFFF"
|
|
5
|
+
secondary: "#F0F0F0"
|
|
6
|
+
accent: "#007BFF"
|
|
7
|
+
surface: "#FFFFFF"
|
|
8
|
+
text: "#000000"
|
|
9
|
+
heading: "#000000"
|
|
10
|
+
muted: "#666666"
|
|
11
|
+
|
|
12
|
+
# Variant colors
|
|
13
|
+
kind1_bg: "#E8F4F8"
|
|
14
|
+
kind2_bg: "#FFF5E6"
|
|
15
|
+
kind3_bg_start: "#1a2a6c"
|
|
16
|
+
kind3_bg_mid: "#b21f1f"
|
|
17
|
+
kind3_bg_end: "#fdbb2d"
|
|
18
|
+
|
|
19
|
+
fonts:
|
|
20
|
+
heading: "Inter"
|
|
21
|
+
body: "Roboto"
|
|
22
|
+
mono: "Courier New"
|
|
23
|
+
serif: "Merriweather"
|
|
24
|
+
slab: "Roboto Slab"
|
|
25
|
+
|
|
26
|
+
defaults:
|
|
27
|
+
background:
|
|
28
|
+
type: "color"
|
|
29
|
+
value: "surface"
|
|
30
|
+
color: "text"
|
|
31
|
+
font_family: "body"
|
|
32
|
+
font_size: 18
|
|
33
|
+
content_align:
|
|
34
|
+
horizontal: "left"
|
|
35
|
+
vertical: "top"
|
|
36
|
+
|
|
37
|
+
variants:
|
|
38
|
+
kind_1:
|
|
39
|
+
background:
|
|
40
|
+
type: "color"
|
|
41
|
+
value: "kind1_bg"
|
|
42
|
+
font_family: "slab"
|
|
43
|
+
color: "accent"
|
|
44
|
+
|
|
45
|
+
kind_2:
|
|
46
|
+
background:
|
|
47
|
+
type: "color"
|
|
48
|
+
value: "kind2_bg"
|
|
49
|
+
font_family: "serif"
|
|
50
|
+
color: "text"
|
|
51
|
+
|
|
52
|
+
kind_3:
|
|
53
|
+
background:
|
|
54
|
+
type: "gradient"
|
|
55
|
+
colors: ["kind3_bg_start", "kind3_bg_mid", "kind3_bg_end"]
|
|
56
|
+
direction: "135deg"
|
|
57
|
+
font_family: "heading"
|
|
58
|
+
color: "primary" # Light text for dark gradient
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: "Minimalista V2"
|
|
2
|
+
tokens:
|
|
3
|
+
colors:
|
|
4
|
+
primary: "#000000"
|
|
5
|
+
secondary: "#ffffff"
|
|
6
|
+
accent: "#000000"
|
|
7
|
+
surface: "#ffffff"
|
|
8
|
+
text: "#333333"
|
|
9
|
+
heading: "#000000"
|
|
10
|
+
muted: "#555555"
|
|
11
|
+
|
|
12
|
+
# Variants
|
|
13
|
+
kind1_bg: "#F9F9F9" # Nearly white
|
|
14
|
+
kind2_bg: "#EFEFEF" # Light grey
|
|
15
|
+
|
|
16
|
+
fonts:
|
|
17
|
+
heading: "Helvetica-Bold"
|
|
18
|
+
body: "Helvetica"
|
|
19
|
+
mono: "Courier New"
|
|
20
|
+
thin: "Helvetica-Light"
|
|
21
|
+
|
|
22
|
+
defaults:
|
|
23
|
+
background:
|
|
24
|
+
type: "color"
|
|
25
|
+
value: "surface"
|
|
26
|
+
color: "text"
|
|
27
|
+
font_family: "body"
|
|
28
|
+
font_size: 24
|
|
29
|
+
content_align:
|
|
30
|
+
horizontal: "left"
|
|
31
|
+
vertical: "top"
|
|
32
|
+
|
|
33
|
+
variants:
|
|
34
|
+
kind_1:
|
|
35
|
+
background:
|
|
36
|
+
type: "color"
|
|
37
|
+
value: "kind1_bg"
|
|
38
|
+
color: "primary"
|
|
39
|
+
font_family: "thin" # Ultra clean
|
|
40
|
+
|
|
41
|
+
kind_2:
|
|
42
|
+
background:
|
|
43
|
+
type: "color"
|
|
44
|
+
value: "kind2_bg"
|
|
45
|
+
color: "text"
|
|
46
|
+
font_align: "center" # Centered minimalism
|
|
47
|
+
content_align:
|
|
48
|
+
horizontal: "center"
|
|
49
|
+
vertical: "middle"
|
|
50
|
+
|
|
51
|
+
kind_3:
|
|
52
|
+
background:
|
|
53
|
+
type: "color"
|
|
54
|
+
value: "surface"
|
|
55
|
+
color: "accent"
|
|
56
|
+
font_family: "heading" # Bold statement
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: "Moderno V2"
|
|
2
|
+
tokens:
|
|
3
|
+
colors:
|
|
4
|
+
primary: "#2c3e50"
|
|
5
|
+
secondary: "#ecf0f1"
|
|
6
|
+
accent: "#3498db"
|
|
7
|
+
surface: "#f5f7fa"
|
|
8
|
+
text: "#34495e"
|
|
9
|
+
heading: "#2c3e50"
|
|
10
|
+
muted: "#7f8c8d"
|
|
11
|
+
quote_bg: "#e1f5fe"
|
|
12
|
+
|
|
13
|
+
# Variants
|
|
14
|
+
kind1_bg: "#FFFFFF"
|
|
15
|
+
kind2_bg_start: "#f5f7fa"
|
|
16
|
+
kind2_bg_end: "#c3cfe2"
|
|
17
|
+
|
|
18
|
+
fonts:
|
|
19
|
+
heading: "Helvetica-Bold"
|
|
20
|
+
body: "Helvetica"
|
|
21
|
+
mono: "Courier New"
|
|
22
|
+
futura: "Futura"
|
|
23
|
+
|
|
24
|
+
defaults:
|
|
25
|
+
background:
|
|
26
|
+
type: "color"
|
|
27
|
+
value: "surface"
|
|
28
|
+
color: "text"
|
|
29
|
+
font_family: "body"
|
|
30
|
+
font_size: 20
|
|
31
|
+
content_align:
|
|
32
|
+
horizontal: "left"
|
|
33
|
+
vertical: "top"
|
|
34
|
+
|
|
35
|
+
variants:
|
|
36
|
+
kind_1:
|
|
37
|
+
background:
|
|
38
|
+
type: "color"
|
|
39
|
+
value: "kind1_bg"
|
|
40
|
+
color: "accent"
|
|
41
|
+
font_family: "futura"
|
|
42
|
+
|
|
43
|
+
kind_2:
|
|
44
|
+
background:
|
|
45
|
+
type: "gradient"
|
|
46
|
+
colors: ["kind2_bg_start", "kind2_bg_end"]
|
|
47
|
+
direction: "135deg"
|
|
48
|
+
color: "primary"
|
|
49
|
+
font_family: "body"
|
|
50
|
+
|
|
51
|
+
kind_3:
|
|
52
|
+
background:
|
|
53
|
+
type: "color"
|
|
54
|
+
value: "primary" # Dark modern
|
|
55
|
+
color: "secondary" # Light text
|
|
56
|
+
font_family: "heading"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: "Tech Blue"
|
|
2
|
+
tokens:
|
|
3
|
+
colors:
|
|
4
|
+
primary: "#0056b3" # Standard Tech Blue
|
|
5
|
+
secondary: "#e3f2fd" # Light Blue background
|
|
6
|
+
accent: "#00c6ff" # Cyan accent
|
|
7
|
+
surface: "#ffffff"
|
|
8
|
+
text: "#2c3e50" # Dark Blue-Grey text
|
|
9
|
+
heading: "#0d47a1" # Deep Blue heading
|
|
10
|
+
muted: "#90a4ae"
|
|
11
|
+
|
|
12
|
+
# Variant Specifics
|
|
13
|
+
kind2_bg: "#0d47a1" # Deep Blue for dark mode
|
|
14
|
+
kind2_text: "#e3f2fd"
|
|
15
|
+
kind3_bg_start: "#00c6ff"
|
|
16
|
+
kind3_bg_end: "#0072ff"
|
|
17
|
+
|
|
18
|
+
fonts:
|
|
19
|
+
heading: "Inter"
|
|
20
|
+
body: "Roboto"
|
|
21
|
+
mono: "Fira Code"
|
|
22
|
+
display: "Montserrat"
|
|
23
|
+
|
|
24
|
+
defaults:
|
|
25
|
+
background:
|
|
26
|
+
type: "color"
|
|
27
|
+
value: "surface"
|
|
28
|
+
color: "text"
|
|
29
|
+
font_family: "body"
|
|
30
|
+
font_size: 20
|
|
31
|
+
content_align:
|
|
32
|
+
horizontal: "left"
|
|
33
|
+
vertical: "top"
|
|
34
|
+
|
|
35
|
+
variants:
|
|
36
|
+
kind_1:
|
|
37
|
+
background:
|
|
38
|
+
type: "color"
|
|
39
|
+
value: "secondary"
|
|
40
|
+
color: "heading"
|
|
41
|
+
font_family: "display" # Modern Tech feel
|
|
42
|
+
|
|
43
|
+
kind_2:
|
|
44
|
+
background:
|
|
45
|
+
type: "color"
|
|
46
|
+
value: "kind2_bg"
|
|
47
|
+
color: "kind2_text"
|
|
48
|
+
font_family: "heading"
|
|
49
|
+
|
|
50
|
+
kind_3:
|
|
51
|
+
background:
|
|
52
|
+
type: "gradient"
|
|
53
|
+
colors: ["kind3_bg_start", "kind3_bg_end"]
|
|
54
|
+
direction: "135deg"
|
|
55
|
+
color: "surface"
|
|
56
|
+
font_family: "display"
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>Verification Clipping</title>
|
|
8
|
+
<style>
|
|
9
|
+
:root {
|
|
10
|
+
--canvas-width: 720pt;
|
|
11
|
+
--canvas-height: 405pt;
|
|
12
|
+
--accent-color: #3b82f6;
|
|
13
|
+
--scale-factor: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
html, body { height: 100%; }
|
|
17
|
+
|
|
18
|
+
body {
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
background-color: #1a1a1a;
|
|
22
|
+
min-height: 100vh;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
27
|
+
transition: background-color 0.3s;
|
|
28
|
+
overflow-x: hidden;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Presentation Mode */
|
|
32
|
+
body.presenting {
|
|
33
|
+
background-color: black;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#presentation-container {
|
|
38
|
+
flex-grow: 1;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
width: 100%;
|
|
44
|
+
padding: 20px 0;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
body.presenting #presentation-container {
|
|
49
|
+
padding: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.slides-inner {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: 20px;
|
|
56
|
+
align-items: center;
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
body.presenting .slides-inner {
|
|
61
|
+
gap: 0;
|
|
62
|
+
width: auto;
|
|
63
|
+
height: 100%;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.slide-wrapper {
|
|
68
|
+
position: relative;
|
|
69
|
+
width: var(--canvas-width);
|
|
70
|
+
height: var(--canvas-height);
|
|
71
|
+
transform-origin: top left;
|
|
72
|
+
transform: scale(var(--scale-factor));
|
|
73
|
+
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
|
|
74
|
+
background-color: white;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
body.presenting .slide-wrapper {
|
|
80
|
+
box-shadow: none;
|
|
81
|
+
display: none; /* Hide inactive */
|
|
82
|
+
/* Do NOT override transform or width/height. Keep them logical 720x405 and let scale work. */
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 50%;
|
|
85
|
+
left: 50%;
|
|
86
|
+
transform-origin: center center;
|
|
87
|
+
transform: translate(-50%, -50%) scale(var(--scale-factor));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
body.presenting .slide-wrapper.active {
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.slide {
|
|
95
|
+
position: absolute;
|
|
96
|
+
top: 0;
|
|
97
|
+
left: 0;
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 100%;
|
|
100
|
+
box-sizing: border-box;
|
|
101
|
+
background-color: white;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Slots */
|
|
106
|
+
.slot {
|
|
107
|
+
position: absolute;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
box-sizing: border-box;
|
|
112
|
+
}
|
|
113
|
+
.slot-title { font-weight: bold; }
|
|
114
|
+
|
|
115
|
+
h1 { font-size: 1.6em; margin-bottom: 0.1em; margin-top: 0; line-height: 1.1; }
|
|
116
|
+
h2 { font-size: 1.3em; margin-bottom: 0.15em; margin-top: 0; line-height: 1.2; }
|
|
117
|
+
h3 { font-size: 1.1em; margin-bottom: 0.1em; margin-top: 0; line-height: 1.2; }
|
|
118
|
+
|
|
119
|
+
ul { padding-left: 1.1em; margin: 0; list-style-type: disc; }
|
|
120
|
+
li { margin-bottom: 0.15em; line-height: 1.25; }
|
|
121
|
+
li::marker { color: var(--accent-color); }
|
|
122
|
+
|
|
123
|
+
table { border-collapse: collapse; width: 100%; margin-top: 0.4em; }
|
|
124
|
+
td, th { border: 1pt solid #ccc; padding: 3pt 5pt; text-align: left; }
|
|
125
|
+
th { background: rgba(0,0,0,0.05); font-weight: bold; }
|
|
126
|
+
|
|
127
|
+
img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; margin: auto; flex-shrink: 0; }
|
|
128
|
+
|
|
129
|
+
.markdown-line { margin-bottom: 2pt; line-height: 1.35; }
|
|
130
|
+
p { margin: 0 0 3pt 0; }
|
|
131
|
+
|
|
132
|
+
/* Navigation */
|
|
133
|
+
#nav-bar {
|
|
134
|
+
position: fixed;
|
|
135
|
+
bottom: 20px;
|
|
136
|
+
left: 50%;
|
|
137
|
+
transform: translateX(-50%);
|
|
138
|
+
background: rgba(0, 0, 0, 0.8);
|
|
139
|
+
color: white;
|
|
140
|
+
padding: 10px 20px;
|
|
141
|
+
border-radius: 30px;
|
|
142
|
+
display: flex;
|
|
143
|
+
gap: 15px;
|
|
144
|
+
align-items: center;
|
|
145
|
+
z-index: 1000;
|
|
146
|
+
backdrop-filter: blur(10px);
|
|
147
|
+
opacity: 1;
|
|
148
|
+
transition: opacity 0.3s;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
body.presenting #nav-bar {
|
|
152
|
+
opacity: 0;
|
|
153
|
+
pointer-events: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
body.presenting #nav-bar:hover {
|
|
157
|
+
opacity: 1;
|
|
158
|
+
pointer-events: auto;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
button {
|
|
162
|
+
background: transparent;
|
|
163
|
+
border: 1px solid rgba(255,255,255,0.3);
|
|
164
|
+
color: white;
|
|
165
|
+
padding: 5px 12px;
|
|
166
|
+
border-radius: 15px;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
font-size: 14px;
|
|
169
|
+
}
|
|
170
|
+
button:hover { background: var(--accent-color); border-color: var(--accent-color); }
|
|
171
|
+
|
|
172
|
+
#slide-index { min-width: 60px; text-align: center; }
|
|
173
|
+
|
|
174
|
+
@media print {
|
|
175
|
+
@page {
|
|
176
|
+
size: 720pt 405pt;
|
|
177
|
+
margin: 0;
|
|
178
|
+
}
|
|
179
|
+
body {
|
|
180
|
+
background: white;
|
|
181
|
+
display: block;
|
|
182
|
+
overflow: visible;
|
|
183
|
+
-webkit-print-color-adjust: exact;
|
|
184
|
+
print-color-adjust: exact;
|
|
185
|
+
}
|
|
186
|
+
#nav-bar {
|
|
187
|
+
display: none !important;
|
|
188
|
+
}
|
|
189
|
+
#presentation-container {
|
|
190
|
+
padding: 0 !important;
|
|
191
|
+
display: block !important;
|
|
192
|
+
}
|
|
193
|
+
.slides-inner {
|
|
194
|
+
display: block !important;
|
|
195
|
+
gap: 0 !important;
|
|
196
|
+
}
|
|
197
|
+
.slide-wrapper {
|
|
198
|
+
display: block !important;
|
|
199
|
+
margin: 0 !important;
|
|
200
|
+
padding: 0 !important;
|
|
201
|
+
box-shadow: none !important;
|
|
202
|
+
page-break-after: always !important;
|
|
203
|
+
break-after: page !important;
|
|
204
|
+
transform: none !important;
|
|
205
|
+
width: 720pt !important;
|
|
206
|
+
height: 405pt !important;
|
|
207
|
+
position: relative !important;
|
|
208
|
+
left: 0 !important;
|
|
209
|
+
top: 0 !important;
|
|
210
|
+
overflow: hidden !important;
|
|
211
|
+
}
|
|
212
|
+
.slide {
|
|
213
|
+
position: absolute !important;
|
|
214
|
+
width: 100% !important;
|
|
215
|
+
height: 100% !important;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
</style>
|
|
219
|
+
</head>
|
|
220
|
+
<body id="body">
|
|
221
|
+
<div id="presentation-container">
|
|
222
|
+
<div class="slides-inner">
|
|
223
|
+
|
|
224
|
+
<div class="slide-wrapper active" id="wrapper-0">
|
|
225
|
+
<div class="slide" id="slide-0" style="background: #E8F4F8; color: #007BFF; font-family: Roboto Slab;">
|
|
226
|
+
|
|
227
|
+
<div class="slot" style="left: 50pt; top: 120pt; width: 620pt; height: 100pt; font-size: 18pt; line-height: normal; text-align: left; justify-content: flex-start; ">
|
|
228
|
+
<h1>Orquestrador de Leitura</h1>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
<div class="slot" style="left: 50pt; top: 230pt; width: 620pt; height: 125pt; font-size: 18pt; line-height: normal; text-align: left; justify-content: flex-start; ">
|
|
232
|
+
<h2>Arquitetura de Contrato Único e Inteligência de</h2>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<div id="nav-bar">
|
|
242
|
+
<button onclick="togglePresent()">Present</button>
|
|
243
|
+
<button onclick="prevSlide()">Prev</button>
|
|
244
|
+
<span id="slide-index">1 / 1</span>
|
|
245
|
+
<button onclick="nextSlide()">Next</button>
|
|
246
|
+
<button onclick="toggleFS()">FS</button>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<script>
|
|
250
|
+
const totalSlides = 1;
|
|
251
|
+
const body = document.getElementById('body');
|
|
252
|
+
const wrappers = document.querySelectorAll('.slide-wrapper');
|
|
253
|
+
const indexSpan = document.getElementById('slide-index');
|
|
254
|
+
let currentIdx = 0;
|
|
255
|
+
|
|
256
|
+
function resize() {
|
|
257
|
+
const baseWidth = 960;
|
|
258
|
+
const baseHeight = 540;
|
|
259
|
+
const isPresenting = body.classList.contains('presenting');
|
|
260
|
+
|
|
261
|
+
const winW = window.innerWidth || document.documentElement.clientWidth || 1024;
|
|
262
|
+
const winH = window.innerHeight || document.documentElement.clientHeight || 768;
|
|
263
|
+
|
|
264
|
+
const targetWidth = isPresenting ? winW : winW * 0.95;
|
|
265
|
+
const targetHeight = isPresenting ? winH : winH * 0.9;
|
|
266
|
+
|
|
267
|
+
let scale = Math.min(targetWidth / baseWidth, targetHeight / baseHeight);
|
|
268
|
+
|
|
269
|
+
if (!isPresenting) {
|
|
270
|
+
scale = Math.min(scale, 1);
|
|
271
|
+
}
|
|
272
|
+
if (scale <= 0.01) scale = 1;
|
|
273
|
+
|
|
274
|
+
document.documentElement.style.setProperty('--scale-factor', scale);
|
|
275
|
+
|
|
276
|
+
wrappers.forEach(w => {
|
|
277
|
+
if (isPresenting) {
|
|
278
|
+
w.style.height = ''; // Reset to CSS default (var(--canvas-height)) for proper aspect ratio scaling
|
|
279
|
+
} else {
|
|
280
|
+
w.style.height = (baseHeight * scale) + 'px';
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
window.addEventListener('resize', resize);
|
|
286
|
+
window.addEventListener('DOMContentLoaded', resize);
|
|
287
|
+
window.addEventListener('load', resize);
|
|
288
|
+
resize();
|
|
289
|
+
|
|
290
|
+
function updateUI() {
|
|
291
|
+
indexSpan.innerText = (currentIdx + 1) + ' / ' + totalSlides;
|
|
292
|
+
wrappers.forEach((w, i) => {
|
|
293
|
+
w.classList.toggle('active', i === currentIdx);
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
if (!body.classList.contains('presenting')) {
|
|
297
|
+
wrappers[currentIdx].scrollIntoView({ behavior: 'auto', block: 'center' });
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function nextSlide() {
|
|
302
|
+
if (currentIdx < totalSlides - 1) {
|
|
303
|
+
currentIdx++;
|
|
304
|
+
updateUI();
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function prevSlide() {
|
|
309
|
+
if (currentIdx > 0) {
|
|
310
|
+
currentIdx--;
|
|
311
|
+
updateUI();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function togglePresent() {
|
|
316
|
+
body.classList.toggle('presenting');
|
|
317
|
+
setTimeout(() => { resize(); updateUI(); }, 50);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
function toggleFS() {
|
|
321
|
+
if (!document.fullscreenElement) {
|
|
322
|
+
body.requestFullscreen().catch(e => console.warn(e));
|
|
323
|
+
} else {
|
|
324
|
+
document.exitFullscreen();
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
window.addEventListener('keydown', (e) => {
|
|
329
|
+
if (['ArrowRight', ' ', 'PageDown', 'Enter'].includes(e.key)) { e.preventDefault(); nextSlide(); }
|
|
330
|
+
if (['ArrowLeft', 'PageUp', 'Backspace'].includes(e.key)) { e.preventDefault(); prevSlide(); }
|
|
331
|
+
if (e.key === 'p') togglePresent();
|
|
332
|
+
if (e.key === 'f') toggleFS();
|
|
333
|
+
if (e.key === 'Escape' && body.classList.contains('presenting')) togglePresent();
|
|
334
|
+
});
|
|
335
|
+
</script>
|
|
336
|
+
|
|
337
|
+
</body>
|
|
338
|
+
</html>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import { processStoneDeck } from '../src/processor.js';
|
|
3
|
+
import * as fs from 'fs';
|
|
4
|
+
import * as path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const mdPath = path.join(__dirname, 'verify_variants.md');
|
|
11
|
+
const content = fs.readFileSync(mdPath, 'utf-8');
|
|
12
|
+
|
|
13
|
+
const ir = processStoneDeck(content, mdPath);
|
|
14
|
+
|
|
15
|
+
console.log("Manifesto Theme:", ir.manifesto.theme);
|
|
16
|
+
|
|
17
|
+
ir.slides.forEach((slide, index) => {
|
|
18
|
+
console.log(`\n--- Slide ${index + 1} ---`);
|
|
19
|
+
console.log(`Variant Request: ${slide.variant}`);
|
|
20
|
+
// Check specific style properties we expect to change
|
|
21
|
+
const bg = slide.style.background;
|
|
22
|
+
console.log(`Background Value:`, bg?.value || bg);
|
|
23
|
+
console.log(`Font Family:`, slide.style.font_family);
|
|
24
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
import { processStoneDeck } from '../dist/processor.js';
|
|
3
|
+
import * as fs from 'fs';
|
|
4
|
+
import * as path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const mdPath = path.join(__dirname, 'verify_clipping.md');
|
|
11
|
+
const content = fs.readFileSync(mdPath, 'utf-8');
|
|
12
|
+
|
|
13
|
+
const ir = processStoneDeck(content, mdPath);
|
|
14
|
+
|
|
15
|
+
console.log("Manifesto Theme:", ir.manifesto.theme);
|
|
16
|
+
|
|
17
|
+
ir.slides.forEach((slide, index) => {
|
|
18
|
+
console.log(`\n--- Slide ${index + 1} ---`);
|
|
19
|
+
console.log(`Layout: ${slide.layout_id}`);
|
|
20
|
+
|
|
21
|
+
// Check specific style properties we expect to change
|
|
22
|
+
const bg = slide.style.background;
|
|
23
|
+
console.log(`Background Value:`, bg ? (bg.value || bg) : 'undefined');
|
|
24
|
+
console.log(`Font Family:`, slide.style.font_family);
|
|
25
|
+
|
|
26
|
+
if (slide.warnings && slide.warnings.length > 0) {
|
|
27
|
+
console.log("WARNINGS:");
|
|
28
|
+
slide.warnings.forEach(w => console.log(` - ${w}`));
|
|
29
|
+
} else {
|
|
30
|
+
console.log("No warnings.");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
});
|