@mulmoclaude/collection-plugin 0.5.7 → 0.5.9

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 (106) hide show
  1. package/dist/style.css +3 -250
  2. package/dist/vue/collectionViewMode.d.ts +1 -1
  3. package/dist/vue/collectionViewMode.d.ts.map +1 -1
  4. package/dist/vue/components/CollectionCalendarView.vue.d.ts +1 -2
  5. package/dist/vue/components/CollectionCalendarView.vue.d.ts.map +1 -1
  6. package/dist/vue/components/CollectionCustomView.vue.d.ts +1 -1
  7. package/dist/vue/components/CollectionCustomView.vue.d.ts.map +1 -1
  8. package/dist/vue/components/CollectionDayView.vue.d.ts +1 -2
  9. package/dist/vue/components/CollectionDayView.vue.d.ts.map +1 -1
  10. package/dist/vue/components/CollectionEmbedView.vue.d.ts +1 -1
  11. package/dist/vue/components/CollectionEmbedView.vue.d.ts.map +1 -1
  12. package/dist/vue/components/CollectionKanbanView.vue.d.ts +1 -2
  13. package/dist/vue/components/CollectionKanbanView.vue.d.ts.map +1 -1
  14. package/dist/vue/components/CollectionRecordPanel.vue.d.ts +5 -6
  15. package/dist/vue/components/CollectionRecordPanel.vue.d.ts.map +1 -1
  16. package/dist/vue/components/CollectionView.vue.d.ts.map +1 -1
  17. package/dist/vue/components/CollectionViewConfigModal.vue.d.ts +1 -1
  18. package/dist/vue/components/CollectionViewConfigModal.vue.d.ts.map +1 -1
  19. package/dist/vue/index.d.ts +1 -1
  20. package/dist/vue/index.d.ts.map +1 -1
  21. package/dist/vue/uiContext.d.ts +1 -2
  22. package/dist/vue/uiContext.d.ts.map +1 -1
  23. package/dist/vue/useCollectionRendering.d.ts +1 -2
  24. package/dist/vue/useCollectionRendering.d.ts.map +1 -1
  25. package/dist/vue.cjs +86 -66
  26. package/dist/vue.cjs.map +1 -1
  27. package/dist/vue.js +3 -4
  28. package/dist/vue.js.map +1 -1
  29. package/package.json +8 -18
  30. package/dist/chunk-CKQMccvm.cjs +0 -28
  31. package/dist/core/actionVisible.d.ts +0 -35
  32. package/dist/core/actionVisible.d.ts.map +0 -1
  33. package/dist/core/calendarGrid.d.ts +0 -121
  34. package/dist/core/calendarGrid.d.ts.map +0 -1
  35. package/dist/core/deriveAll.d.ts +0 -39
  36. package/dist/core/deriveAll.d.ts.map +0 -1
  37. package/dist/core/derivedFormula.d.ts +0 -19
  38. package/dist/core/derivedFormula.d.ts.map +0 -1
  39. package/dist/core/draft.d.ts +0 -19
  40. package/dist/core/draft.d.ts.map +0 -1
  41. package/dist/core/enumColors.d.ts +0 -34
  42. package/dist/core/enumColors.d.ts.map +0 -1
  43. package/dist/core/errorMessage.d.ts +0 -5
  44. package/dist/core/errorMessage.d.ts.map +0 -1
  45. package/dist/core/itemLabel.d.ts +0 -13
  46. package/dist/core/itemLabel.d.ts.map +0 -1
  47. package/dist/core/presentCollection.d.ts +0 -14
  48. package/dist/core/presentCollection.d.ts.map +0 -1
  49. package/dist/core/promptSafety.d.ts +0 -2
  50. package/dist/core/promptSafety.d.ts.map +0 -1
  51. package/dist/core/schema.d.ts +0 -356
  52. package/dist/core/schema.d.ts.map +0 -1
  53. package/dist/core/shortHexId.d.ts +0 -9
  54. package/dist/core/shortHexId.d.ts.map +0 -1
  55. package/dist/core/sortItems.d.ts +0 -30
  56. package/dist/core/sortItems.d.ts.map +0 -1
  57. package/dist/core/uiTypes.d.ts +0 -107
  58. package/dist/core/uiTypes.d.ts.map +0 -1
  59. package/dist/deriveAll-BHcs1erT.js +0 -342
  60. package/dist/deriveAll-BHcs1erT.js.map +0 -1
  61. package/dist/deriveAll-BJ0Lvm1Q.cjs +0 -359
  62. package/dist/deriveAll-BJ0Lvm1Q.cjs.map +0 -1
  63. package/dist/index.cjs +0 -57
  64. package/dist/index.d.ts +0 -15
  65. package/dist/index.d.ts.map +0 -1
  66. package/dist/index.js +0 -4
  67. package/dist/promptSafety-B0pPJkfQ.cjs +0 -1020
  68. package/dist/promptSafety-B0pPJkfQ.cjs.map +0 -1
  69. package/dist/promptSafety-DIQ2yDca.js +0 -739
  70. package/dist/promptSafety-DIQ2yDca.js.map +0 -1
  71. package/dist/schema-5P5ZJPrY.cjs +0 -42
  72. package/dist/schema-5P5ZJPrY.cjs.map +0 -1
  73. package/dist/schema-BcnitlL8.js +0 -25
  74. package/dist/schema-BcnitlL8.js.map +0 -1
  75. package/dist/server/atomic.d.ts +0 -2
  76. package/dist/server/atomic.d.ts.map +0 -1
  77. package/dist/server/delete.d.ts +0 -39
  78. package/dist/server/delete.d.ts.map +0 -1
  79. package/dist/server/derive.d.ts +0 -9
  80. package/dist/server/derive.d.ts.map +0 -1
  81. package/dist/server/discoveredCollection.d.ts +0 -19
  82. package/dist/server/discoveredCollection.d.ts.map +0 -1
  83. package/dist/server/discovery.d.ts +0 -228
  84. package/dist/server/discovery.d.ts.map +0 -1
  85. package/dist/server/host.d.ts +0 -78
  86. package/dist/server/host.d.ts.map +0 -1
  87. package/dist/server/index.d.ts +0 -12
  88. package/dist/server/index.d.ts.map +0 -1
  89. package/dist/server/io.d.ts +0 -115
  90. package/dist/server/io.d.ts.map +0 -1
  91. package/dist/server/paths.d.ts +0 -53
  92. package/dist/server/paths.d.ts.map +0 -1
  93. package/dist/server/spawn.d.ts +0 -56
  94. package/dist/server/spawn.d.ts.map +0 -1
  95. package/dist/server/templatePath.d.ts +0 -26
  96. package/dist/server/templatePath.d.ts.map +0 -1
  97. package/dist/server/util.d.ts +0 -4
  98. package/dist/server/util.d.ts.map +0 -1
  99. package/dist/server/validate.d.ts +0 -20
  100. package/dist/server/validate.d.ts.map +0 -1
  101. package/dist/server/views.d.ts +0 -21
  102. package/dist/server/views.d.ts.map +0 -1
  103. package/dist/server.cjs +0 -1759
  104. package/dist/server.cjs.map +0 -1
  105. package/dist/server.js +0 -1709
  106. package/dist/server.js.map +0 -1
