hyperbook 0.99.1 → 0.100.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.
@@ -249,3 +249,26 @@
249
249
  .directive-abc-music .buttons button:hover {
250
250
  background-color: var(--color-spacer);
251
251
  }
252
+
253
+ /* Icon-only toolbar: the written labels made this row wrap on narrow screens,
254
+ so the wording moved into title/aria-label. */
255
+ .directive-abc-music .buttons.bottom button {
256
+ flex: 0 0 auto;
257
+ min-width: 42px;
258
+ width: 42px;
259
+ padding: 8px 0;
260
+ display: flex;
261
+ align-items: center;
262
+ justify-content: center;
263
+ }
264
+
265
+ .directive-abc-music .buttons.bottom button .icon {
266
+ width: 18px;
267
+ height: 18px;
268
+ display: block;
269
+ }
270
+
271
+ /* Fullscreen sits apart, at the trailing edge of the toolbar. */
272
+ .directive-abc-music .buttons.bottom button.fullscreen {
273
+ margin-inline-start: auto;
274
+ }
@@ -12,7 +12,7 @@
12
12
  background: transparent;
13
13
  }
14
14
 
15
- .directive-archive>.icon {
15
+ .directive-archive > .icon {
16
16
  display: flex;
17
17
  border-right-color: var(--color-spacer);
18
18
  align-items: center;
@@ -22,11 +22,17 @@
22
22
  border-right-width: 1px;
23
23
  }
24
24
 
25
- .directive-archive>.label {
25
+ .directive-archive > .label {
26
26
  flex: 1;
27
27
  padding: 12px 16px;
28
28
  }
29
29
 
30
- .directive-archive>.offline {
30
+ .directive-archive > .offline {
31
31
  text-decoration: line-through;
32
32
  }
33
+
34
+ .directive-archive > .icon .icon {
35
+ width: 26px;
36
+ height: 26px;
37
+ display: block;
38
+ }
@@ -12,7 +12,7 @@
12
12
  background: transparent;
13
13
  }
14
14
 
15
- .directive-download>.icon {
15
+ .directive-download > .icon {
16
16
  display: flex;
17
17
  border-right-color: var(--color-spacer);
18
18
  align-items: center;
@@ -22,11 +22,17 @@
22
22
  border-right-width: 1px;
23
23
  }
24
24
 
25
- .directive-download>.label {
25
+ .directive-download > .label {
26
26
  flex: 1;
27
27
  padding: 12px 16px;
28
28
  }
29
29
 
30
- .directive-download>.offline {
30
+ .directive-download > .offline {
31
31
  text-decoration: line-through;
32
32
  }
33
+
34
+ .directive-download > .icon .icon {
35
+ width: 26px;
36
+ height: 26px;
37
+ display: block;
38
+ }
@@ -34695,10 +34695,7 @@ void main() {
34695
34695
  const applySplitSize = (rawSize, isHorizontal) => {
34696
34696
  const total = isHorizontal ? elem.clientWidth : elem.clientHeight;
34697
34697
  const splitterSize = isHorizontal ? splitter.offsetWidth : splitter.offsetHeight;
34698
- const maxSize = Math.max(
34699
- minPanelSize,
34700
- total - splitterSize - minPanelSize
34701
- );
34698
+ const maxSize = Math.max(minPanelSize, total - splitterSize - minPanelSize);
34702
34699
  const clamped = Math.max(minPanelSize, Math.min(rawSize, maxSize));
34703
34700
  previewContainer.style.flex = `0 0 ${clamped}px`;
34704
34701
  return clamped;
@@ -34756,7 +34753,6 @@ void main() {
34756
34753
  if (!elem || !button) return;
34757
34754
  const isFullscreen = document.fullscreenElement === elem;
34758
34755
  const label = i18nGet("ide-fullscreen-enter", "Fullscreen");
34759
- button.textContent = "\u26F6";
34760
34756
  button.title = label;
34761
34757
  button.setAttribute("aria-label", label);
34762
34758
  button.classList.toggle("active", isFullscreen);
@@ -34836,7 +34832,9 @@ void main() {
34836
34832
  bottomButtons.insertBefore(downloadFormatSelect, downloadBtn);
34837
34833
  }
34838
34834
  if (downloadBtn) {
34839
- downloadBtn.textContent = i18nGet("openscad-download", "Download");
34835
+ const downloadLabel = i18nGet("openscad-download", "Download");
34836
+ downloadBtn.title = downloadLabel;
34837
+ downloadBtn.setAttribute("aria-label", downloadLabel);
34840
34838
  }
34841
34839
  const normalizeBinaryDest = (dest) => {
34842
34840
  if (typeof dest !== "string") return null;
@@ -35256,14 +35254,19 @@ void main() {
35256
35254
  userBinaryFiles,
35257
35255
  buildAutoBinaryFiles(cm?.getValue() || "", basePath, pagePath)
35258
35256
  );
35259
- const result = await callWorker("render", "render", {
35260
- code: cm?.getValue() || "",
35261
- format,
35262
- libraryNames: libraryNames2,
35263
- binaryFiles: resolvedBinaryFiles,
35264
- paramDefinitions: [],
35265
- isPreview
35266
- }, _scriptBase);
35257
+ const result = await callWorker(
35258
+ "render",
35259
+ "render",
35260
+ {
35261
+ code: cm?.getValue() || "",
35262
+ format,
35263
+ libraryNames: libraryNames2,
35264
+ binaryFiles: resolvedBinaryFiles,
35265
+ paramDefinitions: [],
35266
+ isPreview
35267
+ },
35268
+ _scriptBase
35269
+ );
35267
35270
  const stderr = getInvocationStderr(result);
35268
35271
  if (result?.error || result?.exitCode !== 0) {
35269
35272
  const error = new Error(
@@ -131,7 +131,9 @@
131
131
  }
132
132
 
133
133
  @keyframes openscad-spin {
134
- to { transform: rotate(360deg); }
134
+ to {
135
+ transform: rotate(360deg);
136
+ }
135
137
  }
136
138
 
137
139
  /* Splitter between canvas and parameters card */
@@ -246,6 +248,31 @@
246
248
  border-top-right-radius: 0;
247
249
  }
248
250
 
251
+ /* Icon-only toolbar: the written labels (Reset/Copy/Download) made this row
252
+ wrap on narrow screens, so the wording moved into title/aria-label. */
253
+ .directive-openscad .buttons.bottom button {
254
+ flex: 0 0 auto;
255
+ min-width: 42px;
256
+ width: 42px;
257
+ padding: 8px 0;
258
+ display: flex;
259
+ align-items: center;
260
+ justify-content: center;
261
+ }
262
+
263
+ .directive-openscad .buttons.bottom button .icon {
264
+ width: 18px;
265
+ height: 18px;
266
+ display: block;
267
+ }
268
+
269
+ /* Fullscreen sits apart, at the trailing edge of the toolbar. */
270
+ .directive-openscad .buttons.bottom button.fullscreen {
271
+ margin-inline-start: auto;
272
+ border-right: none;
273
+ border-left: 1px solid var(--color-spacer);
274
+ }
275
+
249
276
  .directive-openscad button {
250
277
  flex: 1;
251
278
  padding: 8px 16px;
@@ -303,8 +330,14 @@
303
330
 
304
331
  .directive-openscad .binary-files-section summary .summary-indicator {
305
332
  transition: transform 0.2s;
306
- display: inline-block;
307
- font-size: 0.75rem;
333
+ display: inline-flex;
334
+ align-items: center;
335
+ }
336
+
337
+ .directive-openscad .binary-files-section summary .summary-indicator .icon {
338
+ width: 14px;
339
+ height: 14px;
340
+ display: block;
308
341
  }
309
342
 
310
343
  .directive-openscad .binary-files-section[open] summary .summary-indicator {
@@ -29,8 +29,13 @@ hyperbook.p5 = (function () {
29
29
 
30
30
  const applySplitSize = (rawSize, isHorizontal) => {
31
31
  const total = isHorizontal ? elem.clientWidth : elem.clientHeight;
32
- const splitterSize = isHorizontal ? splitter.offsetWidth : splitter.offsetHeight;
33
- const maxSize = Math.max(minPanelSize, total - splitterSize - minPanelSize);
32
+ const splitterSize = isHorizontal
33
+ ? splitter.offsetWidth
34
+ : splitter.offsetHeight;
35
+ const maxSize = Math.max(
36
+ minPanelSize,
37
+ total - splitterSize - minPanelSize,
38
+ );
34
39
  const clamped = Math.max(minPanelSize, Math.min(rawSize, maxSize));
35
40
  container.style.flex = `0 0 ${clamped}px`;
36
41
  return clamped;
@@ -90,7 +95,6 @@ hyperbook.p5 = (function () {
90
95
  if (!elem || !button) return;
91
96
  const isFullscreen = document.fullscreenElement === elem;
92
97
  const label = hyperbook.i18n.get("ide-fullscreen-enter");
93
- button.textContent = "⛶";
94
98
  button.title = label;
95
99
  button.setAttribute("aria-label", label);
96
100
  button.classList.toggle("active", isFullscreen);
@@ -219,10 +223,7 @@ hyperbook.p5 = (function () {
219
223
  const observer = new MutationObserver((mutations) => {
220
224
  mutations.forEach((mutation) => {
221
225
  mutation.addedNodes.forEach((node) => {
222
- if (
223
- node.nodeType === 1 &&
224
- node.classList.contains("directive-p5")
225
- ) {
226
+ if (node.nodeType === 1 && node.classList.contains("directive-p5")) {
226
227
  initElement(node);
227
228
  }
228
229
  });
@@ -100,6 +100,31 @@ code-input {
100
100
  border-top-right-radius: 0;
101
101
  }
102
102
 
103
+ /* Icon-only toolbar: the written labels (Reset/Copy/Download) made this row
104
+ wrap on narrow screens, so the wording moved into title/aria-label. */
105
+ .directive-p5 .buttons.bottom button {
106
+ flex: 0 0 auto;
107
+ min-width: 42px;
108
+ width: 42px;
109
+ padding: 8px 0;
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ }
114
+
115
+ .directive-p5 .buttons.bottom button .icon {
116
+ width: 18px;
117
+ height: 18px;
118
+ display: block;
119
+ }
120
+
121
+ /* Fullscreen sits apart, at the trailing edge of the toolbar. */
122
+ .directive-p5 .buttons.bottom button.fullscreen {
123
+ margin-inline-start: auto;
124
+ border-right: none;
125
+ border-left: 1px solid var(--color-spacer);
126
+ }
127
+
103
128
  .directive-p5 button {
104
129
  flex: 1;
105
130
  padding: 8px 16px;
@@ -12,7 +12,7 @@
12
12
  border-width: 1px;
13
13
  }
14
14
 
15
- .directive-protect .password-input>input {
15
+ .directive-protect .password-input > input {
16
16
  text-align: center;
17
17
  border-radius: 10px;
18
18
  font-size: 1.125rem;
@@ -20,7 +20,7 @@
20
20
  border-style: solid;
21
21
  }
22
22
 
23
- .directive-protect .password-input>.icon {
23
+ .directive-protect .password-input > .icon {
24
24
  position: absolute;
25
25
  user-select: none;
26
26
  left: -14px;
@@ -33,17 +33,17 @@
33
33
  margin-bottom: 10px;
34
34
  }
35
35
 
36
- .directive-protect .password-input>.description {
36
+ .directive-protect .password-input > .description {
37
37
  margin-bottom: 10px;
38
38
  }
39
39
 
40
- .directive-protect .password-input>input {
40
+ .directive-protect .password-input > input {
41
41
  color: var(--color-text);
42
42
  background: var(--color-nav);
43
43
  border-color: var(--color-spacer);
44
44
  }
45
45
 
46
- .directive-protect .password-input>.icon {
46
+ .directive-protect .password-input > .icon {
47
47
  background: white;
48
48
  border-color: var(--color-spacer);
49
49
  }
@@ -52,3 +52,9 @@
52
52
  visibility: hidden;
53
53
  display: none;
54
54
  }
55
+
56
+ .directive-protect .password-input > .icon .icon {
57
+ width: 16px;
58
+ height: 16px;
59
+ display: block;
60
+ }