tosijs-ui 1.9.0 → 1.9.1
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 +30 -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 +6 -6
- package/dist/dialog.js +1 -1
- package/dist/doc-browser.d.ts +1 -1
- package/dist/doc-browser.js +11 -11
- 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 +1 -1
- 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 +6 -6
- 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 +1 -1
- 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 +66 -66
- package/dist/iife.js.map +46 -46
- 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 +1 -1
- 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/tooltip.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/value-renderer.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/llms.txt +1 -1
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.1
|
|
4
|
+
|
|
5
|
+
**`tosijs-ui` did not import under Node.** Shipped `dist/` used extensionless relative
|
|
6
|
+
imports (`from './site-config'`), which bun resolves and Node ESM does not — so a Node
|
|
7
|
+
consumer got `Cannot find module` on entry points that had nothing to do with bun. Every
|
|
8
|
+
entry point is affected, and this goes back well before 1.8.0.
|
|
9
|
+
|
|
10
|
+
Everything shipped now uses explicit `.js` specifiers, which Node requires and every
|
|
11
|
+
bundler accepts. **If you are on Node, upgrade; 1.9.0 and earlier will not resolve.**
|
|
12
|
+
|
|
13
|
+
Two runtime requirements are unchanged, and are now documented rather than implied — they
|
|
14
|
+
are honest constraints, not bugs, but the failure messages named symptoms rather than
|
|
15
|
+
causes:
|
|
16
|
+
|
|
17
|
+
| entry point | runtime |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `tosijs-ui/site` | **bun** — it shells out, builds and spawns |
|
|
20
|
+
| `tosijs-ui`, `tosijs-ui/<component>` | a **browser** or a bundler targeting one |
|
|
21
|
+
| `tosijs-ui/icon-svg` | anything — deliberately DOM-free |
|
|
22
|
+
|
|
23
|
+
`engines` now declares bun, and `doc-site-system.md` has a "Runtimes — what runs where"
|
|
24
|
+
section.
|
|
25
|
+
|
|
26
|
+
**Why four test lanes missed it:** all four run under bun. `test-consumer` packs the real
|
|
27
|
+
tarball, installs it and builds from a foreign cwd — but with bun, so it proved the
|
|
28
|
+
package works for people exactly like us. It now imports every entry point through **Node**
|
|
29
|
+
and asserts the absence of module-resolution errors specifically, separating "packaging is
|
|
30
|
+
broken" from "this needs a DOM / needs bun". Verified against the published 1.9.0: all
|
|
31
|
+
three checks fail on it.
|
|
32
|
+
|
|
3
33
|
## 1.9.0
|
|
4
34
|
|
|
5
35
|
Consumer repairs, remote access, and **authoring: many books from one corpus**.
|
package/dist/babylon-3d.js
CHANGED
|
@@ -207,8 +207,8 @@ be used to load `.glb` files. Setting `src` calls this for you on connect.
|
|
|
207
207
|
*/
|
|
208
208
|
/*{ "parent": "Components" }*/
|
|
209
209
|
import { Component as WebComponent, elements } from 'tosijs';
|
|
210
|
-
import { scriptTag } from './via-tag';
|
|
211
|
-
import { icons, svg2DataUrl } from './icons';
|
|
210
|
+
import { scriptTag } from './via-tag.js';
|
|
211
|
+
import { icons, svg2DataUrl } from './icons.js';
|
|
212
212
|
const noop = () => {
|
|
213
213
|
/* do not care */
|
|
214
214
|
};
|
package/dist/bodymovin-player.js
CHANGED
|
@@ -103,7 +103,7 @@ Also see the [documentation for advanced interactions](https://lottiefiles.githu
|
|
|
103
103
|
*/
|
|
104
104
|
/*{ "parent": "Components" }*/
|
|
105
105
|
import { Component as WebComponent } from 'tosijs';
|
|
106
|
-
import { scriptTag } from './via-tag';
|
|
106
|
+
import { scriptTag } from './via-tag.js';
|
|
107
107
|
export class BodymovinPlayer extends WebComponent {
|
|
108
108
|
static preferredTagName = 'tosi-lottie';
|
|
109
109
|
static initAttributes = {
|
package/dist/carousel.js
CHANGED
|
@@ -57,7 +57,7 @@ This is a minimalist carousel component that supports the usual stuff.
|
|
|
57
57
|
*/
|
|
58
58
|
/*{ "parent": "Components" }*/
|
|
59
59
|
import { Component as WebComponent, elements, vars, } from 'tosijs';
|
|
60
|
-
import { icons } from './icons';
|
|
60
|
+
import { icons } from './icons.js';
|
|
61
61
|
const { button, slot, div } = elements;
|
|
62
62
|
export class TosiCarousel extends WebComponent {
|
|
63
63
|
static preferredTagName = 'tosi-carousel';
|
package/dist/code-editor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component as WebComponent, ElementCreator, PartsMap } from 'tosijs';
|
|
2
|
-
import type { CmHandle, TjsAutocompleteConfig } from './code-editor-cm';
|
|
3
|
-
export type { TjsAutocompleteConfig } from './code-editor-cm';
|
|
2
|
+
import type { CmHandle, TjsAutocompleteConfig } from './code-editor-cm.js';
|
|
3
|
+
export type { TjsAutocompleteConfig } from './code-editor-cm.js';
|
|
4
4
|
interface CodeEditorParts extends PartsMap {
|
|
5
5
|
host: HTMLDivElement;
|
|
6
6
|
diffHost: HTMLDivElement;
|
package/dist/code-editor.js
CHANGED
|
@@ -65,7 +65,7 @@ won't catch this one.
|
|
|
65
65
|
*/
|
|
66
66
|
/*{ "parent": "Components" }*/
|
|
67
67
|
import { Component as WebComponent, elements, varDefault, } from 'tosijs';
|
|
68
|
-
import { tosiDiff } from './diff';
|
|
68
|
+
import { tosiDiff } from './diff.js';
|
|
69
69
|
const { div } = elements;
|
|
70
70
|
// Warn once per removed member, not once per access — a live-example page holds
|
|
71
71
|
// dozens of editors and a render-loop read would otherwise flood the console.
|
|
@@ -286,7 +286,7 @@ export class CodeEditor extends WebComponent {
|
|
|
286
286
|
if (this._loadPromise === undefined) {
|
|
287
287
|
// Lazy chunk — CodeMirror only enters the bundle here, on first editor use.
|
|
288
288
|
const generation = ++this._loadGeneration;
|
|
289
|
-
this._loadPromise = import('./code-editor-cm').then(({ createCmEditor }) => {
|
|
289
|
+
this._loadPromise = import('./code-editor-cm.js').then(({ createCmEditor }) => {
|
|
290
290
|
// The chunk fetch is async, and the pre-load window is WIDE on a cold fetch —
|
|
291
291
|
// doc-browser navigation and closeEditor() both remove editors mid-flight. If we
|
|
292
292
|
// mounted regardless:
|
|
@@ -346,7 +346,7 @@ export class CodeEditor extends WebComponent {
|
|
|
346
346
|
const handle = this._handle;
|
|
347
347
|
if (!handle || !this.isTjsMode())
|
|
348
348
|
return;
|
|
349
|
-
import('./code-editor-cm')
|
|
349
|
+
import('./code-editor-cm.js')
|
|
350
350
|
.then(({ loadTjsExtension }) => loadTjsExtension(this._tjsAutocomplete ?? {}))
|
|
351
351
|
.then((ext) => {
|
|
352
352
|
if (ext && this._handle === handle && this.isTjsMode()) {
|
package/dist/data-table.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component as WebComponent, ElementCreator } from 'tosijs';
|
|
2
|
-
import { SortCallback } from './make-sorter';
|
|
3
|
-
import { ValueRendererType } from './value-renderer';
|
|
2
|
+
import { SortCallback } from './make-sorter.js';
|
|
3
|
+
import { ValueRendererType } from './value-renderer.js';
|
|
4
4
|
export interface ColumnOptions {
|
|
5
5
|
name?: string;
|
|
6
6
|
prop: string;
|
package/dist/data-table.js
CHANGED
|
@@ -565,12 +565,12 @@ As well as any column names you want localized.
|
|
|
565
565
|
*/
|
|
566
566
|
/*{ "parent": "Components" }*/
|
|
567
567
|
import { Component as WebComponent, elements, vars, varDefault, tosiValue, getListItem, getListBinding, tosi, } from 'tosijs';
|
|
568
|
-
import { trackDrag } from './track-drag';
|
|
569
|
-
import { icons } from './icons';
|
|
570
|
-
import { valueRenderer } from './value-renderer';
|
|
571
|
-
import { popMenu } from './menu';
|
|
572
|
-
import * as dragAndDrop from './drag-and-drop';
|
|
573
|
-
import { tosiLocalized, localize } from './localize';
|
|
568
|
+
import { trackDrag } from './track-drag.js';
|
|
569
|
+
import { icons } from './icons.js';
|
|
570
|
+
import { valueRenderer } from './value-renderer.js';
|
|
571
|
+
import { popMenu } from './menu.js';
|
|
572
|
+
import * as dragAndDrop from './drag-and-drop.js';
|
|
573
|
+
import { tosiLocalized, localize } from './localize.js';
|
|
574
574
|
function defaultWidth(array, prop, charWidth) {
|
|
575
575
|
const example = array.find((item) => item[prop] !== undefined && item[prop] !== null);
|
|
576
576
|
if (example !== undefined) {
|
package/dist/dialog.js
CHANGED
|
@@ -119,7 +119,7 @@ preview.append(
|
|
|
119
119
|
*/
|
|
120
120
|
/*{ "parent": "Components" }*/
|
|
121
121
|
import { Component, elements, on, vars, varDefault } from 'tosijs';
|
|
122
|
-
import { findHighestZ } from './track-drag';
|
|
122
|
+
import { findHighestZ } from './track-drag.js';
|
|
123
123
|
const { dialog, button, header, footer, tosiSlot, h3, p, label, input, div } = elements;
|
|
124
124
|
export class TosiDialog extends Component {
|
|
125
125
|
static preferredTagName = 'tosi-dialog';
|
package/dist/doc-browser.d.ts
CHANGED
package/dist/doc-browser.js
CHANGED
|
@@ -152,17 +152,17 @@ The `tosijs-ui` demo is a complete working example. See:
|
|
|
152
152
|
*/
|
|
153
153
|
/*{"pin":"bottom","parent":"Appendices"}*/
|
|
154
154
|
import { elements, vars, varDefault, bindings, touch, getListItem, debounce, tosi, StyleSheet, } from 'tosijs';
|
|
155
|
-
import { buildSlugMap, pathForSlug, filenameForPath, } from './doc-system/routing';
|
|
156
|
-
import { buildNavTree } from './doc-system/nav-tree';
|
|
157
|
-
import { renderDocMarkdown } from './doc-system/render';
|
|
158
|
-
import { pageTitle } from './doc-system/doc-title';
|
|
159
|
-
import { LiveExample, testManager } from './live-example';
|
|
160
|
-
import { tosiSidenav, TosiSidenav } from './side-nav';
|
|
161
|
-
import { icons } from './icons';
|
|
162
|
-
import { tosiLocalized } from './localize';
|
|
163
|
-
import { popMenu } from './menu';
|
|
164
|
-
import { codeEditor } from './code-editor';
|
|
165
|
-
import { tosiDiff } from './diff';
|
|
155
|
+
import { buildSlugMap, pathForSlug, filenameForPath, } from './doc-system/routing.js';
|
|
156
|
+
import { buildNavTree } from './doc-system/nav-tree.js';
|
|
157
|
+
import { renderDocMarkdown } from './doc-system/render.js';
|
|
158
|
+
import { pageTitle } from './doc-system/doc-title.js';
|
|
159
|
+
import { LiveExample, testManager } from './live-example.js';
|
|
160
|
+
import { tosiSidenav, TosiSidenav } from './side-nav.js';
|
|
161
|
+
import { icons } from './icons.js';
|
|
162
|
+
import { tosiLocalized } from './localize.js';
|
|
163
|
+
import { popMenu } from './menu.js';
|
|
164
|
+
import { codeEditor } from './code-editor.js';
|
|
165
|
+
import { tosiDiff } from './diff.js';
|
|
166
166
|
const { div, span, a, header, button, template, input, h2, img, details, summary, ul, li, } = elements;
|
|
167
167
|
// Test colors
|
|
168
168
|
const testColor = {
|
|
@@ -6,9 +6,9 @@ doc-browser (the user's browser prints it to PDF). Pure rendering — no fs, no
|
|
|
6
6
|
Node-only APIs — so it bundles into the iife. Live examples are pretty-printed,
|
|
7
7
|
force-wrapped code listings, not executed.
|
|
8
8
|
*/
|
|
9
|
-
import { renderDocMarkdown } from './render';
|
|
10
|
-
import { buildSlugMap } from './routing';
|
|
11
|
-
import { buildNavTree } from './nav-tree';
|
|
9
|
+
import { renderDocMarkdown } from './render.js';
|
|
10
|
+
import { buildSlugMap } from './routing.js';
|
|
11
|
+
import { buildNavTree } from './nav-tree.js';
|
|
12
12
|
// Clean book typography; force-wraps code so listings never overflow a page.
|
|
13
13
|
export const DEFAULT_BOOK_CSS = `/* doc-system book stylesheet */
|
|
14
14
|
html { font-size: 100%; }
|
|
@@ -19,7 +19,7 @@ exactly what it means everywhere else (filename, slug, or slugified title).
|
|
|
19
19
|
Cycles are survivable by construction: `parent` is author-written and nav-tree already
|
|
20
20
|
guards against loops, so this walks with a seen-set rather than trusting the data.
|
|
21
21
|
*/
|
|
22
|
-
import { resolveParent } from './routing';
|
|
22
|
+
import { resolveParent } from './routing.js';
|
|
23
23
|
/** The main book's internal key — what a doc with no `book` lands in. */
|
|
24
24
|
export const DEFAULT_BOOK = '';
|
|
25
25
|
/** `book: "none"` — on the site, in no book. */
|
|
@@ -7,7 +7,7 @@ can drop `<tosi-css-var-editor element-selector="tosi-widget">` under an example
|
|
|
7
7
|
deliberately not exported from `tosijs-ui`.
|
|
8
8
|
*/
|
|
9
9
|
import { Component as WebComponent, elements, Color, } from 'tosijs';
|
|
10
|
-
import { tosiForm, tosiField } from '../form';
|
|
10
|
+
import { tosiForm, tosiField } from '../form.js';
|
|
11
11
|
const { h2, code } = elements;
|
|
12
12
|
// A value is a color if it's a hex literal or an rgb()/hsl() (with or without alpha)
|
|
13
13
|
// functional notation — the forms getComputedStyle / getPropertyValue return. The old
|
|
@@ -11,7 +11,7 @@ palette can eventually be driven entirely by a few attributes on the element
|
|
|
11
11
|
(accent/background/text) — most of the palette is derived from `accent`.
|
|
12
12
|
*/
|
|
13
13
|
import { vars, Color, invertLuminance, } from 'tosijs';
|
|
14
|
-
import { icons, svg2DataUrl } from '../icons';
|
|
14
|
+
import { icons, svg2DataUrl } from '../icons.js';
|
|
15
15
|
// The sidebar's geometry, shared by the hydrated layout and the pre-hydration one.
|
|
16
16
|
// These mirror what <tosi-sidenav> is given by doc-browser (navSize / minSize): the
|
|
17
17
|
// sidebar is `SIDEBAR_WIDTH` wide and collapses behind a toggle below
|
|
@@ -57,16 +57,16 @@ A self-contained, controllable embed (e.g. docs in a floating panel):
|
|
|
57
57
|
*/
|
|
58
58
|
/*{ "parent": "Appendices" }*/
|
|
59
59
|
import { Component, StyleSheet, elements, tosi, vars, } from 'tosijs';
|
|
60
|
-
import { createDocBrowser } from '../doc-browser';
|
|
61
|
-
import { buildSlugMap, legacyQueryPath } from './routing';
|
|
62
|
-
import { buildBookHtml, slugify } from './book-html';
|
|
63
|
-
import { docSystemStyleSpec } from './doc-system-styles';
|
|
64
|
-
import { icons } from '../icons';
|
|
65
|
-
import { popMenu } from '../menu';
|
|
66
|
-
import { i18n, setLocale, initLocalization } from '../localize';
|
|
60
|
+
import { createDocBrowser } from '../doc-browser.js';
|
|
61
|
+
import { buildSlugMap, legacyQueryPath } from './routing.js';
|
|
62
|
+
import { buildBookHtml, slugify } from './book-html.js';
|
|
63
|
+
import { docSystemStyleSpec } from './doc-system-styles.js';
|
|
64
|
+
import { icons } from '../icons.js';
|
|
65
|
+
import { popMenu } from '../menu.js';
|
|
66
|
+
import { i18n, setLocale, initLocalization } from '../localize.js';
|
|
67
67
|
// Side-effect: register <tosi-css-var-editor> so doc pages can drop the live CSS-var
|
|
68
68
|
// tweaker under an example. Part of the doc-system, NOT re-exported from tosijs-ui.
|
|
69
|
-
import './css-var-editor';
|
|
69
|
+
import './css-var-editor.js';
|
|
70
70
|
const { button, div } = elements;
|
|
71
71
|
const PREFS_KEY = 'tosi-doc-system-prefs';
|
|
72
72
|
export class TosiDocSystem extends Component {
|
|
@@ -11,7 +11,7 @@ parent form a nav section, nested arbitrarily deep. Parents are expected to
|
|
|
11
11
|
exist as real docs by the time the tree is built (the build auto-creates any
|
|
12
12
|
missing section docs first), so this module never synthesizes.
|
|
13
13
|
*/
|
|
14
|
-
import { resolveParent } from './routing';
|
|
14
|
+
import { resolveParent } from './routing.js';
|
|
15
15
|
/** Pin buckets sort top < none < bottom. */
|
|
16
16
|
function pinRank(doc) {
|
|
17
17
|
return doc.pin === 'top' ? 0 : doc.pin === 'bottom' ? 2 : 1;
|
|
@@ -26,7 +26,7 @@ orchestrator.ts.
|
|
|
26
26
|
|
|
27
27
|
Build-time only. Never import this from browser code.
|
|
28
28
|
*/
|
|
29
|
-
import { checkExamples } from './check-examples';
|
|
29
|
+
import { checkExamples } from './check-examples.js';
|
|
30
30
|
const docsJson = process.argv[2];
|
|
31
31
|
if (!docsJson) {
|
|
32
32
|
console.error('check-examples-cli: expected a docs.json path');
|
|
@@ -22,7 +22,7 @@ executed, so they're skipped.
|
|
|
22
22
|
Build-time only (bun). Never import from browser code.
|
|
23
23
|
*/
|
|
24
24
|
import { marked } from 'marked';
|
|
25
|
-
import { rewriteImports, AsyncFunction, loadTransform, UnsupportedImportError, } from '../../live-example/code-transform';
|
|
25
|
+
import { rewriteImports, AsyncFunction, loadTransform, UnsupportedImportError, } from '../../live-example/code-transform.js';
|
|
26
26
|
// The default live-example context (matches the IIFE globals the pages provide).
|
|
27
27
|
// A project that sets a custom `context` on its <tosi-doc-system> can pass its
|
|
28
28
|
// own keys; these are the tosijs-ui defaults.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SiteConfig } from './site-config';
|
|
2
|
-
import { isLoopbackAddressForAuth as isLoopbackAddress } from './dev-auth';
|
|
1
|
+
import type { SiteConfig } from './site-config.js';
|
|
2
|
+
import { isLoopbackAddressForAuth as isLoopbackAddress } from './dev-auth.js';
|
|
3
3
|
declare global {
|
|
4
4
|
var Bun: any;
|
|
5
5
|
}
|
|
@@ -10,12 +10,12 @@ Build-time only (Bun APIs). Never import this from browser code.
|
|
|
10
10
|
import * as path from 'path';
|
|
11
11
|
import { statSync } from 'fs';
|
|
12
12
|
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';
|
|
13
|
+
import { buildSite } from './orchestrator.js';
|
|
14
|
+
import { preflight } from './preflight.js';
|
|
15
|
+
import { auditDependencies, reportAudit } from './audit-guard.js';
|
|
16
|
+
import { openDevBrowser } from './open-browser.js';
|
|
17
|
+
import { resolveTunnelLocalPort } from './site-config.js';
|
|
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.js';
|
|
19
19
|
const TEST_RESULTS_FILE = '.browser-tests.json';
|
|
20
20
|
const DEFAULT_IDLE_HOURS = 8;
|
|
21
21
|
/**
|
|
@@ -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 {
|