package/package.json CHANGED
@@ -1,24 +1,12 @@
1
1
  {
2
2
  "name": "@mulmoclaude/collection-plugin",
3
- "version": "0.5.7",
4
- "description": "Schema-driven Collections plugin (presentCollection) — shared gui-chat-protocol plugin for MulmoClaude and MulmoTerminal. This entry is the isomorphic collection engine (derive / formula / visibility); Vue surfaces land in ./vue.",
3
+ "version": "0.5.9",
4
+ "description": "Schema-driven Collections plugin (presentCollection) — the Vue surfaces (chat View/Preview, embeds, calendar, record modal, i18n) for MulmoClaude and MulmoTerminal. The isomorphic engine + node storage engine now live in @mulmoclaude/core/collection and @mulmoclaude/core/collection/server.",
5
5
  "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
6
+ "main": "./dist/vue.js",
7
+ "module": "./dist/vue.js",
8
+ "types": "./dist/vue/index.d.ts",
9
9
  "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs",
14
- "default": "./dist/index.js"
15
- },
16
- "./server": {
17
- "types": "./dist/server/index.d.ts",
18
- "import": "./dist/server.js",
19
- "require": "./dist/server.cjs",
20
- "default": "./dist/server.js"
21
- },
22
10
  "./vue": {
23
11
  "types": "./dist/vue/index.d.ts",
24
12
  "import": "./dist/vue.js",
@@ -43,13 +31,15 @@
43
31
  "zod": "^4.4.3"
44
32
  },
