@pitcher/js-api 1.30.0 → 1.31.0

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.
Files changed (113) hide show
  1. package/js-api.esm.js +80 -17
  2. package/js-api.esm.js.map +1 -1
  3. package/js-api.umd.min.js +15 -15
  4. package/js-api.umd.min.js.map +1 -1
  5. package/lib/apps/browser/components/ContextMenu/TranslateFileButton.test.d.ts +1 -0
  6. package/lib/apps/browser/stores/api.filesFoldersDeleter.test.d.ts +1 -0
  7. package/lib/apps/canvas-builder/components/container/PopupApps/PopupAppModal.spec.d.ts +1 -0
  8. package/lib/apps/canvas-builder/components/container/PresentationTools/PresentationToolsButtons.spec.d.ts +1 -0
  9. package/lib/apps/canvas-builder/components/ui/BottomSheetModal/BottomSheetModal.integration.spec.d.ts +1 -0
  10. package/lib/apps/canvas-builder/components/ui/BottomSheetModal/BottomSheetModal.spec.d.ts +1 -0
  11. package/lib/apps/canvas-builder/components/ui/DynamicContent/section-component-bindings.util.d.ts +32 -0
  12. package/lib/apps/canvas-builder/components/ui/DynamicContent/useDynamicContent.d.ts +4 -0
  13. package/lib/apps/canvas-builder/components/ui/Link/Link.util.d.ts +8 -1
  14. package/lib/apps/canvas-builder/components/ui/Link/Link.util.test.d.ts +1 -0
  15. package/lib/apps/canvas-builder/components/ui/SectionList/SectionItemModal.spec.d.ts +1 -0
  16. package/lib/apps/canvas-builder/composables/useCanvas.d.ts +83 -9
  17. package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +4 -2
  18. package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +2 -2
  19. package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +2 -2
  20. package/lib/apps/canvas-builder/composables/useNavigatorDrawer.d.ts +25 -0
  21. package/lib/apps/canvas-builder/composables/useNavigatorDrawer.spec.d.ts +1 -0
  22. package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +41 -4
  23. package/lib/apps/canvas-builder/composables/usePopupApps.spec.d.ts +1 -0
  24. package/lib/apps/canvas-builder/composables/usePresentationTools.d.ts +112 -0
  25. package/lib/apps/canvas-builder/composables/usePresentationTools.spec.d.ts +1 -0
  26. package/lib/apps/canvas-builder/types/canvas.d.ts +13 -0
  27. package/lib/apps/canvas-builder/util/canvas.util.d.ts +12 -0
  28. package/lib/apps/canvas-builder/util/completionWizard.util.d.ts +251 -11
  29. package/lib/apps/canvas-builder/util/iframe.util.d.ts +24 -2
  30. package/lib/apps/canvas-builder/util/iframe.util.test.d.ts +1 -0
  31. package/lib/apps/canvas-selector/stores/app.d.ts +14 -0
  32. package/lib/apps/collection-player/components/AppHeader.spec.d.ts +1 -0
  33. package/lib/apps/collection-player/composables/speaker-notes.use.d.ts +14 -0
  34. package/lib/apps/collection-player/composables/speaker-notes.use.spec.d.ts +1 -0
  35. package/lib/apps/collection-player/stores/app.store.d.ts +5 -1
  36. package/lib/apps/collection-player/stores/showNotesToggle.spec.d.ts +1 -0
  37. package/lib/apps/content-selector/appTypes.d.ts +16 -0
  38. package/lib/apps/content-selector/components/Content/AllContent/List/expandFileGuard.spec.d.ts +1 -0
  39. package/lib/apps/notes/NotesApp.accountNotes.spec.d.ts +1 -0
  40. package/lib/apps/notes/NotesApp.speakerNotes.spec.d.ts +1 -0
  41. package/lib/apps/notes/composables/useAccountNotes.d.ts +14 -0
  42. package/lib/apps/notes/composables/useAccountNotes.spec.d.ts +1 -0
  43. package/lib/apps/notes/composables/useAccountOnlyNotesGate.d.ts +21 -0
  44. package/lib/apps/notes/composables/useAccountOnlyNotesGate.spec.d.ts +1 -0
  45. package/lib/apps/notes/composables/useActiveSlideNotes.d.ts +42 -0
  46. package/lib/apps/notes/composables/useActiveSlideNotes.spec.d.ts +1 -0
  47. package/lib/components/CFileAccessManagement/collaborationApi.d.ts +2 -0
  48. package/lib/components/CFilePanel/Details.spec.d.ts +1 -0
  49. package/lib/components/CFilePanel/KeyMessages.spec.d.ts +1 -0
  50. package/lib/components/CFilePanel/Summary.spec.d.ts +1 -0
  51. package/lib/components/CFileViewer/pdf/CFileViewer.pdf.util.d.ts +52 -0
  52. package/lib/components/CGlobalLoader/CGlobalLoaderMark.spec.d.ts +1 -0
  53. package/lib/components/CGlobalLoader/globalLoader.paths.d.ts +2 -0
  54. package/lib/components/CGlobalSearch/globalSearchTarget.util.d.ts +31 -0
  55. package/lib/components/CGlobalSearch/globalSearchTarget.util.test.d.ts +1 -0
  56. package/lib/components/CRichTextEditor/extensions/paragraphExtended.d.ts +7 -1
  57. package/lib/components/CRichTextEditor/extensions/paragraphExtended.test.d.ts +1 -0
  58. package/lib/components/canvases/CanvasesManagementBulk.use.d.ts +12 -2
  59. package/lib/components/masterCanvases/CMasterCanvasesManagement.use.d.ts +86 -0
  60. package/lib/components/masterCanvases/CMasterCanvasesManagement.use.spec.d.ts +1 -0
  61. package/lib/components/masterCanvases/CMasterCanvasesPendingShareCell.spec.d.ts +1 -0
  62. package/lib/components/masterCanvases/CMasterCanvasesSharedWithCell.use.d.ts +39 -0
  63. package/lib/components/masterCanvases/CMasterCanvasesSharedWithCell.use.spec.d.ts +1 -0
  64. package/lib/components/masterCanvases/createFromMaster.use.d.ts +255 -0
  65. package/lib/components/masterCanvases/createFromMaster.use.spec.d.ts +1 -0
  66. package/lib/components/masterCanvases/masterCanvasDocuments.use.d.ts +56 -0
  67. package/lib/components/masterCanvases/masterCanvasDocuments.use.spec.d.ts +1 -0
  68. package/lib/components/masterCanvases/masterCanvasShares.use.d.ts +103 -0
  69. package/lib/components/masterCanvases/masterCanvasShares.use.spec.d.ts +1 -0
  70. package/lib/components/masterCanvases/masterFromCanvas.use.d.ts +122 -0
  71. package/lib/components/masterCanvases/masterFromCanvas.use.spec.d.ts +1 -0
  72. package/lib/components/masterCanvases/masterFromTemplate.use.d.ts +50 -0
  73. package/lib/components/masterCanvases/masterFromTemplate.use.spec.d.ts +1 -0
  74. package/lib/components/savedCanvases/CSavedCanvasesManagement.use.d.ts +203 -0
  75. package/lib/components/savedCanvases/savedCanvasDocuments.use.d.ts +111 -0
  76. package/lib/components/savedCanvases/savedCanvasDocuments.use.spec.d.ts +1 -0
  77. package/lib/components/savedCanvases/smartFolders/SmartFolders.use.d.ts +4 -0
  78. package/lib/constants/cdp.const.d.ts +1 -0
  79. package/lib/constants/translationLanguages.const.d.ts +86 -8
  80. package/lib/constants/translationLanguages.const.spec.d.ts +1 -0
  81. package/lib/main.lib.d.ts +5 -0
  82. package/lib/sdk/api/HighLevelApi.d.ts +2 -0
  83. package/lib/sdk/api/modules/appsDb.d.ts +4 -4
  84. package/lib/sdk/api/modules/canvas.d.ts +12 -0
  85. package/lib/sdk/api/modules/ui/types.ui.d.ts +18 -0
  86. package/lib/sdk/interfaces.d.ts +31 -1
  87. package/lib/sdk/main.d.ts +38 -0
  88. package/lib/sdk/payload.types.d.ts +45 -0
  89. package/lib/sdk/platform.d.ts +27 -0
  90. package/lib/sdk/platform.spec.d.ts +1 -0
  91. package/lib/sdk/singleton-scope.spec.d.ts +1 -0
  92. package/lib/sdk/utils/httpFetch.spec.d.ts +1 -0
  93. package/lib/theme/canvasUiUnoPreset.test.d.ts +1 -0
  94. package/lib/types/app.d.ts +55 -1
  95. package/lib/types/canvases.d.ts +15 -0
  96. package/lib/types/launchDarkly.types.d.ts +8 -1
  97. package/lib/types/organizationSettings.types.d.ts +29 -0
  98. package/lib/util/aiSummary.d.ts +30 -0
  99. package/lib/util/aiSummary.spec.d.ts +1 -0
  100. package/lib/util/network.d.ts +35 -0
  101. package/package.json +1 -1
  102. package/types/openapi/models/Canvas.d.ts +1 -0
  103. package/types/openapi/models/CanvasCreate.d.ts +1 -0
  104. package/types/openapi/models/CanvasCreateRequest.d.ts +1 -0
  105. package/types/openapi/models/CanvasRecommendedFile.d.ts +1 -1
  106. package/types/openapi/models/CanvasRetrieve.d.ts +1 -0
  107. package/types/openapi/models/CanvasUpdate.d.ts +1 -0
  108. package/types/openapi/models/CanvasUpdateRequest.d.ts +1 -0
  109. package/types/openapi/models/DeletedCanvas.d.ts +1 -0
  110. package/types/openapi/models/File.d.ts +1 -1
  111. package/types/openapi/models/PatchedCanvasUpdateRequest.d.ts +1 -0
  112. package/types/openapi/models/SharedLink.d.ts +6 -0
  113. package/types/openapi/models/SharedLinkCreateRequest.d.ts +5 -0
