tosijs-ui 1.16.39 → 1.16.41

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/bin/make-icon-data.js +1 -1
  3. package/bin/release-notes.ts +1 -1
  4. package/dist/ab-test.js +1 -1
  5. package/dist/affix.js +1 -1
  6. package/dist/babylon-3d.js +1 -1
  7. package/dist/bodymovin-player.js +1 -1
  8. package/dist/carousel.js +1 -1
  9. package/dist/code-editor.js +1 -1
  10. package/dist/color-input.js +1 -1
  11. package/dist/crud.js +1 -1
  12. package/dist/data-table.js +1 -1
  13. package/dist/dialog.js +1 -1
  14. package/dist/diff.js +1 -1
  15. package/dist/doc-browser.d.ts +5 -0
  16. package/dist/doc-browser.js +7 -4
  17. package/dist/doc-system/data-client.js +1 -1
  18. package/dist/doc-system/doc-system-styles.js +1 -1
  19. package/dist/doc-system/doc-system.js +2 -1
  20. package/dist/doc-system/highlight-styles.js +1 -1
  21. package/dist/doc-system/site/docs.js +1 -1
  22. package/dist/doc-system/site/generate-site.d.ts +2 -0
  23. package/dist/doc-system/site/generate-site.js +1 -0
  24. package/dist/doc-system/site/make-llms-txt.d.ts +1 -0
  25. package/dist/doc-system/site/make-llms-txt.js +5 -3
  26. package/dist/doc-system/site/orchestrator.js +1 -0
  27. package/dist/doc-system/site/site-config.d.ts +5 -0
  28. package/dist/drag-and-drop.js +1 -1
  29. package/dist/editable-rect.js +1 -1
  30. package/dist/filter-builder.js +1 -1
  31. package/dist/float.js +1 -1
  32. package/dist/form.js +1 -1
  33. package/dist/header.js +1 -1
  34. package/dist/highlight-block.js +1 -1
  35. package/dist/icon-svg.js +1 -1
  36. package/dist/icons.js +1 -1
  37. package/dist/iife.js +99 -99
  38. package/dist/iife.js.map +59 -59
  39. package/dist/layout.js +1 -1
  40. package/dist/live-example/component.js +1 -1
  41. package/dist/live-example/execution.d.ts +11 -0
  42. package/dist/live-example/execution.js +18 -0
  43. package/dist/live-theme.js +1 -1
  44. package/dist/localize.js +1 -1
  45. package/dist/make-sorter.js +1 -1
  46. package/dist/mapbox.js +1 -1
  47. package/dist/markdown-viewer.js +1 -1
  48. package/dist/menu.js +1 -1
  49. package/dist/month.js +1 -1
  50. package/dist/notifications.js +1 -1
  51. package/dist/palette.d.ts +7 -0
  52. package/dist/palette.js +32 -8
  53. package/dist/password-strength.js +1 -1
  54. package/dist/rating.js +1 -1
  55. package/dist/rich-text.js +1 -1
  56. package/dist/router.js +1 -1
  57. package/dist/schema-form.js +1 -1
  58. package/dist/search-field.js +1 -1
  59. package/dist/segmented.js +1 -1
  60. package/dist/select.js +1 -1
  61. package/dist/side-nav.js +1 -1
  62. package/dist/size-break.js +1 -1
  63. package/dist/sizer.js +1 -1
  64. package/dist/tab-selector.js +1 -1
  65. package/dist/tag-list.js +1 -1
  66. package/dist/theme.js +1 -1
  67. package/dist/tooltip.js +1 -1
  68. package/dist/track-drag.js +1 -1
  69. package/dist/value-renderer.js +1 -1
  70. package/dist/version.d.ts +1 -1
  71. package/dist/version.js +1 -1
  72. package/dist/via-tag.js +1 -1
  73. package/llms.txt +64 -70
  74. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.41
