@kosdev-code/kos-ddk-cli 0.1.0-dev.92 → 0.1.0-dev.94

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosdev-code/kos-ddk-cli",
3
- "version": "0.1.0-dev.92",
3
+ "version": "0.1.0-dev.94",
4
4
  "description": "DDK commands for kosui: plugin projects and DDK extension-point contributions.",
5
5
  "type": "module",
6
6
  "kosui": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "kos": {
29
29
  "build": {
30
- "gitHash": "1f9387903c5f24258c38cb36d439dbb55e21d65f"
30
+ "gitHash": "5fa870d635bca165fb61f294bbf0b2f913adce26"
31
31
  }
32
32
  },
33
33
  "publishConfig": {
@@ -3755,6 +3755,11 @@
3755
3755
  "name": "width",
3756
3756
  "type": "number",
3757
3757
  "optional": true
3758
+ },
3759
+ {
3760
+ "name": "wrapTitle",
3761
+ "type": "boolean",
3762
+ "optional": true
3758
3763
  }
3759
3764
  ],
3760
3765
  "renders": [
@@ -3879,6 +3884,11 @@
3879
3884
  "name": "width",
3880
3885
  "type": "number",
3881
3886
  "optional": true
3887
+ },
3888
+ {
3889
+ "name": "wrapTitle",
3890
+ "type": "boolean",
3891
+ "optional": true
3882
3892
  }
3883
3893
  ],
3884
3894
  "renders": [
@@ -5439,6 +5449,12 @@
5439
5449
  "name": "title",
5440
5450
  "type": "ReactNode",
5441
5451
  "optional": true
5452
+ },
5453
+ {
5454
+ "name": "wrapTitle",
5455
+ "type": "boolean",
5456
+ "optional": true,
5457
+ "description": "Allow the title to wrap while preserving space for the side controls."
5442
5458
  }
5443
5459
  ],
5444
5460
  "renders": [
@@ -14212,6 +14228,12 @@
14212
14228
  "name": "value",
14213
14229
  "type": "string",
14214
14230
  "optional": true
14231
+ },
14232
+ {
14233
+ "name": "wrapTitle",
14234
+ "type": "boolean",
14235
+ "optional": true,
14236
+ "description": "Allow the title to wrap while preserving space for the side controls."
14215
14237
  }
14216
14238
  ],
14217
14239
  "renders": [
@@ -15640,6 +15662,11 @@
15640
15662
  "name": "width",
15641
15663
  "type": "number",
15642
15664
  "optional": true
15665
+ },
15666
+ {
15667
+ "name": "wrapTitle",
15668
+ "type": "boolean",
15669
+ "optional": true
15643
15670
  }
15644
15671
  ],