@@ -0,0 +1,112 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ import { CanvasRetrieve } from '../../../../types/openapi';
3
+ /**
4
+ * Presentation tools rail (PIT-8031): the instance's embeddable-only section canvases —
5
+ * the SAME roster the pitchdeck wizard offers (next-core `resolve-embeddable-only-slides`)
6
+ * — openable as a modal OVER the running deck, independent of deck content.
7
+ *
8
+ * This is the decoupled successor to the "hidden section list" workaround: tool
9
+ * availability no longer requires the tool to be a slide in the deck
10
+ * (`useInstalledEmbeddables` filters by deck content; this roster deliberately does not).
11
+ * "Add tool as agenda point" in the wizard stays the way to put a tool INTO the deck/ToC.
12
+ *
13
+ * Opt-in via the `canvas.enable_presentation_tools` org/instance setting (default off),
14
+ * Impact mode only. Both platform surfaces degrade silently: no `coreRestApiAxios` (host
15
+ * without core API — incl. iOS `file://` apps, which are CORS-jailed for direct core
16
+ * fetches) or no `fetchCanvas` → the button never appears.
17
+ */
18
+ export interface PresentationTool {
19
+ /** The tool's section canvas id. */
20
+ id: string;
21
+ name: string;
22
+ /**
23
+ * The installed app's `app.json` icon, RAW as stored (`fas fa-building-columns`,
24
+ * `far fa-browser`, `fa-kit fa-…`, or a bare name) — normalise with `getAppIconProps()`
25
+ * before handing it to `CIcon`. `null` when the roster could not resolve the app
26
+ * (uninstalled, or an older endpoint that predates PIT-8274) → render the generic glyph.
27
+ * The tool canvas's `thumbnail_url` is deliberately NOT carried: it is a screenshot of
28
+ * the slide, and the overlay shows app icons like every other app surface (PIT-8274).
29
+ */
30
+ icon: string | null;
31
+ }
32
+ type CanvasSection = CanvasRetrieve['sections'][number];
33
+ /**
34
+ * Section ids THIS composable injected into `activeCanvas.sections`. Ids already present
35
+ * as real deck slides are never added. The one consumer is `closeTool`, which unregisters
36
+ * them so nothing outlives the modal. (The shortcuts derivation no longer needs the set:
37
+ * `useInstalledEmbeddables` now filters the sections lookup through the deck's OWN
38
+ * SectionList/ContentList refs — PIT-8031 QA Q1 — which excludes injected entries by
39
+ * construction.) Replaced, not mutated, so computeds re-run.
40
+ */
41
+ export declare const injectedToolSectionIds: Ref<{
42
+ forEach: (callbackfn: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: any) => void;
43
+ has: (value: string) => boolean;
44
+ readonly size: number;
45
+ entries: () => SetIterator<[string, string]>;
46
+ keys: () => SetIterator<string>;
47
+ values: () => SetIterator<string>;
48
+ union: <U>(other: ReadonlySetLike<U>) => Set<string | U>;
49
+ intersection: <U>(other: ReadonlySetLike<U>) => Set<string & U>;
50
+ difference: <U>(other: ReadonlySetLike<U>) => Set<string>;
51
+ symmetricDifference: <U>(other: ReadonlySetLike<U>) => Set<string | U>;
52
+ isSubsetOf: (other: ReadonlySetLike<unknown>) => boolean;
53
+ isSupersetOf: (other: ReadonlySetLike<unknown>) => boolean;
54
+ isDisjointFrom: (other: ReadonlySetLike<unknown>) => boolean;
55
+ [Symbol.iterator]: () => SetIterator<string>;
56
+ }, ReadonlySet<string> | {
57
+ forEach: (callbackfn: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: any) => void;
58
+ has: (value: string) => boolean;
59
+ readonly size: number;
60
+ entries: () => SetIterator<[string, string]>;
61
+ keys: () => SetIterator<string>;
62
+ values: () => SetIterator<string>;
63
+ union: <U>(other: ReadonlySetLike<U>) => Set<string | U>;
64
+ intersection: <U>(other: ReadonlySetLike<U>) => Set<string & U>;
65
+ difference: <U>(other: ReadonlySetLike<U>) => Set<string>;
66
+ symmetricDifference: <U>(other: ReadonlySetLike<U>) => Set<string | U>;
67
+ isSubsetOf: (other: ReadonlySetLike<unknown>) => boolean;
68
+ isSupersetOf: (other: ReadonlySetLike<unknown>) => boolean;
69
+ isDisjointFrom: (other: ReadonlySetLike<unknown>) => boolean;
70
+ [Symbol.iterator]: () => SetIterator<string>;
71
+ }>;
72
+ /**
73
+ * Reset ALL module-level state — for test isolation (spec `beforeEach`). Without this,
74
+ * `toolSectionCache`/`fetchedForInstance`/`selectedTool` survive between cases, so a test
75
+ * reusing a tool id would silently hit the cache and skip the fetch path it means to cover.
76
+ */
77
+ export declare function resetPresentationToolsState(): void;
78
+ /**
79
+ * A tool canvas is a full `CanvasRetrieve`; the deck's section machinery wants the
80
+ * `CanvasSection` shape. The content tree sits at `sections[0].content.data` when the tool
81
+ * canvas nests one, else `content.data` (same normalization as DynamicContent's
82
+ * `getSectionComponents`).
83
+ */
84
+ export declare function toolCanvasToSection(canvas: CanvasRetrieve): CanvasSection;
85
+ export declare function usePresentationTools(): {
86
+ tools: ComputedRef<{
87
+ id: string;
88
+ name: string;
89
+ icon: string | null;
90
+ }[]>;
91
+ hasSingleTool: ComputedRef<boolean>;
92
+ shouldShowTools: ComputedRef<boolean>;
93
+ isFrameless: ComputedRef<boolean>;
94
+ isFetchingToolSection: ComputedRef<boolean>;
95
+ selectedTool: ComputedRef<{
96
+ id: string;
97
+ name: string;
98
+ icon: string | null;
99
+ } | null>;
100
+ selectedToolSection: ComputedRef<{
101
+ readonly id: string;
102
+ name: string;
103
+ content: Record<string, any>;
104
+ theme?: (Record<string, any> | null) | undefined;
105
+ metadata?: Record<string, any> | undefined;
106
+ is_draft: boolean;
107
+ } | null>;
108
+ ensureTools: () => Promise<void>;
109
+ openTool: (tool: PresentationTool) => Promise<void>;
110
+ closeTool: () => void;
111
+ };
112
+ export {};
@@ -771,6 +771,19 @@ type AdminImpactCommonBuilderProps = {
771
771
  isAnyTypeOfAdmin: boolean;
772
772
  canvasMetadata: CanvasMetadataRetrieve | null;
773
773
  hideEdit?: boolean;
774
+ /**
775
+ * PIT-8361 QA — the host cannot yet tell whether this canvas is frozen, so its `hideEdit` is a
776
+ * fail-safe placeholder rather than an answer.
777
+ *
778
+ * Only `isWizardOwnedEditSurface` reads it, and only to avoid concluding "not a wizard surface"
779
+ * from a `hideEdit` that means "don't know yet" — which dropped the rep into the RAW canvas
780
+ * editor on a wizard-driven canvas for the length of one API call. The WRITE guard
781
+ * (`shouldAutoOpenCompletionWizard`) deliberately still refuses while `hideEdit` is true.
782
+ *
783
+ * Falsy default is the safe one — a host that never sets it behaves exactly as before, which
784
+ * also keeps it clear of Vue's absent-boolean-is-`false` casting.
785
+ */
786
+ isFreezePending?: boolean;
774
787
  /**
775
788
  * Which asset backend the Assets tab's files come from, stamped onto a Multimedia node on selection
776
789
  * (`prepareMultimediaNodeData`). Defaults to `'pitcher_asset'`, so every existing sales/DSR/admin
@@ -57,6 +57,18 @@ type FoundComponent = {
57
57
  } | null;
58
58
  export declare function findEmbeddableInSectionsContent(canvasPages: ComponentNode[][], sectionComponentNodesBySectionId: UnwrapRef<SectionComponentNodesBySectionId>, appName: string): FoundComponent;
59
59
  export declare function findAllEmbeddableTypesInCanvasContent(componentNodesById: UnwrapRef<ComponentNodesById>): Set<string>;
60
+ /**
61
+ * Section ids the deck's OWN content references (SectionList/ContentList `data.sections`).
62
+ *
63
+ * `activeCanvas.sections` is a strict SUPERSET of these: Django's `prefetch_sections`
64
+ * deliberately merges the TEMPLATE's sections in (so wizard steps and pickers can offer
65
+ * them), and the presentation-tools modal registers lookup-only entries (PIT-8031).
66
+ * Anything that means "what is actually presentable in this deck" — the embeddable
67
+ * shortcut icons chiefly — must filter the lookup through these ids, or it renders
68
+ * affordances for slides that do not exist (PIT-8031 QA Q1: dead tool shortcuts on any
69
+ * deck whose template carries tool groups the rep never selected).
70
+ */
71
+ export declare function findReferencedSectionIdsInCanvasContent(componentNodesById: UnwrapRef<ComponentNodesById>): Set<string>;
60
72
  export declare function findAllEmbeddableTypesInSectionsContent(sectionComponentNodesBySectionId: UnwrapRef<SectionComponentNodesBySectionId>): Set<string>;
61
73
  export declare function findEmbeddableInCanvasContent(componentNodesById: UnwrapRef<ComponentNodesById>, appName: string): FoundComponent;
62
74
  export declare function scrollToComponentById(id: ComponentNode['id'] | null | undefined, sectionId?: string, sectionIndex?: number, instant?: boolean, delay?: number): void;
@@ -1,4 +1,5 @@
1
1
  import { CanvasActions } from '../../../types/canvasActions';
2
+ import { ComponentNode } from '../types/canvas';
2
3
  import { AppFile } from '../../../types/app';
3
4
  /** Installable-app name of the React pitchdeck wizard (PIT-7510). */
4
5
  export declare const REACT_COMPLETION_WIZARD_APP_NAME = "pitchdeck-wizard-ng";
@@ -7,22 +8,32 @@ export interface ResolveCompletionWizardVariantParams {
7
8
  isReactWizardSettingEnabled: boolean;
8
9
  /** The React wizard app resolved to a loadable URL (installed or local dev override). */
9
10
  isReactWizardAvailable: boolean;
10
- /** The deck's admin config uses features the React wizard cannot honor yet (see below). */
11
- hasUnsupportedConfig?: boolean;
11
+ /**
12
+ * The host has not delivered the installed-apps roster yet (PIT-7992): `undefined` apps,
13
+ * as opposed to a loaded-but-empty list. While pending, "no React app" cannot be told
14
+ * apart from "not loaded yet", so the decision is deferred rather than falling back.
15
+ */
16
+ isRosterPending?: boolean;
12
17
  }
13
18
  /**
14
19
  * PIT-7510: which completion-wizard implementation to render where the wizard opens today.
15
20
  * The setting is the only switch (no LaunchDarkly flag); an enabled setting without an
16
- * installed app or a deck whose admin config the React wizard cannot honor falls back
17
- * to the Vue wizard so no flow is ever lost.
18
- */
19
- export declare function resolveCompletionWizardVariant(p: ResolveCompletionWizardVariantParams): 'vue' | 'react';
20
- /**
21
- * Admin group_selector config features the React wizard does not implement yet:
22
- * repetition rules (slide repeats + salesforce-populator data binding) and visibility
23
- * rules. Decks using them keep the vanilla wizard regardless of the setting.
21
+ * installed app falls back to the Vue wizard so no flow is ever lost.
22
+ *
23
+ * An enabled instance NEVER sees the Vue wizard for config reasons (PIT-8021 QA Q3,
24
+ * decided by Bastien in comment 515871): templates carrying group features the React
25
+ * wizard does not implement — visibility rules, repetition rules — still open the React
26
+ * wizard, which simply does not apply them (the groups behave as ordinary groups). The
27
+ * earlier per-deck fallback honored those rules but meant an admin ticking one condition
28
+ * silently swapped every rep back to the legacy flow, which reads as a regression.
29
+ *
30
+ * `'pending'` (PIT-7992): the React setting is on but the host's app roster hasn't loaded,
31
+ * so availability is unknowable. Deciding 'vue' here is what flashed the LEGACY wizard on
32
+ * templates with a non-app step ('wizard' strategy passes `getCompletionWizardStepNodes`
33
+ * without the roster, so the overlay condition goes true before the roster lands) — the
34
+ * caller must render NEITHER wizard until the roster resolves the real variant.
24
35
  */
25
- export declare function hasUnsupportedGroupSelectorConfig(context: Record<string, unknown> | null | undefined): boolean;
36
+ export declare function resolveCompletionWizardVariant(p: ResolveCompletionWizardVariantParams): 'vue' | 'react' | 'pending';
26
37
  /**
27
38
  * Resolve the React wizard app's iframe URL: local dev override first (same mechanism as
28
39
  * every installable app), else the installed app's `content_url`.
@@ -53,6 +64,191 @@ interface WizardCancelCanvasContext {
53
64
  };
54
65
  }
55
66
  export declare function shouldCompleteWizardOnCancel(canvasContext: WizardCancelCanvasContext | null | undefined): boolean;
67
+ export interface IsWizardOwnedEditSurfaceParams {
68
+ /** `canvas.enable_edit_opens_completion_wizard` — the opt-in. */
69
+ isSettingEnabled: boolean;
70
+ isImpact: boolean;
71
+ isCanvas: boolean;
72
+ isCanvasPreviewMode: boolean;
73
+ /** The host's "this canvas is not editable" signal (frozen / RBAC / lock). */
74
+ hideEdit: boolean;
75
+ /**
76
+ * The host cannot yet tell whether the canvas is frozen, so `hideEdit` is a placeholder rather
77
+ * than an answer. See the doc comment for why this exists.
78
+ */
79
+ isFreezePending?: boolean;
80
+ /** The deck carries wizard steps, or wizard state from a previous session. */
81
+ hasWizardState: boolean;
82
+ }
83
+ /**
84
+ * PIT-7992 — whether the WIZARD owns this canvas's edit surface, i.e. a rep must never land in the
85
+ * raw canvas editor here because the wizard IS the deck's edit surface.
86
+ *
87
+ * PIT-8361 QA — `isFreezePending` is why this is a function rather than an inline `&&` chain.
88
+ * slotty computes `hideEdit` as `props.hideEdit || isCanvasFrozen`, and `isCanvasFrozen` is SEEDED
89
+ * TRUE for any org with the freeze flag, then corrected by an API round-trip. In that window
90
+ * `hideEdit: true` means "not yet known to be editable" — a fail-safe about WRITING, not a
91
+ * statement that this is not a wizard surface. Reading it as the latter released the surface, so
92
+ * nothing demoted the builder out of edit mode and the rep was dropped into the raw editor on a
93
+ * wizard-driven canvas for the length of one network call.
94
+ *
95
+ * Holding the surface while pending is safe either way it resolves: not frozen → the wizard opens
96
+ * as intended; genuinely frozen → the canvas has already been demoted out of edit mode, which is
97
+ * where a frozen canvas belongs. Note this only ever excuses `hideEdit` — it can never resurrect a
98
+ * surface the other gates rejected.
99
+ *
100
+ * The WRITE guard is deliberately NOT relaxed the same way: `shouldAutoOpenCompletionWizard` keeps
101
+ * its hard `hideEdit` bail, because `retriggerWizard()` persists `completed: false` and must not
102
+ * touch a canvas that may turn out to be frozen. It re-runs once the status resolves.
103
+ */
104
+ export declare function isWizardOwnedEditSurface(p: IsWizardOwnedEditSurfaceParams): boolean;
105
+ /**
106
+ * PIT-8361 — whether COMPLETING the wizard should EXIT the builder instead of reloading it.
107
+ *
108
+ * The complete path ends in `reloadAfterCompletionWizard()`, and for a DECK that is right: the
109
+ * wizard just rewrote the deck's `content`, the rep stays in the builder to present it, and one
110
+ * page load is the cheapest way to guarantee every component re-renders from the saved artifact.
111
+ *
112
+ * For a MASTER it is wrong, and visibly so. A master's builder is a place the rep is LEAVING —
113
+ * `savedCanvasCompletionWizard` already returns them to "My Master Pitchdecks", which refetches on
114
+ * arrival (`shouldRefetchOnMasterBuilderReturn`), so the freshly authored master is on screen
115
+ * without a reload. Reloading instead reboots the whole slotty iframe on the master builder URL,
116
+ * so the rep gets a flash of the master's own view state (the `enable_edit_opens_completion_wizard`
117
+ * demote watcher in `App.vue` rewrites edit -> present on the way back up), then the app's boot
118
+ * spinner, then a rebuilt sidebar — the reported defect, and never the tab they asked for.
119
+ *
120
+ * **Orthogonal to `resolveWizardFlow`**, which deliberately STOPPED special-casing masters
121
+ * (PIT-7488 QA Q9). That decision is about how a wizard session OPENS — create vs restore — and
122
+ * forcing masters to `edit` there restored them from an artifact that did not exist yet. This one
123
+ * is about how a session ENDS. The two read as contradictory only if you miss that distinction.
124
+ *
125
+ * Callers must also skip `markCompletionWizardAutoOpened()` on the exit branch: that marker exists
126
+ * purely to suppress one auto-open on the post-reload mount, so with no reload it survives and
127
+ * swallows the rep's next deliberate Edit (PIT-7510 Q12).
128
+ */
129
+ export declare function shouldExitBuilderOnWizardComplete(p: {
130
+ isMaster?: boolean | null;
131
+ }): boolean;
132
+ /** The wizard state the flow decision reads — `context.pitcher.completion_wizard`. */
133
+ export interface WizardFlowState {
134
+ /** Set by `retriggerWizard()` — the wizard was reopened over an already-completed deck. */
135
+ edited?: boolean;
136
+ completed?: boolean;
137
+ /** A Save & Exit draft: restores like an edit session but cancels like a draft. */
138
+ react_saved?: boolean;
139
+ /**
140
+ * PIT-8399 — this canvas's content was COPIED from a curated source (a master), so its own
141
+ * persisted artifact is the authoritative agenda even though it carries no wizard progress.
142
+ *
143
+ * Written by `buildContextFromMaster` (master -> deck) and next-core's `buildSharedCopyContext`
144
+ * (master -> shared copy), which both reset the source's progress so the wizard runs. It is
145
+ * deliberately not one of the three flags above: see `resolveWizardAgendaSource`.
146
+ */
147
+ from_master?: boolean;
148
+ }
149
+ export interface ResolveWizardFlowParams {
150
+ wizardState?: WizardFlowState | null;
151
+ }
152
+ /**
153
+ * Which flow the React wizard is opened in: `'edit'` restores from the canvas's own artifact,
154
+ * `'create'` seeds a fresh one.
155
+ *
156
+ * Masters are NOT special-cased here, deliberately (PIT-7488 QA Q9). They were briefly forced to
157
+ * `'edit'` to dodge the app's account-demanding entry dialog, and it worked — but restoring a
158
+ * master that had never been through the wizard meant an empty cover, an agenda rebuilt by
159
+ * attribution rather than seeded from the admin groups, and an "Update Pitchdeck" button, since
160
+ * `editorLabelKeys` reads this very value. Suppressing that dialog is now `skipEntry`'s job, which
161
+ * leaves this answering the only question it should: has this canvas been through the wizard
162
+ * before? A fresh master says no and gets `'create'`; once saved it says yes and `'edit'` restores
163
+ * something that actually exists.
164
+ */
165
+ export declare function resolveWizardFlow(p: ResolveWizardFlowParams): 'create' | 'edit';
166
+ /**
167
+ * PIT-8399 — where the CREATE flow's agenda comes from: the admin group config, or this deck's own
168
+ * persisted artifact.
169
+ *
170
+ * A second declared fact rather than a lookup on `resolveWizardFlow`, for the reason `target_kind`
171
+ * is one (PIT-8361): the flow says whether the deck has been through the wizard, this says whether
172
+ * its content was authored somewhere else first. Both are true of a deck built from a master —
173
+ * never wizarded ITSELF, but carrying a complete artifact copied from the master — and that pair is
174
+ * exactly what one boolean could not express. Overloading `completion_wizard`'s presence to answer
175
+ * both is the reported defect: stripping it made the deck look never-curated, so the wizard reseeded
176
+ * its agenda from the admin groups and every custom agenda point the master carried vanished.
177
+ *
178
+ * `'artifact'` therefore requires `from_master` AND no progress of the deck's own. Progress means
179
+ * `resolveWizardFlow` already answers `'edit'`, whose full restore supersedes this — the deck has
180
+ * been saved since it was copied, so its artifact is its own rather than the master's. Stating the
181
+ * precedence here keeps the app's gate a plain equality check instead of a second copy of this rule.
182
+ */
183
+ export declare function resolveWizardAgendaSource(p: ResolveWizardFlowParams): 'config' | 'artifact';
184
+ /**
185
+ * The `completed: true` write that undoes `retriggerWizard()`'s `completed: false`.
186
+ *
187
+ * Both wizard hosts persist it on the edit-cancel and the torn-down-mid-session paths, and both
188
+ * must write context AND metadata (the deck's In-progress/Completed badge reads `metadata`, the
189
+ * wizard's own guards read `context` — leaving one behind desyncs the badge from the flow).
190
+ */
191
+ export declare function buildCompletedStateRestore(canvasContext: Record<string, any> | null | undefined, canvasMetadata: Record<string, any> | null | undefined): {
192
+ context: Record<string, any>;
193
+ metadata: Record<string, any>;
194
+ };
195
+ /**
196
+ * The SectionList/ContentList nodes that become completion-wizard steps — the single source of
197
+ * truth behind `useCanvasCompletionWizard`'s `sectionListNodes` (and so `isCompletionWizardEnabled`).
198
+ *
199
+ * Extracted as a pure function because hosts need the same answer BEFORE the canvas-builder mounts:
200
+ * slotty decides whether to auto-enter fullscreen while it still only has the raw canvas record
201
+ * (PIT-7720 Q1). Duplicating the predicate there would silently drift from the wizard's own gate.
202
+ *
203
+ * A step whose `app` strategy points at an app that is not installed (and has no local dev override)
204
+ * does NOT count — the wizard skips it, so a deck made only of those never opens a wizard at all.
205
+ */
206
+ export declare function getCompletionWizardStepNodes(canvasContent: ComponentNode[] | null | undefined, sectionSelectorApps: AppFile[]): ComponentNode[];
207
+ export interface HasPendingCompletionWizardParams {
208
+ /** The deck's component tree (`canvas.content`). */
209
+ canvasContent: ComponentNode[] | null | undefined;
210
+ /** Installed section-selector apps — the same list the builder provides as `sectionSelectorApps`. */
211
+ sectionSelectorApps: AppFile[];
212
+ /** The deck's `canvas.context`; `pitcher.completion_wizard.completed` decides "still pending". */
213
+ canvasContext: {
214
+ pitcher?: {
215
+ completion_wizard?: {
216
+ completed?: boolean;
217
+ };
218
+ };
219
+ } | null | undefined;
220
+ }
221
+ /**
222
+ * Whether opening this deck lands the rep in the completion wizard — the host-side mirror of
223
+ * `isCompletionWizardShowing` (`wizard has steps && !completed`), answerable from the raw canvas
224
+ * record alone.
225
+ *
226
+ * PIT-7720 Q1: used to suppress the PIT-7029 auto-fullscreen, which otherwise wraps the WIZARD in
227
+ * native browser fullscreen on open — the rep is still building the deck, not presenting it.
228
+ */
229
+ export declare function hasPendingCompletionWizard(p: HasPendingCompletionWizardParams): boolean;
230
+ export declare function isCompletionWizardReloadInProgress(): boolean;
231
+ /**
232
+ * Drop the slide-anchor query params (`section` + `component`, written by the present
233
+ * view's `router.replace`) from a URL, wherever the host's router keeps its query:
234
+ * slotty is hash-history (the params sit INSIDE `#/...?...`), other hosts are plain
235
+ * history (real `?...`). Both places are cleaned; everything else is preserved.
236
+ */
237
+ export declare function stripWizardSlideAnchor(href: string): string;
238
+ /**
239
+ * One-shot reload-survival marker paired with the URL strip below, consumed by the HOST's
240
+ * builder boot (slotty `CanvasBuilder.vue`): ignore any slide anchor on the route for the
241
+ * one boot that follows a post-wizard reload. The strip alone is not enough — slotty runs
242
+ * inside the Impact shell, and the shell's location ROOT survives the iframe reload and
243
+ * RESTORES the pre-wizard route (query included) into slotty's router before the builder
244
+ * mounts, resurrecting the anchor the strip just removed (PIT-8021 QA Q5 round 2: the
245
+ * regenerated deck opened mid-deck again with the strip deployed). sessionStorage so it
246
+ * survives exactly the reload and nothing else; consumed on first read so a later manual
247
+ * navigation with a real anchor works normally.
248
+ */
249
+ export declare function consumeWizardReloadAnchorSkip(): boolean;
250
+ /** `reload` is injectable only because jsdom's `window.location` is unforgeable in tests. */
251
+ export declare function reloadAfterCompletionWizard(reload?: () => void): void;
56
252
  export declare function wasCompletionWizardAutoOpened(canvasId: string): boolean;
