@things-factory/help 10.1.297 → 10.1.298

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.
@@ -7,6 +7,12 @@ export type GuideOrigin = {
7
7
  };
8
8
  /** Answers whether the person's work is done, and records it - registered by the module that carries guides to people. */
9
9
  export type GuideFinisher = (originId: string, guide: GuideItem) => Promise<boolean>;
10
+ /** Told on `window` when a guide starts - not when it goes on after a reload (ADR-0212 amendment 2: an offer's progress). */
11
+ export declare const GUIDE_STARTED = "guide-started";
12
+ export type GuideStarted = {
13
+ guideId?: string;
14
+ origin?: GuideOrigin;
15
+ };
10
16
  /** Told on `window` when a guide ends - closed by the person, or done (ADR-0212 amendment 1: closing it is 「나중에」). */
11
17
  export declare const GUIDE_STOPPED = "guide-stopped";
12
18
  export type GuideStopped = {
@@ -11,6 +11,8 @@ import { findShown } from './deep-find.js';
11
11
  import { guideAnchor, guideAnchors, selectorOf } from './guide-anchors.js';
12
12
  import { guideApi } from './guide-api.js';
13
13
  import { anchorOnPath, moveStillDue, stepFinishedBy } from './guide-progress.js';
14
+ /** Told on `window` when a guide starts - not when it goes on after a reload (ADR-0212 amendment 2: an offer's progress). */
15
+ export const GUIDE_STARTED = 'guide-started';
14
16
  /** Told on `window` when a guide ends - closed by the person, or done (ADR-0212 amendment 1: closing it is 「나중에」). */
15
17
  export const GUIDE_STOPPED = 'guide-stopped';
16
18
  const KEY = 'guide.running';
@@ -49,6 +51,7 @@ export async function startGuide(guide, origin) {
49
51
  openedFor = -1;
50
52
  keep();
51
53
  show();
54
+ window.dispatchEvent(new CustomEvent(GUIDE_STARTED, { detail: { guideId: one.id, origin } }));
52
55
  }
53
56
  /** Goes on with the guide the session was in - at sign-in or after a reload. */
54
57
  export function resumeGuide() {
@@ -1,6 +1,6 @@
1
1
  export * from '@operato/help';
2
2
  export { registerGuideAnchors, guideAnchor, guideAnchors, selectorOf, type GuideAnchor, type GuideAnchorAction, type GuideAnchorTarget } from './guide/guide-anchors.js';
3
3
  export { brokenSteps, type GuideItem, type GuideStep } from './guide/guide-progress.js';
4
- export { registerGuideFinisher, startGuide, stopGuide, guideRunning, offerGuide, GUIDE_STOPPED, type GuideFinisher, type GuideOrigin, type GuideStopped } from './guide/guide-runner.js';
4
+ export { registerGuideFinisher, startGuide, stopGuide, guideRunning, offerGuide, GUIDE_STARTED, GUIDE_STOPPED, type GuideFinisher, type GuideOrigin, type GuideStarted, type GuideStopped } from './guide/guide-runner.js';
5
5
  export { registerGuideEditorSection, type GuideEditorSection } from './guide/guide-editor-sections.js';
6
6
  export { guideApi, type GuideRow } from './guide/guide-api.js';
@@ -1,7 +1,7 @@
1
1
  export * from '@operato/help';
2
2
  export { registerGuideAnchors, guideAnchor, guideAnchors, selectorOf } from './guide/guide-anchors.js';
3
3
  export { brokenSteps } from './guide/guide-progress.js';
4
- export { registerGuideFinisher, startGuide, stopGuide, guideRunning, offerGuide, GUIDE_STOPPED } from './guide/guide-runner.js';
4
+ export { registerGuideFinisher, startGuide, stopGuide, guideRunning, offerGuide, GUIDE_STARTED, GUIDE_STOPPED } from './guide/guide-runner.js';
5
5
  export { registerGuideEditorSection } from './guide/guide-editor-sections.js';
6
6
  export { guideApi } from './guide/guide-api.js';
7
7
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/help",
3
- "version": "10.1.297",
3
+ "version": "10.1.298",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "files": [
@@ -34,6 +34,7 @@
34
34
  },
35
35
  "scripts": {
36
36
  "build": "npm run build:server && npm run build:client",
37
+ "test": "npm run build:server && cd ../.. && NODE_ICU_DATA=node_modules/full-icu npx jest --no-coverage packages/help/",
37
38
  "copy:files": "copyfiles -e \"./client/**/*.{ts,js,json}\" -u 1 \"./client/**/*\" dist-client",
38
39
  "build:client": "npm run copy:files && npx tsc --p ./client/tsconfig.json",
39
40
  "build:server": "npx tsc --p ./server/tsconfig.json",
@@ -54,11 +55,11 @@
54
55
  "@operato/shell": "^10.29.69",
55
56
  "@operato/styles": "^10.29.1",
56
57
  "@operato/utils": "^10.0.0",
57
- "@things-factory/auth-base": "^10.1.297",
58
- "@things-factory/shell": "^10.1.297",
58
+ "@things-factory/auth-base": "^10.1.298",
59
+ "@things-factory/shell": "^10.1.298",
59
60
  "graphql-scalars": "^1.22.0",
60
61
  "graphql-tag": "^2.12.6",
61
62
  "lit": "^3.1.2"
62
63
  },
63
- "gitHead": "656ec78e5adf500b3b636eb9790cfe22f2a49ba9"
64
+ "gitHead": "5b5dce33c891a02896ef3a9cb3974abefc3f53d6"
64
65
  }