15645
15672
  "renders": [
@@ -19106,6 +19133,11 @@
19106
19133
  "file": "src/components/spm-field-calibration/spm-field-calibration-modal.tsx",
19107
19134
  "styled": false,
19108
19135
  "props": [
19136
+ {
19137
+ "name": "holder",
19138
+ "type": "HolderModel<any>",
19139
+ "optional": true
19140
+ },
19109
19141
  {
19110
19142
  "name": "onComplete",
19111
19143
  "type": "() => void",
@@ -20932,7 +20964,7 @@
20932
20964
  "name": "ddk-guide-descriptor-project",
20933
20965
  "title": "NCUI descriptor projects",
20934
20966
  "description": "What ddk:descriptor-project writes for each layout and option, the dashboard layout, and where --descriptorProject lists a utility, setup step or navigation view.",
20935
- "body": "# NCUI descriptor projects\n\nThe NCUI shows a utility, setup step or navigation view only if its NCUI descriptor lists it (`kondra.ncui` `utilities`, `setup.steps`, `navigations`). The DDK app uses an installed `ddk.ncui.descriptor` KAB in place of the system app's descriptor, so a descriptor project is where a plugin's new slots are listed; the backend `descriptor.json` is the fallback.\n\n```sh\nkosui ddk:descriptor-project --name my-ncui --layout standard --ice true\n```\n\nMCP: `scaffold_ddk_descriptor_project`. The project is a content project under `content/<name>`; its `.kos.json` is the KAB's `descriptor.json`. Run `npm install` if the command names added packages, then `nx run <name>:kab` and install the KAB beside the DDK app.\n\nThe lists below are what a new project gets with every option off. `standard` spreads utilities over two columns and marks `embed` navigation entries, whose children show as tabs; `compact` keeps utilities in one column.\n\n## standard\n\nSetup steps, in order: `selectCountry` (pre-step), `selectLanguage` (pre-step), `plainWater`, `ns`, `macroAssignment`, `ingredients`, `regions`, `timeSettings`, `dispenserProfile`, `waterSettings`.\n\nUtilities, by column:\n\n1. `touchScreenTest`, `pixelQualityTest`, `setup`, `usbUpdate` (manager, technician)\n2. `reboot` (manager), `downloadLogs` (manager, technician)\n\nNavigation:\n\n- `summary` (crew, technician)\n- `dashboard` (crew, technician)\n- `notifications` (crew, technician)\n- `about` (crew, technician) — embed: its children show as tabs\n - `dispenser-info` (technician, crew)\n - `hardware` (technician, crew)\n - `connectivity` (technician, crew)\n - `software` (technician, crew)\n- `utilities` (technician, manager)\n- `settings` (technician) — embed: its children show as tabs\n - `regions` (technician)\n - `dispenser-profile` (technician)\n - `cui-selection` (technician)\n - `water` (technician)\n - `remote-nns` (technician)\n\nDashboard regions:\n\n- `micros`: holder groups `*micros*`; one column per group\n- `macros`: holder groups `*`; compact cards; small size\n- `assembly`: summaries `*`; small size\n\nDashboard areas:\n\n- portrait: `micros macros` `micros macros` `micros assembly` (columns `73% 27%`)\n- landscape: `micros micros` `macros assembly` (columns `50% 50%`)\n\n## compact\n\nSetup steps, in order: `selectCountry` (pre-step), `selectLanguage` (pre-step), `plainWater`, `ns`, `macroAssignment`, `ingredients`, `regions`, `timeSettings`, `dispenserProfile`, `waterSettings`.\n\nUtilities, by column:\n\n1. `touchScreenTest`, `pixelQualityTest`, `setup`, `usbUpdate` (manager, technician), `reboot` (manager), `downloadLogs` (manager, technician)\n\nNavigation:\n\n- `dashboard` (crew, technician)\n- `notifications` (crew, technician)\n- `about` (crew, technician)\n - `software` (crew, technician)\n - `hardware` (crew, technician)\n- `network` (technician, crew)\n- `utilities` (technician, manager)\n- `settings` (technician)\n - `localization` (technician)\n - `time-settings` (technician)\n - `water-settings` (technician)\n - `dispenser-profile` (technician)\n - `cui-selection` (technician)\n\nDashboard regions:\n\n- `micros`: holder groups `*micros*`; one column per group\n- `macros`: holder groups `*`; compact cards; small size\n- `assembly`: summaries `*`; small size\n\nDashboard areas:\n\n- portrait: `micros` `macros` `assembly` (columns `100%`)\n- landscape: `micros micros` `macros assembly` (columns `50% 50%`)\n\n## Dashboard layout\n\n`kondra.ncui.dashboard` lays out the dashboard. With none, the DDK uses the built-in layout for its component mode (the same as a new project's).\n\n- `regions`: named slots. `holders` and `summaries` are holder-group and `dashboard.summary` `dashboardKey` patterns (`*` is the only wildcard). Each group and key goes to the first region, in list order, that the current layout places and that matches it; put `[\"*\"]` last to catch the rest. `holderCard` (default `true`) renders the holders as holder cards, `false` as compact cards; `perGroup` gives each group its own sub-column; `size` (`default` or `small`) applies to every card in the region; `justify` (`left`, `right`, `center`, `full`, default `full`) places the region and its cards in its cell.\n- `layouts.portrait` and/or `layouts.landscape` (give at least one; an orientation without a layout uses the other): `areas` (one string per row of region names, `.` for an empty cell), `columns` and `rows` (one size each: a share of the space such as `60%`, or `fit` to size to the cards; rows default to `fit`), `justify` (`left`, `right` or `center`: where the grid sits when its columns don't fill the width, default `left`), and `flow` per region: `cards` and `groups` (`vertical` or `horizontal`), `wrap`.\n- A plugin renders a whole region with a `ddk.dashboard.region` contribution (`add_dashboard_region`) whose `regionKey` is the region's `component`, else its `name`; a region with none renders its built-in cards. A region that claims no holders or summaries (only a `component`, such as a dispenser map) takes no cards from the others and shows only while a plugin contributes its key.\n- A region with nothing to show is empty, and a column or row whose cells are all empty is dropped with its size, and its share goes to the columns that remain: a dispenser without micro groups loses the micro columns. Give a pinned column the size `fit` and set `justify: \"right\"` to keep it at the right edge when the others drop.\n- `validate_ddk_plugin` warns about an area that is no region, a plugin's dashboard summary that no placed region claims, a size that is not a share or `fit`, shares that do not add up to 100%, an unknown `justify`, a region `component` no workspace plugin contributes, and a plugin's region contribution that no descriptor region uses.\n\n## Options\n\nOff by default; each adds:\n\n- `--carb`: carbonation: the carbWater and carbTank setup steps.\n - standard: setup step `carbWater`, setup step `carbTank`\n - compact: setup step `carbWater`, setup step `carbTank`\n- `--ice`: ice: the iceSettings setup step and the ice settings tab.\n - standard: setup step `iceSettings`, navigation `settings.ice`\n - compact: setup step `iceSettings`, navigation `settings.ice-settings`\n- `--beveragePourTest`: the beveragePourTest utility.\n - standard: utility `beveragePourTest`\n - compact: utility `beveragePourTest`\n\n## Listing a plugin's slots\n\n- `--descriptorProject <name>` on `ddk:utility`, `ddk:setup` and `ddk:nav` (MCP `descriptorProject` on `add_utility`, `add_setup_step`, `add_nav_view`) lists the new contribution's slot:\n - a utility in the last column, or `--column <n>` (1-based), with `--roles` (comma-separated; none: every role);\n - a setup step last; the setup flow runs steps in descriptor order;\n - a navigation view under its parent path, with `--roles` or the parent's roles; the parent must exist.\n- A slot already listed is left as it is; an override (`--override`) fills a listed slot and needs no entry.\n- For contributions written before the descriptor project: `kosui ddk:descriptor-entries --project <plugin> --descriptorProject <name>` (MCP `add_descriptor_entries`).\n- `validate_ddk_plugin` warns about a slot no descriptor project lists."
20967
+ "body": "# NCUI descriptor projects\n\nThe NCUI shows a utility, setup step or navigation view only if its NCUI descriptor lists it (`kondra.ncui` `utilities`, `setup.steps`, `navigations`). The DDK app uses an installed `ddk.ncui.descriptor` KAB in place of the system app's descriptor, so a descriptor project is where a plugin's new slots are listed; the backend `descriptor.json` is the fallback.\n\n```sh\nkosui ddk:descriptor-project --name my-ncui --layout standard --ice true\n```\n\nMCP: `scaffold_ddk_descriptor_project`. The project is a content project under `content/<name>`; its `.kos.json` is the KAB's `descriptor.json`. Run `npm install` if the command names added packages, then `nx run <name>:kab` and install the KAB beside the DDK app.\n\nThe lists below are what a new project gets with every option off. `standard` spreads utilities over two columns and marks `embed` navigation entries, whose children show as tabs; `compact` keeps utilities in one column.\n\n## standard\n\nSetup steps, in order: `selectCountry` (pre-step), `selectLanguage` (pre-step), `plainWater`, `ns`, `macroAssignment`, `ingredients`, `regions`, `timeSettings`, `dispenserProfile`, `waterSettings`.\n\nUtilities, by column:\n\n1. `touchScreenTest`, `pixelQualityTest`, `setup`, `usbUpdate` (manager, technician)\n2. `reboot` (manager), `downloadLogs` (manager, technician)\n\nNavigation:\n\n- `summary` (crew, technician)\n- `dashboard` (crew, technician)\n- `notifications` (crew, technician)\n- `about` (crew, technician) — embed: its children show as tabs\n - `dispenser-info` (technician, crew)\n - `hardware` (technician, crew)\n - `connectivity` (technician, crew)\n - `software` (technician, crew)\n- `utilities` (technician, manager)\n- `settings` (technician) — embed: its children show as tabs\n - `regions` (technician)\n - `dispenser-profile` (technician)\n - `cui-selection` (technician)\n - `water` (technician)\n - `remote-nns` (technician)\n\nDashboard regions:\n\n- `micros`: holder groups `*micros*`; one column per group\n- `macros`: holder groups `*`; compact cards; small size\n- `assembly`: summaries `*`; small size\n\nDashboard areas:\n\n- portrait: `micros macros` `micros macros` `micros assembly` (columns `73% 27%`)\n- landscape: `micros micros` `macros assembly` (columns `50% 50%`)\n\n## compact\n\nSetup steps, in order: `selectCountry` (pre-step), `selectLanguage` (pre-step), `plainWater`, `ns`, `macroAssignment`, `ingredients`, `regions`, `timeSettings`, `dispenserProfile`, `waterSettings`.\n\nUtilities, by column:\n\n1. `touchScreenTest`, `pixelQualityTest`, `setup`, `usbUpdate` (manager, technician), `reboot` (manager), `downloadLogs` (manager, technician)\n\nNavigation:\n\n- `dashboard` (crew, technician)\n- `notifications` (crew, technician)\n- `about` (crew, technician)\n - `software` (crew, technician)\n - `hardware` (crew, technician)\n- `network` (technician, crew)\n- `utilities` (technician, manager)\n- `settings` (technician)\n - `localization` (technician)\n - `time-settings` (technician)\n - `water-settings` (technician)\n - `dispenser-profile` (technician)\n - `cui-selection` (technician)\n\nDashboard regions:\n\n- `micros`: holder groups `*micros*`; one column per group\n- `macros`: holder groups `*`; compact cards; small size\n- `assembly`: summaries `*`; small size\n\nDashboard areas:\n\n- portrait: `micros` `macros` `assembly` (columns `100%`)\n- landscape: `micros micros` `macros assembly` (columns `50% 50%`)\n\n## Dashboard layout\n\n`kondra.ncui.dashboard` lays out the dashboard. With none, the DDK uses the built-in layout for its component mode (the same as a new project's).\n\n- `regions`: named slots. `holders` and `summaries` are holder-group and `dashboard.summary` `dashboardKey` patterns (`*` is the only wildcard). Each group and key goes to the first region, in list order, that the current layout places and that matches it; put `[\"*\"]` last to catch the rest. `holderCard` (default `true`) renders the holders as holder cards, `false` as compact cards; `perGroup` gives each group its own sub-column; `size` (`default` or `small`) applies to every card in the region; `justify` (`left`, `right`, `center`, `full`, default `full`) places the region and its cards in its cell.\n- `layouts.portrait` and/or `layouts.landscape` (give at least one; an orientation without a layout uses the other): `areas` (one string per row of region names, `.` for an empty cell), `columns` and `rows` (one size each: a share of the space such as `60%`, or `fit` to size to the cards; rows default to `fit`; a column can also be `fixed 20%` or `fixed 240px` for a set width, or `max 30%` or `max 300px` to fit its cards up to that width, where the percentage is of the dashboard's width and shares divide what is left), `justify` (`left`, `right` or `center`: where the grid sits when its columns don't fill the width, default `left`), and `flow` per region: `cards` and `groups` (`vertical` or `horizontal`), `wrap`.\n- A plugin renders a whole region with a `ddk.dashboard.region` contribution (`add_dashboard_region`) whose `regionKey` is the region's `component`, else its `name`; a region with none renders its built-in cards. A region that claims no holders or summaries (only a `component`, such as a dispenser map) takes no cards from the others and shows only while a plugin contributes its key.\n- A region with nothing to show is empty, and a column or row whose cells are all empty is dropped with its size, and its share goes to the columns that remain: a dispenser without micro groups loses the micro columns. Give a pinned column the size `fit` and set `justify: \"right\"` to keep it at the right edge when the others drop.\n- `validate_ddk_plugin` warns about an area that is no region, a plugin's dashboard summary that no placed region claims, a size that is not a share or `fit`, shares that do not add up to 100%, an unknown `justify`, a region `component` no workspace plugin contributes, and a plugin's region contribution that no descriptor region uses.\n\n## Options\n\nOff by default; each adds:\n\n- `--carb`: carbonation: the carbWater and carbTank setup steps.\n - standard: setup step `carbWater`, setup step `carbTank`\n - compact: setup step `carbWater`, setup step `carbTank`\n- `--ice`: ice: the iceSettings setup step and the ice settings tab.\n - standard: setup step `iceSettings`, navigation `settings.ice`\n - compact: setup step `iceSettings`, navigation `settings.ice-settings`\n- `--beveragePourTest`: the beveragePourTest utility.\n - standard: utility `beveragePourTest`\n - compact: utility `beveragePourTest`\n\n## Listing a plugin's slots\n\n- `--descriptorProject <name>` on `ddk:utility`, `ddk:setup` and `ddk:nav` (MCP `descriptorProject` on `add_utility`, `add_setup_step`, `add_nav_view`) lists the new contribution's slot:\n - a utility in the last column, or `--column <n>` (1-based), with `--roles` (comma-separated; none: every role);\n - a setup step last; the setup flow runs steps in descriptor order;\n - a navigation view under its parent path, with `--roles` or the parent's roles; the parent must exist.\n- A slot already listed is left as it is; an override (`--override`) fills a listed slot and needs no entry.\n- For contributions written before the descriptor project: `kosui ddk:descriptor-entries --project <plugin> --descriptorProject <name>` (MCP `add_descriptor_entries`).\n- `validate_ddk_plugin` warns about a slot no descriptor project lists."
20936
20968
  },
20937
20969
  {
20938
20970
  "uri": "ddk://design/base",
@@ -210,14 +210,21 @@ const SHARE = /^\d+(\.\d+)?%$/;
210
210
  const GRID_ALIGN = ["left", "right", "center"];
211
211
  const REGION_ALIGN = [...GRID_ALIGN, "full"];
212
212
 
213
+ const SIZED_COLUMN = /^(fixed|max) \d+(\.\d+)?(%|px)$/;
214
+
213
215
  function trackProblems(orientation, kind, sizes) {
214
216
  if (!sizes) return [];
217
+ const known = (size) =>
218
+ size === "fit" ||
219
+ SHARE.test(size) ||
220
+ (kind === "column" && SIZED_COLUMN.test(size));
221
+ const forms =
222
+ kind === "column"
223
+ ? 'a share like "50%", fit, fixed like "fixed 20%" or max like "max 300px"'
224
+ : 'a share like "50%" or fit';
215
225
  const problems = sizes
216
- .filter((size) => size !== "fit" && !SHARE.test(size))
217
- .map(
218
- (size) =>
219
- `${orientation} ${kind} size "${size}" is not a share like "50%" or fit`
220
- );
226
+ .filter((size) => !known(size))
227
+ .map((size) => `${orientation} ${kind} size "${size}" is not ${forms}`);
221
228
  const shares = sizes.filter((size) => SHARE.test(size));
222
229
  const total = shares.reduce((sum, size) => sum + parseFloat(size), 0);
223
230
  if (shares.length > 0 && Math.abs(total - 100) > 0.5) {