@qilin-agent/client-ui-slots 3.1.3 → 3.1.4
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/README.i18n.yaml +18 -18
- package/lib/index.js +5 -9
- package/lib/types/index.d.ts +4 -7
- package/lib/types/renderer.d.ts +1 -31
- package/package.json +2 -2
package/README.i18n.yaml
CHANGED
|
@@ -5,51 +5,51 @@
|
|
|
5
5
|
/:
|
|
6
6
|
en: 5beac554c13460fd
|
|
7
7
|
zh: 54b7b2e34a797628
|
|
8
|
-
/qilin-client-ui-slots:
|
|
9
|
-
en:
|
|
10
|
-
zh:
|
|
11
|
-
/qilin-client-ui-slots/summary:
|
|
8
|
+
/qilin-agent-client-ui-slots:
|
|
9
|
+
en: 54424b7979721f41
|
|
10
|
+
zh: 3f084b16be3e9f18
|
|
11
|
+
/qilin-agent-client-ui-slots/summary:
|
|
12
12
|
en: 974552cacd652bd5
|
|
13
13
|
zh: 2c51e79b2dc3ffcb
|
|
14
|
-
/qilin-client-ui-slots/table-of-contents:
|
|
14
|
+
/qilin-agent-client-ui-slots/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
17
|
-
/qilin-client-ui-slots/use-this-package:
|
|
17
|
+
/qilin-agent-client-ui-slots/use-this-package:
|
|
18
18
|
en: 05691d44a0c6c48f
|
|
19
19
|
zh: 434033d5761297f3
|
|
20
|
-
/qilin-client-ui-slots/use-this-package/reusable-component-factories:
|
|
20
|
+
/qilin-agent-client-ui-slots/use-this-package/reusable-component-factories:
|
|
21
21
|
en: 301de67bf2779ae6
|
|
22
22
|
zh: 6e9d405ee1063d53
|
|
23
|
-
/qilin-client-ui-slots/use-this-package/the-five-framework-props-shares:
|
|
23
|
+
/qilin-agent-client-ui-slots/use-this-package/the-five-framework-props-shares:
|
|
24
24
|
en: 45e2933a5e084956
|
|
25
25
|
zh: 938deedaf489f892
|
|
26
|
-
/qilin-client-ui-slots/use-this-package/store-seats:
|
|
26
|
+
/qilin-agent-client-ui-slots/use-this-package/store-seats:
|
|
27
27
|
en: 0d1c2948112841ec
|
|
28
28
|
zh: fc5a998cea485024
|
|
29
|
-
/qilin-client-ui-slots/use-this-package/declaration-discipline:
|
|
29
|
+
/qilin-agent-client-ui-slots/use-this-package/declaration-discipline:
|
|
30
30
|
en: 8a41014931ffccd5
|
|
31
31
|
zh: 615f93335a682b01
|
|
32
|
-
/qilin-client-ui-slots/understand-the-implementation:
|
|
32
|
+
/qilin-agent-client-ui-slots/understand-the-implementation:
|
|
33
33
|
en: 983e6c0e71105f65
|
|
34
34
|
zh: 75af8d36dd8223fd
|
|
35
|
-
/qilin-client-ui-slots/understand-the-implementation/registration-and-routing:
|
|
35
|
+
/qilin-agent-client-ui-slots/understand-the-implementation/registration-and-routing:
|
|
36
36
|
en: 0638aaadacadb6f1
|
|
37
37
|
zh: cb6324ef5c9e1ade
|
|
38
|
-
/qilin-client-ui-slots/understand-the-implementation/the-renderer-contract:
|
|
38
|
+
/qilin-agent-client-ui-slots/understand-the-implementation/the-renderer-contract:
|
|
39
39
|
en: 2b6058e98fb1efe7
|
|
40
40
|
zh: f32e37c8381809b9
|
|
41
|
-
/qilin-client-ui-slots/further-exploration:
|
|
41
|
+
/qilin-agent-client-ui-slots/further-exploration:
|
|
42
42
|
en: 5f9dfd481b3adb72
|
|
43
43
|
zh: c39a3b01252192a4
|
|
44
|
-
/qilin-client-ui-slots/model-experience:
|
|
44
|
+
/qilin-agent-client-ui-slots/model-experience:
|
|
45
45
|
en: 3120df665299c634
|
|
46
46
|
zh: 67bb5e1fe59dae19
|
|
47
|
-
/qilin-client-ui-slots/model-experience/kv-cache-effect:
|
|
47
|
+
/qilin-agent-client-ui-slots/model-experience/kv-cache-effect:
|
|
48
48
|
en: ca75c51c89c2c9b0
|
|
49
49
|
zh: de54f3467ef3b9be
|
|
50
|
-
/qilin-client-ui-slots/known-limitations-and-deferred-work:
|
|
50
|
+
/qilin-agent-client-ui-slots/known-limitations-and-deferred-work:
|
|
51
51
|
en: 093b1c5076ddfd6d
|
|
52
52
|
zh: 3069c423115492fe
|
|
53
|
-
/qilin-client-ui-slots/known-limitations-and-deferred-work/dev-note:
|
|
53
|
+
/qilin-agent-client-ui-slots/known-limitations-and-deferred-work/dev-note:
|
|
54
54
|
en: e67f633dc6fe7773
|
|
55
55
|
zh: 3bb0c20c93f16f98
|
package/lib/index.js
CHANGED
|
@@ -278,25 +278,21 @@ var SlotCore = class {
|
|
|
278
278
|
* is one cell; keyed: one cell per `key`; list: one cell per `id` (winners
|
|
279
279
|
* keep ledger sequence; list renderers still refine display by `order`).
|
|
280
280
|
* Chain keys return the raw entries unchanged: election consumes every
|
|
281
|
-
* entry, shadowing does not apply.
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
* {@link SlotCore.entries} view stays the inspection surface. Builds a
|
|
285
|
-
* fresh array per call — a render body read, not a uSES getSnapshot source.
|
|
281
|
+
* entry, shadowing does not apply. The raw {@link SlotCore.entries} view
|
|
282
|
+
* stays the inspection surface. Builds a fresh array per call — a render
|
|
283
|
+
* body read, not a uSES getSnapshot source.
|
|
286
284
|
* @param key - slot key (dynamic: the render machinery holds keys as strings).
|
|
287
|
-
* @param admit - presentation predicate; an entry it declines is invisible to this projection.
|
|
288
285
|
* @returns the winning entry per occupied cell (empty while undeclared).
|
|
289
286
|
*/
|
|
290
|
-
entriesOfSlot(key
|
|
287
|
+
entriesOfSlot(key) {
|
|
291
288
|
const rec = this.records.get(key);
|
|
292
289
|
if (!rec?.spec) return NO_ENTRIES;
|
|
293
290
|
const kind = rec.spec.kind;
|
|
294
|
-
if (kind === "chain") return
|
|
291
|
+
if (kind === "chain") return rec.entries;
|
|
295
292
|
const heads = [];
|
|
296
293
|
const seenCells = /* @__PURE__ */ new Set();
|
|
297
294
|
for (const entry of rec.entries) {
|
|
298
295
|
if (this.abdicated.has(entry)) continue;
|
|
299
|
-
if (admit !== void 0 && !admit(entry)) continue;
|
|
300
296
|
const cell = kind === "keyed" ? entry.options.key : kind === "list" ? entry.options.id : void 0;
|
|
301
297
|
if (seenCells.has(cell)) continue;
|
|
302
298
|
seenCells.add(cell);
|
package/lib/types/index.d.ts
CHANGED
|
@@ -846,16 +846,13 @@ export declare class SlotCore {
|
|
|
846
846
|
* is one cell; keyed: one cell per `key`; list: one cell per `id` (winners
|
|
847
847
|
* keep ledger sequence; list renderers still refine display by `order`).
|
|
848
848
|
* Chain keys return the raw entries unchanged: election consumes every
|
|
849
|
-
* entry, shadowing does not apply.
|
|
850
|
-
*
|
|
851
|
-
*
|
|
852
|
-
* {@link SlotCore.entries} view stays the inspection surface. Builds a
|
|
853
|
-
* fresh array per call — a render body read, not a uSES getSnapshot source.
|
|
849
|
+
* entry, shadowing does not apply. The raw {@link SlotCore.entries} view
|
|
850
|
+
* stays the inspection surface. Builds a fresh array per call — a render
|
|
851
|
+
* body read, not a uSES getSnapshot source.
|
|
854
852
|
* @param key - slot key (dynamic: the render machinery holds keys as strings).
|
|
855
|
-
* @param admit - presentation predicate; an entry it declines is invisible to this projection.
|
|
856
853
|
* @returns the winning entry per occupied cell (empty while undeclared).
|
|
857
854
|
*/
|
|
858
|
-
entriesOfSlot(key: string
|
|
855
|
+
entriesOfSlot(key: string): readonly StoredEntry[];
|
|
859
856
|
/**
|
|
860
857
|
* Look up a slot's declared spec, narrowed by the SlotMap key.
|
|
861
858
|
* @param key - SlotMap key.
|
package/lib/types/renderer.d.ts
CHANGED
|
@@ -102,27 +102,6 @@ export interface RootStandardSourceContribution {
|
|
|
102
102
|
readonly keyedHooks?: Readonly<Record<string, KeyedStandardSource>>;
|
|
103
103
|
readonly props?: Readonly<Record<string, unknown>>;
|
|
104
104
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Presentation gate over the host face's render-entry reads: an entry whose
|
|
107
|
-
* registrant the gate declines renders as if unregistered (shadowing cells
|
|
108
|
-
* fall to their next survivor, empty cells take the owner fallback), while
|
|
109
|
-
* the inspection surfaces (`SlotRegistry.entries`, `snapshot`) stay
|
|
110
|
-
* unfiltered. Composition-neutral: the gate classifies registrants by any
|
|
111
|
-
* rule it owns; the machinery only asks. Installed by one plugin through the
|
|
112
|
-
* `ui-renderer` SlotRegistry, same effect lifetime and boot-once discipline
|
|
113
|
-
* as the locale face.
|
|
114
|
-
*/
|
|
115
|
-
export interface SlotAdmissionGate {
|
|
116
|
-
/**
|
|
117
|
-
* Classify one entry's registrant.
|
|
118
|
-
* @param registrant - the entry's registrant stamp (its plugin package name),
|
|
119
|
-
* or undefined when the registration carries none.
|
|
120
|
-
* @returns whether the entry presents.
|
|
121
|
-
*/
|
|
122
|
-
admit(registrant: string | undefined): boolean;
|
|
123
|
-
/** Monotonic source bumping whenever the admitted set may have changed. */
|
|
124
|
-
readonly revision: HostObservable<number>;
|
|
125
|
-
}
|
|
126
105
|
/** renderSlot dispatch options at the machinery level. */
|
|
127
106
|
export interface RenderOpts {
|
|
128
107
|
entryKey?: string;
|
|
@@ -148,8 +127,6 @@ export interface SlotRendererHost {
|
|
|
148
127
|
getVersion(key: string): number;
|
|
149
128
|
/**
|
|
150
129
|
* Snapshot the registered entries for a key (stable reference between mutations).
|
|
151
|
-
* The installed admission gate, if any, shapes this view: declined entries
|
|
152
|
-
* read as unregistered to the render machinery.
|
|
153
130
|
* @param key - slot key.
|
|
154
131
|
* @returns entries in registration (list: order) sequence.
|
|
155
132
|
*/
|
|
@@ -158,9 +135,7 @@ export interface SlotRendererHost {
|
|
|
158
135
|
* Shadowing winners per cell for a key — the render read for single/keyed/
|
|
159
136
|
* list dispatch: the first live (non-abdicated) entry of each cell in
|
|
160
137
|
* priority order; chain keys pass through unchanged (election consumes
|
|
161
|
-
* every entry).
|
|
162
|
-
* only, so a declined head falls its cell to the next survivor. Fresh array
|
|
163
|
-
* per call — a render-body read, not a uSES getSnapshot source.
|
|
138
|
+
* every entry). Fresh array per call — a render-body read, not a uSES getSnapshot source.
|
|
164
139
|
* @param key - slot key.
|
|
165
140
|
* @returns the winning entry per occupied cell.
|
|
166
141
|
*/
|
|
@@ -250,11 +225,6 @@ export interface SlotRendererHost {
|
|
|
250
225
|
readonly root: HostObservable<StandardSourceBinding>;
|
|
251
226
|
/** Monotonic source updated whenever the installed scope-adapter roster changes. */
|
|
252
227
|
readonly scopeRevision: HostObservable<number>;
|
|
253
|
-
/**
|
|
254
|
-
* Monotonic source updated whenever the installed admission gate changes
|
|
255
|
-
* what it admits; a constant zero while no gate is installed.
|
|
256
|
-
*/
|
|
257
|
-
readonly admissionRevision: HostObservable<number>;
|
|
258
228
|
/**
|
|
259
229
|
* Resolve the adapter installed for one non-root scope.
|
|
260
230
|
* `session` and `session-maybe` intentionally resolve the same adapter.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-slots",
|
|
3
3
|
"description": "Slot registry pure core: typed ordinary Slots and reusable Component Factories, derived props, Store seats, and renderer installation",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.4",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/react": "~18.3.1",
|
|
30
|
-
"@qilin-agent/client-store": "3.1.
|
|
30
|
+
"@qilin-agent/client-store": "3.1.4",
|
|
31
31
|
"@qilin-agent/kylin": "~4.0.3"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|