tosijs-ui 1.16.40 → 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 (65) hide show
  1. package/CHANGELOG.md +13 -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.js +1 -1
  16. package/dist/doc-system/data-client.js +1 -1
  17. package/dist/doc-system/doc-system.js +1 -1
  18. package/dist/doc-system/highlight-styles.js +1 -1
  19. package/dist/doc-system/site/docs.js +1 -1
  20. package/dist/doc-system/site/make-llms-txt.d.ts +1 -0
  21. package/dist/doc-system/site/make-llms-txt.js +5 -3
  22. package/dist/drag-and-drop.js +1 -1
  23. package/dist/editable-rect.js +1 -1
  24. package/dist/filter-builder.js +1 -1
  25. package/dist/float.js +1 -1
  26. package/dist/form.js +1 -1
  27. package/dist/header.js +1 -1
  28. package/dist/highlight-block.js +1 -1
  29. package/dist/icon-svg.js +1 -1
  30. package/dist/icons.js +1 -1
  31. package/dist/iife.js +2 -2
  32. package/dist/iife.js.map +56 -56
  33. package/dist/layout.js +1 -1
  34. package/dist/live-example/component.js +1 -1
  35. package/dist/live-theme.js +1 -1
  36. package/dist/localize.js +1 -1
  37. package/dist/make-sorter.js +1 -1
  38. package/dist/mapbox.js +1 -1
  39. package/dist/markdown-viewer.js +1 -1
  40. package/dist/menu.js +1 -1
  41. package/dist/month.js +1 -1
  42. package/dist/notifications.js +1 -1
  43. package/dist/palette.js +1 -1
  44. package/dist/password-strength.js +1 -1
  45. package/dist/rating.js +1 -1
  46. package/dist/rich-text.js +1 -1
  47. package/dist/router.js +1 -1
  48. package/dist/schema-form.js +1 -1
  49. package/dist/search-field.js +1 -1
  50. package/dist/segmented.js +1 -1
  51. package/dist/select.js +1 -1
  52. package/dist/side-nav.js +1 -1
  53. package/dist/size-break.js +1 -1
  54. package/dist/sizer.js +1 -1
  55. package/dist/tab-selector.js +1 -1
  56. package/dist/tag-list.js +1 -1
  57. package/dist/theme.js +1 -1
  58. package/dist/tooltip.js +1 -1
  59. package/dist/track-drag.js +1 -1
  60. package/dist/value-renderer.js +1 -1
  61. package/dist/version.d.ts +1 -1
  62. package/dist/version.js +1 -1
  63. package/dist/via-tag.js +1 -1
  64. package/llms.txt +64 -70
  65. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
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
+
3
16
  ## 1.16.40
4
17
 
5
18
  - **An example with no script runs under a strict CSP (#245, #246).** A pure-HTML example still
@@ -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. */
@@ -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';
@@ -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
 
@@ -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';
@@ -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';
@@ -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):
@@ -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