57
253
  export declare function markCompletionWizardAutoOpened(canvasId: string | undefined): void;
58
254
  /**
@@ -104,4 +300,48 @@ export interface ShouldAutoOpenCompletionWizardParams {
104
300
  * only covers the completed case, which is what `canRetriggerWizard` encodes.
105
301
  */
106
302
  export declare function shouldAutoOpenCompletionWizard(p: ShouldAutoOpenCompletionWizardParams): boolean;
303
+ /**
304
+ * PIT-8361 QA Q2 — remember the mode each canvas was ENTERED in, because `startInMode` does not
305
+ * stay still long enough for the auto-open to read it.
306
+ *
307
+ * The defect it fixes is a race between two `{ immediate: true }` watchers in `App.vue` and slotty's
308
+ * URL rewrite, which is why QA saw the wizard open on some master Edits and not others:
309
+ *
310
+ * 1. The auto-open watcher runs first and bails while `completionWizardVariant` is `'pending'` —
311
+ * i.e. until the HOST's installed-app roster lands (a network round-trip on a cold boot; warm
312
+ * and synchronous once slotty has it, which is the "sometimes it works" half).
313
+ * 2. The demote watcher then fires on the same mount and sets `isEditMode = false` (correctly — the
314
+ * wizard owns this surface). Slotty turns that into a new `startInMode` **through the URL**:
315
+ * `edit-mode-changed` → `onEditModeChanged` → `CanvasBuilderModalView`'s local `isEditMode` →
316
+ * its watcher → `debouncedUpdateUrl` (**250 ms**) → `router.replace` to the twin *present*
317
+ * route → `CanvasBuilder.getStartMode()`, which on a routed open has `props.initialEditMode ===
318
+ * undefined` and falls through to `isCanvasBuilderPresentRoute(route.name)` → `Present`.
319
+ * (`:initialEditMode` is bound from the PROP, never from that local ref — there is no prop echo.)
320
+ * 3. The roster lands, the auto-open watcher re-runs — and now rejects its own canvas on
321
+ * `startInMode !== Edit`. The rep is left on the raw canvas surface with no wizard, on a deck
322
+ * the platform has just decided the wizard owns.
323
+ *
324
+ * So the race window is that **250 ms debounce**: a roster resolving inside it auto-opens with or
325
+ * without this helper, one resolving after it used to be rejected. Anyone shortening, removing or
326
+ * relocating `updateUrl`'s debounce is changing the wizard's behaviour. Both master child routes
327
+ * render the same `CanvasBuilderModalView` under an unkeyed `<RouterView>`, so step 2's `replace`
328
+ * patches the component in place rather than remounting it — which is what lets a latch survive
329
+ * the rewrite at all.
330
+ *
331
+ * Latching restores what `startInMode` is documented to mean ("the mode the builder was opened
332
+ * in"), which is a fact about an ENTRY and can only be observed before the host starts rewriting
333
+ * the URL under it. Keyed by canvas id rather than latched once per mount so that
334
+ * `useCanvasOverlay`, which swaps canvases in place without remounting, still gets a fresh reading
335
+ * per canvas — the same reason `autoOpenInFlightCanvasIds` is a set of ids.
336
+ *
337
+ * Pass-through (no latching) while the canvas id is unknown: there is nothing to key on yet, and
338
+ * the auto-open needs an id anyway.
339
+ *
340
+ * An UNKNOWN mode is not latched either. `startInMode` is optional on `CanvasBuilderProps`, so a
341
+ * host can hand over a canvas id before it has an entry mode — and latching `undefined` there would
342
+ * pin it forever, so the Edit that arrived a tick later could never open the wizard. That is the
343
+ * same defect this helper exists to fix, one layer up. Latch the first mode that is actually
344
+ * KNOWN, not the first observation.
345
+ */
346
+ export declare function createEntryModeLatch(): (canvasId: string | undefined, startInMode: CanvasActions | undefined) => CanvasActions | undefined;
107
347
  export {};
