@design.estate/dees-catalog 23.2.0 → 23.4.0

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 (44) hide show
  1. package/dist_bundle/bundle.js +3033 -2785
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-T6MJ73SK.js → chunk-6M55MVYH.js} +3 -3
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-I4IO5H5N.js → chunk-CM67HGUE.js} +2 -2
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-74TRVA7N.js → chunk-QVHO2EIW.js} +3 -3
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-74TRVA7N.js.map → chunk-QVHO2EIW.js.map} +1 -1
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-OOMCZNLC.js → de-ZWMPLB5K.js} +3 -3
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-ZWMPLB5K.js.map +1 -0
  9. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-HUKGQIM3.js → dees-modal-75MIWWY2.js} +3 -3
  10. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-OISBUFI7.js → dees-workspace-terminal-6V4DLJS3.js} +4 -4
  11. package/dist_ts_web/00_commitinfo_data.js +1 -1
  12. package/dist_ts_web/contextmenu.d.ts +7 -0
  13. package/dist_ts_web/contextmenu.js +8 -0
  14. package/dist_ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.d.ts +9 -39
  15. package/dist_ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.js +85 -419
  16. package/dist_ts_web/elements/00group-input/dees-picker-fold/dees-picker-fold.d.ts +133 -0
  17. package/dist_ts_web/elements/00group-input/dees-picker-fold/dees-picker-fold.demo.d.ts +1 -0
  18. package/dist_ts_web/elements/00group-input/dees-picker-fold/dees-picker-fold.demo.js +71 -0
  19. package/dist_ts_web/elements/00group-input/dees-picker-fold/dees-picker-fold.js +600 -0
  20. package/dist_ts_web/elements/00group-input/dees-picker-fold/index.d.ts +1 -0
  21. package/dist_ts_web/elements/00group-input/dees-picker-fold/index.js +2 -0
  22. package/dist_ts_web/elements/00group-input/index.d.ts +1 -0
  23. package/dist_ts_web/elements/00group-input/index.js +2 -1
  24. package/dist_ts_web/i18n/de.d.ts +4 -4
  25. package/dist_ts_web/i18n/de.js +2 -2
  26. package/dist_ts_web/i18n/messages.d.ts +4 -4
  27. package/dist_ts_web/i18n/messages.js +2 -2
  28. package/package.json +5 -1
  29. package/readme.md +55 -1
  30. package/scripts/check-packed-consumer.mjs +8 -1
  31. package/ts_web/00_commitinfo_data.ts +1 -1
  32. package/ts_web/contextmenu.ts +7 -0
  33. package/ts_web/elements/00group-harness/dees-harness-composer/dees-harness-composer.ts +82 -403
  34. package/ts_web/elements/00group-input/dees-picker-fold/dees-picker-fold.demo.ts +77 -0
  35. package/ts_web/elements/00group-input/dees-picker-fold/dees-picker-fold.ts +559 -0
  36. package/ts_web/elements/00group-input/dees-picker-fold/index.ts +1 -0
  37. package/ts_web/elements/00group-input/index.ts +1 -0
  38. package/ts_web/i18n/de.ts +1 -1
  39. package/ts_web/i18n/messages.ts +1 -1
  40. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-OOMCZNLC.js.map +0 -1
  41. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-T6MJ73SK.js.map → chunk-6M55MVYH.js.map} +0 -0
  42. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-I4IO5H5N.js.map → chunk-CM67HGUE.js.map} +0 -0
  43. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-HUKGQIM3.js.map → dees-modal-75MIWWY2.js.map} +0 -0
  44. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-OISBUFI7.js.map → dees-workspace-terminal-6V4DLJS3.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "23.2.0",
3
+ "version": "23.4.0",
4
4
  "private": false,
5
5
  "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
6
6
  "main": "dist_ts_web/index.js",
@@ -15,6 +15,10 @@
15
15
  "types": "./dist_ts_web/icon.d.ts",
16
16
  "import": "./dist_ts_web/icon.js"
17
17
  },