4
+
5
+ - **A `noindex` page is left out of `llms.txt`.** The sitemap and the markdown copies already
6
+ left it out, but `llms.txt` still listed it, so an agent reading the index was sent to pages
7
+ the author had asked not to be found.
8
+ - **Every page on ui.tosijs.net has a written description, and the terse titles say what the
9
+ component is.** 63 pages described themselves with whatever their first paragraph said ("A
10
+ mapboxgl wrapper.", sentences cut off at 155 characters), which is what search results, link
11
+ previews and `llms.txt` showed. Short nav labels such as "map" and "table" keep their place in
12
+ the nav and get a fuller `<title>` through `headTitle`. The kitchen sink and the two layout
13
+ demo pages are `noindex`. The practice behind the rewrite is proposed for the shared coding
14
+ practices (tosijs-coding-practices #3561).
15
+
16
+ ## 1.16.40
17
+
18
+ - **An example with no script runs under a strict CSP (#245, #246).** A pure-HTML example still
19
+ built an `AsyncFunction` from its empty script, and a dialect that runs its own source (`run`)
20
+ had one built before its `run` was called. Under a Content Security Policy without
21
+ `'unsafe-eval'` (`script-src 'self'`) the constructor throws, so each such example showed an
22
+ error and filed a violation report every time it ran. Neither now constructs a function at
23
+ all, so HTML examples, and `run` dialects that only sanitize and bind markup, work on a
24
+ CSP-protected host. Script examples still need `'unsafe-eval'`; a CSP-compatible path for
25
+ them, and an HTML-only example mode, are planned for 1.17.0.
26
+ - **The doc header's search says "Search", and a site can set it.** `searchPlaceholder` in the
27
+ site config (or `createDocBrowser`) sets the hint in the header's search field, and the
28
+ trigger's accessible name; the default was "Search documentation" (set
29
+ `searchPlaceholder: 'Search documentation'` to keep it, and update any test that looks the
30
+ field up by that name). It is localized through the site's strings, and its placeholder
31
+ follows the locale the reader picks. `<tosi-palette>` gained a `localizer` property for this: a function its placeholder
32
+ goes through, such as `localize`. It is a function rather than a `localized` attribute so the
33
+ palette does not import the localization module, and `<tosi-select>` with it, wherever it is
34
+ used.
35
+ - **The ⌘K hint in the search field has no outline.** An outline inside the field's own outline
36
+ read as a second control. The hints inside the open palette keep theirs.
37
+
3
38
  ## 1.16.39
4
39
 
5
40
  - **The doc-site frame passes WCAG 2.2 AA where an axe scan said it did not (#3520).** An
@@ -86,7 +86,7 @@ byte-identical files, so it never shows up as spurious diff noise.
86
86
  > your prettier config, which it now honours) — not the output.
87
87
  */
88
88
 
89
- /*{ "parent": "icons", "order": 30 }*/
89
+ /*{ "parent": "icons", "order": 30, "description": "A build tool that turns folders of SVG files into the icon-data module behind the tosijs-ui icon system, optimizing the paths as it goes." }*/
90
90
 
91
91
  import fs from 'fs'
92
92
  import path from 'path'
@@ -60,7 +60,7 @@ commit whose diff never touched the file it named. Cheap to detect, and the fail
60
60
  catches is expensive.
61
61
  */
62
62
 
63
- /*{ "parent": "Appendices" }*/
63
+ /*{ "parent": "Appendices", "description": "tosijs-release-notes builds CHANGELOG sections from tagged bullets in commit messages, and fails a release when one is left unwritten." }*/
64
64
 
65
65
  import { $ } from 'bun'
66
66
  import {
package/dist/ab-test.js CHANGED
@@ -75,7 +75,7 @@ randomize()
75
75
  - `condition` attribute determines which value in `AbTest.conditions` controls the element
76
76
  - `not` reverses the condition (so `<tosi-ab not condition="foo">` will be visible if `conditions.foo` is `false`)
77
77
  */
78
- /*{ "parent": "Helper Libraries" }*/
78
+ /*{ "parent": "Helper Libraries", "description": "<tosi-ab> shows or hides content by condition, so you can run A/B tests or feature flags by setting AbTest.conditions." }*/
79
79
  import { withAttributes } from 'tosijs';
80
80
  const abTestConditions = {};
81
81
  export class AbTest extends withAttributes({
package/dist/affix.js CHANGED
@@ -142,7 +142,7 @@ and `describePlacement({ position, inside })` convert between the attribute and
142
142
  `{ position, inside }`, and `affixCell(placement)` gives the grid cell and alignment a
143
143
  placement takes.
144
144
  */
145
- /*{ "parent": "Components" }*/
145
+ /*{ "parent": "Components", "description": "<tosi-affix> attaches a toolbar, badge or caption to one edge of its content, laid out beside it rather than floated, so it never covers it." }*/
146
146
  import { Component, elements } from 'tosijs';
147
147
  const { slot } = elements;
148
148
  const POSITIONS = new Set([
@@ -220,7 +220,7 @@ be used to load `.glb` files. Setting `src` calls this for you on connect.
220
220
 
221
221
  `<tosi-3d>.loadUI(options: B3dUIOptions)` loads babylonjs guis, which you can create programmatically or using the [babylonjs gui tool](https://gui.babylonjs.com/).
222
222
  */
223
- /*{ "parent": "Components" }*/
223
+ /*{ "parent": "Components", "headTitle": "<tosi-3d> Babylon.js wrapper (deprecated) — tosijs-ui", "description": "Deprecated: <tosi-3d> is a thin Babylon.js wrapper kept for compatibility. New 3D work should use the tosijs-3d package." }*/
224
224
  import { elements, withAttributes } from 'tosijs';
225
225
  import { scriptTag } from './via-tag.js';
226
226
  import { icons, svg2DataUrl } from './icons.js';
@@ -101,7 +101,7 @@ And of course just access the element's `animation` property to [use the bodymov
101
101
 
102
102
  Also see the [documentation for advanced interactions](https://lottiefiles.github.io/lottie-docs/advanced_interactions/)
103
103
  */
104
- /*{ "parent": "Components" }*/
104
+ /*{ "parent": "Components", "headTitle": "<tosi-lottie> Lottie animation player — tosijs-ui", "description": "<tosi-lottie> plays Lottie (bodymovin) animations like an <img>: set src or json, and use the bodymovin API through its animation property." }*/
105
105
  import { withAttributes } from 'tosijs';
106
106
  import { scriptTag } from './via-tag.js';
107
107
  export class BodymovinPlayer extends withAttributes({
package/dist/carousel.js CHANGED
@@ -68,7 +68,7 @@ This is a minimalist carousel component that supports the usual stuff.
68
68
 
69
69
  <tosi-css-var-editor element-selector="tosi-carousel"></tosi-css-var-editor>
70
70
  */
71
- /*{ "parent": "Components" }*/
71
+ /*{ "parent": "Components", "description": "A minimal carousel with optional arrows and dots, several items per page, looping, and auto-advance that holds still while someone is looking." }*/
72
72
  import { elements, vars, withAttributes } from 'tosijs';
73
73
  import { icons } from './icons.js';
74
74
  import { prefersReducedMotion } from './reduced-motion.js';
@@ -111,7 +111,7 @@ Only `@codemirror/state` and `@codemirror/view` are re-exported — the two you
111
111
  view. The language, lint and search packages are internal composition details; ask if you need
112
112
  one exposed.
113
113
  */
114
- /*{ "parent": "Components" }*/
114
+ /*{ "parent": "Components", "headTitle": "<tosi-code> CodeMirror 6 code editor — tosijs-ui", "description": "<tosi-code> embeds a CodeMirror 6 editor for JavaScript, TypeScript, CSS, HTML and Markdown, with undo, a diff view and a change event." }*/
115
115
  import { elements, varDefault, withAttributes, } from 'tosijs';
116
116
  import { tosiDiff } from './diff.js';
117
117
  const { div } = elements;
@@ -27,7 +27,7 @@ colorInput.addEventListener('change', () => {
27
27
 
28
28
  <tosi-css-var-editor element-selector="tosi-color"></tosi-css-var-editor>
29
29
  */
30
- /*{ "parent": "Form Components" }*/
30
+ /*{ "parent": "Form Components", "description": "<tosi-color> is a colour input that also edits opacity, so it can produce translucent colours that the native colour picker cannot." }*/
31
31
  import { Component, elements, Color, vars, } from 'tosijs';
32
32
  const { input } = elements;
33
33
  const defaultColor = Color.fromCss('#8888');
package/dist/crud.js CHANGED
@@ -304,7 +304,7 @@ for every instance; each one re-checks it the next time it is resized.
304
304
  - `change` — the selection or the saved record changed.
305
305
  - `error` — a store operation failed.
306
306
  */
307
- /*{ "parent": "Components" }*/
307
+ /*{ "parent": "Components", "description": "<tosi-crud> pairs a searchable table with a schema-driven form over a store you supply (REST, IndexedDB or an array) for list-and-edit screens." }*/
308
308
  import { elements, withAttributes } from 'tosijs';
309
309
  import { tosiTable } from './data-table.js';
310
310
  import { tosiSchemaForm } from './schema-form.js';
@@ -1241,7 +1241,7 @@ As well as any column names you want localized — these are also used as the ac
1241
1241
  (`aria-label`) of each editable cell, so an editable table wants them present even if you are
1242
1242
  happy with the untranslated headers.
1243
1243
  */
1244
- /*{ "parent": "Components" }*/
1244
+ /*{ "parent": "Components", "headTitle": "<tosi-table> virtual data table — tosijs-ui", "description": "A virtual data table for very large datasets: sortable, resizable, pinnable columns inferred from the data, keyboard navigation and row detail." }*/
1245
1245
  import { elements, vars, varDefault, tosiValue, getListItem, getListBinding, tosi, withAttributes, } from 'tosijs';
1246
1246
  import { trackDrag } from './track-drag.js';
1247
1247
  import { naturalSorter } from './natural-compare.js';
package/dist/dialog.js CHANGED
@@ -143,7 +143,7 @@ preview.append(
143
143
  ```
144
144
 
145
145
  */
146
- /*{ "parent": "Components" }*/
146
+ /*{ "parent": "Components", "description": "<tosi-dialog> wraps the native <dialog> element with an OK button, a footer slot, and promise-based alert, confirm and prompt helpers." }*/
147
147
  import { Component, elements, on, vars, varDefault } from 'tosijs';
148
148
  import { findHighestZ } from './track-drag.js';
149
149
  const { dialog, button, header, footer, tosiSlot, h3, p, label, input, div } = elements;
package/dist/diff.js CHANGED
@@ -101,7 +101,7 @@ and writable if you want to drive it yourself. Resolutions **reset when either t
101
101
  changes** — decisions belong to the diff they were made about.
102
102
 
103
103
  */
104
- /*{ "parent": "Components" }*/
104
+ /*{ "parent": "Components", "description": "<tosi-diff> shows a unified, line-by-line diff between two strings, with removed and added lines marked, as in a code review." }*/
105
105
  import { elements, vars, varDefault, withAttributes, } from 'tosijs';
106
106
  const { div, span, button } = elements;
107
107
  /** Group a line diff into context runs and change blocks, in display order. */
@@ -118,6 +118,11 @@ export interface DocBrowserOptions {
118
118
  * for a host page that owns that key or embeds more than one browser.
119
119
  */
120
120
  searchShortcut?: string;
121
+ /**
122
+ * The hint in the header's search field (default `'Search'`). Localized through the site's
123
+ * strings, like every other piece of the doc system's own text.
124
+ */
125
+ searchPlaceholder?: string;
121
126
  /**
122
127
  * Header-bar links. When provided, these replace the legacy `projectLinks` icon
123
128
  * set in the header (each renders as an icon if `icon` names a known icon, else
@@ -98,7 +98,7 @@ The search opens on Cmd-K (Ctrl-K off a Mac) anywhere on the page. A host that o
98
98
  or embeds more than one browser, passes `searchShortcut: ''` (or another key in
99
99
  `<tosi-palette>`'s `shortcut` form).
100
100
  */
101
- /*{ "parent": "Documentation System", "order": 50 }*/
101
+ /*{ "parent": "Documentation System", "order": 50, "description": "createDocBrowser() renders a documentation corpus as a searchable browser with live, self-testing examples: a lighter alternative to Storybook." }*/
102
102
  import { elements, vars, varDefault, bindings, getListItem, tosi, StyleSheet, } from 'tosijs';
103
103
  import { buildSlugMap, pathForSlug, filenameForPath, homeDoc, wikilinkTargets, } from './doc-system/routing.js';
104
104
  import { buildNavTree } from './doc-system/nav-tree.js';
@@ -115,7 +115,7 @@ import { tosiSidenav, TosiSidenav } from './side-nav.js';
115
115
  import { icons } from './icons.js';
116
116
  import { tosiPalette } from './palette.js';
117
117
  import { buildDocIndex, searchDocs } from './doc-system/doc-search.js';
118
- import { tosiLocalized } from './localize.js';
118
+ import { tosiLocalized, localize, i18n } from './localize.js';
119
119
  import { popMenu } from './menu.js';
120
120
  import { codeEditor } from './code-editor.js';
121
121
  import { tosiDiff } from './diff.js';
@@ -395,7 +395,7 @@ let docBrowserSeq = 0;
395
395
  // Likewise for the nav's aria-controls ids.
396
396
  let navIdCounter = 0;
397
397
  export function createDocBrowser(options) {
398
- const { docs, context = {}, projectName = '', projectLinks = {}, logo, navSize = 200, minSize = 600, routing = 'query', initialRoute, aliases = {}, onRouteChange, searchShortcut = 'mod+k', navbarLinks, contentElement, } = options;
398
+ const { docs, context = {}, projectName = '', projectLinks = {}, logo, navSize = 200, minSize = 600, routing = 'query', initialRoute, aliases = {}, onRouteChange, searchShortcut = 'mod+k', searchPlaceholder = 'Search', navbarLinks, contentElement, } = options;
399
399
  // Memory routing is fully self-contained: it never reads or writes
400
400
  // window.history/location, so an embedded or nested browser can't hijack the
401
401
  // host page's URL (or recurse into it).
@@ -750,11 +750,14 @@ export function createDocBrowser(options) {
750
750
  // In the header bar (see headerContent); the nav no longer holds a search field.
751
751
  const searchBox = tosiPalette({
752
752
  class: 'doc-search',
753
- placeholder: 'Search documentation',
753
+ placeholder: searchPlaceholder,
754
+ localizer: localize,
754
755
  shortcut: searchShortcut,
755
756
  sources: [docSearchSource],
756
757
  quickLinks,
757
758
  });
759
+ // The hint follows the reader's language, like the rest of the doc system's own text.
760
+ i18n.locale.observe(() => searchBox.queueRender());
758
761
  // Memory routing is decoupled from the page URL, so it ignores browser
759
762
  // back/forward (the host owns history, if any).
760
763
  if (!memoryRouting) {
@@ -1,4 +1,4 @@
1
- /*{ "parent": "Documentation System", "order": 85 }*/
1
+ /*{ "parent": "Documentation System", "order": 85, "description": "Open and save a project's data files from a dev-server page, for in-browser tools such as level or scene editors, optionally committing each save." }*/
2
2
  /*#
3
3
  # data client
4
4
 
@@ -66,7 +66,7 @@ export function docSystemColors(theme = {}) {
66
66
  /*
67
67
  Readable, not faint (#3520). This was the brand at 40% opacity, which an axe scan measured
68
68
  at 1.88:1 on the input (#eda7c5 on #fdfdfd) where AA asks 4.5:1, and it colours the doc
69
- header's "Search documentation" trigger, a real label, not just a hint.
69
+ header's search trigger, a real label, not just a hint.
70
70
  */
71
71
  _placeholderColor: readableOn(brandColor, Color.fromCss(theme.inputBg ?? '#fdfdfd')),
72
72
  /*
@@ -55,7 +55,7 @@ A self-contained, controllable embed (e.g. docs in a floating panel):
55
55
  </tosi-doc-system>
56
56
  ```
57
57
  */
58
- /*{ "parent": "Documentation System", "order": 40 }*/
58
+ /*{ "parent": "Documentation System", "order": 40, "description": "<tosi-doc-system> hydrates pre-rendered static doc pages into a fast single-page doc browser, keeping full HTML for search engines and no-JS readers." }*/
59
59
  import { StyleSheet, elements, tosi, vars, withAttributes, } from 'tosijs';
60
60
  import * as tosijsModule from 'tosijs';
61
61
  import { createDocBrowser, } from '../doc-browser.js';
@@ -608,6 +608,7 @@ export class TosiDocSystem extends withAttributes({
608
608
  projectLinks: config.projectLinks,
609
609
  logo: config.logo,
610
610
  navbarLinks: navbarLinks.length ? navbarLinks : undefined,
611
+ searchPlaceholder: config.searchPlaceholder,
611
612
  contentElement,
612
613
  });
613
614
  // Add the settings (theme + language) menu — except in a nested demo, where
@@ -1,4 +1,4 @@
1
- /*{ "parent": "Documentation System", "order": 80 }*/
1
+ /*{ "parent": "Documentation System", "order": 80, "description": "The syntax-highlighting token colours as a stylesheet you can import and retheme, for code highlighted outside <tosi-highlight>." }*/
2
2
  /*#
3
3
  # highlight-styles
4
4
 
@@ -37,7 +37,7 @@ whatever metadata the doc declares (`pin`, `order`, `parent`, `layout`, `descrip
37
37
  Metadata blocks (`<!--{ … }-->` in markdown, `/*{ … }*‎/` in code), nav order, sections and
38
38
  which code fences run live are described under [Doc format](/doc-site-system/#doc-format).
39
39
  */
40
- /*{ "parent": "Documentation System", "order": 60 }*/
40
+ /*{ "parent": "Documentation System", "order": 60, "description": "extractDocs() collects markdown files and doc comments from source code into one docs.json corpus, the input to the doc browser and static site." }*/
41
41
  // TODO CLI options
42
42
  import * as fs from 'fs';
43
43
  import * as path from 'path';
@@ -8,6 +8,8 @@ export interface GenerateSiteConfig {
8
8
  docs: Doc[];
9
9
  /** `SiteConfig.aliases`: { alias path -> slug } (board #3513) */
10
10
  aliases?: Record<string, string>;
11
+ /** `SiteConfig.searchPlaceholder` */
12
+ searchPlaceholder?: string;
11
13
  /**
12
14
  * Mirrors `SiteConfig.liveExamples`. The static highlighter needs it so it skips the
13
15
  * fences that will become live examples — a highlighted block hands the example markup
@@ -368,6 +368,7 @@ export async function generateSite(config) {
368
368
  logo: config.logo,
369
369
  bookVolumes: config.bookVolumes,
370
370
  ebooks: config.ebooks,
371
+ searchPlaceholder: config.searchPlaceholder,
371
372
  }));
372
373
  // The theme stylesheet (config.stylesUrl) is written separately by
373
374
  // ./generate-css.ts; pages here just <link> to it.
@@ -6,6 +6,7 @@ interface CorpusDoc {
6
6
  text?: string;
7
7
  description?: string;
8
8
  hidden?: boolean;
9
+ noindex?: boolean;
9
10
  }
10
11
  interface LlmsEntry {
11
12
  title: string;
@@ -44,14 +44,16 @@ function extractDescription(text) {
44
44
  export function entriesFromCorpus(corpus, meta) {
45
45
  const slugMap = buildSlugMap(corpus);
46
46
  const base = (meta.baseUrl ?? '').replace(/\/$/, '');
47
- return corpus
48
- .filter((doc) => doc.title && !doc.hidden)
47
+ return (corpus
48
+ // A noindex page is one the author asked not to be found; the sitemap and the markdown
49
+ // copies already leave it out, and an index for agents is no different.
50
+ .filter((doc) => doc.title && !doc.hidden && !doc.noindex)
49
51
  .map((doc) => ({
50
52
  title: doc.title,
51
53
  description: doc.description?.trim() || extractDescription(doc.text ?? ''),
52
54
  link: base + withBase(meta.basePath, pathForSlug(slugMap[doc.filename])),
53
55
  }))
54
- .sort((a, b) => a.title.localeCompare(b.title));
56
+ .sort((a, b) => a.title.localeCompare(b.title)));
55
57
  }
56
58
  /**
57
59
  * Legacy fallback when no corpus is passed (e.g. running this file directly):
@@ -1497,6 +1497,7 @@ export async function buildSite(config, opts = {}) {
1497
1497
  liveExamples: config.liveExamples,
1498
1498
  docs,
1499
1499
  aliases: config.aliases,
1500
+ searchPlaceholder: config.searchPlaceholder,
1500
1501
  outputDir: PUBLIC,
1501
1502
  projectName: config.name,
1502
1503
  bookVolumes: printCoverManifestUrl(config),
@@ -71,6 +71,11 @@ export interface SiteConfig {
71
71
  * on one that is not, that takes a page's own path or a static folder's, or that names no page.
72
72
  */
73
73
  aliases?: Record<string, string>;
74
+ /**
75
+ * The hint in the header's search field. Default `'Search'`. It is localized like the rest
76
+ * of the doc system's own text, so a site with translations can translate it.
77
+ */
78
+ searchPlaceholder?: string;
74
79
  /**
75
80
  * Directories to skip while scanning `docPaths` — by basename (skipped wherever it
76
81
  * appears) or by path (skipped only at that location). Added to the built-in
@@ -291,7 +291,7 @@ preview.append(
291
291
  > `data-drop` in this example.
292
292
  )
293
293
  */
294
- /*{ "parent": "Helper Libraries" }*/
294
+ /*{ "parent": "Helper Libraries", "description": "Make HTML5 drag and drop usable: one init() call highlights compatible drop zones as a drag starts, including zones added mid-drag." }*/
295
295
  const dragInProgress = () => !!document.querySelector('.drag-source');
296
296
  export const isTypeAllowed = (allowedTypes, type) => {
297
297
  if (!allowedTypes) {
@@ -65,7 +65,7 @@ Similarly `EditableRect.snapAngle === true` or the shift-key will snap rotation
65
65
 
66
66
  After an element's position, size, or rotation are adjusted a `change` event is triggered on the element.
67
67
  */
68
- /*{ "parent": "Components" }*/
68
+ /*{ "parent": "Components", "description": "<tosi-editable> adds handles to an absolutely positioned element to move, resize and rotate it, with optional grid and angle snapping." }*/
69
69
  import { elements, vars, withAttributes } from 'tosijs';
70
70
  import { icons } from './icons.js';
71
71
  import { trackDrag } from './track-drag.js';
@@ -143,7 +143,7 @@ interface FilterMaker {
143
143
  }
144
144
  ```
145
145
  */
146
- /*{ "parent": "Form Components" }*/
146
+ /*{ "parent": "Form Components", "description": "<tosi-filter> builds array filter functions from a Finder-style query editor, with extensible filter types and a state you can save as JSON." }*/
147
147
  import { Component as WebComponent, elements, withAttributes, } from 'tosijs';
148
148
  import { icons } from './icons.js';
149
149
  import { tosiSelect } from './select.js';
package/dist/float.js CHANGED
@@ -90,7 +90,7 @@ moment it opened. A float with no anchor still reacts to any scroll outside itse
90
90
  To prevent dragging for an interior element (e.g. if you want a floating palette with buttons or input fields)
91
91
  just add the `no-drag` class to an element or its container.
92
92
  */
93
- /*{ "parent": "Components" }*/
93
+ /*{ "parent": "Components", "description": "<tosi-float> is a minimally styled floating element that can be dragged, and that hides, stays or is removed when the window resizes." }*/
94
94
  import { elements, withAttributes } from 'tosijs';
95
95
  import { trackDrag, bringToFront } from './track-drag.js';
96
96
  const { slot } = elements;
package/dist/form.js CHANGED
@@ -401,7 +401,7 @@ preview.querySelector('.set-values-btn').addEventListener('click', () => {
401
401
  })
402
402
  ```
403
403
  */
404
- /*{ "parent": "Form Components" }*/
404
+ /*{ "parent": "Form Components", "description": "<tosi-form> and <tosi-field> build forms with native client-side validation and a submit callback that receives the form's values." }*/
405
405
  import { Component as XinComponent, elements, varDefault, withAttributes, } from 'tosijs';
406
406
  import { colorInput } from './color-input.js';
407
407
  const { form, slot, tosiSlot, label, input, span } = elements;
package/dist/header.js CHANGED
@@ -87,7 +87,7 @@ preview.append(
87
87
  }
88
88
  ```
89
89
  */
90
- /*{ "parent": "Components" }*/
90
+ /*{ "parent": "Components", "description": "<tosi-header> is a flex header bar; compose it with elastic() and spacer() to place a title, links and menus where you want them." }*/
91
91
  import { Component, elements, varDefault } from 'tosijs';
92
92
  import { icons } from './icons.js';
93
93
  const { a } = elements;
@@ -1,4 +1,4 @@
1
- /*{ "parent": "Documentation System", "order": 70 }*/
1
+ /*{ "parent": "Documentation System", "order": 70, "description": "<tosi-highlight> syntax-highlights code that arrives at runtime, such as a fetched snippet or a chat message, without loading a code editor." }*/
2
2
  /*#
3
3
  # highlight-block
4
4
 
package/dist/icon-svg.js CHANGED
@@ -1,4 +1,4 @@
1
- /*{ "parent": "icons", "order": 20 }*/
1
+ /*{ "parent": "icons", "order": 20, "description": "iconSvg() returns an icon's SVG markup as a string and iconNames() lists them, with no DOM, for build scripts, server templates and ePubs." }*/
2
2
  /*#
3
3
  # `iconSvg` — icon markup without a DOM
4
4
 
package/dist/icons.js CHANGED
@@ -1,4 +1,4 @@
1
- /*{ "parent": "Components" }*/
1
+ /*{ "parent": "Components", "description": "SVG icons as element creators (icons.chevronDown()), themeable with CSS variables, with a small language for composing new icons from old." }*/
2
2
  /*#
3
3
  # icons
4
4