@@ -1,13 +1,35 @@
1
1
  /**
2
2
  * Utility functions for iframe full screen mode positioning
3
3
  */
4
+ /**
5
+ * Marker class on `SectionItemModal`'s scrollable body. A section canvas rendered in that
6
+ * modal (presentation tools, DynamicContent's section preview, SectionList/ContentList item
7
+ * modals) is NOT inside the deck's content box, so a full-screen embeddable must size itself
8
+ * against the modal body instead — see `positionFullScreenIframe`.
9
+ */
10
+ export declare const SECTION_MODAL_CONTENT_SELECTOR = ".section-item-modal__content";
4
11
  export interface FullScreenPositionOptions {
5
12
  container: HTMLElement;
6
13
  canvasContentSelector?: string;
14
+ /** Ancestor that, when present, owns the geometry instead of the deck content box. */
15
+ modalContentSelector?: string;
7
16
  }
8
17
  /**
9
- * Positions an iframe container in full screen mode
10
- * Calculates height from current position to bottom of parent window
18
+ * Positions an iframe container in full screen mode.
19
+ *
20
+ * Two hosts, two coordinate systems (PIT-8147):
21
+ *
22
+ * - **Deck** — the component renders inside the running presentation, so the container is
23
+ * pinned (`fixed`) to the deck content box and stretched to the bottom of the window.
24
+ * - **Section modal** — the component renders in `SectionItemModal`, an overlay ON TOP of the
25
+ * deck. Copying the deck's box there lands the app under the modal's dead space (offset
26
+ * right/down) and runs it past the modal body's bottom edge, where `overflow-auto` clips it.
27
+ * `fixed` is wrong twice over: while the modal panel slides in or out it carries a `transform`,
28
+ * which makes it the containing block for fixed descendants, so "viewport" coordinates flip
29
+ * meaning between mid-slide and at rest. The modal body IS the
30
+ * full-screen surface, so stay in flow and take exactly its height — no coordinates to get
31
+ * wrong, and the modal's own max-width/centering keeps applying. `relative` is kept so the
32
+ * container still anchors its own absolutely positioned children (the loading overlay).
11
33
  */