18
+ "./contextmenu": {
19
+ "types": "./dist_ts_web/contextmenu.d.ts",
20
+ "import": "./dist_ts_web/contextmenu.js"
21
+ },
18
22
  "./cdn": {
19
23
  "types": "./dist_ts_web/cdn.d.ts",
20
24
  "import": "./dist_ts_web/cdn.js"
package/readme.md CHANGED
@@ -22,6 +22,7 @@ switcher**, **view-toggle**, and **single-selection toggle** all lead to
22
22
  | Turn one setting on or off | [`dees-input-toggle`](#deesinputtoggle), [`dees-input-checkbox`](#deesinputcheckbox) | Boolean setting or checkable form choice. Multitoggle's boolean mode is useful when both alternatives need explicit labels. |
23
23
  | Toggle an independent toolbar option | [`dees-button`](#deesbutton) with `pressed`, [`dees-input-toggle`](#deesinputtoggle) | A toolbar or app-bar command that stays on uses a button with `pressed`; a labelled setting uses the switch. A set of independent options is not a single-selection multitoggle. |
24
24
  | Choose from a longer menu of values | [`dees-input-dropdown`](#deesinputdropdown) | Searchable single selection; `enableSearch` defaults to true. |
25
+ | Put several dropdowns on a row that may be too narrow for them: a model and its effort, an account | [`dees-picker-fold`](#deespickerfold) | Where they do not fit, one button says the choices and opens the same dropdowns in a speech bubble; `fold="always"` for a narrow cell. Never hand-build the fold. |
25
26
  | Group related commands | [`dees-button-group`](#deesbuttongroup), [`dees-actionbar`](#deesactionbar) | Layout for actions. A button group does not own a selected value. |
26
27
  | Navigate open content panels, with optional close controls | [`dees-appui-tabs`](#deesappuitabs) | Tab selection, close actions and keyboard focus. Use multitoggle for changing a display mode within a panel. |
27
28
  | Build an application shell with views and menus | [`dees-appui`](#deesappui) | Main/secondary navigation, content tabs, bars and view lifecycle. Routes by hash, or by path beside the host's server routes. |
@@ -115,6 +116,7 @@ class MyApp extends DeesElement {
115
116
  | --- | --- |
116
117
  | `@design.estate/dees-catalog` | Every component, registered on import, with the types of their properties and events. |
117
118
  | `@design.estate/dees-catalog/icon` | `dees-icon` alone (see [DeesIcon](#deesicon)). |
119
+ | `@design.estate/dees-catalog/contextmenu` | `dees-contextmenu` alone, with the `dees-icon` it draws glyphs with, and its menu-item types `TContextMenuItem`, `IContextMenuItemRegular`, `IContextMenuDivider` and `IContextMenuOptions` (see [DeesContextmenu](#deescontextmenu)). Leaves out ECharts, xterm.js, highlight.js, Monaco and the other components. |
118
120
  | `@design.estate/dees-catalog/cdn` | Where the catalog loads Monaco from, as constants, and `monacoVsDirectoryUrl()` for a server that serves Monaco itself. Imports no component, Lit or DOM API, so it runs in plain Node. |
119
121
  | `@design.estate/dees-catalog/richtext-markdown` | The richtext editor's Markdown format without the editor: `richtextMarkdownToDoc`, `richtextDocToMarkdown` and `richtextMarkdownRenderOptions`, and its references: `richtextReferenceHref`, `richtextReferenceId`, `richtextMarkdownToReferences` and `richtextReferencesToMarkdown`. Imports no component, Lit or DOM API, so it runs in plain Node. |
120
122
 
@@ -461,6 +463,7 @@ task guide and examples deliberately; the generated table does not replace them.
461
463
  | `dees-pagination` | layout | [DeesPagination](#deespagination) | [Source](ts_web/elements/00group-layout/dees-pagination/dees-pagination.ts) |
462
464
  | `dees-panel` | layout | [DeesPanel](#deespanel) | [Source](ts_web/elements/00group-layout/dees-panel/dees-panel.ts) |
463
465
  | `dees-pdf-viewer` | media | [DeesPdfViewer](#deespdfviewer) | [Source](ts_web/elements/00group-media/dees-pdf-viewer/component.ts) |
466
+ | `dees-picker-fold` | input | [DeesPickerFold](#deespickerfold) | [Source](ts_web/elements/00group-input/dees-picker-fold/dees-picker-fold.ts) |
464
467
  | `dees-popover` | overlay | [DeesPopover](#deespopover) | [Source](ts_web/elements/00group-overlay/dees-popover/dees-popover.ts) |
465
468
  | `dees-preview` | media | [DeesPreview](#deespreview) | [Source](ts_web/elements/00group-media/dees-preview/dees-preview.ts) |
466
469
  | `dees-profilepicture-modal` | input | — | [Source](ts_web/elements/00group-input/profilepicture/profilepicture.modal.ts) |
@@ -1953,6 +1956,50 @@ usable one.
1953
1956
  ]}
1954
1957
  ```
1955
1958
 
1959
+ #### `DeesPickerFold`
1960
+ Dropdowns on a row that fold into one button where they do not fit. The button says the choices
1961
+ and opens the same dropdowns, one under another with their names, in a speech bubble
1962
+ (`dees-popover`); `dees-harness-composer` folds its account, model and effort this way.
1963
+
1964
+ ```typescript
1965
+ <dees-picker-fold
1966
+ label="Model settings"
1967
+ primary="model"
1968
+ .pickers=${[
1969
+ { key: 'model', label: 'Model', options: models, selectedOption: model, placeholder: 'Choose a model', minWidth: 150, maxWidth: 280 },
1970
+ { key: 'effort', label: 'Reasoning effort', options: efforts, selectedOption: effort, minWidth: 150, maxWidth: 150 },
1971
+ ]}
1972
+ @picker-change=${(event) => save(event.detail.key, event.detail.option.key)}
1973
+ ></dees-picker-fold>
1974
+ ```
1975
+
1976
+ - Each picker (`IPickerFoldPicker`) is a `dees-input-dropdown`: its `key`, its `label` (shown above
1977
+ it in the bubble only; on the row its choice speaks for it), `options`, `selectedOption`,
1978
+ `placeholder`, `disabled`, `enableSearch`, and `description`, a line under it in the bubble such
1979
+ as why it cannot be chosen now. On the row it is at least `minWidth` px and grows to `maxWidth`
1980
+ (absent, into what the row leaves); it sizes from these, never from its label.
1981
+ - `fold="auto"` (the default) folds where the pickers do not fit at their smallest widths. Among
1982
+ the items of a flex row the control takes the free space, and the pickers have to fit beside the
1983
+ row's other items at their widths, whichever line those wrapped onto; anywhere else, in the
1984
+ control's own width. The decision never reads the control's own content, so it never flips back
1985
+ and forth, and an open bubble keeps the pickers folded until it closes. `fold="always"` keeps them
1986
+ folded, for a cell too narrow to hold them; the button is then as wide as what it says.
1987
+ - The button says `summary`, or, empty, every picker's choice (else its placeholder) joined with
1988
+ " · ", where the choice of the `primary` picker gives way first and the others keep their words.
1989
+ Its tooltip holds every choice and its name is "`label`: what it says", however little shows.
1990
+ `warning` (such as a saved choice no longer offered) gives it the warning tone and says it in its
1991
+ tooltip and description.
1992
+ - The button and the row's pickers share the field's look, which a host sets for both through the
1993
+ dropdown's custom properties (`--dees-input-control-height`, `--dees-input-control-bg`,
1994
+ `--dees-input-control-border`); the bubble's pickers keep the catalog's look.
1995
+ - Controlled: a choice emits the bubbling `picker-change` with `{ key, option }`, and the pickers
1996
+ show what the host passes in `pickers`. A host that refuses a choice passes its own choice again
1997
+ (new option objects) and the dropdown shows it.
1998
+ - The focus follows a fold: a focused picker that folds away hands it to the button; when the
1999
+ pickers unfold, the same picker on the row takes it, or the `primary` one when it was on the
2000
+ button. `openPicker(key?)` focuses a picker and opens its list, opening the bubble first while
2001
+ folded; without a key, the primary picker. `folded` says whether the button stands in for them.
2002
+
1956
2003
  #### `DeesInputFileupload`
1957
2004
  File upload component with drag-and-drop support.
1958
2005
 
@@ -4908,6 +4955,13 @@ from background work. Toast `duration: 0` keeps it visible until dismissal.
4908
4955
  #### `DeesContextmenu`
4909
4956
  Context menu component for right-click actions with nested submenu support.
4910
4957
 
4958
+ Applications that only need the context menu can use the granular entry point
4959
+ without registering or bundling the complete catalog:
4960
+
4961
+ ```typescript
4962
+ import { DeesContextmenu, type TContextMenuItem } from '@design.estate/dees-catalog/contextmenu';
4963
+ ```
4964
+
4911
4965
  Menus take focus after becoming visible. ArrowUp/ArrowDown move through enabled items and the disabled items that say why (`description`), Enter activates the focused item, and Escape dismisses the menu chain without reaching enclosing app shortcuts. Hosts can register focus restoration with the returned menu's `registerGarbageFunction()` hook.
4912
4966
 
4913
4967
  A menu blends in out of the corner nearest its anchor over `--dees-transition-fast` and leaves the same way over `--dees-transition-instant`: it scales from 0.96, its frosted panel's material — tint, border, shadow and backdrop blur — ramps in from nothing, and the commands fade in. `transform-origin` follows the computed placement, so a menu flipped left or up grows from its own corner; submenus and the account dropdown (`DeesAppuiProfileDropdown.openFromTrigger()`) blend the same way, and all of them sit at the medium elevation, `--dees-shadow-md`. The panel never fades as a whole, which would drop the frosted backdrop for the length of the blend, and nothing is clipped, so every command takes presses from the first frame. Under `prefers-reduced-motion: reduce` both blends are immediate.
@@ -6264,7 +6318,7 @@ Set `setupItems` (`THarnessComposerSetupItem[]`) while a new session is being se
6264
6318
 
6265
6319
  Place optional reply or task context in `slot="context"` to integrate it above the textarea inside one input surface. Set `contextDescription` to the same context as plain text for the textarea's accessible description. An empty slot reserves no space. Clicking informational context focuses the prompt; links and controls retain their own behavior. `DeesHarnessChat` supplies its reply heading here and keeps the composer within the conversation column, alongside the full-height desktop sidebar.
6266
6320
 
6267
- Prompt input: one card holds the prompt and its controls (docked, it floats on the transcript's measure with the chat's own surface around it; the card takes the focus ring while the prompt has focus), autogrow textarea at the subhead size, attachment picker/paste/drag-drop (an image with its data shows as a 48px thumbnail tile with its remove control on it; files as chips) with configurable `maxAttachmentCount`, `maxAttachmentBytes` (10 MB default), and `maxTotalAttachmentBytes` (30 MB default), image/text/binary classification, optional account, model, and reasoning-effort dropdowns, Enter to send (also Cmd/Ctrl+Enter), Shift+Enter for a new line. The controls keep one row: the account, model and effort pickers shrink to their smallest widths (120, 150 and 110 px; they size from those widths, never from their labels), and where even those do not fit beside the attach button, the mode switch and the trailing actions, they fold into one settings button. It says the model, or the first choice still to make, and opens the same dropdowns, with their names, in a popover; an open popover keeps them folded until it closes. Only where even the folded row does not fit (a phone while a turn runs) do the trailing actions (queued count, delivery hint, More options, Stop, Queue, the main action) wrap together onto their own line at the trailing edge. The prompt's words, and the chat's "Replying to" line, start `md` in from the card's outer edge, where the transcript's words start above the docked composer. The main action and Stop are pills and keep their words (Send, Steer, Queue, Run; Stop with a square glyph). Nothing widens the composer past its column; an Enter that commits an IME composition (`isComposing`, or key 229 right after `compositionend`) stays the composition's, and an open slash-command menu takes Enter to complete its highlighted entry first. Attachment count is unlimited unless the host sets it. `attachmentAccept` names the files the host takes, as an `<input type="file">` `accept` list (`.pdf`, `application/pdf`, `image/*`): the picker offers those, and a picked, pasted or dropped file of another type is refused with `harness-attachment-error`; empty takes every file. `dees-harness-chat` forwards all three limits, `attachmentAccept` and `commands` to its composer. Controlled component — the host owns `value`, `attachments`, `commands`, `account`, and the other selections. Set `accountOptions` to `{ label, value }[]` so the dropdown displays readable labels while events retain opaque stable account values. Account changes emit `harness-account-change` with `{ account }`; `harness-send` includes optional `account` alongside `model` and `reasoningEffort`. While `account` names no usable option the account select says "Choose an account", and an empty `model` or `reasoningEffort` reads "Choose a model" or "Choose an effort".
6321
+ Prompt input: one card holds the prompt and its controls (docked, it floats on the transcript's measure with the chat's own surface around it; the card takes the focus ring while the prompt has focus), autogrow textarea at the subhead size, attachment picker/paste/drag-drop (an image with its data shows as a 48px thumbnail tile with its remove control on it; files as chips) with configurable `maxAttachmentCount`, `maxAttachmentBytes` (10 MB default), and `maxTotalAttachmentBytes` (30 MB default), image/text/binary classification, optional account, model, and reasoning-effort dropdowns, Enter to send (also Cmd/Ctrl+Enter), Shift+Enter for a new line. The controls keep one row: the account, model and effort pickers shrink to their smallest widths (120, 150 and 110 px; they size from those widths, never from their labels), and where even those do not fit beside the attach button, the mode switch and the trailing actions, they fold into one settings button ([DeesPickerFold](#deespickerfold)). It says the model, or the first choice still to make, and opens the same dropdowns, with their names, in a popover; an open popover keeps them folded until it closes. Only where even the folded row does not fit (a phone while a turn runs) do the trailing actions (queued count, delivery hint, More options, Stop, Queue, the main action) wrap together onto their own line at the trailing edge. The prompt's words, and the chat's "Replying to" line, start `md` in from the card's outer edge, where the transcript's words start above the docked composer. The main action and Stop are pills and keep their words (Send, Steer, Queue, Run; Stop with a square glyph). Nothing widens the composer past its column; an Enter that commits an IME composition (`isComposing`, or key 229 right after `compositionend`) stays the composition's, and an open slash-command menu takes Enter to complete its highlighted entry first. Attachment count is unlimited unless the host sets it. `attachmentAccept` names the files the host takes, as an `<input type="file">` `accept` list (`.pdf`, `application/pdf`, `image/*`): the picker offers those, and a picked, pasted or dropped file of another type is refused with `harness-attachment-error`; empty takes every file. `dees-harness-chat` forwards all three limits, `attachmentAccept` and `commands` to its composer. Controlled component — the host owns `value`, `attachments`, `commands`, `account`, and the other selections. Set `accountOptions` to `{ label, value }[]` so the dropdown displays readable labels while events retain opaque stable account values. Account changes emit `harness-account-change` with `{ account }`; `harness-send` includes optional `account` alongside `model` and `reasoningEffort`. While `account` names no usable option the account select says "Choose an account", and an empty `model` or `reasoningEffort` reads "Choose a model" or "Choose an effort".
6268
6322
 
6269
6323
  An account that cannot be used right now stays listed: give its option `disabled: true` and a `description` with the reason or the fix ("Sign in again in Accounts to use it."). It cannot be chosen, and it is never the current account: an `account` that names a disabled option shows as no selection, and the host's `account` property is left as the host set it. When the host's `account` is a disabled option, `harness-send` carries no `account`, whatever its delivery. Treat a missing `account` as "no usable account": refuse the send or prompt for an account, and never fall back to a default account. `accountNote` is a note on the account choice, shown under the controls with or without options — for accounts that need attention, or for an account service that is unavailable and lists none. Its polite live region (`role="status"`) is in the DOM whenever the model controls show (`showModelControls`), visually hidden and taking no space while the note is empty, so both the note's first appearance and every later change are announced. It hides with the model controls, and `dees-harness-chat` forwards it.
6270
6324
 
@@ -1,5 +1,5 @@
1
1
  import { execFileSync } from 'node:child_process';
2
- import { cpSync, mkdirSync, mkdtempSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
2
+ import { cpSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
3
3
  import { join, resolve } from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
 
@@ -40,6 +40,13 @@ for (const name of browserTests) {
40
40
  .replaceAll('../ts_web/', '@design.estate/dees-catalog/dist_ts_web/');
41
41
  writeFileSync(join(consumer, `test.${name}.browser.ts`), browserTest);
42
42
  }
43
+ // The browser regressions share test/helpers/, which reach the sources one level further up.
44
+ mkdirSync(join(consumer, 'helpers'));
45
+ for (const helper of readdirSync(join(root, 'test/helpers')).filter((fileArg) => fileArg.endsWith('.ts'))) {
46
+ const helperSource = readFileSync(join(root, 'test/helpers', helper), 'utf8')
47
+ .replaceAll('../../ts_web/', '@design.estate/dees-catalog/dist_ts_web/');
48
+ writeFileSync(join(consumer, 'helpers', helper), helperSource);
49
+ }
43
50
  console.log(`Packed consumer: ${consumer}`);
44
51
  run(['install', '--ignore-scripts']);
45
52
  run(['exec', 'tsc', '--version']);
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '23.2.0',
6
+ version: '23.4.0',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Granular dees-contextmenu registration and type entry point.
3
+ *
4
+ * Import this subpath when a browser bundle only needs the context menu and its
5
+ * menu-item types and should not load the complete component catalog.
6
+ */
7
+ export * from './elements/00group-overlay/dees-contextmenu/index.js';