tosijs-ui 1.9.0 → 1.9.2
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/CHANGELOG.md +83 -0
- package/dist/babylon-3d.js +2 -2
- package/dist/bodymovin-player.js +1 -1
- package/dist/carousel.js +1 -1
- package/dist/code-editor.d.ts +2 -2
- package/dist/code-editor.js +3 -3
- package/dist/data-table.d.ts +2 -2
- package/dist/data-table.js +10 -10
- package/dist/dialog.js +1 -1
- package/dist/doc-browser.d.ts +1 -1
- package/dist/doc-browser.js +37 -15
- package/dist/doc-system/book-html.d.ts +1 -1
- package/dist/doc-system/book-html.js +3 -3
- package/dist/doc-system/book-target.js +1 -1
- package/dist/doc-system/css-var-editor.d.ts +1 -1
- package/dist/doc-system/css-var-editor.js +1 -1
- package/dist/doc-system/doc-system-styles.js +25 -4
- package/dist/doc-system/doc-system.d.ts +1 -1
- package/dist/doc-system/doc-system.js +8 -8
- package/dist/doc-system/nav-tree.js +1 -1
- package/dist/doc-system/site/check-examples-cli.js +1 -1
- package/dist/doc-system/site/check-examples.d.ts +2 -2
- package/dist/doc-system/site/check-examples.js +1 -1
- package/dist/doc-system/site/dev-server.d.ts +2 -2
- package/dist/doc-system/site/dev-server.js +53 -68
- package/dist/doc-system/site/docs.js +3 -3
- package/dist/doc-system/site/epub-cli.js +1 -1
- package/dist/doc-system/site/epub.d.ts +2 -2
- package/dist/doc-system/site/epub.js +6 -6
- package/dist/doc-system/site/generate-css.d.ts +2 -2
- package/dist/doc-system/site/generate-css.js +2 -2
- package/dist/doc-system/site/generate-site.d.ts +3 -3
- package/dist/doc-system/site/generate-site.js +4 -4
- package/dist/doc-system/site/index.d.ts +16 -16
- package/dist/doc-system/site/index.js +9 -9
- package/dist/doc-system/site/make-llms-txt.js +1 -1
- package/dist/doc-system/site/orchestrator.d.ts +1 -1
- package/dist/doc-system/site/orchestrator.js +12 -12
- package/dist/doc-system/site/sections.js +2 -2
- package/dist/doc-system/site/site-config.d.ts +6 -6
- package/dist/editable-rect.js +2 -2
- package/dist/filter-builder.d.ts +1 -1
- package/dist/filter-builder.js +2 -2
- package/dist/float.js +1 -1
- package/dist/form.js +1 -1
- package/dist/header.js +2 -2
- package/dist/icon-svg.js +1 -1
- package/dist/icons/data/index.d.ts +313 -313
- package/dist/icons/data/index.js +313 -313
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +2 -2
- package/dist/iife.js +82 -82
- package/dist/iife.js.map +47 -47
- package/dist/index-iife.js +1 -1
- package/dist/index.d.ts +49 -49
- package/dist/index.js +49 -49
- package/dist/live-example/code-transform.d.ts +1 -1
- package/dist/live-example/component.d.ts +1 -1
- package/dist/live-example/component.js +14 -14
- package/dist/live-example/execution.d.ts +1 -1
- package/dist/live-example/execution.js +1 -1
- package/dist/live-example/index.d.ts +8 -8
- package/dist/live-example/index.js +6 -6
- package/dist/live-example/insert-examples.d.ts +2 -2
- package/dist/live-example/remote-sync.d.ts +1 -1
- package/dist/live-example/test-harness.d.ts +1 -1
- package/dist/live-example/test-harness.js +1 -1
- package/dist/live-example/types.d.ts +2 -2
- package/dist/live-example.d.ts +1 -1
- package/dist/live-example.js +1 -1
- package/dist/live-theme.js +5 -5
- package/dist/localize.d.ts +1 -1
- package/dist/localize.js +2 -2
- package/dist/mapbox.js +1 -1
- package/dist/menu.d.ts +2 -2
- package/dist/menu.js +5 -5
- package/dist/month.d.ts +2 -2
- package/dist/month.js +3 -3
- package/dist/notifications.js +2 -2
- package/dist/pocket-bar.d.ts +1 -1
- package/dist/pocket-bar.js +2 -2
- package/dist/pop-float.d.ts +1 -1
- package/dist/pop-float.js +2 -2
- package/dist/rating.js +1 -1
- package/dist/rich-text.d.ts +1 -1
- package/dist/rich-text.js +3 -3
- package/dist/segmented.js +2 -2
- package/dist/select.d.ts +1 -1
- package/dist/select.js +3 -3
- package/dist/sizer.js +2 -2
- package/dist/tab-selector.js +2 -2
- package/dist/tag-list.js +2 -2
- package/dist/theme.js +4 -4
- package/dist/tooltip.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/value-renderer.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/llms.txt +1 -1
- package/package.json +4 -1
|
@@ -9,13 +9,14 @@ Build-time only (Bun APIs). Never import this from browser code.
|
|
|
9
9
|
*/
|
|
10
10
|
import * as path from 'path';
|
|
11
11
|
import { statSync } from 'fs';
|
|
12
|
+
import { tmpdir } from 'os';
|
|
12
13
|
import { $, spawn } from 'bun';
|
|
13
|
-
import { buildSite } from './orchestrator';
|
|
14
|
-
import { preflight } from './preflight';
|
|
15
|
-
import { auditDependencies, reportAudit } from './audit-guard';
|
|
16
|
-
import { openDevBrowser } from './open-browser';
|
|
17
|
-
import { resolveTunnelLocalPort } from './site-config';
|
|
18
|
-
import { TUNNEL_LINK_CMD, isLockedDown, hasTunnel, isLoopbackAddressForAuth as isLoopbackAddress, mayReadSite, shouldInterceptLinkToken, createAuthState, issueLink, readCookie, redeemLink, sessionCookie, urlWithoutToken, validSession, mayWriteSource, isProxiedRequest, SESSION_COOKIE, } from './dev-auth';
|
|
14
|
+
import { buildSite } from './orchestrator.js';
|
|
15
|
+
import { preflight } from './preflight.js';
|
|
16
|
+
import { auditDependencies, reportAudit } from './audit-guard.js';
|
|
17
|
+
import { openDevBrowser } from './open-browser.js';
|
|
18
|
+
import { resolveTunnelLocalPort } from './site-config.js';
|
|
19
|
+
import { TUNNEL_LINK_CMD, isLockedDown, hasTunnel, isLoopbackAddressForAuth as isLoopbackAddress, mayReadSite, shouldInterceptLinkToken, createAuthState, issueLink, readCookie, redeemLink, sessionCookie, urlWithoutToken, validSession, mayWriteSource, isProxiedRequest, SESSION_COOKIE, } from './dev-auth.js';
|
|
19
20
|
const TEST_RESULTS_FILE = '.browser-tests.json';
|
|
20
21
|
const DEFAULT_IDLE_HOURS = 8;
|
|
21
22
|
/**
|
|
@@ -1210,7 +1211,6 @@ export async function devServer(config, opts = {}) {
|
|
|
1210
1211
|
testReportResolve = resolve;
|
|
1211
1212
|
setTimeout(() => reject(new Error('Browser tests timed out')), testTimeout);
|
|
1212
1213
|
});
|
|
1213
|
-
let haltija;
|
|
1214
1214
|
/**
|
|
1215
1215
|
* Tear down the haltija WE started — including the Electron grandchild. Defined up
|
|
1216
1216
|
* front so EVERY failure path can call it, including the start-timeout below, which
|
|
@@ -1270,72 +1270,55 @@ export async function devServer(config, opts = {}) {
|
|
|
1270
1270
|
|
|
1271
1271
|
Declining to adopt is safe: we spawn with `-f`, which stomps the stale instance.
|
|
1272
1272
|
*/
|
|
1273
|
-
|
|
1273
|
+
/*
|
|
1274
|
+
ALWAYS an isolated instance. Never adopt, never stomp.
|
|
1275
|
+
|
|
1276
|
+
The lane used to reuse any reachable haltija and otherwise spawn with `-f`, which
|
|
1277
|
+
reclaims the shared default port and SIGTERMs whatever held it — often another
|
|
1278
|
+
project's session. Both halves were a problem:
|
|
1279
|
+
|
|
1280
|
+
- adopting meant inheriting the DESKTOP app's window, whose visibility depends on
|
|
1281
|
+
whatever else is on screen. `hj` refuses to drive a hidden tab (rightly — a
|
|
1282
|
+
backgrounded tab throttles rAF, so results are plausible-but-wrong), so the lane
|
|
1283
|
+
failed intermittently, roughly two runs in three, with no programmatic way out.
|
|
1284
|
+
- `-f` made this project's test run destructive to everyone else's.
|
|
1285
|
+
|
|
1286
|
+
`--private` gives us our own server on an EPHEMERAL port, so there is nothing to
|
|
1287
|
+
contend for and nothing to kill. The port is written to a file rather than guessed.
|
|
1288
|
+
(tosijs-ui#18, #21.)
|
|
1289
|
+
*/
|
|
1290
|
+
const portFile = `${tmpdir()}/tosijs-haltija-${process.pid}.json`;
|
|
1291
|
+
console.log('Starting a private haltija…');
|
|
1292
|
+
const haltija = spawn(['bunx', HALTIJA_PKG, '--private', '--port-file', portFile], {
|
|
1293
|
+
// stdout/stderr are NOT inherited: `bunx haltija` launches Electron as a
|
|
1294
|
+
// grandchild, and killing the bunx wrapper does not kill it. An orphan holding
|
|
1295
|
+
// our inherited stdout keeps the pipe open forever, so the command looks hung
|
|
1296
|
+
// long after it exited.
|
|
1297
|
+
stdout: 'ignore',
|
|
1298
|
+
stderr: 'ignore',
|
|
1299
|
+
});
|
|
1300
|
+
// Read the port it actually bound, rather than assuming one.
|
|
1301
|
+
let hjPort = '';
|
|
1302
|
+
for (let i = 0; i < 60; i++) {
|
|
1303
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
1274
1304
|
try {
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
`JSON.parse` throws and a `catch` that fell through to `return true` adopted the
|
|
1280
|
-
very dead server this check exists to reject — the gate was inert on every
|
|
1281
|
-
npm-installed CLI. It passed verification here only because this machine's `hj` is
|
|
1282
|
-
a standalone bundle with no `hints.json` beside it, so the hint was never emitted:
|
|
1283
|
-
a real behavioural test, run against an environment adopters do not have.
|
|
1284
|
-
|
|
1285
|
-
Failing closed costs nothing: the spawn below uses `-f`, which stomps a stale
|
|
1286
|
-
instance. Adopting a server we could not read is the expensive direction.
|
|
1287
|
-
*/
|
|
1288
|
-
const out = await $ `hj windows --json`.quiet().text();
|
|
1289
|
-
return haltijaIsDrivable(out);
|
|
1305
|
+
const info = JSON.parse(await Bun.file(portFile).text());
|
|
1306
|
+
hjPort = String(info.port ?? info.address?.port ?? '');
|
|
1307
|
+
if (hjPort)
|
|
1308
|
+
break;
|
|
1290
1309
|
}
|
|
1291
1310
|
catch {
|
|
1292
|
-
|
|
1311
|
+
/* not written yet */
|
|
1293
1312
|
}
|
|
1294
|
-
};
|
|
1295
|
-
const adoptable = await haltijaReachable();
|
|
1296
|
-
if (!adoptable) {
|
|
1297
|
-
/*
|
|
1298
|
-
Leave a receipt: spawning with `-f` reclaims haltija's shared default port, which
|
|
1299
|
-
SIGTERMs whatever was there — frequently another project's session, or the
|
|
1300
|
-
developer's own. This file already sets that norm for killStrayServer; declining to
|
|
1301
|
-
adopt makes the stomp MORE frequent, so it must be at least as loud.
|
|
1302
|
-
*/
|
|
1303
|
-
console.log(`No drivable haltija (server absent, or up with no connected tab).\n` +
|
|
1304
|
-
` Starting one with -f, which reclaims the shared haltija port — any other\n` +
|
|
1305
|
-
` project's session on it will be stopped. (cwd: ${process.cwd()})`);
|
|
1306
1313
|
}
|
|
1307
|
-
if (
|
|
1308
|
-
console.
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
// grandchild, and killing the bunx wrapper does not kill it. An orphaned Electron
|
|
1314
|
-
// holding our inherited stdout keeps the pipe open forever, so a CI job or an
|
|
1315
|
-
// agent capturing this command's output sees it hang long after it exited (0).
|
|
1316
|
-
haltija = spawn(['bunx', HALTIJA_PKG, '-f'], {
|
|
1317
|
-
stdout: 'ignore',
|
|
1318
|
-
stderr: 'ignore',
|
|
1319
|
-
});
|
|
1320
|
-
const waitStarted = Date.now();
|
|
1321
|
-
console.log('Waiting for haltija…');
|
|
1322
|
-
let up = false;
|
|
1323
|
-
for (let i = 0; i < 20; i++) {
|
|
1324
|
-
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
1325
|
-
if (await haltijaReachable()) {
|
|
1326
|
-
up = true;
|
|
1327
|
-
break;
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
if (!up) {
|
|
1331
|
-
console.error(`haltija did not become drivable within ${Math.round((Date.now() - waitStarted) / 1000)}s.\n` +
|
|
1332
|
-
` A single \`hj windows\` can block for several seconds when a server is up\n` +
|
|
1333
|
-
` with no tab, so this can take much longer than the poll count suggests.`);
|
|
1334
|
-
await stopHaltija();
|
|
1335
|
-
server.stop();
|
|
1336
|
-
process.exit(1);
|
|
1337
|
-
}
|
|
1314
|
+
if (!hjPort) {
|
|
1315
|
+
console.error(`haltija did not report a private port within 30s (${portFile}).\n` +
|
|
1316
|
+
` Is \`bunx ${HALTIJA_PKG}\` able to run? Try it by hand.`);
|
|
1317
|
+
await stopHaltija();
|
|
1318
|
+
server.stop();
|
|
1319
|
+
process.exit(1);
|
|
1338
1320
|
}
|
|
1321
|
+
console.log(` private haltija on port ${hjPort}`);
|
|
1339
1322
|
console.log('Opening demo site...');
|
|
1340
1323
|
// haltija 1.4: `hj navigate` exits NON-ZERO on failure (no browser reachable, a
|
|
1341
1324
|
// window that didn't take the URL, …). Before 1.4 it exited 0 regardless, so a
|
|
@@ -1343,7 +1326,9 @@ export async function devServer(config, opts = {}) {
|
|
|
1343
1326
|
// timeout with a misleading "Browser tests timed out". Now we can read the exit
|
|
1344
1327
|
// code: fail immediately, say why, and tear down the haltija we spawned so the
|
|
1345
1328
|
// next run isn't inheriting a half-navigated browser.
|
|
1346
|
-
const nav = await $ `hj navigate https://localhost:${PORT}
|
|
1329
|
+
const nav = await $ `hj --port ${hjPort} navigate https://localhost:${PORT}`
|
|
1330
|
+
.nothrow()
|
|
1331
|
+
.quiet();
|
|
1347
1332
|
if (nav.exitCode !== 0) {
|
|
1348
1333
|
console.error(`hj navigate failed (exit ${nav.exitCode}): ${nav.stderr.toString().trim() || 'no browser reachable'}`);
|
|
1349
1334
|
await stopHaltija();
|
|
@@ -95,9 +95,9 @@ e.g. `{ "pin": "top", "order": 1 }` above `{ "pin": "top", "order": 2 }`.
|
|
|
95
95
|
// TODO CLI options
|
|
96
96
|
import * as fs from 'fs';
|
|
97
97
|
import * as path from 'path';
|
|
98
|
-
import { pinnedSort } from '../nav-tree';
|
|
99
|
-
import { buildSlugMap } from '../routing';
|
|
100
|
-
import { withoutHidden } from '../book-target';
|
|
98
|
+
import { pinnedSort } from '../nav-tree.js';
|
|
99
|
+
import { buildSlugMap } from '../routing.js';
|
|
100
|
+
import { withoutHidden } from '../book-target.js';
|
|
101
101
|
const TRIM_REGEX = /^#+ |`/g;
|
|
102
102
|
/**
|
|
103
103
|
* Parse & strip a leading YAML frontmatter block (`---\n…\n---`). Every prose
|
|
@@ -12,7 +12,7 @@ the Bun.build note in orchestrator.ts.
|
|
|
12
12
|
|
|
13
13
|
Build-time only. Never import this from browser code.
|
|
14
14
|
*/
|
|
15
|
-
import { buildEpub } from './epub';
|
|
15
|
+
import { buildEpub } from './epub.js';
|
|
16
16
|
const payloadPath = process.argv[2];
|
|
17
17
|
if (!payloadPath) {
|
|
18
18
|
console.error('epub-cli: expected a payload file path');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SiteConfig } from './site-config';
|
|
2
|
-
import { DEFAULT_BOOK_CSS, stripDocMeta } from '../book-html';
|
|
1
|
+
import type { SiteConfig } from './site-config.js';
|
|
2
|
+
import { DEFAULT_BOOK_CSS, stripDocMeta } from '../book-html.js';
|
|
3
3
|
export { DEFAULT_BOOK_CSS, stripDocMeta };
|
|
4
4
|
declare global {
|
|
5
5
|
var Bun: any;
|
|
@@ -16,12 +16,12 @@ Build-time only (Bun APIs + the `zip` CLI); never import from browser code.
|
|
|
16
16
|
*/
|
|
17
17
|
import * as fs from 'fs';
|
|
18
18
|
import * as path from 'path';
|
|
19
|
-
import { renderDocMarkdown } from '../render';
|
|
20
|
-
import { buildSlugMap, pathForSlug, slugForPath } from '../routing';
|
|
21
|
-
import { buildNavTree } from '../nav-tree';
|
|
22
|
-
import { partitionByBook, DEFAULT_BOOK } from '../book-target';
|
|
23
|
-
import { DEFAULT_BOOK_CSS, stripDocMeta, flatten, slugify } from '../book-html';
|
|
24
|
-
import { selectBookDocs } from '../book-manifest';
|
|
19
|
+
import { renderDocMarkdown } from '../render.js';
|
|
20
|
+
import { buildSlugMap, pathForSlug, slugForPath } from '../routing.js';
|
|
21
|
+
import { buildNavTree } from '../nav-tree.js';
|
|
22
|
+
import { partitionByBook, DEFAULT_BOOK } from '../book-target.js';
|
|
23
|
+
import { DEFAULT_BOOK_CSS, stripDocMeta, flatten, slugify } from '../book-html.js';
|
|
24
|
+
import { selectBookDocs } from '../book-manifest.js';
|
|
25
25
|
// Re-exported for back-compat (tosijs-ui/site's public surface + tests).
|
|
26
26
|
export { DEFAULT_BOOK_CSS, stripDocMeta };
|
|
27
27
|
// ── XML / XHTML helpers ─────────────────────────────────────────────────────
|
|
@@ -10,9 +10,9 @@ would trigger an endless watch->rebuild loop.
|
|
|
10
10
|
Usage: bun src/doc-system/site/generate-css.ts [outputPath]
|
|
11
11
|
Default output: docs/doc-system.css
|
|
12
12
|
*/
|
|
13
|
-
import './build-dom-shim'; // must precede any tosijs import (build has no DOM)
|
|
13
|
+
import './build-dom-shim.js'; // must precede any tosijs import (build has no DOM)
|
|
14
14
|
import { css } from 'tosijs';
|
|
15
|
-
import { docSystemStyleSpec } from '../doc-system-styles';
|
|
15
|
+
import { docSystemStyleSpec } from '../doc-system-styles.js';
|
|
16
16
|
export async function generateCss(outputPath = 'docs/doc-system.css', theme = {}) {
|
|
17
17
|
await Bun.write(outputPath, css(docSystemStyleSpec(theme)));
|
|
18
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Doc } from './docs';
|
|
2
|
-
import type { ProjectLinks, LinkItem } from '../../doc-browser';
|
|
3
|
-
import { type ExampleBakes } from '../render';
|
|
1
|
+
import type { Doc } from './docs.js';
|
|
2
|
+
import type { ProjectLinks, LinkItem } from '../../doc-browser.js';
|
|
3
|
+
import { type ExampleBakes } from '../render.js';
|
|
4
4
|
declare global {
|
|
5
5
|
var Bun: any;
|
|
6
6
|
}
|
|
@@ -10,10 +10,10 @@ the IIFE bundle loads.
|
|
|
10
10
|
Build-time only (uses Bun.write). Shares slug + markdown rendering with the runtime
|
|
11
11
|
component (src/doc-system/*) so static and hydrated output agree.
|
|
12
12
|
*/
|
|
13
|
-
import { pageTitle } from '../doc-title';
|
|
14
|
-
import { buildSlugMap, pathForSlug, rewriteDocLinks } from '../routing';
|
|
15
|
-
import { buildNavTree, navOpenPath } from '../nav-tree';
|
|
16
|
-
import { renderDocMarkdown, docDescription } from '../render';
|
|
13
|
+
import { pageTitle } from '../doc-title.js';
|
|
14
|
+
import { buildSlugMap, pathForSlug, rewriteDocLinks } from '../routing.js';
|
|
15
|
+
import { buildNavTree, navOpenPath } from '../nav-tree.js';
|
|
16
|
+
import { renderDocMarkdown, docDescription } from '../render.js';
|
|
17
17
|
const escapeAttr = (s) => s
|
|
18
18
|
.replace(/&/g, '&')
|
|
19
19
|
.replace(/</g, '<')
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { defineSiteConfig } from './site-config';
|
|
2
|
-
export type { SiteConfig, SiteHost, LibraryBuildContext } from './site-config';
|
|
3
|
-
export { buildSite } from './orchestrator';
|
|
4
|
-
export { devServer } from './dev-server';
|
|
5
|
-
export { auditDependencies, reportAudit, resolveAuditMode } from './audit-guard';
|
|
6
|
-
export type { AuditConfig, AuditGate, AuditResult, AuditSeverity, AuditMode, AuditAdvisory, } from './audit-guard';
|
|
7
|
-
export { openDevBrowser, buildOpenPlan } from './open-browser';
|
|
8
|
-
export type { OpenPlan, OpenPlanInput } from './open-browser';
|
|
9
|
-
export { extractDocs, saveDocsJSON } from './docs';
|
|
10
|
-
export type { Doc } from './docs';
|
|
11
|
-
export { generateSite } from './generate-site';
|
|
12
|
-
export type { GenerateSiteConfig } from './generate-site';
|
|
13
|
-
export { buildEpub, DEFAULT_BOOK_CSS } from './epub';
|
|
14
|
-
export type { BuildEpubOptions, BookMeta } from './epub';
|
|
15
|
-
export { selectBookDocs } from '../book-manifest';
|
|
16
|
-
export type { BookManifest } from '../book-manifest';
|
|
1
|
+
export { defineSiteConfig } from './site-config.js';
|
|
2
|
+
export type { SiteConfig, SiteHost, LibraryBuildContext } from './site-config.js';
|
|
3
|
+
export { buildSite } from './orchestrator.js';
|
|
4
|
+
export { devServer } from './dev-server.js';
|
|
5
|
+
export { auditDependencies, reportAudit, resolveAuditMode } from './audit-guard.js';
|
|
6
|
+
export type { AuditConfig, AuditGate, AuditResult, AuditSeverity, AuditMode, AuditAdvisory, } from './audit-guard.js';
|
|
7
|
+
export { openDevBrowser, buildOpenPlan } from './open-browser.js';
|
|
8
|
+
export type { OpenPlan, OpenPlanInput } from './open-browser.js';
|
|
9
|
+
export { extractDocs, saveDocsJSON } from './docs.js';
|
|
10
|
+
export type { Doc } from './docs.js';
|
|
11
|
+
export { generateSite } from './generate-site.js';
|
|
12
|
+
export type { GenerateSiteConfig } from './generate-site.js';
|
|
13
|
+
export { buildEpub, DEFAULT_BOOK_CSS } from './epub.js';
|
|
14
|
+
export type { BuildEpubOptions, BookMeta } from './epub.js';
|
|
15
|
+
export { selectBookDocs } from '../book-manifest.js';
|
|
16
|
+
export type { BookManifest } from '../book-manifest.js';
|
|
@@ -3,12 +3,12 @@ Public entry for `tosijs-ui/site` — the static, pre-rendered, hydrating
|
|
|
3
3
|
doc-site build system. Build-time only (Bun/node APIs); never import this from
|
|
4
4
|
browser code. See ./README is at ../doc-site-system.md and the repo docs.
|
|
5
5
|
*/
|
|
6
|
-
export { defineSiteConfig } from './site-config';
|
|
7
|
-
export { buildSite } from './orchestrator';
|
|
8
|
-
export { devServer } from './dev-server';
|
|
9
|
-
export { auditDependencies, reportAudit, resolveAuditMode } from './audit-guard';
|
|
10
|
-
export { openDevBrowser, buildOpenPlan } from './open-browser';
|
|
11
|
-
export { extractDocs, saveDocsJSON } from './docs';
|
|
12
|
-
export { generateSite } from './generate-site';
|
|
13
|
-
export { buildEpub, DEFAULT_BOOK_CSS } from './epub';
|
|
14
|
-
export { selectBookDocs } from '../book-manifest';
|
|
6
|
+
export { defineSiteConfig } from './site-config.js';
|
|
7
|
+
export { buildSite } from './orchestrator.js';
|
|
8
|
+
export { devServer } from './dev-server.js';
|
|
9
|
+
export { auditDependencies, reportAudit, resolveAuditMode } from './audit-guard.js';
|
|
10
|
+
export { openDevBrowser, buildOpenPlan } from './open-browser.js';
|
|
11
|
+
export { extractDocs, saveDocsJSON } from './docs.js';
|
|
12
|
+
export { generateSite } from './generate-site.js';
|
|
13
|
+
export { buildEpub, DEFAULT_BOOK_CSS } from './epub.js';
|
|
14
|
+
export { selectBookDocs } from '../book-manifest.js';
|
|
@@ -12,21 +12,21 @@ the icon system here would put src/icon-data.ts into `bun --watch`'s graph and
|
|
|
12
12
|
cause an endless rebuild loop.
|
|
13
13
|
*/
|
|
14
14
|
import * as path from 'path';
|
|
15
|
-
import { namedBooks, partitionByBook, DEFAULT_BOOK } from '../book-target';
|
|
16
|
-
import { buildSlugMap } from '../routing';
|
|
15
|
+
import { namedBooks, partitionByBook, DEFAULT_BOOK } from '../book-target.js';
|
|
16
|
+
import { buildSlugMap } from '../routing.js';
|
|
17
17
|
import { existsSync, mkdirSync, unlinkSync } from 'fs';
|
|
18
18
|
import { tmpdir } from 'os';
|
|
19
19
|
import { $, spawn } from 'bun';
|
|
20
|
-
import { extractDocs } from './docs';
|
|
21
|
-
import { checkExamples, formatExampleProblems, } from './check-examples';
|
|
22
|
-
import { ensureSections } from './sections';
|
|
23
|
-
import { generateLlmsTxt } from './make-llms-txt';
|
|
24
|
-
import { generateSite } from './generate-site';
|
|
25
|
-
import { findOutputDirOverlap } from './output-guard';
|
|
26
|
-
import { preflight } from './preflight';
|
|
27
|
-
import { auditDependencies, reportAudit } from './audit-guard';
|
|
28
|
-
import { gatherBuildStamp, serializeBuildStamp } from './build-stamp';
|
|
29
|
-
import { tjsEditorExternal, tjsEditorLeakedAsExternal, classicScriptSyntaxErrorInChild, } from './bundle-guard';
|
|
20
|
+
import { extractDocs } from './docs.js';
|
|
21
|
+
import { checkExamples, formatExampleProblems, } from './check-examples.js';
|
|
22
|
+
import { ensureSections } from './sections.js';
|
|
23
|
+
import { generateLlmsTxt } from './make-llms-txt.js';
|
|
24
|
+
import { generateSite } from './generate-site.js';
|
|
25
|
+
import { findOutputDirOverlap } from './output-guard.js';
|
|
26
|
+
import { preflight } from './preflight.js';
|
|
27
|
+
import { auditDependencies, reportAudit } from './audit-guard.js';
|
|
28
|
+
import { gatherBuildStamp, serializeBuildStamp } from './build-stamp.js';
|
|
29
|
+
import { tjsEditorExternal, tjsEditorLeakedAsExternal, classicScriptSyntaxErrorInChild, } from './bundle-guard.js';
|
|
30
30
|
// Module specifiers contain regex metacharacters (`/`, `.`, `@`, …), so escape
|
|
31
31
|
// before interpolating into the require-shim detector below.
|
|
32
32
|
/** Give up on a hung ePub child rather than wedge the dev server's rebuild. */
|
|
@@ -13,8 +13,8 @@ doesn't loop. TOC links are root-relative (basePath-agnostic source).
|
|
|
13
13
|
*/
|
|
14
14
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
15
15
|
import * as path from 'path';
|
|
16
|
-
import { buildSlugMap, pathForSlug, slugify, resolveParent } from '../routing';
|
|
17
|
-
import { pinnedSort } from '../nav-tree';
|
|
16
|
+
import { buildSlugMap, pathForSlug, slugify, resolveParent } from '../routing.js';
|
|
17
|
+
import { pinnedSort } from '../nav-tree.js';
|
|
18
18
|
const TOC_RE = /<!-- toc -->[\s\S]*?<!-- \/toc -->/;
|
|
19
19
|
function readDocs(p) {
|
|
20
20
|
return JSON.parse(readFileSync(p, 'utf8'));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ProjectLinks, LinkItem } from '../../doc-browser';
|
|
2
|
-
import type { DocSystemTheme } from '../doc-system-styles';
|
|
3
|
-
import type { Doc } from './docs';
|
|
4
|
-
import type { PreflightMode } from './preflight';
|
|
5
|
-
import type { AuditConfig } from './audit-guard';
|
|
6
|
-
import type { BookManifest } from '../book-manifest';
|
|
1
|
+
import type { ProjectLinks, LinkItem } from '../../doc-browser.js';
|
|
2
|
+
import type { DocSystemTheme } from '../doc-system-styles.js';
|
|
3
|
+
import type { Doc } from './docs.js';
|
|
4
|
+
import type { PreflightMode } from './preflight.js';
|
|
5
|
+
import type { AuditConfig } from './audit-guard.js';
|
|
6
|
+
import type { BookManifest } from '../book-manifest.js';
|
|
7
7
|
export type SiteHost = 'github-pages' | 'firebase' | 'static';
|
|
8
8
|
/** Resolved paths handed to a `libraryBuild` override (see SiteConfig). */
|
|
9
9
|
export interface LibraryBuildContext {
|
package/dist/editable-rect.js
CHANGED
|
@@ -69,8 +69,8 @@ After an element's position, size, or rotation are adjusted a `change` event is
|
|
|
69
69
|
*/
|
|
70
70
|
/*{ "parent": "Components" }*/
|
|
71
71
|
import { Component, elements, vars } from 'tosijs';
|
|
72
|
-
import { icons } from './icons';
|
|
73
|
-
import { trackDrag } from './track-drag';
|
|
72
|
+
import { icons } from './icons.js';
|
|
73
|
+
import { trackDrag } from './track-drag.js';
|
|
74
74
|
const { div, slot } = elements;
|
|
75
75
|
export class EditableRect extends Component {
|
|
76
76
|
static preferredTagName = 'tosi-editable';
|
package/dist/filter-builder.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component as WebComponent, ElementCreator, PartsMap } from 'tosijs';
|
|
2
|
-
import { TosiSelect } from './select';
|
|
2
|
+
import { TosiSelect } from './select.js';
|
|
3
3
|
type ObjectTest = (obj: any) => boolean;
|
|
4
4
|
type ArrayFilter = (array: any[]) => any[];
|
|
5
5
|
interface FilterMaker {
|
package/dist/filter-builder.js
CHANGED
|
@@ -145,8 +145,8 @@ interface FilterMaker {
|
|
|
145
145
|
*/
|
|
146
146
|
/*{ "parent": "Form Components" }*/
|
|
147
147
|
import { Component as WebComponent, elements, } from 'tosijs';
|
|
148
|
-
import { icons } from './icons';
|
|
149
|
-
import { tosiSelect } from './select';
|
|
148
|
+
import { icons } from './icons.js';
|
|
149
|
+
import { tosiSelect } from './select.js';
|
|
150
150
|
const { div, input, button, span } = elements;
|
|
151
151
|
const passThru = (array) => array;
|
|
152
152
|
const NULL_FILTER_DESCRIPTION = 'null filter, everything matches';
|
package/dist/float.js
CHANGED
|
@@ -90,7 +90,7 @@ just add the `no-drag` class to an element or its container.
|
|
|
90
90
|
*/
|
|
91
91
|
/*{ "parent": "Components" }*/
|
|
92
92
|
import { Component as WebComponent, elements } from 'tosijs';
|
|
93
|
-
import { trackDrag, bringToFront } from './track-drag';
|
|
93
|
+
import { trackDrag, bringToFront } from './track-drag.js';
|
|
94
94
|
const { slot } = elements;
|
|
95
95
|
export class TosiFloat extends WebComponent {
|
|
96
96
|
static preferredTagName = 'tosi-float';
|
package/dist/form.js
CHANGED
|
@@ -403,7 +403,7 @@ preview.querySelector('.set-values-btn').addEventListener('click', () => {
|
|
|
403
403
|
*/
|
|
404
404
|
/*{ "parent": "Form Components" }*/
|
|
405
405
|
import { Component as XinComponent, elements, varDefault, } from 'tosijs';
|
|
406
|
-
import { colorInput } from './color-input';
|
|
406
|
+
import { colorInput } from './color-input.js';
|
|
407
407
|
const { form, slot, tosiSlot, label, input, span } = elements;
|
|
408
408
|
function attr(element, name, value) {
|
|
409
409
|
if (value !== '' && value !== false) {
|
package/dist/header.js
CHANGED
|
@@ -89,7 +89,7 @@ preview.append(
|
|
|
89
89
|
*/
|
|
90
90
|
/*{ "parent": "Components" }*/
|
|
91
91
|
import { Component, elements, varDefault } from 'tosijs';
|
|
92
|
-
import { icons } from './icons';
|
|
92
|
+
import { icons } from './icons.js';
|
|
93
93
|
const { a } = elements;
|
|
94
94
|
// ============================================================================
|
|
95
95
|
// Header Component
|
|
@@ -101,7 +101,7 @@ export class TosiHeader extends Component {
|
|
|
101
101
|
display: 'flex',
|
|
102
102
|
alignItems: 'center',
|
|
103
103
|
padding: varDefault.tosiHeaderPadding('12px 24px'),
|
|
104
|
-
background: varDefault.tosiHeaderBg('var(--tosi-accent, #
|
|
104
|
+
background: varDefault.tosiHeaderBg('var(--tosi-accent, #d92270)'),
|
|
105
105
|
lineHeight: varDefault.tosiHeaderLineHeight('32px'),
|
|
106
106
|
gap: varDefault.tosiHeaderGap('8px'),
|
|
107
107
|
},
|
package/dist/icon-svg.js
CHANGED
|
@@ -31,7 +31,7 @@ server-rendered template had no way to get markup except by parsing
|
|
|
31
31
|
resorted to when putting its own logo on a generated page. There is nothing to protect:
|
|
32
32
|
the map ships in the bundle either way.
|
|
33
33
|
*/
|
|
34
|
-
import iconData from './icon-data';
|
|
34
|
+
import iconData from './icon-data.js';
|
|
35
35
|
export function iconSvg(name) {
|
|
36
36
|
const data = iconData;
|
|
37
37
|
let key = name.endsWith('_') ? name.slice(0, -1) : name;
|