@picked/client 0.0.70 → 0.0.71-next.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/dist/.tsbuildinfo +1 -0
- package/dist/api-CH2FNa6S.cjs +1 -0
- package/dist/api-CgqRvuKL.js +38 -0
- package/dist/cjs/form/index.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dom-observer/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/{dom-BwmTHeT7.js → dom-BqcToNL0.js} +1 -3
- package/dist/{dom-CDrHc_j9.cjs → dom-DlLH3FxV.cjs} +1 -1
- package/dist/esm/form/index.js +2 -4
- package/dist/esm/index.js +50 -45
- package/dist/esm/plugins/dom-observer/index.js +1 -1
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/preview/index.js +1 -1
- package/dist/esm/server/index.js +12 -10
- package/dist/{experience-instance-DOJShRk5.js → experience-instance-DGk11d8a.js} +3 -3
- package/dist/experience-instance-Dej3P1sE.cjs +1 -0
- package/dist/{plugin-ChPkTj__.js → plugin-D2UqFikQ.js} +2 -2
- package/dist/plugin-DCW-tnjO.cjs +1 -0
- package/dist/{preview-channel-DW9J8t4B.js → preview-channel-CSr96XAo.js} +1 -1
- package/dist/{protocol-DSqOlW2r.js → protocol-C5KkkiZc.js} +1 -1
- package/dist/types/client.d.ts +7 -6
- package/dist/types/entities/action/action.d.ts +5 -4
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/component/component.d.ts +6 -5
- package/dist/types/entities/component/component.d.ts.map +1 -1
- package/dist/types/entities/condition/condition.d.ts +5 -5
- package/dist/types/entities/content/content.d.ts +4 -3
- package/dist/types/entities/experience/experience.d.ts +11 -10
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +10 -9
- package/dist/types/entities/feature/feature.d.ts +3 -2
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +7 -6
- package/dist/types/entities/framework/framework.d.ts +7 -6
- package/dist/types/entities/framework/framework.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts +6 -6
- package/dist/types/entities/plugin/plugin.d.ts +3 -2
- package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +4 -3
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/response/response-validation.d.ts +3 -2
- package/dist/types/entities/response/response.d.ts +12 -11
- package/dist/types/entities/session/session.d.ts +2 -1
- package/dist/types/entities/step/step.d.ts +6 -5
- package/dist/types/exports.d.ts +2 -1
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/form/build-responses.d.ts +2 -1
- package/dist/types/form/create-field-evaluator.d.ts +4 -3
- package/dist/types/form/create-field-validation.d.ts +5 -4
- package/dist/types/form/create-form.d.ts +7 -6
- package/dist/types/form/create-submit-pipeline.d.ts +7 -6
- package/dist/types/form/get-step-fields.d.ts +3 -2
- package/dist/types/lifecycle/condition-selection.d.ts +14 -4
- package/dist/types/lifecycle/lifecycle.d.ts +4 -3
- package/dist/types/lifecycle/rules-logic.d.ts +4 -3
- package/dist/types/lifecycle/state-snapshot.d.ts +4 -3
- package/dist/types/picked.d.ts +64 -62
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/ping.d.ts +1 -1
- package/dist/types/ping.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +9 -8
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/plugin.d.ts +3 -2
- package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/serialization.d.ts.map +1 -1
- package/dist/types/plugins/dom-observer/plugin.d.ts +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +3 -3
- package/dist/types/plugins/dynamic-experiences/types.d.ts +8 -5
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/plugins/web-components/plugin.d.ts +2 -1
- package/dist/types/plugins/window-object/plugin.d.ts +2 -2
- package/dist/types/preview-channel.d.ts +5 -1
- package/dist/types/preview-receiver/index.d.ts +18 -1
- package/dist/types/preview-receiver/protocol.d.ts +10 -1
- package/dist/types/server/index.d.ts +3 -3
- package/dist/types/server/serialize.d.ts +2 -2
- package/dist/types/utils/dom.d.ts +2 -1
- package/dist/types/utils/events.d.ts +6 -6
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +1 -1
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/id.d.ts.map +1 -1
- package/dist/types/utils/logger.d.ts +2 -1
- package/dist/types/utils/logger.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +2 -1
- package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts +2 -1
- package/dist/types/utils/node-tree/get-next-node.d.ts +1 -1
- package/dist/types/utils/node-tree/get-next-node.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-origin-node.d.ts +1 -1
- package/dist/types/utils/node-tree/get-origin-node.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/nodes.d.ts +1 -1
- package/dist/types/utils/picked-config.d.ts +2 -1
- package/dist/types/utils/rules-logic.d.ts +6 -2
- package/dist/types/utils/storage.d.ts +1 -1
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/package.json +22 -23
- package/dist/api-CPy9G49C.js +0 -40
- package/dist/api-Ce6xYI--.cjs +0 -1
- package/dist/experience-instance-DurC3pE-.cjs +0 -1
- package/dist/plugin-DHn11gn6.cjs +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Field entity — Effector stores, types, and CRUD helpers for experience fields. */
|
|
2
|
+
import { type Store } from 'effector';
|
|
3
|
+
import type { LogicRule } from '../../logic-engine';
|
|
3
4
|
export type FieldsStore = ReturnType<typeof createFieldIndex>;
|
|
4
5
|
export type PrimitiveFieldValue = string | number | boolean | null;
|
|
5
6
|
export type FieldOptionValue = string | number | boolean;
|
|
@@ -83,11 +84,11 @@ export interface FieldBooleanMultiple extends FieldBase<boolean> {
|
|
|
83
84
|
export type Field = FieldTextSingular | FieldTextMultiple | FieldNumberSingular | FieldNumberMultiple | FieldObjectSingular | FieldObjectMultiple | FieldBooleanSingular | FieldBooleanMultiple;
|
|
84
85
|
declare const createFieldIndexFactory: () => {
|
|
85
86
|
register: (field: Field) => void;
|
|
86
|
-
update: (key: FieldBase[
|
|
87
|
-
getById: (id: FieldBase[
|
|
88
|
-
getByKey: (key: FieldBase[
|
|
87
|
+
update: (key: FieldBase['key'], updates: Partial<Field>) => void;
|
|
88
|
+
getById: (id: FieldBase['id']) => Store<Field | null>;
|
|
89
|
+
getByKey: (key: FieldBase['key']) => Store<Field | null>;
|
|
89
90
|
listStore: Store<Field[]>;
|
|
90
|
-
getByName: (name: FieldBase[
|
|
91
|
+
getByName: (name: FieldBase['name']) => Store<Field | null>;
|
|
91
92
|
};
|
|
92
93
|
/**
|
|
93
94
|
* Creates an Effector-based index for registering and retrieving fields.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
/** @file Framework entity — Effector stores and registry for UI framework integrations (React, Svelte, etc). */
|
|
2
|
+
import { type EventCallable } from 'effector';
|
|
3
|
+
import type { AdaptedComponent } from '../component/component';
|
|
4
|
+
import type { ExperienceInstance } from '../experience-instance/experience-instance';
|
|
5
|
+
import type { Picked } from '../../picked';
|
|
5
6
|
export type FrameworksStore = ReturnType<typeof createFrameworkIndex>;
|
|
6
7
|
export interface Framework {
|
|
7
8
|
name: string;
|
|
@@ -16,8 +17,8 @@ declare const createFrameworkIndexFactory: (_params: {
|
|
|
16
17
|
name: string;
|
|
17
18
|
framework: Framework;
|
|
18
19
|
}>;
|
|
19
|
-
getByName: (name: string) => import(
|
|
20
|
-
listStore: import(
|
|
20
|
+
getByName: (name: string) => import("effector").Store<Framework | undefined>;
|
|
21
|
+
listStore: import("effector").Store<Framework[]>;
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
24
|
* Creates a framework index with stores and registration logic.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../../../../src/entities/framework/framework.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAChH,OAAO,EAAwC,KAAK,aAAa,EAAU,MAAM,UAAU,CAAA;AAG3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AACpF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,MAAM,eAAe,GAAG,UAAU,CAA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CAAA;IACvB,4GAA4G;IAC5G,OAAO,CAAC,EAAE,gBAAgB,CAAA;CAC3B;AAED,QAAA,MAAM,2BAA2B,YAA2B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;cAkBtC,MAAM;mBAAa,SAAS;;sBA6BzC,MAAM;;CAS/B,CAAA;AAEF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,EAC9F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAEhD;AAED,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,gBAAgB,EAC3B,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,kBAAkB,KAC3B,IAAI,CAAA;AAET,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAA;AAE3D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,cAAe,SAAS,cAAc,eAAe,KAAG,IAElF,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExperienceNode } from '../experience/experience';
|
|
1
|
+
import type { ExperienceNode } from '../experience/experience';
|
|
2
2
|
export interface HistoryEntry {
|
|
3
3
|
id: string;
|
|
4
4
|
node: ExperienceNode;
|
|
@@ -6,20 +6,20 @@ export interface HistoryEntry {
|
|
|
6
6
|
experienceId: string;
|
|
7
7
|
}
|
|
8
8
|
export declare function createHistory(): {
|
|
9
|
-
push: import(
|
|
9
|
+
push: import("effector").EventCallable<{
|
|
10
10
|
experienceId: string;
|
|
11
11
|
node: ExperienceNode;
|
|
12
12
|
}>;
|
|
13
|
-
replace: import(
|
|
13
|
+
replace: import("effector").EventCallable<{
|
|
14
14
|
experienceId: string;
|
|
15
15
|
node: ExperienceNode;
|
|
16
16
|
}>;
|
|
17
|
-
back: import(
|
|
17
|
+
back: import("effector").EventCallable<{
|
|
18
18
|
experienceId?: string;
|
|
19
19
|
}>;
|
|
20
|
-
restore: import(
|
|
20
|
+
restore: import("effector").EventCallable<{
|
|
21
21
|
entries: HistoryEntry[];
|
|
22
22
|
}>;
|
|
23
|
-
entriesStore: import(
|
|
23
|
+
entriesStore: import("effector").Store<HistoryEntry[]>;
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=history.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Plugin contract for the Picked SDK. Plugins extend the client via setup-time registration and effector-based onStart hooks. */
|
|
2
|
+
import { type Effect } from 'effector';
|
|
3
|
+
import type { Picked } from '../../picked';
|
|
3
4
|
export interface Plugin {
|
|
4
5
|
name: string;
|
|
5
6
|
setup: (client: Picked) => void | PluginConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/entities/plugin/plugin.ts"],"names":[],"mappings":"AAAA,wIAAwI;AACxI,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,YAAY,CAAA;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,qIAAqI;IACrI,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAIjG;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/entities/plugin/plugin.ts"],"names":[],"mappings":"AAAA,wIAAwI;AACxI,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,YAAY,CAAA;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,qIAAqI;IACrI,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAIjG;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,WAAY,MAAM,UAAU,MAAM,WAAW,iBAAiB,KAAG,IASxF,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Predicate entity — Effector stores and registry for condition evaluation functions. */
|
|
2
|
+
import { type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { StateSnapshot } from '../../lifecycle/state-snapshot';
|
|
4
|
+
import type { Picked } from '../../picked';
|
|
4
5
|
export type Predicate = (snapshot: StateSnapshot & {
|
|
5
6
|
args: unknown[];
|
|
6
7
|
}) => boolean | Promise<boolean> | string | Promise<string> | string[] | Promise<string[]> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predicate.d.ts","sourceRoot":"","sources":["../../../../src/entities/predicate/predicate.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,OAAO,EAML,KAAK,aAAa,EAElB,KAAK,KAAK,EACX,MAAM,UAAU,CAAA;AAGjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,MAAM,SAAS,GAAG,CACtB,QAAQ,EAAE,aAAa,GAAG;IAAE,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,KAE3C,OAAO,GACP,OAAO,CAAC,OAAO,CAAC,GAChB,MAAM,GACN,OAAO,CAAC,MAAM,CAAC,GACf,MAAM,EAAE,GACR,OAAO,CAAC,MAAM,EAAE,CAAC,GACjB,SAAS,CAAA;AAEb,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAErE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,SAAS,CAAA;CACrB;AAID,QAAA,MAAM,2BAA2B,eAA8B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;cAwBzC,MAAM;mBAAa,SAAS;;sBAiCzC,MAAM;;cAtDrB,MAAM;mBACD,SAAS;;0CAiEqB,MAAM,KAAG,KAAK,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC;CA0CxF,CAAA;AAEF;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,EAC9F,MAAM,EAAE,CAAC,GACR,UAAU,CAAC,O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AM,aAAa,SAAS,cAAc,eAAe,SAE7F,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Validation utilities for response values — type checks, coercion, and field-level validation. */
|
|
2
|
+
import type { Field, FieldValue } from '../field/field';
|
|
3
|
+
import type { LogicObject, LogicRule } from '../../logic-engine';
|
|
3
4
|
export interface ValidationError {
|
|
4
5
|
fieldKey: Field['key'];
|
|
5
6
|
userMessage: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
/** @file Response entity — Effector stores, commit/validation flow, and field-response lookups. */
|
|
2
|
+
import { type Store } from 'effector';
|
|
3
|
+
import type { Picked } from '../../picked';
|
|
4
|
+
import type { Field, FieldValue } from '../field/field';
|
|
5
|
+
import { type ValidationError } from './response-validation';
|
|
5
6
|
export type { ValidationError } from './response-validation';
|
|
6
7
|
export type ResponsesStore = ReturnType<typeof createResponseIndex>;
|
|
7
8
|
export type Response = FieldValue;
|
|
@@ -13,11 +14,11 @@ declare const createResponseIndexFactory: ({ client }: {
|
|
|
13
14
|
client: Picked;
|
|
14
15
|
}) => {
|
|
15
16
|
register: {
|
|
16
|
-
(fieldKey: Field[
|
|
17
|
-
(payload: Record<Field[
|
|
17
|
+
(fieldKey: Field['key'], response: Response): void;
|
|
18
|
+
(payload: Record<Field['key'], Response>, response?: never): void;
|
|
18
19
|
};
|
|
19
|
-
clearAll: import(
|
|
20
|
-
clear: import(
|
|
20
|
+
clearAll: import("effector").EventCallable<void>;
|
|
21
|
+
clear: import("effector").EventCallable<string>;
|
|
21
22
|
commit: (responsesToCommit: CommitResponses) => Promise<{
|
|
22
23
|
errors: ValidationError[];
|
|
23
24
|
}>;
|
|
@@ -32,9 +33,9 @@ declare const createResponseIndexFactory: ({ client }: {
|
|
|
32
33
|
getAllStore: Store<{
|
|
33
34
|
[fieldKey: string]: FieldValue;
|
|
34
35
|
}>;
|
|
35
|
-
getByFieldId: (id: Field[
|
|
36
|
-
getByFieldKey: (key: Field[
|
|
37
|
-
getByFieldName: (fieldName: Field[
|
|
36
|
+
getByFieldId: (id: Field['id']) => Store<FieldValue>;
|
|
37
|
+
getByFieldKey: (key: Field['key']) => Store<FieldValue>;
|
|
38
|
+
getByFieldName: (fieldName: Field['name']) => Store<FieldValue>;
|
|
38
39
|
};
|
|
39
40
|
/**
|
|
40
41
|
* Creates a response index instance bound to the given client.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @file Session entity — single Effector store for the visitor session (id, isUser flag, identifiers) plus mutator events generated via `createApi`. Persists to localStorage when available. */
|
|
2
|
+
import { type EventCallable, type Store } from 'effector';
|
|
2
3
|
/** Plain shape of a persisted session — id, optional isUser flag, optional identifiers map. */
|
|
3
4
|
export interface Session {
|
|
4
5
|
id: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Step entity — Effector stores, types, and lifecycle helpers for experience steps. */
|
|
2
|
+
import { type Store } from 'effector';
|
|
3
|
+
import type { Content } from '../content/content';
|
|
3
4
|
export type StepsStore = ReturnType<typeof createStepIndex>;
|
|
4
5
|
export interface ExperienceStep {
|
|
5
6
|
id: string;
|
|
@@ -23,10 +24,10 @@ export interface ExperienceStep {
|
|
|
23
24
|
}
|
|
24
25
|
declare const createStepIndexFactory: () => {
|
|
25
26
|
register: (step: ExperienceStep) => void;
|
|
26
|
-
getById: (id: ExperienceStep[
|
|
27
|
-
getByKey: (key: ExperienceStep[
|
|
27
|
+
getById: (id: ExperienceStep['id']) => Store<ExperienceStep | null>;
|
|
28
|
+
getByKey: (key: ExperienceStep['key']) => Store<ExperienceStep | null>;
|
|
28
29
|
listStore: Store<ExperienceStep[]>;
|
|
29
|
-
indexStore: import(
|
|
30
|
+
indexStore: import("effector").StoreWritable<{
|
|
30
31
|
[id: string]: ExperienceStep;
|
|
31
32
|
}>;
|
|
32
33
|
};
|
package/dist/types/exports.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @file Public exports for the Picked SDK client package — surfaces the `Picked` class, `createClient` factory, and supporting utilities. */
|
|
2
|
+
import type { CreateClientOptions } from './client';
|
|
2
3
|
import { Picked } from './picked';
|
|
3
4
|
export { isPickedRoot } from './utils/dom';
|
|
4
5
|
export { rehydrateScripts, buildRehydrateBootstrap, PICKED_SCRIPT_TYPE, PICKED_MODULE_SCRIPT_TYPE, PICKED_HYDRATED_ATTR, } from './utils/rehydrate-scripts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/exports.ts"],"names":[],"mappings":"AAAA,8IAA8I;AAC9I,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC/E,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,6BAA6B,CAAA;AAEpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,mBAAmB,iBAAiB,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,Y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
|
|
1
|
+
/** @file Parses FormData snapshots into typed field-response records keyed by field key. */
|
|
2
|
+
import type { FieldBase, FieldValue } from '../entities/field/field';
|
|
2
3
|
/**
|
|
3
4
|
* Parses a FormData snapshot into a typed record of field responses keyed by field key. Fields
|
|
4
5
|
* absent from FormData are mapped to `null`. Empty string values are mapped to `null`. Repeated
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Reactive field evaluator — filters and re-evaluates fields when responses or step context change. */
|
|
2
|
+
import { type Store, type StoreWritable } from 'effector';
|
|
3
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
4
|
+
import type { Picked } from '../picked';
|
|
4
5
|
/**
|
|
5
6
|
* Creates a reactive store of evaluated fields for a given set of field keys.
|
|
6
7
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
/** @file Creates the client-side field validation slice (touched tracking, error stores, staged values). */
|
|
2
|
+
import { type EventCallable, type Store, type StoreWritable } from 'effector';
|
|
3
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
4
|
+
import type { ValidationError } from '../entities/response/response';
|
|
5
|
+
import type { Picked } from '../picked';
|
|
5
6
|
export interface FieldValidation {
|
|
6
7
|
/** Dispatch on keyboard input — updates staged values and runs validation if the field has been touched. */
|
|
7
8
|
fieldInputEvent: EventCallable<{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
/** @file Creates form instances that wire field evaluation, validation, and submission. */
|
|
2
|
+
import { type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
4
|
+
import type { ExperienceInstance } from '../entities/experience-instance/experience-instance';
|
|
5
|
+
import type { ValidationError } from '../entities/response/response';
|
|
6
|
+
import type { Picked } from '../picked';
|
|
7
|
+
import { type ErrorCallback, type SubmitCallback, type SubmitEventWithCurrentTarget, type SuccessCallback } from './create-submit-pipeline';
|
|
7
8
|
export type FormField = Field & {
|
|
8
9
|
value: FieldValue | undefined;
|
|
9
10
|
/** Validation error for this field, or undefined if valid. */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
/** @file Submit pipeline for form instances — manages lifecycle, validation, and navigation. */
|
|
2
|
+
import { type Event, type EventCallable, type Store } from 'effector';
|
|
3
|
+
import type { ExperienceInstance } from '../entities/experience-instance/experience-instance';
|
|
4
|
+
import type { ExperienceStep } from '../entities/step/step';
|
|
5
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
6
|
+
import type { ValidationError } from '../entities/response/response';
|
|
7
|
+
import type { Picked } from '../picked';
|
|
7
8
|
export type SubmitEventWithCurrentTarget = SubmitEvent & {
|
|
8
9
|
currentTarget: EventTarget & HTMLFormElement;
|
|
9
10
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** @file Step field evaluation — resolves field and option visibility conditions. */
|
|
2
|
+
import type { Field } from '../entities/field/field';
|
|
3
|
+
import type { Picked } from '../picked';
|
|
3
4
|
import { evaluateRuleLogic } from '../utils/rules-logic';
|
|
4
5
|
/**
|
|
5
6
|
* Evaluates field and option conditions, returning only the fields that should be visible.
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @file Memoized condition evaluator plus a reactive condition-results store.
|
|
3
|
+
*
|
|
4
|
+
* The results store is keyed by a stable, key-order-independent hash of the rule, so the
|
|
5
|
+
* server's selection (`serialize`) and the client's hydration share results without
|
|
6
|
+
* re-evaluating. A cache hit reads synchronously (driving SSR render and the first
|
|
7
|
+
* client paint); a miss evaluates asynchronously and writes the result back, which
|
|
8
|
+
* propagates reactively to subscribers. Conditions that reference an action are exempt from the
|
|
9
|
+
* cache: they re-evaluate on every call so the action's side effect runs each time.
|
|
10
|
+
*/
|
|
11
|
+
import { type Store } from 'effector';
|
|
12
|
+
import type { Condition } from '../entities/condition/condition';
|
|
13
|
+
import type { LogicObject, LogicRule, LogicValue } from '../logic-engine';
|
|
14
|
+
import type { Picked } from '../picked';
|
|
5
15
|
/** A condition rule that may be json-logic, a raw logic value, or unset. */
|
|
6
16
|
type ConditionRule = LogicRule | LogicValue | undefined;
|
|
7
17
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Lifecycle module — owns the SDK start chain as an effector event graph. */
|
|
2
|
+
import { type Effect, type EventCallable, type StoreWritable } from 'effector';
|
|
3
|
+
import type { Picked } from '../picked';
|
|
4
|
+
import type { LogicRule } from '../logic-engine';
|
|
4
5
|
/** Discrete stages of the SDK lifecycle. */
|
|
5
6
|
export type LifecycleStage = 'idle' | 'starting' | 'ready' | 'failed';
|
|
6
7
|
/** A logic-engine gate rule, a literal boolean override, or `undefined` to indicate no gate is configured. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file Effector effect that evaluates a json-logic rule against the client's reactive state. */
|
|
2
|
+
import { type Effect } from 'effector';
|
|
3
|
+
import type { LogicObject, LogicRule } from '../logic-engine';
|
|
4
|
+
import type { Picked } from '../picked';
|
|
4
5
|
/** Parameters for `evaluateRuleLogicFx` — the rule to evaluate and an optional context override. */
|
|
5
6
|
export interface EvaluateRuleLogicParams {
|
|
6
7
|
rule: LogicRule;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/** @file State snapshot store — derives an immutable `StateSnapshot` from the client's reactive entity stores via `combine`. */
|
|
2
|
+
import { type Store } from 'effector';
|
|
3
|
+
import type { Picked } from '../picked';
|
|
4
|
+
import type { Field, FieldValue } from '../entities/field/field';
|
|
4
5
|
/** Immutable snapshot of the current client state, suitable for passing to user-supplied predicates, actions, and rule evaluators. */
|
|
5
6
|
export interface StateSnapshot {
|
|
6
7
|
client: Picked;
|
package/dist/types/picked.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
1
|
+
/** @file Picked client — the main entry point for the Picked SDK. */
|
|
2
|
+
import { type Effect, type EventCallable, type Store, type StoreWritable } from 'effector';
|
|
3
|
+
import { type Experience, type LaunchExperienceOptions } from './entities/experience/experience';
|
|
4
|
+
import { type Plugin, type PluginConfigIndex } from './entities/plugin/plugin';
|
|
5
|
+
import { type CreateClientOptions } from './client';
|
|
6
|
+
import { type AdaptedComponent } from './entities/component/component';
|
|
7
|
+
import { type Framework } from './entities/framework/framework';
|
|
8
|
+
import { logger } from './utils/logger';
|
|
9
|
+
import { type StateSnapshot } from './lifecycle/state-snapshot';
|
|
10
|
+
import { type EvaluateRuleLogicParams } from './lifecycle/rules-logic';
|
|
11
|
+
import { type ConditionResults } from './lifecycle/condition-selection';
|
|
12
|
+
import { type LifecycleStage } from './lifecycle/lifecycle';
|
|
13
|
+
import type { Predicate } from './entities/predicate/predicate';
|
|
14
|
+
import type { Feature } from './entities/feature/feature';
|
|
15
|
+
import { type EventBusPayload, type EventHistoryStore } from './utils/events';
|
|
16
|
+
import type { Field } from './entities/field/field';
|
|
17
|
+
import type { ExperienceStep } from './entities/step/step';
|
|
18
|
+
import type { Content, ContentDataPatch } from './entities/content/content';
|
|
19
|
+
import type { ContentLoader } from './plugins/dynamic-experiences/types';
|
|
20
|
+
import type { Action } from './entities/action/action';
|
|
21
|
+
import { type Condition } from './entities/condition/condition';
|
|
22
|
+
import type { SessionEntity } from './entities/session/session';
|
|
21
23
|
/**
|
|
22
24
|
* Provenance metadata describing where the Picked client's project config and
|
|
23
25
|
* content came from. Set by `dynamicExperiencesPlugin` when the Vite plugin's
|
|
@@ -34,7 +36,7 @@ export interface PickedDataSource {
|
|
|
34
36
|
workspaceId: string | null;
|
|
35
37
|
}
|
|
36
38
|
export declare class Picked {
|
|
37
|
-
static readonly logger:
|
|
39
|
+
static readonly logger: typeof logger;
|
|
38
40
|
private readonly options;
|
|
39
41
|
/**
|
|
40
42
|
* Provenance metadata for the data backing this client. Populated by
|
|
@@ -64,23 +66,23 @@ export declare class Picked {
|
|
|
64
66
|
readonly dashboardUrl: string;
|
|
65
67
|
readonly documentationSiteUrl: string;
|
|
66
68
|
readonly session: SessionEntity;
|
|
67
|
-
readonly searchParams: import(
|
|
69
|
+
readonly searchParams: import(".").PickedSearchParams;
|
|
68
70
|
readonly history: {
|
|
69
71
|
push: EventCallable<{
|
|
70
72
|
experienceId: string;
|
|
71
|
-
node: import(
|
|
73
|
+
node: import(".").ExperienceNode;
|
|
72
74
|
}>;
|
|
73
75
|
replace: EventCallable<{
|
|
74
76
|
experienceId: string;
|
|
75
|
-
node: import(
|
|
77
|
+
node: import(".").ExperienceNode;
|
|
76
78
|
}>;
|
|
77
79
|
back: EventCallable<{
|
|
78
80
|
experienceId?: string;
|
|
79
81
|
}>;
|
|
80
82
|
restore: EventCallable<{
|
|
81
|
-
entries: import(
|
|
83
|
+
entries: import(".").HistoryEntry[];
|
|
82
84
|
}>;
|
|
83
|
-
entriesStore: Store<import(
|
|
85
|
+
entriesStore: Store<import(".").HistoryEntry[]>;
|
|
84
86
|
};
|
|
85
87
|
readonly components: {
|
|
86
88
|
register: EventCallable<{
|
|
@@ -98,16 +100,16 @@ export declare class Picked {
|
|
|
98
100
|
}[]>;
|
|
99
101
|
};
|
|
100
102
|
readonly experienceInstances: {
|
|
101
|
-
spawn: (experience: import(
|
|
102
|
-
getByExperienceKey: (key: Experience[
|
|
103
|
-
getByExperienceId: (id: Experience[
|
|
104
|
-
listStore: Store<import(
|
|
103
|
+
spawn: (experience: import(".").ExperienceStore, target: HTMLElement, options?: LaunchExperienceOptions) => void;
|
|
104
|
+
getByExperienceKey: (key: Experience['key']) => Store<import(".").ExperienceInstance[]>;
|
|
105
|
+
getByExperienceId: (id: Experience['id']) => Store<import(".").ExperienceInstance[]>;
|
|
106
|
+
listStore: Store<import(".").ExperienceInstance[]>;
|
|
105
107
|
};
|
|
106
108
|
readonly experiences: {
|
|
107
109
|
register: EventCallable<Experience>;
|
|
108
|
-
get: (id: Experience[
|
|
109
|
-
getById: (id: Experience[
|
|
110
|
-
getByKey: (key: Experience[
|
|
110
|
+
get: (id: Experience['id']) => Store<import(".").ExperienceStore | undefined>;
|
|
111
|
+
getById: (id: Experience['id']) => Store<import(".").ExperienceStore | undefined>;
|
|
112
|
+
getByKey: (key: Experience['key']) => Store<import(".").ExperienceStore | undefined>;
|
|
111
113
|
launch: Effect<{
|
|
112
114
|
key: string;
|
|
113
115
|
options?: LaunchExperienceOptions;
|
|
@@ -117,12 +119,12 @@ export declare class Picked {
|
|
|
117
119
|
}, void, Error>;
|
|
118
120
|
open: Effect<{
|
|
119
121
|
key: string;
|
|
120
|
-
options?: import(
|
|
122
|
+
options?: import("./exports").OpenExperienceOptions;
|
|
121
123
|
} | {
|
|
122
124
|
id: string;
|
|
123
|
-
options?: import(
|
|
125
|
+
options?: import("./exports").OpenExperienceOptions;
|
|
124
126
|
}, void, Error>;
|
|
125
|
-
listStore: Store<import(
|
|
127
|
+
listStore: Store<import(".").ExperienceStore[]>;
|
|
126
128
|
initialiseExperiencesFx: Effect<void, void, Error>;
|
|
127
129
|
};
|
|
128
130
|
readonly frameworks: {
|
|
@@ -150,15 +152,15 @@ export declare class Picked {
|
|
|
150
152
|
id: string;
|
|
151
153
|
feature: Feature;
|
|
152
154
|
}>;
|
|
153
|
-
getById: (id: string) => Store<import(
|
|
154
|
-
getByName: (name: string) => Store<import(
|
|
155
|
-
listStore: Store<import(
|
|
155
|
+
getById: (id: string) => Store<import(".").FeatureBucket | undefined>;
|
|
156
|
+
getByName: (name: string) => Store<import(".").FeatureIndexItem | undefined>;
|
|
157
|
+
listStore: Store<import(".").FeatureBucket[]>;
|
|
156
158
|
getEvokableFeature: (featureName: string) => Store<() => Promise<boolean | string | undefined>>;
|
|
157
159
|
};
|
|
158
160
|
readonly conditions: {
|
|
159
161
|
register: (condition: Condition) => void;
|
|
160
|
-
getById: (id: Condition[
|
|
161
|
-
getByKey: (key: Condition[
|
|
162
|
+
getById: (id: Condition['id']) => Store<Condition | null>;
|
|
163
|
+
getByKey: (key: Condition['key']) => Store<Condition | null>;
|
|
162
164
|
listStore: Store<Condition[]>;
|
|
163
165
|
indexStore: StoreWritable<{
|
|
164
166
|
[id: string]: Condition;
|
|
@@ -166,41 +168,41 @@ export declare class Picked {
|
|
|
166
168
|
};
|
|
167
169
|
readonly fields: {
|
|
168
170
|
register: (field: Field) => void;
|
|
169
|
-
update: (key: import(
|
|
170
|
-
getById: (id: import(
|
|
171
|
-
getByKey: (key: import(
|
|
171
|
+
update: (key: import(".").FieldBase['key'], updates: Partial<Field>) => void;
|
|
172
|
+
getById: (id: import(".").FieldBase['id']) => Store<Field | null>;
|
|
173
|
+
getByKey: (key: import(".").FieldBase['key']) => Store<Field | null>;
|
|
172
174
|
listStore: Store<Field[]>;
|
|
173
|
-
getByName: (name: import(
|
|
175
|
+
getByName: (name: import(".").FieldBase['name']) => Store<Field | null>;
|
|
174
176
|
};
|
|
175
177
|
readonly responses: {
|
|
176
178
|
register: {
|
|
177
|
-
(fieldKey: Field[
|
|
178
|
-
(payload: Record<Field[
|
|
179
|
+
(fieldKey: Field['key'], response: import(".").Response): void;
|
|
180
|
+
(payload: Record<Field['key'], import(".").Response>, response?: never): void;
|
|
179
181
|
};
|
|
180
182
|
clearAll: EventCallable<void>;
|
|
181
183
|
clear: EventCallable<string>;
|
|
182
|
-
commit: (responsesToCommit: import(
|
|
183
|
-
errors: import(
|
|
184
|
+
commit: (responsesToCommit: import(".").CommitResponses) => Promise<{
|
|
185
|
+
errors: import(".").ValidationError[];
|
|
184
186
|
}>;
|
|
185
|
-
getResponsesToCommit: (responsesToCommit: import(
|
|
186
|
-
responsesToCommit: import(
|
|
187
|
-
validationErrors: import(
|
|
187
|
+
getResponsesToCommit: (responsesToCommit: import(".").CommitResponses) => Promise<{
|
|
188
|
+
responsesToCommit: import(".").CommitResponses;
|
|
189
|
+
validationErrors: import(".").ValidationError[];
|
|
188
190
|
}>;
|
|
189
191
|
listStore: Store<{
|
|
190
192
|
fieldKey: string;
|
|
191
|
-
value: import(
|
|
193
|
+
value: import(".").FieldValue;
|
|
192
194
|
}[]>;
|
|
193
195
|
getAllStore: Store<{
|
|
194
|
-
[fieldKey: string]: import(
|
|
196
|
+
[fieldKey: string]: import(".").FieldValue;
|
|
195
197
|
}>;
|
|
196
|
-
getByFieldId: (id: Field[
|
|
197
|
-
getByFieldKey: (key: Field[
|
|
198
|
-
getByFieldName: (fieldName: Field[
|
|
198
|
+
getByFieldId: (id: Field['id']) => Store<import(".").FieldValue>;
|
|
199
|
+
getByFieldKey: (key: Field['key']) => Store<import(".").FieldValue>;
|
|
200
|
+
getByFieldName: (fieldName: Field['name']) => Store<import(".").FieldValue>;
|
|
199
201
|
};
|
|
200
202
|
readonly steps: {
|
|
201
203
|
register: (step: ExperienceStep) => void;
|
|
202
|
-
getById: (id: ExperienceStep[
|
|
203
|
-
getByKey: (key: ExperienceStep[
|
|
204
|
+
getById: (id: ExperienceStep['id']) => Store<ExperienceStep | null>;
|
|
205
|
+
getByKey: (key: ExperienceStep['key']) => Store<ExperienceStep | null>;
|
|
204
206
|
listStore: Store<ExperienceStep[]>;
|
|
205
207
|
indexStore: StoreWritable<{
|
|
206
208
|
[id: string]: ExperienceStep;
|
|
@@ -209,7 +211,7 @@ export declare class Picked {
|
|
|
209
211
|
readonly contents: {
|
|
210
212
|
register: (content: Content) => void;
|
|
211
213
|
patch: (id: string, apply: ContentDataPatch) => void;
|
|
212
|
-
getById: (id: Content[
|
|
214
|
+
getById: (id: Content['id']) => Store<Content | null>;
|
|
213
215
|
listStore: Store<Content[]>;
|
|
214
216
|
indexStore: StoreWritable<{
|
|
215
217
|
[id: string]: Content;
|
|
@@ -221,9 +223,9 @@ export declare class Picked {
|
|
|
221
223
|
action: Action;
|
|
222
224
|
}>;
|
|
223
225
|
getByKey: (key: string) => Store<Action | undefined>;
|
|
224
|
-
listStore: Store<import(
|
|
226
|
+
listStore: Store<import(".").ActionIndexItem[]>;
|
|
225
227
|
getEvokableAction: (actionKey: string, options?: {
|
|
226
|
-
experience: import(
|
|
228
|
+
experience: import(".").ExperienceInstance;
|
|
227
229
|
}) => Store<() => ReturnType<Action>>;
|
|
228
230
|
};
|
|
229
231
|
/**
|