45
33
  "peerDependencies": {
34
+ "@mulmoclaude/core": "*",
46
35
  "gui-chat-protocol": "^0.4.0",
47
36
  "vue": "^3.5.0",
48
37
  "vue-i18n": "^11.4.4"
49
38
  },
50
39
  "devDependencies": {
40
+ "@mulmoclaude/core": "*",
51
41
  "@tailwindcss/vite": "^4.2.2",
52
- "@types/node": "^26.0.0",
42
+ "@types/node": "^26.0.1",
53
43
  "@vitejs/plugin-vue": "^6.0.5",
54
44
  "gui-chat-protocol": "^0.4.0",
55
45
  "tailwindcss": "^4.2.2",
@@ -1,28 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
- value: mod,
20
- enumerable: true
21
- }) : target, mod));
22
- //#endregion
23
- Object.defineProperty(exports, "__toESM", {
24
- enumerable: true,
25
- get: function() {
26
- return __toESM;
27
- }
28
- });
@@ -1,35 +0,0 @@
1
- /** A `when` predicate: render only when the open record's `field`
2
- * (stringified) is one of `in`. Shared shape for action buttons and
3
- * conditionally visible fields. */
4
- export interface WhenPredicate {
5
- field: string;
6
- in: string[];
7
- }
8
- /** Core matcher:
9
- * - no `when` ⇒ always true (visible);
10
- * - otherwise true only when `record[when.field]` is present and its
11
- * stringified value is one of `when.in`.
12
- * A missing/undefined/null field is treated as "not a match"
13
- * (hidden), so a status-gated target never shows on a record that
14
- * lacks the status. */
15
- export declare function whenMatches(when: WhenPredicate | undefined, record: Record<string, unknown>): boolean;
16
- /** Minimal shape this helper needs from an action — just its optional
17
- * `when` predicate. Accepts the full CollectionAction too. */
18
- export interface ActionWithWhen {
19
- when?: WhenPredicate;
20
- }
21
- /** True when the action's button should render against `record`
22
- * (see whenMatches). */
23
- export declare function actionVisible(action: ActionWithWhen, record: Record<string, unknown>): boolean;
24
- /** Minimal shape this helper needs from a field spec — just its
25
- * optional `when` predicate. Accepts the full FieldSpec too. */
26
- export interface FieldWithWhen {
27
- when?: WhenPredicate;
28
- }
29
- /** True when the field should render against `record`. A field with
30
- * no `when` is always shown; otherwise it's shown only when the
31
- * record matches (e.g. hide a rating field until `visited` is true).
32
- * Purely presentational — a hidden field's stored value is never
33
- * altered, so toggling the gate back on restores it. */
34
- export declare function fieldVisible(field: FieldWithWhen, record: Record<string, unknown>): boolean;
35
- //# sourceMappingURL=actionVisible.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actionVisible.d.ts","sourceRoot":"","sources":["../../src/core/actionVisible.ts"],"names":[],"mappings":"AAOA;;oCAEoC;AACpC,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,EAAE,CAAC;CACd;AAED;;;;;;wBAMwB;AACxB,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAKrG;AAED;+DAC+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED;yBACyB;AACzB,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAE9F;AAED;iEACiE;AACjE,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED;;;;yDAIyD;AACzD,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAE3F"}
@@ -1,121 +0,0 @@
1
- /** Minutes in a full day — the timeline's vertical extent. */
2
- export declare const MINUTES_PER_DAY = 1440;
3
- /** A civil date triple. `month` is 1-12 (NOT the 0-based `Date` month). */
4
- export interface Ymd {
5
- year: number;
6
- month: number;
7
- day: number;
8
- }
9
- /** One cell of the 6×7 month grid. */
10
- export interface DayCell {
11
- ymd: Ymd;
12
- /** False for the leading/trailing days that belong to the adjacent
13
- * month (rendered greyed). */
14
- inMonth: boolean;
15
- /** Canonical `YYYY-MM-DD` key for this cell. */
16
- key: string;
17
- }
18
- /** A record placed on the calendar: the inclusive `[start, end]` span of
19
- * days it covers. `end === start` for a single-day record. `startMin` /
20
- * `endMin` are minutes-of-day for the time-allocation (day) view, resolved
21
- * from either a `datetime` field's clock or a separate time-string field.
22
- * `null` means "no clock" — `startMin === null && endMin === null` is an
23
- * all-day record; a non-null `startMin` with a null `endMin` is a
24
- * point-in-time record (rendered as a single line). */
25
- export interface RecordSpan<T> {
26
- item: T;
27
- start: Ymd;
28
- end: Ymd;
29
- startMin: number | null;
30
- endMin: number | null;
31
- }
32
- /** Canonical `YYYY-MM-DD` string for a civil date. */
33
- export declare function ymdKey(ymd: Ymd): string;
34
- /** Strictly parse a `YYYY-MM-DD` string into a civil date, rejecting
35
- * anything that isn't a real calendar day (e.g. `2026-02-30`, `2026-13-01`).
36
- * Returns null for non-strings and malformed values so callers can route
37
- * records with no usable date into the "no date" tray rather than crash. */
38
- export declare function parseIsoDate(value: unknown): Ymd | null;
39
- /** Strictly parse a `YYYY-MM-DDTHH:MM` (optional `:SS`) datetime into its
40
- * civil date and minutes-of-day. Returns null for anything that isn't a real
41
- * calendar day or a valid 24h clock. */
42
- export declare function parseIsoDateTime(value: unknown): {
43
- ymd: Ymd;
44
- minutes: number;
45
- } | null;
46
- /** Civil date from either a `YYYY-MM-DD` or a `YYYY-MM-DDTHH:MM` value, so the
47
- * month grid buckets date-only and datetime anchors alike. */
48
- export declare function dateOf(value: unknown): Ymd | null;
49
- /** Parse a free-form time-string field into start/end minutes-of-day.
50
- * Handles the common shapes in user data:
51
- * "14:00-17:00" → { start: 840, end: 1020 } (range → block)
52
- * "17:00-" → { start: 1020, end: null } (open end → single line)
53
- * "16:30" → { start: 990, end: null } (point in time → single line)
54
- * "終日" / "" → null (no clock → all-day)
55
- * Returns null when no clock token is parseable. */
56
- export declare function parseTimeRange(value: unknown): {
57
- startMin: number | null;
58
- endMin: number | null;
59
- } | null;
60
- /** Chronological comparison: negative if `left` precedes `right`, 0 if the
61
- * same day, positive if after. */
62
- export declare function compareYmd(left: Ymd, right: Ymd): number;
63
- /** True iff `day` falls within the inclusive span `[span.start, span.end]`. */
64
- export declare function spanCoversDay<T>(span: RecordSpan<T>, day: Ymd): boolean;
65
- /** Build the 6×7 (42-cell) grid for the given month, including the
66
- * leading/trailing days of the adjacent months so every week is full.
67
- * `month` is 1-12. `weekStartsOn` is 0 (Sunday) … 6 (Saturday). */
68
- export declare function buildMonthGrid(year: number, month: number, weekStartsOn?: number): DayCell[];
69
- /** Resolve a record's calendar span from its date/datetime fields. Returns
70
- * null when the anchor date is missing/invalid (→ the caller's "no date"
71
- * tray). An end date that is missing, invalid, or earlier than the start
72
- * collapses to a single-day span — never an inverted range.
73
- *
74
- * Times for the day (time-allocation) view come from, in priority order:
75
- * 1. the clock on a `datetime` anchor/end value, else
76
- * 2. `timeField` — a separate free-form time-string column (e.g. "14:00-17:00").
77
- * A record with no resolvable clock has `startMin === endMin === null`. */
78
- export declare function recordSpan<T extends Record<string, unknown>>(item: T, anchorField: string, endField?: string, timeField?: string): RecordSpan<T> | null;
79
- /** Split records into those that land on the calendar (with their spans)
80
- * and those with no usable anchor date (the "no date" tray). Spans are
81
- * sorted by start day so same-day stacking is stable across renders. */
82
- export declare function bucketRecords<T extends Record<string, unknown>>(items: readonly T[], anchorField: string, endField?: string, timeField?: string): {
83
- spans: RecordSpan<T>[];
84
- noDate: T[];
85
- };
86
- /** Geometry for one record on one day of the time-allocation view.
87
- * `kind`:
88
- * "allDay" — no clock anywhere → render in the bottom all-day strip.
89
- * "line" — a single point in time → a 1px marker at `startMin`.
90
- * "block" — a [startMin, endMin) span, clamped to this day's [0, 1440).
91
- * `bleedsBefore` / `bleedsAfter` flag a multi-day span that began on an
92
- * earlier day or continues onto a later one (so the view can show arrows). */
93
- export interface DaySlice {
94
- kind: "allDay" | "line" | "block";
95
- startMin: number;
96
- endMin: number;
97
- bleedsBefore: boolean;
98
- bleedsAfter: boolean;
99
- }
100
- /** Project a record's span onto a single day for the time-allocation view, or
101
- * null when the span doesn't cover that day. */
102
- export declare function daySlice<T>(span: RecordSpan<T>, day: Ymd): DaySlice | null;
103
- /** Side-by-side lane assignment for overlapping timeline blocks. Each input
104
- * is an `[startMin, endMin)` interval; the result (parallel to the input)
105
- * gives each item its `lane` (column index) and the `lanes` total of its
106
- * overlap cluster, so a renderer can size every block to `1 / lanes` width
107
- * and offset it by `lane / lanes`. Non-overlapping items get `lanes === 1`. */
108
- export interface LaneSpan {
109
- startMin: number;
110
- endMin: number;
111
- }
112
- export interface LaneAssignment {
113
- lane: number;
114
- lanes: number;
115
- }
116
- export declare function assignLanes(blocks: readonly LaneSpan[]): LaneAssignment[];
117
- /** Month label key inputs — returns the 1st of the month as a `Date` so the
118
- * component can feed it to `Intl.DateTimeFormat(locale, …)` for a localized
119
- * "April 2026" header without this module taking a locale dependency. */
120
- export declare function monthAnchorDate(year: number, month: number): Date;
121
- //# sourceMappingURL=calendarGrid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calendarGrid.d.ts","sourceRoot":"","sources":["../../src/core/calendarGrid.ts"],"names":[],"mappings":"AAkBA,8DAA8D;AAC9D,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,2EAA2E;AAC3E,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,sCAAsC;AACtC,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,GAAG,CAAC;IACT;mCAC+B;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;wDAMwD;AACxD,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC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1
- import { type FormulaContext } from "./derivedFormula";
2
- /** Minimal field shape the derive loop needs — accepts both the client
3
- * FieldSpec and the server CollectionFieldSpec. */
4
- export interface DerivableFieldSpec {
5
- type: string;
6
- /** When type === "ref": slug of the target collection. */
7
- to?: string;
8
- /** When type === "derived": formula evaluated against the record. */
9
- formula?: string;
10
- }
11
- /** Minimal schema shape: just the ordered field map. */
12
- export interface DerivableSchema {
13
- fields: Record<string, DerivableFieldSpec>;
14
- }
15
- export type DerivableRecord = Record<string, unknown>;
16
- /** Per-target-collection cache of loaded referenced records:
17
- * target collection slug → item slug → full record. Mirrors the
18
- * client's `RefRecordCache` / the server's enrichment loader. */
19
- export type DeriveRefRecords = Record<string, Record<string, DerivableRecord>>;
20
- /** Map each `ref` field's stored slug to its loaded target record (or
21
- * null when dangling / not loaded), keyed by the LOCAL field name —
22
- * the shape `evaluateDerived` reads for `<field>.<col>` derefs. */
23
- export declare function resolveRowRefs(schema: DerivableSchema, record: DerivableRecord, refRecords: DeriveRefRecords): NonNullable<FormulaContext["refs"]>;
24
- /** Evaluate every `derived` field against `base`, saturating so a
25
- * derived field can read another derived field computed in an earlier
26
- * pass (`subtotal → tax → total` converges in ≤ field-count passes).
27
- * Cycles can't loop forever — passes are bounded by the number of
28
- * derived fields and the loop breaks as soon as a pass changes
29
- * nothing. Failed formulas stay ABSENT (the UI renders them as
30
- * em-dash). Returns a copy; `base` is never mutated.
31
- *
32
- * Derived keys already present in `base` are stripped before
33
- * evaluation: computed output is host-truth, never persisted-input
34
- * fallback. A record JSON can carry a stale (or forged) derived value
35
- * — raw Write/Edit, legacy data — and without the strip, a failing
36
- * formula would silently surface that value as if the host computed
37
- * it. */
38
- export declare function deriveAll(schema: DerivableSchema, base: DerivableRecord, refRecords: DeriveRefRecords): DerivableRecord;
39
- //# sourceMappingURL=deriveAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deriveAll.d.ts","sourceRoot":"","sources":["../../src/core/deriveAll.ts"],"names":[],"mappings":"AAaA,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExE;oDACoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAC5C;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEtD;;kEAEkE;AAClE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;AAE/E;;oEAEoE;AACpE,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,GAAG,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAQlJ;AAED;;;;;;;;;;;;;UAaU;AACV,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,GAAG,eAAe,CAkBvH"}
@@ -1,19 +0,0 @@
1
- export interface FormulaContext {
2
- /** The record being evaluated. For derived fields in the form,
3
- * this is the live draft (text + table both converted via the
4
- * same `draftToRecord` pipeline). For the main table cell,
5
- * this is the persisted item. */
6
- record: Record<string, unknown>;
7
- /** Resolved ref-target records for THIS row, keyed by the local
8
- * `ref` field name. The caller (which has the schema + the linked
9
- * collection's items loaded) maps each ref field's stored slug to
10
- * the full target record and passes it here, so a `<field>.<col>`
11
- * formula can read a numeric column off the referenced record
12
- * (e.g. `shares * ticker.price`). A missing key or `null` value
13
- * (unknown field / dangling slug) makes that deref evaluate to
14
- * NaN → the whole formula returns `null` → em-dash, consistent
15
- * with every other failure mode. Absent ⇒ no refs available. */
16
- refs?: Record<string, Record<string, unknown> | null>;
17
- }
18
- export declare function evaluateDerived(formula: string, ctx: FormulaContext): number | null;
19
- //# sourceMappingURL=derivedFormula.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"derivedFormula.d.ts","sourceRoot":"","sources":["../../src/core/derivedFormula.ts"],"names":[],"mappings":"AAkCA,MAAM,WAAW,cAAc;IAC7B;;;sCAGkC;IAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC;;;;;;;;qEAQiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;CACvD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,IAAI,CAkBnF"}
@@ -1,19 +0,0 @@
1
- import type { CollectionFieldSpec as FieldSpec, CollectionItem, CollectionSchema } from "./schema";
2
- import type { EditState, TableRowDraft } from "./uiTypes";
3
- /** A fresh, empty row draft for a `table` field's sub-schema. */
4
- export declare function emptyRow(subFields: Record<string, FieldSpec>): TableRowDraft;
5
- /** Build a row draft from an existing persisted row. */
6
- export declare function rowFromItem(item: Record<string, unknown>, subFields: Record<string, FieldSpec>): TableRowDraft;
7
- /** Convert a full edit draft to the record to persist. */
8
- export declare function draftToRecord(state: EditState, schema: CollectionSchema): CollectionItem;
9
- /** Normalise a raw inline-edit input (table-cell checkbox/select) to its
10
- * persisted form. Mirrors `draftToRecord`'s boolean strictness; an empty
11
- * enum selection (the placeholder option) clears the field via `undefined`. */
12
- export declare function coerceInlineValue(field: FieldSpec, raw: boolean | string): unknown;
13
- /** Build the full record to PUT for a single-cell inline edit, without
14
- * mutating `item`. A `undefined` value omits the key (enum cleared),
15
- * matching `draftToRecord`'s omission semantics. */
16
- export declare function buildUpdatedRecord(item: CollectionItem, key: string, value: unknown): CollectionItem;
17
- /** Human-readable label of the first missing required field, or null. */
18
- export declare function firstMissingRequiredField(draft: EditState, schema: CollectionSchema): string | null;
19
- //# sourceMappingURL=draft.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/core/draft.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,IAAI,SAAS,EAAoC,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACrI,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE1D,iEAAiE;AACjE,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,aAAa,CAe5E;AAED,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,aAAa,CAkB9G;AAiCD,0DAA0D;AAC1D,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,GAAG,cAAc,CAiBxF;AAED;;gFAEgF;AAChF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAGlF;AAED;;qDAEqD;AACrD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,cAAc,CAMpG;AAmCD,yEAAyE;AACzE,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAOnG"}
@@ -1,34 +0,0 @@
1
- import type { CollectionSchema } from "./schema";
2
- export interface EnumColorClasses {
3
- /** Stat-card style: border + fill + text + hover. */
4
- card: string;
5
- /** Small status dot (kanban column header). */
6
- dot: string;
7
- /** Pill / badge / inline `<select>` fill + text (no border width). */
8
- badge: string;
9
- /** Border colour, paired with a `border` width class by the caller. */
10
- border: string;
11
- }
12
- /** Neutral styling for the empty / Uncategorized bucket — never a palette
13
- * colour, so an unset or unknown value reads grey across every surface. */
14
- export declare const ENUM_NEUTRAL: EnumColorClasses;
15
- /** The urgent notification colour (red), matching the bell's `urgent`
16
- * severity. The first value a schema's `notifyWhen` flags reads this. */
17
- export declare const ENUM_ALERT: EnumColorClasses;
18
- /** The nudge notification colour (amber), matching the bell's `nudge`
19
- * severity. Flagged `notifyWhen` values after the first read this. */
20
- export declare const ENUM_NUDGE: EnumColorClasses;
21
- /** Classes for the enum value at `index` in its field's `values` array. A
22
- * negative index (value unset or not among the declared values) reads
23
- * neutral. */
24
- export declare function enumColorClasses(index: number): EnumColorClasses;
25
- /** Index of `value` within an enum field's declared `values`, or -1 when the
26
- * value is empty / unknown (→ neutral). */
27
- export declare function enumValueIndex(values: readonly string[] | undefined, value: unknown): number;
28
- /** Resolve a value's colour for enum field `fieldKey`:
29
- * - Notification enum (`notifyWhen` targets it): the first flagged value (in
30
- * `notifyWhen.in` order, the most urgent) reads notification red, the rest
31
- * amber, and every non-flagged value neutral grey.
32
- * - Any other enum: the standard palette by the value's declared index. */
33
- export declare function resolveEnumColor(schema: CollectionSchema, fieldKey: string, value: unknown): EnumColorClasses;
34
- //# sourceMappingURL=enumColors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enumColors.d.ts","sourceRoot":"","sources":["../../src/core/enumColors.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;CAChB;AAsCD;4EAC4E;AAC5E,eAAO,MAAM,YAAY,EAAE,gBAK1B,CAAC;AAEF;0EAC0E;AAC1E,eAAO,MAAM,UAAU,EAAE,gBAKxB,CAAC;AAEF;uEACuE;AACvE,eAAO,MAAM,UAAU,EAAE,gBAKxB,CAAC;AAEF;;eAEe;AACf,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAGhE;AAED;4CAC4C;AAC5C,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAG5F;AASD;;;;4EAI4E;AAC5E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAS7G"}
@@ -1,5 +0,0 @@
1
- /** Normalise an unknown thrown value to a display string. The view layer's host
2
- * capabilities already return normalised `{ ok: false, error }` results, so this
3
- * only backs the defensive `catch` around an unexpected throw. */
4
- export declare function errorMessage(err: unknown): string;
5
- //# sourceMappingURL=errorMessage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../../src/core/errorMessage.ts"],"names":[],"mappings":"AAAA;;mEAEmE;AACnE,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAEjD"}
@@ -1,13 +0,0 @@
1
- import type { CollectionItem, CollectionSchema } from "./schema";
2
- /** Which field labels a record: the schema's explicit `displayField`, else the
3
- * first non-primary text-like field (so a collection without a displayField
4
- * shows e.g. the title rather than the opaque primaryKey), else null → the
5
- * caller falls back to the primary-key value. */
6
- export declare function labelFieldFor(schema: CollectionSchema): string | null;
7
- /** A record's primary-key value as a string. */
8
- export declare function itemIdOf(item: CollectionItem, schema: CollectionSchema): string;
9
- /** A record's display label: the resolved `labelField` value, else the
10
- * primary key. Pass the result of `labelFieldFor(schema)` as `labelField`
11
- * (compute it once per render rather than per item). */
12
- export declare function itemLabelOf(item: CollectionItem, schema: CollectionSchema, labelField: string | null): string;
13
- //# sourceMappingURL=itemLabel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"itemLabel.d.ts","sourceRoot":"","sources":["../../src/core/itemLabel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAKjE;;;kDAGkD;AAClD,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAMrE;AAED,gDAAgD;AAChD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAE/E;AAED;;yDAEyD;AACzD,wBAAgB,WAAW,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAY7G"}
@@ -1,14 +0,0 @@
1
- import type { ToolContext, ToolDefinition, ToolResult } from "gui-chat-protocol";
2
- export declare const TOOL_NAME = "presentCollection";
3
- /** Render payload carried in the tool result's `data` field; the View mounts
4
- * off these. Same shape as the tool args. */
5
- export interface PresentCollectionData {
6
- /** Slug of the collection to display (e.g. "clients", "invoices"). */
7
- collectionSlug: string;
8
- /** Optional primary-key value of a single item to open on mount. */
9
- itemId?: string;
10
- }
11
- export type PresentCollectionArgs = PresentCollectionData;
12
- export declare const TOOL_DEFINITION: ToolDefinition;
13
- export declare const executePresentCollection: (_context: ToolContext, args: PresentCollectionArgs) => Promise<ToolResult<PresentCollectionData, PresentCollectionData>>;
14
- //# sourceMappingURL=presentCollection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"presentCollection.d.ts","sourceRoot":"","sources":["../../src/core/presentCollection.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEjF,eAAO,MAAM,SAAS,sBAAsB,CAAC;AAE7C;8CAC8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC,sEAAsE;IACtE,cAAc,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAE1D,eAAO,MAAM,eAAe,EAAE,cAoB7B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,UAAU,WAAW,EACrB,MAAM,qBAAqB,KAC1B,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAoBlE,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function defangForPrompt(value: string): string;
2
- //# sourceMappingURL=promptSafety.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promptSafety.d.ts","sourceRoot":"","sources":["../../src/core/promptSafety.ts"],"names":[],"mappings":"AAUA,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD"}