@limetech/lime-web-components 6.13.0 → 6.13.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [6.13.1](https://github.com/Lundalogik/lime-web-components/compare/v6.13.0...v6.13.1) (2026-02-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **ai-context:** make element required and rename componentContext ([fbe7e42](https://github.com/Lundalogik/lime-web-components/commit/fbe7e42130fb59b3b3aa436a685a7e4a4e712b28)), closes [Lundalogik/crm-insights-and-intelligence#205](https://github.com/Lundalogik/crm-insights-and-intelligence/issues/205)
8
+
1
9
  ## [6.13.0](https://github.com/Lundalogik/lime-web-components/compare/v6.12.0...v6.13.0) (2026-02-25)
2
10
 
3
11
 
@@ -1,21 +1,6 @@
1
1
  import { LimeWebComponent } from '../core/lime-web-component';
2
2
  import { LimeWebComponentContext } from '../core/context';
3
- /**
4
- * A value that can be safely serialized to JSON via JSON.stringify().
5
- *
6
- * This type excludes non-serializable values like:
7
- * - `undefined` (use `null` instead)
8
- * - `Date` (convert to ISO string first)
9
- * - `Function`
10
- * - `Symbol`
11
- * - Circular references
12
- *
13
- * @alpha
14
- * @group AI Context
15
- */
16
- export type JsonValue = string | number | boolean | null | JsonValue[] | {
17
- [key: string]: JsonValue;
18
- };
3
+ import { JsonValue } from '../json/json-value';
19
4
  /**
20
5
  * Represents context information that a provider contributes to the AI chat.
21
6
  *
@@ -83,16 +68,19 @@ export interface AIContextContribution {
83
68
  */
84
69
  export interface GatheredAIContext extends AIContextContribution {
85
70
  /**
86
- * The component's LimeWebComponentContext at the time of gathering.
71
+ * The component's {@link LimeWebComponentContext} at the time of gathering.
87
72
  *
88
- * Provides rich information about where this context originates:
89
- * - `limetype`: What type of business object the component is working with
90
- * - `id`: Which specific record (if any)
91
- * - `parent`: Parent context for nested components
73
+ * Describes the chain of ancestor objects the component is nested under,
74
+ * not the component's own data. This is the context injected by the
75
+ * framework:
92
76
  *
93
- * Only present when the provider registered with an element reference.
77
+ * - A component on the main view (e.g. showing Object A) gets an empty
78
+ * context (`limetype: null, id: null`) because it has no parent.
79
+ * - A component in the side-panel showing Object B, opened from Object A,
80
+ * gets `{ limetype: '<Object A's limetype>', id: <Object A's id> }`.
81
+ * - Nested widgets typically inherit their host's context verbatim.
94
82
  */
95
- componentContext?: LimeWebComponentContext;
83
+ ancestorContext: LimeWebComponentContext;
96
84
  }
97
85
  /**
98
86
  * A provider that contributes context information to the AI chat.
@@ -199,8 +187,8 @@ export interface AIContextRegistry {
199
187
  * gets a unique internal key.
200
188
  *
201
189
  * @param provider - The provider to register.
202
- * @param element - Optional host element of the component registering this
203
- * provider. When provided, enables the registry to:
190
+ * @param element - The host element of the component registering this
191
+ * provider. Enables the registry to:
204
192
  * - Read the component's `LimeWebComponentContext` to enrich contributions
205
193
  * - Skip providers whose elements are not currently connected to the DOM
206
194
  * @returns A function to unregister the provider. Call this when the
@@ -225,7 +213,7 @@ export interface AIContextRegistry {
225
213
  * unregister();
226
214
  * ```
227
215
  */
228
- register(provider: AIContextProvider, element?: HTMLElement & LimeWebComponent): () => void;
216
+ register(provider: AIContextProvider, element: HTMLElement & LimeWebComponent): () => void;
229
217
  /**
230
218
  * Get all registered providers.
231
219
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ai-context-registry.d.ts","sourceRoot":"","sources":["../../src/ai-context/ai-context-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,SAAS,GACf,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEnC;;;;;;;;GAQG;AACH,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;;;;;OAkBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC5D;;;;;;;;;;;;OAYG;IACH,eAAe,EAAE,uBAAuB,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;OASG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;;;;;;;;;;;OAaG;IACH,UAAU,IAAI,qBAAqB,GAAG,IAAI,CAAC;CAC9C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,QAAQ,CACJ,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,EAAE,WAAW,GAAG,gBAAgB,GACxC,MAAM,IAAI,CAAC;IAEd;;;;;;OAMG;IACH,YAAY,IAAI,iBAAiB,EAAE,CAAC;IAEpC;;;;;;;;;;;;OAYG;IACH,aAAa,IAAI,iBAAiB,EAAE,CAAC;CACxC"}
package/dist/index.d.ts CHANGED
@@ -49,5 +49,6 @@ export * from './notification-service';
49
49
  export * from './poller';
50
50
  export * from './logger';
51
51
  export * from './problem';
52
+ export * from './json';
52
53
  export * from './ai-context';
53
54
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,C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,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,OAAO,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './json-value';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/json/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A value that can be safely serialized to JSON via JSON.stringify().
3
+ *
4
+ * This type excludes non-serializable values like:
5
+ * - `undefined` (use `null` instead)
6
+ * - `Date` (convert to ISO string first)
7
+ * - `Function`
8
+ * - `Symbol`
9
+ * - Circular references
10
+ *
11
+ * @alpha
12
+ */
13
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
14
+ [key: string]: JsonValue;
15
+ };
16
+ //# sourceMappingURL=json-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-value.d.ts","sourceRoot":"","sources":["../../src/json/json-value.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GACf,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-web-components",
3
- "version": "6.13.0",
3
+ "version": "6.13.1",
4
4
  "description": "Lime Web Components",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -37,7 +37,7 @@
37
37
  "devDependencies": {
38
38
  "@commitlint/config-conventional": "^20.4.2",
39
39
  "@limetech/eslint-config": "^4.0.0",
40
- "@microsoft/api-extractor": "^7.57.4",
40
+ "@microsoft/api-extractor": "^7.57.6",
41
41
  "eslint": "^9.39.2",
42
42
  "expect-type": "^1.3.0",
43
43
  "globals": "^17.3.0",