@kosdev-code/kos-dispense-sdk 0.1.0-next.970 → 0.1.0-next.975
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/.kos.json +7 -0
- package/{dispense-registration-manager-Da9CW_cN.js → dispense-registration-manager-J59_vyyY.js} +584 -184
- package/dispense-registration-manager-J59_vyyY.js.map +1 -0
- package/{dispense-registration-manager-Dtb31fcI.cjs → dispense-registration-manager-OYGAiIZy.cjs} +551 -151
- package/dispense-registration-manager-OYGAiIZy.cjs.map +1 -0
- package/{extension-utils-D_dnBLH6.js → extension-utils-DEM1emOY.js} +2 -2
- package/{extension-utils-D_dnBLH6.js.map → extension-utils-DEM1emOY.js.map} +1 -1
- package/{extension-utils-Cfhe358W.cjs → extension-utils-Pd5ntKtv.cjs} +2 -2
- package/{extension-utils-Cfhe358W.cjs.map → extension-utils-Pd5ntKtv.cjs.map} +1 -1
- package/index.cjs +6 -4
- package/index.cjs.map +1 -1
- package/index.js +66 -64
- package/models/models/cui-kit-state/cui-kit-state-model.d.ts +131 -0
- package/models/models/cui-kit-state/cui-kit-state-model.d.ts.map +1 -0
- package/models/models/cui-kit-state/index.d.ts +4 -0
- package/models/models/cui-kit-state/index.d.ts.map +1 -0
- package/models/models/cui-kit-state/types/index.d.ts +68 -0
- package/models/models/index.d.ts +1 -0
- package/models/models/index.d.ts.map +1 -1
- package/models/utils/dispense-registration-manager.d.ts +13 -0
- package/models/utils/dispense-registration-manager.d.ts.map +1 -1
- package/models/utils/pour-context.d.ts +8 -0
- package/models/utils/pour-context.d.ts.map +1 -0
- package/models.cjs +4 -2
- package/models.cjs.map +1 -1
- package/models.js +17 -15
- package/package.json +5 -5
- package/{pump-provider-uNNMh9uh.cjs → pump-provider-BSbTT-BC.cjs} +371 -418
- package/pump-provider-BSbTT-BC.cjs.map +1 -0
- package/{pump-provider-BQmCKz7S.js → pump-provider-Ch7NOeRj.js} +417 -464
- package/pump-provider-Ch7NOeRj.js.map +1 -0
- package/ui/contexts/cui-kit/cui-kit.d.ts +12 -1
- package/ui/contexts/cui-kit/cui-kit.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-cui-kit.d.ts +44 -5
- package/ui/hooks/cui-kit/use-cui-kit.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts +2 -0
- package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts.map +1 -1
- package/ui/utils/pour-context.d.ts +1 -7
- package/ui/utils/pour-context.d.ts.map +1 -1
- package/ui.cjs +3 -2
- package/ui.cjs.map +1 -1
- package/ui.js +49 -48
- package/ui.js.map +1 -1
- package/dispense-registration-manager-Da9CW_cN.js.map +0 -1
- package/dispense-registration-manager-Dtb31fcI.cjs.map +0 -1
- package/pump-provider-BQmCKz7S.js.map +0 -1
- package/pump-provider-uNNMh9uh.cjs.map +0 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { FutureEndState } from '@kosdev-code/kos-ui-sdk';
|
|
2
|
+
import { PourStrategy } from '../../../../ui/hooks/utils/pour-strategy/pour-strategy';
|
|
3
|
+
import { AvailabilityModel } from '../../availability/types';
|
|
4
|
+
import { PourStrategyAware } from '../../nozzle/types';
|
|
5
|
+
import { PourContext } from '../../../utils/pour-context';
|
|
6
|
+
/** A screen of the CUI Kit's selection flow. */
|
|
7
|
+
export type CuiKitGroup = "brands" | "beverages" | "flavors" | "pour";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The steps a CUI Kit shows. `beverages` is always on; the rest are opt-in. Turning a
|
|
11
|
+
* step off removes its screen, not its data: `flavors` stays selectable on another
|
|
12
|
+
* screen when its step is off.
|
|
13
|
+
*/
|
|
14
|
+
export interface CuiKitSteps {
|
|
15
|
+
brands?: boolean;
|
|
16
|
+
flavors?: boolean;
|
|
17
|
+
pour?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CuiKitStateOptions {
|
|
21
|
+
/** Path of the nozzle the kit drives. */
|
|
22
|
+
nozzlePath: string;
|
|
23
|
+
/**
|
|
24
|
+
* Where navigation starts when `steps` is not set.
|
|
25
|
+
* @deprecated Use `steps.brands`.
|
|
26
|
+
*/
|
|
27
|
+
initialGroup?: "brands" | "beverages";
|
|
28
|
+
/** The steps to show. Without it the kit keeps its original brand → beverage → flavor flow. */
|
|
29
|
+
steps?: CuiKitSteps;
|
|
30
|
+
/** Pour defaults for every pour the kit starts. */
|
|
31
|
+
pour?: {
|
|
32
|
+
/** Gesture strategy for pours that do not name one. */
|
|
33
|
+
strategy?: PourStrategy;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Called when a pour ends on its own (a fixed or automated pour finishing, or a pour
|
|
37
|
+
* failing) rather than being cancelled. A hold-to-pour release never calls it.
|
|
38
|
+
*/
|
|
39
|
+
onPourComplete?: (result: CuiPourResult) => void;
|
|
40
|
+
/** Companion model types created alongside the brand, beverage and flavor availability models. */
|
|
41
|
+
companionTypes?: {
|
|
42
|
+
brand?: string;
|
|
43
|
+
beverage?: string;
|
|
44
|
+
flavor?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Options for a single pour. */
|
|
49
|
+
export interface CuiPourOptions {
|
|
50
|
+
/** A beverage to select (with its brand) before pouring; waits until the nozzle has it. */
|
|
51
|
+
select?: AvailabilityModel;
|
|
52
|
+
/** Runs after selecting and before the before-pour gate. */
|
|
53
|
+
prepare?: (context: PourContext) => Promise<void> | void;
|
|
54
|
+
/** What to pour on, e.g. a GenericPour. Default: the nozzle. */
|
|
55
|
+
target?: PourStrategyAware;
|
|
56
|
+
/** Gesture strategy for this pour. Default: the kit's `pour.strategy`. */
|
|
57
|
+
strategy?: PourStrategy;
|
|
58
|
+
/** Pours the nozzle's named fixed volume instead of using the strategy. */
|
|
59
|
+
fixedPourName?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** How a pour ended, passed to `onPourComplete`. */
|
|
63
|
+
export interface CuiPourResult {
|
|
64
|
+
/** End state of the pour's future, when it reached one. */
|
|
65
|
+
endState?: FutureEndState;
|
|
66
|
+
/** The error when starting the pour failed. */
|
|
67
|
+
error?: unknown;
|
|
68
|
+
}
|
package/models/models/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-dispense-sdk/src/models/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-dispense-sdk/src/models/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
|
|
@@ -5,10 +5,23 @@ export declare const registerDispenseModels: <R>(root: R) => () => {
|
|
|
5
5
|
companion: (parentType: string, companion: import('@kosdev-code/kos-ui-sdk').KosCompanionModelType<any>) => RegistrationResult<R>;
|
|
6
6
|
legacy: <T extends import('@kosdev-code/kos-ui-sdk').IKosModelRegistration>(type: string, registration: T) => RegistrationResult<R>;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Registers the CUI Kit's models together with the dispense models they depend on. The
|
|
10
|
+
* name a Consumer UI's registration chain uses; `dispense.models()` registers the same.
|
|
11
|
+
*/
|
|
12
|
+
export declare const registerCuiKitModels: <R>(root: R) => () => {
|
|
13
|
+
preload: (type: string) => RegistrationResult<R>;
|
|
14
|
+
model: <T extends import('@kosdev-code/kos-ui-sdk').BaseKosModelRegistrationBean<any, any> | import('@kosdev-code/kos-ui-sdk').KosModelRegistrationType<any, any>>(registration: T, preload?: boolean) => RegistrationResult<R>;
|
|
15
|
+
companion: (parentType: string, companion: import('@kosdev-code/kos-ui-sdk').KosCompanionModelType<any>) => RegistrationResult<R>;
|
|
16
|
+
legacy: <T extends import('@kosdev-code/kos-ui-sdk').IKosModelRegistration>(type: string, registration: T) => RegistrationResult<R>;
|
|
17
|
+
};
|
|
8
18
|
export type DispenseKosModelRegistration<R> = typeof CoreKosModelRegistration & {
|
|
9
19
|
dispense: {
|
|
10
20
|
models: () => RegistrationResult<R>;
|
|
11
21
|
};
|
|
22
|
+
cuiKit: {
|
|
23
|
+
models: () => RegistrationResult<R>;
|
|
24
|
+
};
|
|
12
25
|
preload: ReturnType<typeof RegistrationManager.model.preloadModel>;
|
|
13
26
|
model: ReturnType<typeof RegistrationManager.model.register>;
|
|
14
27
|
companion: ReturnType<typeof RegistrationManager.companion.register>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispense-registration-manager.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-dispense-sdk/src/models/utils/dispense-registration-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,wBAAwB,EAG5C,mBAAmB,EAInB,KAAK,kBAAkB,EAExB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"dispense-registration-manager.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-dispense-sdk/src/models/utils/dispense-registration-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,wBAAwB,EAG5C,mBAAmB,EAInB,KAAK,kBAAkB,EAExB,MAAM,yBAAyB,CAAC;AAQjC,eAAO,MAAM,sBAAsB,GAChC,CAAC,EAAE,MAAM,CAAC;;;;;CAwCV,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC9B,CAAC,EAAE,MAAM,CAAC;;;;;CAEqB,CAAC;AAEnC,MAAM,MAAM,4BAA4B,CAAC,CAAC,IACxC,OAAO,wBAAwB,GAAG;IAChC,QAAQ,EAAE;QAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC,CAAC,CAAC,CAAA;KAAE,CAAC;IAClD,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC,CAAC,CAAC,CAAA;KAAE,CAAC;IAChD,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACnE,KAAK,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7D,SAAS,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;CACtE,CAAC;AAEJ,QAAA,MAAM,iBAAiB;;;;;;;CAEtB,CAAC;AAiBF,KAAK,oBAAoB,GAAG,4BAA4B,CACtD,OAAO,iBAAiB,CACzB,CAAC;AAEF,QAAA,MAAM,gBAAgB,EAAE,oBAA+C,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pour-context.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-dispense-sdk/src/models/utils/pour-context.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;IACtB,OAAO,CAAC,KAAK,CAA0B;IAEvC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAGlC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAG5B,MAAM,CAAC,GAAG,EAAE,MAAM;IAGlB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAG1B"}
|
package/models.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const dispenseRegistrationManager = require("./dispense-registration-manager-
|
|
4
|
-
const extensionUtils = require("./extension-utils-
|
|
3
|
+
const dispenseRegistrationManager = require("./dispense-registration-manager-OYGAiIZy.cjs");
|
|
4
|
+
const extensionUtils = require("./extension-utils-Pd5ntKtv.cjs");
|
|
5
5
|
exports.Assembly = dispenseRegistrationManager.Assembly;
|
|
6
6
|
exports.Availability = dispenseRegistrationManager.Availability;
|
|
7
7
|
exports.Board = dispenseRegistrationManager.Board;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "BoardContainerModel", {
|
|
|
12
12
|
});
|
|
13
13
|
exports.CONTEXT_ASSEMBLY_DATA = dispenseRegistrationManager.CONTEXT_ASSEMBLY_DATA;
|
|
14
14
|
exports.CONTEXT_ASSEMBLY_RAW_DATA = dispenseRegistrationManager.CONTEXT_ASSEMBLY_RAW_DATA;
|
|
15
|
+
exports.CuiKitState = dispenseRegistrationManager.CuiKitState;
|
|
15
16
|
exports.DeviceAssembly = dispenseRegistrationManager.DeviceAssembly;
|
|
16
17
|
exports.DispenseModelType = dispenseRegistrationManager.DispenseModelType;
|
|
17
18
|
exports.ExtensionType = dispenseRegistrationManager.ExtensionType;
|
|
@@ -32,6 +33,7 @@ exports.TOPIC_GENERIC_POUR_CANCEL = dispenseRegistrationManager.TOPIC_GENERIC_PO
|
|
|
32
33
|
exports.TOPIC_GENERIC_POUR_PROGRESS = dispenseRegistrationManager.TOPIC_GENERIC_POUR_PROGRESS;
|
|
33
34
|
exports.TOPIC_GENERIC_POUR_STARTED = dispenseRegistrationManager.TOPIC_GENERIC_POUR_STARTED;
|
|
34
35
|
exports.kosModels = dispenseRegistrationManager.kosModels;
|
|
36
|
+
exports.registerCuiKitModels = dispenseRegistrationManager.registerCuiKitModels;
|
|
35
37
|
exports.registerDispenseModels = dispenseRegistrationManager.registerDispenseModels;
|
|
36
38
|
exports.AssemblyServices = extensionUtils.index;
|
|
37
39
|
exports.AssemblyTypes = extensionUtils.assembly;
|
package/models.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"models.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/models.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A, a, B, b, c, C, d, D,
|
|
2
|
-
import { i as i2, a as a2, D as D2, b as b2, c as c2, d as d2, K as K2, e as e2, f as f2, g as g2 } from "./extension-utils-
|
|
1
|
+
import { A, a, B, b, c, C, d, e, D, f, E, G, H, g, I, h, K, N, i, j, k, l, T, m, n, o, p, q, r, s } from "./dispense-registration-manager-J59_vyyY.js";
|
|
2
|
+
import { i as i2, a as a2, D as D2, b as b2, c as c2, d as d2, K as K2, e as e2, f as f2, g as g2 } from "./extension-utils-DEM1emOY.js";
|
|
3
3
|
export {
|
|
4
4
|
A as Assembly,
|
|
5
5
|
i2 as AssemblyServices,
|
|
@@ -10,34 +10,36 @@ export {
|
|
|
10
10
|
c as BoardContainerModel,
|
|
11
11
|
C as CONTEXT_ASSEMBLY_DATA,
|
|
12
12
|
d as CONTEXT_ASSEMBLY_RAW_DATA,
|
|
13
|
+
e as CuiKitState,
|
|
13
14
|
D as DeviceAssembly,
|
|
14
15
|
D2 as DispenseExtensionManager,
|
|
15
|
-
|
|
16
|
+
f as DispenseModelType,
|
|
16
17
|
E as ExtensionType,
|
|
17
18
|
G as GenericPour,
|
|
18
19
|
b2 as GenericPourServices,
|
|
19
20
|
H as Holder,
|
|
20
|
-
|
|
21
|
+
g as HolderContainer,
|
|
21
22
|
c2 as HolderServices,
|
|
22
23
|
I as Ingredient,
|
|
23
|
-
|
|
24
|
+
h as IngredientContainer,
|
|
24
25
|
d2 as IngredientServices,
|
|
25
26
|
K2 as KosExtensionManager,
|
|
26
27
|
K as KosModelRegistry,
|
|
27
28
|
N as Nozzle,
|
|
28
29
|
e2 as NozzleServices,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
i as PourState,
|
|
31
|
+
j as Pump,
|
|
32
|
+
k as PumpContainer,
|
|
33
|
+
l as PumpIndex,
|
|
33
34
|
f2 as PumpServices,
|
|
34
35
|
T as TOPIC_BOARD_LINKED,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
m as TOPIC_BOARD_UNLINKED,
|
|
37
|
+
n as TOPIC_GENERIC_POUR_CANCEL,
|
|
38
|
+
o as TOPIC_GENERIC_POUR_PROGRESS,
|
|
39
|
+
p as TOPIC_GENERIC_POUR_STARTED,
|
|
39
40
|
g2 as getFuelGaugeValue,
|
|
40
|
-
|
|
41
|
-
r as
|
|
41
|
+
q as kosModels,
|
|
42
|
+
r as registerCuiKitModels,
|
|
43
|
+
s as registerDispenseModels
|
|
42
44
|
};
|
|
43
45
|
//# sourceMappingURL=models.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosdev-code/kos-dispense-sdk",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.975",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"./package.json": "./package.json"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@kosdev-code/kos-api-levels": "0.1.0-next.
|
|
39
|
-
"@kosdev-code/kos-ui-sdk": "0.1.0-next.
|
|
38
|
+
"@kosdev-code/kos-api-levels": "0.1.0-next.975",
|
|
39
|
+
"@kosdev-code/kos-ui-sdk": "0.1.0-next.975"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@kosdev-code/kos-ui-plugin": "0.1.0-next.
|
|
42
|
+
"@kosdev-code/kos-ui-plugin": "0.1.0-next.975"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"registry": "https://registry.npmjs.org/"
|
|
46
46
|
},
|
|
47
47
|
"kos": {
|
|
48
48
|
"build": {
|
|
49
|
-
"gitHash": "
|
|
49
|
+
"gitHash": "85fce80fc3b2a32e4a2d792999a4afeec0db2cb3"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|