@camstack/types 1.2.89 → 1.2.90

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.
@@ -50,9 +50,16 @@
50
50
  * strings verbatim, the viewer maps the ids onto its `v2.nc.rules.*` i18n keys
51
51
  * and falls back to them.
52
52
  *
53
- * The admin UI keeps a pinned local copy for now — `@camstack/types` reaches it
54
- * as a Module-Federation singleton provided by the HOST, so a newly-added export
55
- * reads `undefined` there until a server closure carrying it is installed. See
53
+ * BOTH EDITORS IMPORT THIS FILE. The admin UI kept a pinned local copy while
54
+ * Phase 1 shipped; it was deleted in Phase 3 once the MF question was actually
55
+ * answered rather than assumed. The admin UI is the module-federation HOST
56
+ * (`packages/addon-admin-ui/vite.config.ts`: `federation({ name:
57
+ * 'admin_ui_host', … shared: { '@camstack/types': { …, import: typesEsm } } })`)
58
+ * — it PROVIDES the singleton, bundled from the workspace at build time, and
59
+ * never consumes one from a server closure. The lag is real for addon widget
60
+ * REMOTES, which declare the same package `import: false`
61
+ * (`packages/addon-benchmark/vite.config.ts`) and therefore read whatever the
62
+ * host loaded; nothing in this file is consumed that way. See
56
63
  * `docs/design/2026-08-19-viewer-notification-rule-parity.md` §3 and Phase 3.
57
64
  */
58
65
  import { type NcAudioCondition, type NcConditions, type NcDelivery, type NcOccupancyCondition } from '../capabilities/notification-rules.cap.js';
@@ -138,6 +145,17 @@ export declare function isSystemDelivery(delivery: string): boolean;
138
145
  export interface NcRuleConditionsSubject {
139
146
  readonly occupancy?: unknown;
140
147
  readonly audio?: unknown;
148
+ /**
149
+ * EVERY OTHER CONDITION, admitted explicitly.
150
+ *
151
+ * Without it the two named keys make this a "weak type", and TypeScript's
152
+ * excess-property check then rejects `{ classes: ['person'] }` written INLINE
153
+ * while accepting the identical value read out of a variable. Both editors
154
+ * write such literals — seeds, specs, the admin's section tests — so the
155
+ * classifier's own shape has to say "the rest of the conditions ride along and
156
+ * I do not read them" rather than let it depend on where the value came from.
157
+ */
158
+ readonly [conditionId: string]: unknown;
141
159
  }
142
160
  /** Every authored condition, keyed by descriptor id — same reasoning as above. */
143
161
  export type NcAuthoredConditions = Readonly<Record<string, unknown>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.89",
3
+ "version": "1.2.90",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",