@owlmeans/web-flow 0.1.18-rc.13 → 0.1.18-rc.14
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/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/web-flow/SKILL.md +13 -8
- package/build/helper.d.ts.map +1 -1
- package/build/helper.js +2 -2
- package/build/helper.js.map +1 -1
- package/build/service.d.ts.map +1 -1
- package/build/service.js +3 -4
- package/build/service.js.map +1 -1
- package/package.json +9 -9
- package/src/helper.ts +2 -2
- package/src/service.ts +3 -4
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/web-flow",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.14",
|
|
5
|
+
"generatedAt": "2026-09-01T16:28:56.997Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: web-flow
|
|
3
|
-
description: How to use @owlmeans/web-flow — web-specific flow execution and
|
|
3
|
+
description: How to use @owlmeans/web-flow — web-specific flow execution (makeFlowService, appendFlowService, useFlow) and URL-carried flow state built on @owlmeans/client-flow. Auto-invoked when importing web flow primitives.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
@@ -8,23 +8,28 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/web-flow
|
|
9
9
|
|
|
10
10
|
**Layer:** Web (React)
|
|
11
|
-
**Install:** `"@owlmeans/web-flow": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/web-flow": "^0.1.18-rc.14"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
## Key Exports
|
|
14
14
|
|
|
15
15
|
| Export | Description |
|
|
16
16
|
|--------|-------------|
|
|
17
|
-
| `
|
|
18
|
-
|
|
|
19
|
-
|
|
|
17
|
+
| `makeFlowService(alias?)` | Web flow service factory — the browser `proceed`/`goHome` on top of the basic one |
|
|
18
|
+
| `appendFlowService(ctx, alias?)` | Register it plus the client resource the flow state lives in |
|
|
19
|
+
| `useFlow(target?)` | The `FlowClient` for the screen currently rendering |
|
|
20
|
+
| Constants | `DEFAULT_ALIAS` (`flow`), `QUERY_PARAM` (`flow`), `SERVICE_PARAM` (`service`) |
|
|
20
21
|
|
|
21
22
|
## Usage
|
|
22
23
|
|
|
23
24
|
```typescript
|
|
24
|
-
import {
|
|
25
|
-
context
|
|
25
|
+
import { appendFlowService } from '@owlmeans/web-flow'
|
|
26
|
+
appendFlowService(context)
|
|
26
27
|
```
|
|
27
28
|
|
|
29
|
+
`proceed` addresses the step's entrypoint with `url(request, { absolute: true })` and carries the
|
|
30
|
+
serialized flow in the `flow` query parameter, so a step that lives in another service is a plain
|
|
31
|
+
browser redirect and the receiving app rehydrates the flow from the URL.
|
|
32
|
+
|
|
28
33
|
## Depends On
|
|
29
34
|
|
|
30
|
-
- `@owlmeans/flow`, `@owlmeans/client-flow`, `@owlmeans/
|
|
35
|
+
- `@owlmeans/flow`, `@owlmeans/client-flow`, `@owlmeans/client-resource`, `@owlmeans/client-entrypoint`
|
package/build/helper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,uBAAuB,CAAA;AAIpE,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,uBAAuB,CAAA;AAIpE,eAAO,MAAM,OAAO,GAAI,SAAQ,MAAM,GAAG,IAAW,KAAG,UAAU,GAAG,IAmBnE,CAAA"}
|
package/build/helper.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useContext,
|
|
1
|
+
import { useContext, useEntrypoint, useNavigate, useValue } from '@owlmeans/client';
|
|
2
2
|
import { createFlowClient } from '@owlmeans/client-flow';
|
|
3
3
|
import { DEFAULT_ALIAS as FLOW_ALIAS } from '@owlmeans/client-flow';
|
|
4
4
|
import { QUERY_PARAM, SERVICE_PARAM } from './consts.js';
|
|
@@ -6,7 +6,7 @@ export const useFlow = (target = null) => {
|
|
|
6
6
|
const context = useContext();
|
|
7
7
|
const nav = useNavigate();
|
|
8
8
|
const [query] = context.router().useSearchParams();
|
|
9
|
-
const { params } =
|
|
9
|
+
const { params } = useEntrypoint();
|
|
10
10
|
const client = useValue(async () => {
|
|
11
11
|
if (QUERY_PARAM in params && params[QUERY_PARAM] != null) {
|
|
12
12
|
const service = context.service(FLOW_ALIAS);
|
package/build/helper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAExD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,SAAwB,IAAI,EAAqB,EAAE;IACzE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAC5B,MAAM,GAAG,GAAG,WAAW,EAAE,CAAA;IACzB,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,eAAe,EAAE,CAAA;IAClD,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,IAAI,EAAE;QACjC,IAAI,WAAW,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,EAAE,CAAC;YACzD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAc,UAAU,CAAC,CAAA;YACxD,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;YAErB,OAAO,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAW,CAAC,CAAC,CAAA;QAChG,CAAC;QACD,OAAO,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,MAAM,CAAC,CAAA;IAChF,CAAC,EAAE;QACD,WAAW,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,CAAW;QACtD,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,MAAM;KAC3D,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
package/build/service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAQ7C,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAQ7C,eAAO,MAAM,eAAe,GAAI,QAAO,MAAsB,KAAG,WA2E/D,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,CAAC,SAAS,YAAY,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAClD,KAAK,CAAC,EAAE,QAAO,MAAsB,KAAG,CAQzC,CAAA"}
|
package/build/service.js
CHANGED
|
@@ -21,11 +21,10 @@ export const makeFlowService = (alias = DEFAULT_ALIAS) => {
|
|
|
21
21
|
const cfg = service.config();
|
|
22
22
|
const param = cfg.queryParam ?? QUERY_PARAM;
|
|
23
23
|
const module = ctx.entrypoint(step.module);
|
|
24
|
-
const
|
|
24
|
+
const url = await module.url({
|
|
25
25
|
...req,
|
|
26
|
-
params: { ...req?.params, [param]: flow.serialize() }
|
|
27
|
-
|
|
28
|
-
});
|
|
26
|
+
params: { ...req?.params, [param]: flow.serialize() }
|
|
27
|
+
}, { absolute: true });
|
|
29
28
|
// const params = new URLSearchParams(req?.query ?? {})
|
|
30
29
|
// params.set(param, flow.serialize())
|
|
31
30
|
const redirectUrl = new URL(url);
|
package/build/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,aAAa,EA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AAC,CAAC,CAAA;QACjE,CAAC;IACH,CAAC,CAAA;IAED,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAE/B,GAAM,EAAE,QAAgB,aAAa,EAAK,EAAE;IAC5C,MAAM,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IAEtC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;IAE5B,oBAAoB,CAAO,GAAG,EAAE,UAAU,CAAC,CAAA;IAE3C,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/web-flow",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@owlmeans/client": "^0.1.18-rc.
|
|
25
|
-
"@owlmeans/client-context": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/client-flow": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/client-entrypoint": "^0.1.18-rc.
|
|
28
|
-
"@owlmeans/client-resource": "^0.1.18-rc.
|
|
29
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
30
|
-
"@owlmeans/error": "^0.1.18-rc.
|
|
31
|
-
"@owlmeans/flow": "^0.1.18-rc.
|
|
24
|
+
"@owlmeans/client": "^0.1.18-rc.13",
|
|
25
|
+
"@owlmeans/client-context": "^0.1.18-rc.11",
|
|
26
|
+
"@owlmeans/client-flow": "^0.1.18-rc.14",
|
|
27
|
+
"@owlmeans/client-entrypoint": "^0.1.18-rc.11",
|
|
28
|
+
"@owlmeans/client-resource": "^0.1.18-rc.11",
|
|
29
|
+
"@owlmeans/context": "^0.1.18-rc.7",
|
|
30
|
+
"@owlmeans/error": "^0.1.18-rc.7",
|
|
31
|
+
"@owlmeans/flow": "^0.1.18-rc.12"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "*"
|
package/src/helper.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useContext,
|
|
1
|
+
import { useContext, useEntrypoint, useNavigate, useValue } from '@owlmeans/client'
|
|
2
2
|
import { createFlowClient } from '@owlmeans/client-flow'
|
|
3
3
|
import type { FlowClient, FlowService } from '@owlmeans/client-flow'
|
|
4
4
|
import { DEFAULT_ALIAS as FLOW_ALIAS } from '@owlmeans/client-flow'
|
|
@@ -8,7 +8,7 @@ export const useFlow = (target: string | null = null): FlowClient | null => {
|
|
|
8
8
|
const context = useContext()
|
|
9
9
|
const nav = useNavigate()
|
|
10
10
|
const [query] = context.router().useSearchParams()
|
|
11
|
-
const { params } =
|
|
11
|
+
const { params } = useEntrypoint()
|
|
12
12
|
const client = useValue(async () => {
|
|
13
13
|
if (QUERY_PARAM in params && params[QUERY_PARAM] != null) {
|
|
14
14
|
const service = context.service<FlowService>(FLOW_ALIAS)
|
package/src/service.ts
CHANGED
|
@@ -28,11 +28,10 @@ export const makeFlowService = (alias: string = DEFAULT_ALIAS): FlowService => {
|
|
|
28
28
|
const param = cfg.queryParam ?? QUERY_PARAM
|
|
29
29
|
|
|
30
30
|
const module = ctx.entrypoint<ClientEntrypoint<string>>(step.module)
|
|
31
|
-
const
|
|
31
|
+
const url = await module.url({
|
|
32
32
|
...req,
|
|
33
|
-
params: { ...req?.params, [param]: flow.serialize() }
|
|
34
|
-
|
|
35
|
-
})
|
|
33
|
+
params: { ...req?.params, [param]: flow.serialize() }
|
|
34
|
+
}, { absolute: true })
|
|
36
35
|
|
|
37
36
|
// const params = new URLSearchParams(req?.query ?? {})
|
|
38
37
|
// params.set(param, flow.serialize())
|