@t8/docsgen 0.4.24 → 0.4.26

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/bin.js CHANGED
@@ -436,8 +436,10 @@ function getPreviewContent(url, title) {
436
436
  let previewURL = new URL(`https://codesandbox.io/embed/${sandboxId}`);
437
437
  let content = title ? `<legend>${title}</legend>` : "";
438
438
  previewURL.searchParams.set("view", "preview");
439
+ previewURL.searchParams.set("hidedevtools", "1");
440
+ previewURL.searchParams.set("theme", "dark");
439
441
  if (file) previewURL.searchParams.set("module", file);
440
- let attrs = [`src="${previewURL.href}"`];
442
+ let attrs = ['class="csb"', `src="${previewURL.href}"`];
441
443
  if (title) attrs.push(`title="${title}"`);
442
444
  if (height) attrs.push(`style="height: ${height}px;"`);
443
445
  content += `<iframe ${attrs.join(" ")} sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts" loading="lazy"></iframe>`;
package/dist/css/base.css CHANGED
@@ -185,3 +185,23 @@ html.blank .layout {
185
185
  justify-content: center;
186
186
  overflow: hidden;
187
187
  }
188
+ fieldset {
189
+ border: 0.05em solid var(--secondary-color);
190
+ padding: 0.25em 0.65em 0.65em;
191
+ margin: var(--block-margin-y) 0;
192
+ }
193
+ fieldset legend {
194
+ font-size: 0.8em;
195
+ color: var(--secondary-color);
196
+ }
197
+ iframe.csb {
198
+ --background: #242424;
199
+ display: block;
200
+ width: 100%;
201
+ height: 360px;
202
+ background: var(--background);
203
+ border: 2px solid var(--background);
204
+ border-width: 2px 3px;
205
+ box-sizing: border-box;
206
+ overflow: hidden;
207
+ }
@@ -250,21 +250,6 @@ main h2 {
250
250
  main h2:first-child {
251
251
  margin-top: 0;
252
252
  }
253
- main fieldset {
254
- border: 0.05em solid var(--secondary-color);
255
- margin: var(--block-margin-y) 0;
256
- }
257
- main fieldset legend {
258
- font-size: 0.8em;
259
- color: var(--secondary-color);
260
- }
261
- main fieldset iframe {
262
- width: 100%;
263
- height: 360px;
264
- background: var(--code-block-background);
265
- border: none;
266
- overflow: hidden;
267
- }
268
253
 
269
254
  .pagenav {
270
255
  --icon-width: 1.25em;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/docsgen",
3
- "version": "0.4.24",
3
+ "version": "0.4.26",
4
4
  "description": "",
5
5
  "main": "dist/bin.js",
6
6
  "type": "module",
@@ -15,10 +15,12 @@ function getPreviewContent(url: string, title?: string) {
15
15
  let content = title ? `<legend>${title}</legend>` : "";
16
16
 
17
17
  previewURL.searchParams.set("view", "preview");
18
+ previewURL.searchParams.set("hidedevtools", "1");
19
+ previewURL.searchParams.set("theme", "dark");
18
20
 
19
21
  if (file) previewURL.searchParams.set("module", file);
20
22
 
21
- let attrs = [`src="${previewURL.href}"`];
23
+ let attrs = ['class="csb"', `src="${previewURL.href}"`];
22
24
 
23
25
  if (title) attrs.push(`title="${title}"`);
24
26
  if (height) attrs.push(`style="height: ${height}px;"`);
package/src/css/base.css CHANGED
@@ -185,3 +185,23 @@ html.blank .layout {
185
185
  justify-content: center;
186
186
  overflow: hidden;
187
187
  }
188
+ fieldset {
189
+ border: 0.05em solid var(--secondary-color);
190
+ padding: 0.25em 0.65em 0.65em;
191
+ margin: var(--block-margin-y) 0;
192
+ }
193
+ fieldset legend {
194
+ font-size: 0.8em;
195
+ color: var(--secondary-color);
196
+ }
197
+ iframe.csb {
198
+ --background: #242424;
199
+ display: block;
200
+ width: 100%;
201
+ height: 360px;
202
+ background: var(--background);
203
+ border: 2px solid var(--background);
204
+ border-width: 2px 3px;
205
+ box-sizing: border-box;
206
+ overflow: hidden;
207
+ }
@@ -250,21 +250,6 @@ main h2 {
250
250
  main h2:first-child {
251
251
  margin-top: 0;
252
252
  }
253
- main fieldset {
254
- border: 0.05em solid var(--secondary-color);
255
- margin: var(--block-margin-y) 0;
256
- }
257
- main fieldset legend {
258
- font-size: 0.8em;
259
- color: var(--secondary-color);
260
- }
261
- main fieldset iframe {
262
- width: 100%;
263
- height: 360px;
264
- background: var(--code-block-background);
265
- border: none;
266
- overflow: hidden;
267
- }
268
253
 
269
254
  .pagenav {
270
255
  --icon-width: 1.25em;