12
34
  export declare function positionFullScreenIframe(options: FullScreenPositionOptions): void;
13
35
  /**
@@ -0,0 +1 @@
1
+ export {};
@@ -12,6 +12,7 @@ export default function useApp(): {
12
12
  is_template?: boolean | undefined;
13
13
  is_section?: boolean | undefined;
14
14
  is_block?: boolean | undefined;
15
+ is_master?: boolean | undefined;
15
16
  is_editable?: boolean | undefined;
16
17
  is_default?: boolean | undefined;
17
18
  metadata?: any;
@@ -60,6 +61,7 @@ export default function useApp(): {
60
61
  is_template?: boolean | undefined;
61
62
  is_section?: boolean | undefined;
62
63
  is_block?: boolean | undefined;
64
+ is_master?: boolean | undefined;
63
65
  is_editable?: boolean | undefined;
64
66
  is_default?: boolean | undefined;
65
67
  metadata?: any;
@@ -108,6 +110,7 @@ export default function useApp(): {
108
110
  is_template?: boolean | undefined;
109
111
  is_section?: boolean | undefined;
110
112
  is_block?: boolean | undefined;
113
+ is_master?: boolean | undefined;
111
114
  is_editable?: boolean | undefined;
112
115
  is_default?: boolean | undefined;
113
116
  metadata?: any;
@@ -156,6 +159,7 @@ export default function useApp(): {
156
159
  is_template?: boolean | undefined;
157
160
  is_section?: boolean | undefined;
158
161
  is_block?: boolean | undefined;
162
+ is_master?: boolean | undefined;
159
163
  is_editable?: boolean | undefined;
160
164
  is_default?: boolean | undefined;
161
165
  metadata?: any;
@@ -210,6 +214,7 @@ export default function useApp(): {
210
214
  is_template?: boolean | undefined;
211
215
  is_section?: boolean | undefined;
212
216
  is_block?: boolean | undefined;
217
+ is_master?: boolean | undefined;
213
218
  is_editable?: boolean | undefined;
214
219
  is_default?: boolean | undefined;
215
220
  metadata?: any;
@@ -258,6 +263,7 @@ export default function useApp(): {
258
263
  is_template?: boolean | undefined;
259
264
  is_section?: boolean | undefined;
260
265
  is_block?: boolean | undefined;
266
+ is_master?: boolean | undefined;
261
267
  is_editable?: boolean | undefined;
262
268
  is_default?: boolean | undefined;
263
269
  metadata?: any;
@@ -306,6 +312,7 @@ export default function useApp(): {
306
312
  is_template?: boolean | undefined;
307
313
  is_section?: boolean | undefined;
308
314
  is_block?: boolean | undefined;
315
+ is_master?: boolean | undefined;
309
316
  is_editable?: boolean | undefined;
310
317
  is_default?: boolean | undefined;
311
318
  metadata?: any;
@@ -354,6 +361,7 @@ export default function useApp(): {
354
361
  is_template?: boolean | undefined;
355
362
  is_section?: boolean | undefined;
356
363
  is_block?: boolean | undefined;
364
+ is_master?: boolean | undefined;
357
365
  is_editable?: boolean | undefined;
358
366
  is_default?: boolean | undefined;
359
367
  metadata?: any;
@@ -403,6 +411,7 @@ export default function useApp(): {
403
411
  is_template?: boolean | undefined;
404
412
  is_section?: boolean | undefined;
405
413
  is_block?: boolean | undefined;
414
+ is_master?: boolean | undefined;
406
415
  is_editable?: boolean | undefined;
407
416
  is_default?: boolean | undefined;
408
417
  metadata?: any;
@@ -450,6 +459,7 @@ export default function useApp(): {
450
459
  is_template?: boolean | undefined;
451
460
  is_section?: boolean | undefined;
452
461
  is_block?: boolean | undefined;
462
+ is_master?: boolean | undefined;
453
463
  is_editable?: boolean | undefined;
454
464
  is_default?: boolean | undefined;
455
465
  metadata?: any;
@@ -498,6 +508,7 @@ export default function useApp(): {
498
508
  is_template?: boolean | undefined;
499
509
  is_section?: boolean | undefined;
500
510
  is_block?: boolean | undefined;
511
+ is_master?: boolean | undefined;
501
512
  is_editable?: boolean | undefined;
502
513
  is_default?: boolean | undefined;
503
514
  metadata?: any;
@@ -546,6 +557,7 @@ export default function useApp(): {
546
557
  is_template?: boolean | undefined;
547
558
  is_section?: boolean | undefined;
548
559
  is_block?: boolean | undefined;
560
+ is_master?: boolean | undefined;
549
561
  is_editable?: boolean | undefined;
550
562
  is_default?: boolean | undefined;
551
563
  metadata?: any;
@@ -594,6 +606,7 @@ export default function useApp(): {
594
606
  is_template?: boolean | undefined;
595
607
  is_section?: boolean | undefined;
596
608
  is_block?: boolean | undefined;
609
+ is_master?: boolean | undefined;
597
610
  is_editable?: boolean | undefined;
598
611
  is_default?: boolean | undefined;
599
612
  metadata?: any;
@@ -642,6 +655,7 @@ export default function useApp(): {
642
655
  is_template?: boolean | undefined;
643
656
  is_section?: boolean | undefined;
644
657
  is_block?: boolean | undefined;
658
+ is_master?: boolean | undefined;
645
659
  is_editable?: boolean | undefined;
646
660
  is_default?: boolean | undefined;
647
661
  metadata?: any;
@@ -0,0 +1,14 @@
1
+ import { Ref } from 'vue';
2
+ import { CollectionSlide } from '../types/collection-player.type';
3
+ /**
4
+ * Publish the on-screen slide's pptx speaker notes so the Notes App can render them
5
+ * (PIT-8016). Only `type: 'slide'` entries map onto a pptx page — whole-file entries
6
+ * (video, image, web) have no slide index, so they clear the key instead.
7
+ */
8
+ declare const _default: ({ isSwiperVisible, activeSlide, enabled, }: {
9
+ isSwiperVisible: Ref<boolean>;
10
+ activeSlide: Ref<CollectionSlide | null>;
11
+ /** Host opt-in — see `publishSpeakerNotes` on the player's props. */
12
+ enabled: () => boolean;
13
+ }) => void;
14
+ export default _default;
@@ -45,6 +45,7 @@ type StorePayload = {
45
45
  emit: EmitFn<Emit>;
46
46
  options?: Options;
47
47
  nodeId?: string;
48
+ showNotesToggle?: ComputedRef<boolean>;
48
49
  };
49
50
  type StoreData = {
50
51
  isLoading: Ref<boolean>;
@@ -81,11 +82,14 @@ type StoreData = {
81
82
  cacheNavigation: ReturnType<typeof useCacheNavigation>;
82
83
  nodeId?: string;
83
84
  handleKeyAction: ActionCallback;
85
+ /** Show the Notes App toggle in the header — rep surfaces only. Reactive: the host derives
86
+ * it from a LaunchDarkly flag, which can flip while the player is open. */
87
+ showNotesToggle: ComputedRef<boolean>;
84
88
  annotationLayer: ReturnType<typeof useAnnotationLayer>;
85
89
  updateSlideInSwiper: (index: number) => void;
86
90
  ensureActiveSlideInView: () => void;
87
91
  rootElement: Ref<HTMLElement | null>;
88
92
  };
89
- export declare function provideAppStore({ data, isEditMode, rootElement, api, emit, options, isLoading, nodeId, inModal, }: StorePayload): StoreData;
93
+ export declare function provideAppStore({ data, isEditMode, rootElement, api, emit, options, isLoading, nodeId, inModal, showNotesToggle, }: StorePayload): StoreData;
90
94
  export declare function useAppStore(): StoreData;
91
95
  export {};