@juo/blocks 1.12.0-alpha.0 → 1.12.0-alpha.2
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/{ExtensionRoot-9XfhG8YM.js → ExtensionRoot-peABLAZZ.js} +15 -3
- package/dist/block-B6s9jL7l.js +966 -0
- package/dist/block.d.ts +50 -0
- package/dist/block.d.ts.map +1 -1
- package/dist/block.devtools.test.d.ts +2 -0
- package/dist/block.devtools.test.d.ts.map +1 -0
- package/dist/{bridge-w5KQ-czl.js → bridge-r7Yk8fjY.js} +34 -25
- package/dist/context.d.ts.map +1 -1
- package/dist/context.devtools.test.d.ts +2 -0
- package/dist/context.devtools.test.d.ts.map +1 -0
- package/dist/core.js +857 -149
- package/dist/devtools/env.d.ts +3 -0
- package/dist/devtools/env.d.ts.map +1 -0
- package/dist/devtools/hook.d.ts +35 -0
- package/dist/devtools/hook.d.ts.map +1 -0
- package/dist/devtools/index.d.ts +4 -0
- package/dist/devtools/index.d.ts.map +1 -0
- package/dist/devtools/protocol.d.ts +91 -0
- package/dist/devtools/protocol.d.ts.map +1 -0
- package/dist/devtools.js +44 -0
- package/dist/editor/bridge.d.ts +7 -0
- package/dist/editor/bridge.d.ts.map +1 -1
- package/dist/editor/components.d.ts.map +1 -1
- package/dist/editor/main.d.ts +6 -1
- package/dist/editor/main.d.ts.map +1 -1
- package/dist/editor/main.test.d.ts +2 -0
- package/dist/editor/main.test.d.ts.map +1 -0
- package/dist/editor/messages.d.ts +13 -2
- package/dist/editor/messages.d.ts.map +1 -1
- package/dist/editor/messages.test.d.ts +2 -0
- package/dist/editor/messages.test.d.ts.map +1 -0
- package/dist/editor/overlays.d.ts +14 -0
- package/dist/editor/overlays.d.ts.map +1 -0
- package/dist/editor/overlays.test.d.ts +2 -0
- package/dist/editor/overlays.test.d.ts.map +1 -0
- package/dist/editor.js +82 -47
- package/dist/{juo-workflow-CkyZRq60.js → juo-workflow-DY4rd256.js} +74 -873
- package/dist/main.d.ts +3 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/overlay-wrapper.d.ts +69 -0
- package/dist/overlay-wrapper.d.ts.map +1 -0
- package/dist/overlay-wrapper.test.d.ts +2 -0
- package/dist/overlay-wrapper.test.d.ts.map +1 -0
- package/dist/overlays/OverlayService.d.ts +34 -0
- package/dist/overlays/OverlayService.d.ts.map +1 -0
- package/dist/overlays/OverlayService.test.d.ts +2 -0
- package/dist/overlays/OverlayService.test.d.ts.map +1 -0
- package/dist/preact.js +1 -1
- package/dist/react.js +1 -1
- package/dist/registry.devtools.test.d.ts +2 -0
- package/dist/registry.devtools.test.d.ts.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/orders/adapter.d.ts +2 -1
- package/dist/services/orders/adapter.d.ts.map +1 -1
- package/dist/services/orders/types.d.ts +8 -0
- package/dist/services/orders/types.d.ts.map +1 -1
- package/dist/services/product/adapter.d.ts +23 -1
- package/dist/services/product/adapter.d.ts.map +1 -1
- package/dist/services/product/adapter.test.d.ts +2 -0
- package/dist/services/product/adapter.test.d.ts.map +1 -0
- package/dist/services/product/productService.d.ts.map +1 -1
- package/dist/services/product/types.d.ts +66 -0
- package/dist/services/product/types.d.ts.map +1 -1
- package/dist/services/schedules/adapter.d.ts +4 -1
- package/dist/services/schedules/adapter.d.ts.map +1 -1
- package/dist/services/schedules/adapter.test.d.ts +2 -0
- package/dist/services/schedules/adapter.test.d.ts.map +1 -0
- package/dist/services/schedules/index.d.ts +3 -3
- package/dist/services/schedules/index.d.ts.map +1 -1
- package/dist/services/schedules/schedulesService.d.ts +4 -3
- package/dist/services/schedules/schedulesService.d.ts.map +1 -1
- package/dist/services/schedules/schedulesService.test.d.ts +2 -0
- package/dist/services/schedules/schedulesService.test.d.ts.map +1 -0
- package/dist/services/schedules/types.d.ts +66 -12
- package/dist/services/schedules/types.d.ts.map +1 -1
- package/dist/services/settings/index.d.ts +3 -0
- package/dist/services/settings/index.d.ts.map +1 -0
- package/dist/services/settings/settingsService.d.ts +7 -0
- package/dist/services/settings/settingsService.d.ts.map +1 -0
- package/dist/services/settings/settingsService.test.d.ts +2 -0
- package/dist/services/settings/settingsService.test.d.ts.map +1 -0
- package/dist/services/settings/types.d.ts +35 -0
- package/dist/services/settings/types.d.ts.map +1 -0
- package/dist/services/shop/index.d.ts +3 -0
- package/dist/services/shop/index.d.ts.map +1 -0
- package/dist/services/shop/shopService.d.ts +12 -0
- package/dist/services/shop/shopService.d.ts.map +1 -0
- package/dist/services/shop/shopService.test.d.ts +2 -0
- package/dist/services/shop/shopService.test.d.ts.map +1 -0
- package/dist/services/shop/types.d.ts +7 -0
- package/dist/services/shop/types.d.ts.map +1 -0
- package/dist/services/subscription/adapter.d.ts +38 -1
- package/dist/services/subscription/adapter.d.ts.map +1 -1
- package/dist/services/subscription/adapter.test.d.ts +2 -0
- package/dist/services/subscription/adapter.test.d.ts.map +1 -0
- package/dist/services/subscription/subscriptionService.d.ts.map +1 -1
- package/dist/services/subscription/types.d.ts +200 -1
- package/dist/services/subscription/types.d.ts.map +1 -1
- package/dist/services/subscription/types.test.d.ts +2 -0
- package/dist/services/subscription/types.test.d.ts.map +1 -0
- package/dist/theme-state.d.ts +2 -1
- package/dist/theme-state.d.ts.map +1 -1
- package/dist/theme-state.params.test.d.ts +2 -0
- package/dist/theme-state.params.test.d.ts.map +1 -0
- package/dist/theme-state.translations.test.d.ts +2 -0
- package/dist/theme-state.translations.test.d.ts.map +1 -0
- package/dist/vue/block.d.ts.map +1 -1
- package/dist/vue.js +25 -4
- package/dist/web-components/ExtensionRoot.d.ts +1 -0
- package/dist/web-components/ExtensionRoot.d.ts.map +1 -1
- package/dist/web-components-editor.js +4 -3
- package/dist/web-components-runtime.js +3 -2
- package/package.json +5 -1
package/dist/main.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export type { Block, BlockInstance, BlockDefinition, BlockLocaleFile, BlockRenderer, BlockPreset, BlockPresets, } from './block';
|
|
2
|
-
export { attachEmptyTracking, backfillInstanceDefaults, createBlockInstance, createBlockInstanceFromJSON, createBlockInstanceFromObject, createCeRenderer, defineBlock, defineBlockRuntime, getDefinedBlocks, hasRenderedContent, isStubDefinition, withWrapper, registerBlock, SelectedBlockContext, createSelectedBlock, BlockWrapperEvent, serializeBlocks, onRegisterBlock, } from './block';
|
|
2
|
+
export { attachEmptyTracking, backfillInstanceDefaults, createBlockInstance, createBlockInstanceFromJSON, createBlockInstanceFromObject, createCeRenderer, defineBlock, defineBlockRuntime, getDefinedBlocks, hasRenderedContent, isStubDefinition, withWrapper, registerBlock, SelectedBlockContext, createSelectedBlock, BlockWrapperEvent, serializeBlocks, onRegisterBlock, getDevtoolsBlockState, setDevtoolsBlockProp, __recordDevtoolsInstance, __recordDevtoolsPropSetter, } from './block';
|
|
3
3
|
export { ThemeStateContext, createThemeState, indexOverrides, type TranslationCatalogs, type TranslationMode, type TranslationScope, type TranslationOverride, type ThemeLocaleState, type ThemeState, type ThemeSurface, type ThemeSurfaceState, type GlobalStyles, type GlobalStyleColors, type ThemeType, DEFAULT_GLOBAL_STYLES, } from './theme-state';
|
|
4
4
|
export { TranslationContext, createTranslationService, type TranslationServiceOptions, type TranslationService, } from './translation';
|
|
5
5
|
export { ContextRequestEvent, ContextProvideEvent, type ContextCallback, createContext, injectContext, provideContext, subscribeContext, type ContextType, type UnknownContext, } from './context';
|
|
6
6
|
export { StateContext, createState } from './state';
|
|
7
|
+
export { defineOverlayWrapper, type OverlayLayout } from './overlay-wrapper';
|
|
8
|
+
export { OverlayServiceContext, createOverlayService, type OverlayService, type OverlayState, type OverlayRegistryEntry, } from './overlays/OverlayService';
|
|
7
9
|
export { waitForDevBlocksUrl, loadBlockRegistry } from './registry';
|
|
8
10
|
export * from './utils';
|
|
9
11
|
export * from './services';
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,KAAK,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,eAAe,EACpB,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,oBAAoB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpE,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AAExB,OAAO,EACL,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,GACV,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { BlockDefinition } from './block';
|
|
2
|
+
/**
|
|
3
|
+
* Layout chrome for an overlay surface. The host (`OverlayHost.vue`) reads this
|
|
4
|
+
* value off the wrapper block's `props.layout` and picks `UiSidebarShell` or
|
|
5
|
+
* `UiModalShell` accordingly — same data-driven pattern `WorkflowOverlay.vue`
|
|
6
|
+
* uses for workflow flow root blocks.
|
|
7
|
+
*/
|
|
8
|
+
export type OverlayLayout = "modal" | "sidebar";
|
|
9
|
+
/**
|
|
10
|
+
* Defines a wrapper block for an overlay surface.
|
|
11
|
+
*
|
|
12
|
+
* The overlay surface is rendered by `<juo-extension-root surface="overlay"
|
|
13
|
+
* name="content">`, which reads `blocks[0].slots.content`. That means the
|
|
14
|
+
* surface root must be a *parent* block with a populated `content` slot —
|
|
15
|
+
* resolving an overlay leaf block directly leaves the surface root with
|
|
16
|
+
* empty slots and `juo-extension-root` renders nothing.
|
|
17
|
+
*
|
|
18
|
+
* `defineOverlayWrapper` produces such a parent: a no-render block whose
|
|
19
|
+
* `initialValue` puts a single instance of the `content` block into its
|
|
20
|
+
* `content` slot, mirroring the page-surface pattern (`MainPage.slots.*`).
|
|
21
|
+
*
|
|
22
|
+
* The `layout` opt is forwarded onto the wrapper's `props.layout` and is
|
|
23
|
+
* read by `OverlayHost.vue` to pick the chrome (sidebar vs modal) — same
|
|
24
|
+
* convention `WorkflowOverlay.vue` uses for flow root blocks. Defaults to
|
|
25
|
+
* `"sidebar"` to preserve behavior for callers that omit it.
|
|
26
|
+
*
|
|
27
|
+
* The `canAbort` opt is forwarded onto the wrapper's `props.canAbort` and is
|
|
28
|
+
* read by `OverlayHost.vue` to (a) drive `<UiModalContent :show-close>` so the
|
|
29
|
+
* corner X is present in modal chrome, and (b) gate `handleClose` so backdrop
|
|
30
|
+
* click, Esc, and the chrome X uniformly respect non-dismissable overlays.
|
|
31
|
+
* Defaults to `true`. Same gate `WorkflowOverlay.handleClose` uses.
|
|
32
|
+
*
|
|
33
|
+
* Usage:
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* const MyFeatureBlock = defineBlock("my_feature", { ...leaf renderer... });
|
|
37
|
+
* const MyFeatureOverlayBlock = defineOverlayWrapper({
|
|
38
|
+
* name: "my_feature_overlay",
|
|
39
|
+
* content: "my_feature",
|
|
40
|
+
* layout: "modal",
|
|
41
|
+
* });
|
|
42
|
+
* registerBlock(MyFeatureBlock);
|
|
43
|
+
* registerBlock(MyFeatureOverlayBlock);
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* Then callers open the overlay via:
|
|
47
|
+
*
|
|
48
|
+
* ```ts
|
|
49
|
+
* themeState.$.resolve("overlay", "my_feature_overlay");
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* The wrapper's `renderer` is a no-op because `<juo-extension-root>` only
|
|
53
|
+
* reads its slot — the wrapper itself is never rendered as a block.
|
|
54
|
+
*
|
|
55
|
+
* Open-time params: callers may pass JSON-safe params as the 3rd arg to
|
|
56
|
+
* `themeState.resolve("overlay", name, params)`. They are merged onto the
|
|
57
|
+
* wrapper's `content` block instance props (see `theme-state.ts` `resolve`),
|
|
58
|
+
* so the content leaf can read per-open data (e.g. the generic Confirmation
|
|
59
|
+
* block's `action`/`title`/`message`). Never pass callbacks — props cross the
|
|
60
|
+
* render boundary and must stay JSON-safe.
|
|
61
|
+
*/
|
|
62
|
+
export declare function defineOverlayWrapper(opts: {
|
|
63
|
+
name: string;
|
|
64
|
+
content: string;
|
|
65
|
+
layout?: OverlayLayout;
|
|
66
|
+
canAbort?: boolean;
|
|
67
|
+
title?: string;
|
|
68
|
+
}): BlockDefinition;
|
|
69
|
+
//# sourceMappingURL=overlay-wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay-wrapper.d.ts","sourceRoot":"","sources":["../src/overlay-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,CAAC;AAyChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,eAAe,CAelB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay-wrapper.test.d.ts","sourceRoot":"","sources":["../src/overlay-wrapper.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReadonlySignal } from '@preact/signals-core';
|
|
2
|
+
import { BlockDefinition } from '../block';
|
|
3
|
+
import { ThemeState } from '../theme-state';
|
|
4
|
+
import { OverlayLayout } from '../overlay-wrapper';
|
|
5
|
+
import { OverlayRegistryEntry } from '../editor/overlays';
|
|
6
|
+
export type { OverlayRegistryEntry };
|
|
7
|
+
export interface OverlayState {
|
|
8
|
+
name: string;
|
|
9
|
+
layout: OverlayLayout;
|
|
10
|
+
canAbort: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface OverlayService {
|
|
13
|
+
/** Editor registry: the flat, global overlay list for the editor dropdown. */
|
|
14
|
+
getEditableOverlays(): Record<string, OverlayRegistryEntry>;
|
|
15
|
+
/** Open an overlay surface (full `overlay:<id>` name), optionally parameterized. */
|
|
16
|
+
open(name: string, params?: Record<string, unknown>): void;
|
|
17
|
+
/** Close the current overlay surface. */
|
|
18
|
+
close(): void;
|
|
19
|
+
/** The overlay currently showing, or null (incl. when a workflow overlay is up). */
|
|
20
|
+
current: ReadonlySignal<OverlayState | null>;
|
|
21
|
+
}
|
|
22
|
+
export declare const OverlayServiceContext: {
|
|
23
|
+
__context__: OverlayService;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Owns non-workflow overlay state over the shared `themeState.overlay` surface.
|
|
27
|
+
* Symmetric to `WorkflowService`; never invoked on the workflow path. `current`
|
|
28
|
+
* filters to `overlay:` roots so workflow roots (which share the surface) read
|
|
29
|
+
* as null.
|
|
30
|
+
*/
|
|
31
|
+
export declare function createOverlayService(themeState: ThemeState, options?: {
|
|
32
|
+
getBlocks?: () => BlockDefinition[];
|
|
33
|
+
}): OverlayService;
|
|
34
|
+
//# sourceMappingURL=OverlayService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayService.d.ts","sourceRoot":"","sources":["../../src/overlays/OverlayService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAErE,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAIrC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IAC5D,oFAAoF;IACpF,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC3D,yCAAyC;IACzC,KAAK,IAAI,IAAI,CAAC;IACd,oFAAoF;IACpF,OAAO,EAAE,cAAc,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,qBAAqB;;CACiB,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,eAAe,EAAE,CAAA;CAAO,GACpD,cAAc,CAiChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayService.test.d.ts","sourceRoot":"","sources":["../../src/overlays/OverlayService.test.ts"],"names":[],"mappings":""}
|
package/dist/preact.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useState, useRef, useEffect, useContext as useContext$1, useMemo } from
|
|
|
6
6
|
import { g as getSignalValue, s as setSignalValue, w as wrapContext, c as createSlotChildren } from "./block-VhmfGB3N.js";
|
|
7
7
|
import { t } from "./block-VhmfGB3N.js";
|
|
8
8
|
import { createContext, h, render } from "preact";
|
|
9
|
-
import {
|
|
9
|
+
import { c as createEditorBridge } from "./bridge-r7Yk8fjY.js";
|
|
10
10
|
function toState(signal) {
|
|
11
11
|
const [value, setValue] = useState(() => getSignalValue(signal));
|
|
12
12
|
const disposeRef = useRef(null);
|
package/dist/react.js
CHANGED
|
@@ -6,7 +6,7 @@ import React, { useSyncExternalStore, createContext, useState, useContext as use
|
|
|
6
6
|
import { g as getSignalValue, s as setSignalValue, w as wrapContext, c as createSlotChildren } from "./block-VhmfGB3N.js";
|
|
7
7
|
import { t } from "./block-VhmfGB3N.js";
|
|
8
8
|
import { createRoot } from "react-dom/client";
|
|
9
|
-
import {
|
|
9
|
+
import { c as createEditorBridge } from "./bridge-r7Yk8fjY.js";
|
|
10
10
|
function toState(signal) {
|
|
11
11
|
const subscribe = (callback) => {
|
|
12
12
|
const dispose = effect(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.devtools.test.d.ts","sourceRoot":"","sources":["../src/registry.devtools.test.ts"],"names":[],"mappings":""}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OrdersAdapter } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* Returns
|
|
3
|
+
* Returns a mock `OrdersAdapter` with sample orders including customAttributes.
|
|
4
|
+
* Hosts can override the methods to seed real fixtures.
|
|
4
5
|
* Used as a starting point by storybook helpers (`createMockOrdersService`) and theme preview.
|
|
5
6
|
*/
|
|
6
7
|
export declare function createMockOrdersAdapter(): OrdersAdapter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/orders/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/orders/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,aAAa,CA6DvD"}
|
|
@@ -4,6 +4,10 @@ export interface OrderLine {
|
|
|
4
4
|
title: string;
|
|
5
5
|
quantity: number;
|
|
6
6
|
variantImage: Image | null;
|
|
7
|
+
customAttributes?: Array<{
|
|
8
|
+
key: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}>;
|
|
7
11
|
}
|
|
8
12
|
export interface Order {
|
|
9
13
|
/** Numeric Shopify order id (the trailing segment of the order GID). The block prepends `#` for display. */
|
|
@@ -17,6 +21,10 @@ export interface Order {
|
|
|
17
21
|
/** Raw Shopify fulfillment-status token (e.g. `FULFILLED`, `PARTIALLY_FULFILLED`); the block humanizes it for display. `null` = unknown. */
|
|
18
22
|
fulfillmentStatus: string | null;
|
|
19
23
|
lines: OrderLine[];
|
|
24
|
+
customAttributes?: Array<{
|
|
25
|
+
key: string;
|
|
26
|
+
value: string;
|
|
27
|
+
}>;
|
|
20
28
|
}
|
|
21
29
|
export interface GetOrdersParams {
|
|
22
30
|
limit?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,KAAK,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,KAAK,GAAG,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,KAAK;IACpB,4GAA4G;IAC5G,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oIAAoI;IACpI,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,4IAA4I;IAC5I,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,2GAA2G;AAC3G,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,CACP,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;CAC1C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiFetcher, PaginatedList } from '../../utils';
|
|
2
|
-
import { Product, WithVariants } from './types';
|
|
2
|
+
import { AvailableProduct, Box, Product, WithVariants } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Adapter interface for product operations.
|
|
5
5
|
* Implementations should handle API calls, error handling, and data transformation.
|
|
@@ -15,6 +15,28 @@ export interface ProductAdapter {
|
|
|
15
15
|
after: string;
|
|
16
16
|
};
|
|
17
17
|
}): Promise<PaginatedList<WithVariants<Product>>>;
|
|
18
|
+
getProductsByIds(params: {
|
|
19
|
+
ids: string[];
|
|
20
|
+
}): Promise<Product[]>;
|
|
21
|
+
getBoxVariants(params: {
|
|
22
|
+
ids: string[];
|
|
23
|
+
subscriptionId: string;
|
|
24
|
+
}): Promise<AvailableProduct[]>;
|
|
25
|
+
getAvailableProducts(params: {
|
|
26
|
+
subscriptionId: string;
|
|
27
|
+
lineId: string;
|
|
28
|
+
q?: string;
|
|
29
|
+
mode?: "same-product" | "other-products";
|
|
30
|
+
action: "swap" | "add";
|
|
31
|
+
pagination?: {
|
|
32
|
+
before: string;
|
|
33
|
+
} | {
|
|
34
|
+
after: string;
|
|
35
|
+
};
|
|
36
|
+
}): Promise<AvailableProduct[]>;
|
|
37
|
+
getBox(params: {
|
|
38
|
+
id: string;
|
|
39
|
+
}): Promise<Box | null>;
|
|
18
40
|
}
|
|
19
41
|
export declare function createMockProductAdapter(): ProductAdapter;
|
|
20
42
|
export declare function createApiProductAdapter(fetcher: ApiFetcher, opts?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/product/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/product/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5F;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;IAE3D,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;I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3,"file":"adapter.test.d.ts","sourceRoot":"","sources":["../../../src/services/product/adapter.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productService.d.ts","sourceRoot":"","sources":["../../../src/services/product/productService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,qBAAqB;;CACiB,CAAC;AAGpD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,cAAc,GACtB,WAAW,CAAC,OAAO,qBAAqB,CAAC,
|
|
1
|
+
{"version":3,"file":"productService.d.ts","sourceRoot":"","sources":["../../../src/services/product/productService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,qBAAqB;;CACiB,CAAC;AAGpD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,cAAc,GACtB,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAsB3C"}
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import { Image, PaginatedList, PriceWithCurrency } from '../../utils';
|
|
2
|
+
export interface AvailableProductVariant {
|
|
3
|
+
id: string;
|
|
4
|
+
availableForSale: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
currentPrice: {
|
|
7
|
+
amount: number;
|
|
8
|
+
currencyCode: string;
|
|
9
|
+
};
|
|
10
|
+
basePrice: {
|
|
11
|
+
amount: number;
|
|
12
|
+
currencyCode: string;
|
|
13
|
+
};
|
|
14
|
+
image?: {
|
|
15
|
+
url: string;
|
|
16
|
+
altText?: string;
|
|
17
|
+
};
|
|
18
|
+
recurring?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface AvailableProduct {
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
featuredImage?: {
|
|
25
|
+
url: string;
|
|
26
|
+
altText?: string;
|
|
27
|
+
};
|
|
28
|
+
hasOnlyDefaultVariant: boolean;
|
|
29
|
+
variants: AvailableProductVariant[];
|
|
30
|
+
}
|
|
2
31
|
export interface Product {
|
|
3
32
|
id: string;
|
|
4
33
|
title: string;
|
|
@@ -29,6 +58,28 @@ export interface ProductVariant {
|
|
|
29
58
|
export type WithVariants<T> = T & {
|
|
30
59
|
variants: PaginatedList<ProductVariant>;
|
|
31
60
|
};
|
|
61
|
+
export interface BoxTier {
|
|
62
|
+
value: number;
|
|
63
|
+
threshold: number;
|
|
64
|
+
}
|
|
65
|
+
export interface BoxVariantGroup {
|
|
66
|
+
id: string;
|
|
67
|
+
variants: {
|
|
68
|
+
id: string;
|
|
69
|
+
}[];
|
|
70
|
+
}
|
|
71
|
+
export interface Box {
|
|
72
|
+
id: string;
|
|
73
|
+
title: string;
|
|
74
|
+
minProductsCount: number;
|
|
75
|
+
parentProduct: string;
|
|
76
|
+
tiers: BoxTier[];
|
|
77
|
+
variants: BoxVariantGroup[];
|
|
78
|
+
freeVariants: BoxVariantGroup[];
|
|
79
|
+
thresholdType: "LINES_COUNT" | "CART_TOTAL";
|
|
80
|
+
type: "FIXED_AMOUNT" | "PERCENTAGE" | "PRICE";
|
|
81
|
+
restrictQuantityToTiers: boolean;
|
|
82
|
+
}
|
|
32
83
|
export type ProductService<T extends WithVariants<Product> = WithVariants<Product>> = {
|
|
33
84
|
getById(id: string): Promise<T | null>;
|
|
34
85
|
getByVariantId(variantId: string): Promise<T | null>;
|
|
@@ -40,5 +91,20 @@ export type ProductService<T extends WithVariants<Product> = WithVariants<Produc
|
|
|
40
91
|
after: string;
|
|
41
92
|
};
|
|
42
93
|
}): Promise<PaginatedList<T>>;
|
|
94
|
+
getProductsByIds(ids: string[]): Promise<Product[]>;
|
|
95
|
+
getBoxVariants(ids: string[], subscriptionId: string): Promise<AvailableProduct[]>;
|
|
96
|
+
getAvailableProducts(params: {
|
|
97
|
+
subscriptionId: string;
|
|
98
|
+
lineId: string;
|
|
99
|
+
q?: string;
|
|
100
|
+
mode?: "same-product" | "other-products";
|
|
101
|
+
action: "swap" | "add";
|
|
102
|
+
pagination?: {
|
|
103
|
+
before: string;
|
|
104
|
+
} | {
|
|
105
|
+
after: string;
|
|
106
|
+
};
|
|
107
|
+
}): Promise<AvailableProduct[]>;
|
|
108
|
+
getBox(id: string): Promise<Box | null>;
|
|
43
109
|
};
|
|
44
110
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/product/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE3E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,KAAK,GAAG,IAAI,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CACvD;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,C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K,EAAE,MAAM,CAAA;SAAE,CAAC;KACrD,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IACpD,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACnF,oBAAoB,CAAC,MAAM,EAAE;QAC3B,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,CAAC,CAAC,EAAE,MAAM,CAAC;QACX,IAAI,CAAC,EAAE,cAAc,GAAG,gBAAgB,CAAC;QACzC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;QACvB,UAAU,CAAC,EAAE;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,GAAG;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACrD,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;CACzC,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ApiFetcher, Result } from '../../utils';
|
|
2
2
|
import { ScheduleAdjustment, ScheduleOrder } from './types';
|
|
3
3
|
export interface SchedulesAdapter {
|
|
4
|
-
getUpcomingOrders(
|
|
4
|
+
getUpcomingOrders(params: {
|
|
5
|
+
count: number;
|
|
6
|
+
subscriptionId?: string;
|
|
7
|
+
}): Promise<Result<ScheduleOrder[]>>;
|
|
5
8
|
getAdjustments(): Promise<Result<ScheduleAdjustment[]>>;
|
|
6
9
|
skipOrder(params: {
|
|
7
10
|
subscriptionId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/adapter.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AAgB,0BAA0B,IAAI,gBAAgB,CAiL7D;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,UAAU,GAAG,gBAAgB,CAoG/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.test.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/adapter.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type { SchedulesAdapter } from './adapter';
|
|
1
|
+
export type { SchedulesAdapter, } from './adapter';
|
|
3
2
|
export { createMockSchedulesAdapter, createApiSchedulesAdapter, } from './adapter';
|
|
4
|
-
export {
|
|
3
|
+
export { createSchedulesService, SchedulesServiceContext, } from './schedulesService';
|
|
4
|
+
export * from './types';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Signal } from '@preact/signals-core';
|
|
2
|
+
import { ContextType } from '../../context';
|
|
2
3
|
import { SchedulesAdapter } from './adapter';
|
|
3
4
|
import { SchedulesService } from './types';
|
|
4
5
|
export declare const SchedulesServiceContext: {
|
|
5
6
|
__context__: SchedulesService;
|
|
6
7
|
};
|
|
7
|
-
export declare function createSchedulesService(adapter: SchedulesAdapter, opts
|
|
8
|
-
hasPendingBilling
|
|
9
|
-
}):
|
|
8
|
+
export declare function createSchedulesService(adapter: SchedulesAdapter, opts?: {
|
|
9
|
+
hasPendingBilling?: Signal<boolean>;
|
|
10
|
+
}): ContextType<typeof SchedulesServiceContext>;
|
|
10
11
|
//# sourceMappingURL=schedulesService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedulesService.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/schedulesService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schedulesService.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/schedulesService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE/D,eAAO,MAAM,uBAAuB;;CACmB,CAAC;AAExD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,gBAAgB,EACzB,IAAI,CAAC,EAAE;IAAE,iBAAiB,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;CAAE,GAC7C,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAmF7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedulesService.test.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/schedulesService.test.ts"],"names":[],"mappings":""}
|
|
@@ -2,18 +2,46 @@ import { Signal } from '@preact/signals-core';
|
|
|
2
2
|
import { Result } from '../../utils';
|
|
3
3
|
export interface ScheduleOrderItem {
|
|
4
4
|
id: string;
|
|
5
|
-
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string | null;
|
|
7
|
+
imageUrl?: string;
|
|
6
8
|
variantId: string;
|
|
7
9
|
quantity: number;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
price: number;
|
|
11
|
+
totalPrice: number;
|
|
12
|
+
variantImage?: {
|
|
13
|
+
url: string;
|
|
14
|
+
altText?: string;
|
|
15
|
+
} | null;
|
|
16
|
+
variantAvailableForSale?: boolean;
|
|
17
|
+
subscriptionId: string;
|
|
18
|
+
subscriptionLineId: string;
|
|
19
|
+
productId?: string;
|
|
20
|
+
parentProductId?: string | null;
|
|
21
|
+
parentLineId?: string | null;
|
|
22
|
+
isVirtual?: boolean;
|
|
23
|
+
isUpsell?: boolean;
|
|
24
|
+
isOneTime?: boolean;
|
|
25
|
+
customAttributes?: {
|
|
26
|
+
name: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[];
|
|
29
|
+
sellingPlanId?: string | null;
|
|
30
|
+
sellingPlanName?: string | null;
|
|
31
|
+
nextBillingDate?: string | null;
|
|
32
|
+
billingPolicy?: {
|
|
33
|
+
interval: "DAY" | "MONTH" | "WEEK" | "YEAR";
|
|
34
|
+
intervalCount: number;
|
|
35
|
+
} | null;
|
|
36
|
+
subscriptionStatus?: string | null;
|
|
37
|
+
subscriptionIsEditable?: boolean | null;
|
|
38
|
+
requiredBillingCyclesLeft?: number | null;
|
|
10
39
|
}
|
|
11
|
-
export interface
|
|
40
|
+
export interface ScheduleOrderDiscount {
|
|
12
41
|
id: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
status: "scheduled" | "processing" | "delivered" | "skipped";
|
|
42
|
+
title?: string;
|
|
43
|
+
type: "percentage" | "fixed_amount";
|
|
44
|
+
value: number;
|
|
17
45
|
}
|
|
18
46
|
export interface ScheduleAdjustment {
|
|
19
47
|
id: string;
|
|
@@ -22,14 +50,32 @@ export interface ScheduleAdjustment {
|
|
|
22
50
|
cycle?: number;
|
|
23
51
|
newDate?: string;
|
|
24
52
|
}
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
53
|
+
export interface ScheduleOrder {
|
|
54
|
+
id: string;
|
|
55
|
+
customerId: string;
|
|
56
|
+
subscriptionId: string;
|
|
57
|
+
date: string;
|
|
58
|
+
skipped: boolean;
|
|
59
|
+
currencyCode: string;
|
|
60
|
+
subtotal: number;
|
|
61
|
+
deliveryPrice: number;
|
|
62
|
+
cycleIndex: number;
|
|
63
|
+
deliveryDate: string;
|
|
64
|
+
status: "scheduled" | "processing" | "delivered" | "skipped";
|
|
65
|
+
items: ScheduleOrderItem[];
|
|
66
|
+
discounts: ScheduleOrderDiscount[];
|
|
67
|
+
}
|
|
68
|
+
export interface SchedulesService {
|
|
69
|
+
/** Reactive signal — shared upcoming orders for multi-block access. `null` until first loaded. */
|
|
70
|
+
current: Signal<ScheduleOrder[] | null>;
|
|
71
|
+
currentLoading: Signal<boolean>;
|
|
28
72
|
/** Sourced from SubscriptionService — guards billing-sensitive actions */
|
|
29
73
|
hasPendingBilling: Signal<boolean>;
|
|
74
|
+
/** Read-only projection. */
|
|
30
75
|
getUpcomingOrder(): Promise<Result<ScheduleOrder | null>>;
|
|
31
76
|
getUpcomingOrders(count: number): Promise<Result<ScheduleOrder[]>>;
|
|
32
77
|
getAdjustments(): Promise<Result<ScheduleAdjustment[]>>;
|
|
78
|
+
/** Adjustment. */
|
|
33
79
|
skipOrder(params: {
|
|
34
80
|
subscriptionId: string;
|
|
35
81
|
cycle?: number;
|
|
@@ -43,5 +89,13 @@ export type SchedulesService = {
|
|
|
43
89
|
removeAdjustment(params: {
|
|
44
90
|
adjustmentId: string;
|
|
45
91
|
}): Promise<Result>;
|
|
46
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Refresh `current` for the given subscription.
|
|
94
|
+
*
|
|
95
|
+
* Useful after a mutation (e.g. skip) when the subscription `id` is unchanged
|
|
96
|
+
* but the upcoming-order state has shifted — the host's id-based watcher
|
|
97
|
+
* does not fire in that case.
|
|
98
|
+
*/
|
|
99
|
+
reloadCurrent(subscriptionId: string): Promise<void>;
|
|
100
|
+
}
|
|
47
101
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/schedules/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACxD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EA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
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/settings/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ContextType } from '../../context';
|
|
2
|
+
import { Settings, SettingsService } from './types';
|
|
3
|
+
export declare const SettingsServiceContext: {
|
|
4
|
+
__context__: SettingsService;
|
|
5
|
+
};
|
|
6
|
+
export declare function createSettingsService(initial?: Settings): ContextType<typeof SettingsServiceContext>;
|
|
7
|
+
//# sourceMappingURL=settingsService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsService.d.ts","sourceRoot":"","sources":["../../../src/services/settings/settingsService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,sBAAsB;;CACkB,CAAC;AAEtD,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,QAAa,GACrB,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAQ5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsService.test.d.ts","sourceRoot":"","sources":["../../../src/services/settings/settingsService.test.ts"],"names":[],"mappings":""}
|