@plitzi/plitzi-builder 0.38.23 → 0.39.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 (129) hide show
  1. package/CHANGELOG.md +194 -1
  2. package/dist/index.html +2 -2
  3. package/dist/modules/App/AppContainer/containers/ContainerServer.d.ts +1 -1
  4. package/dist/modules/App/AppContainer/containers/ContainerSettings.d.ts +4 -1
  5. package/dist/modules/App/AppContainer/containers/ContainerTests.d.ts +6 -0
  6. package/dist/modules/App/AppContainer/containers/SharingSettings.d.ts +8 -0
  7. package/dist/modules/App/components/AppHeader/PlanBadge.d.ts +2 -0
  8. package/dist/modules/App/components/AppHeader/RoleBadge.d.ts +2 -0
  9. package/dist/modules/App/components/AppHeader/ViewButtons.d.ts +7 -0
  10. package/dist/modules/App/components/EmptyState/EmptyState.d.ts +3 -1
  11. package/dist/modules/App/components/Notice/Notice.d.ts +23 -0
  12. package/dist/modules/App/components/Notice/index.d.ts +3 -0
  13. package/dist/modules/App/components/PanelSearch/PanelSearch.d.ts +9 -0
  14. package/dist/modules/App/components/PanelSearch/index.d.ts +3 -0
  15. package/dist/modules/App/components/PanelToolbar/PanelToolbar.d.ts +22 -0
  16. package/dist/modules/App/components/PanelToolbar/index.d.ts +3 -0
  17. package/dist/modules/App/components/SitemapDiagram/types.d.ts +3 -0
  18. package/dist/modules/App/components/SnapshotPruneNotice/SnapshotPruneNotice.d.ts +7 -0
  19. package/dist/modules/App/components/SnapshotPruneNotice/helpers.d.ts +5 -0
  20. package/dist/modules/App/components/SnapshotPruneNotice/index.d.ts +2 -0
  21. package/dist/modules/App/components/ViewTabs/ViewTabs.d.ts +19 -0
  22. package/dist/modules/App/components/ViewTabs/index.d.ts +3 -0
  23. package/dist/modules/App/helpers/utils.d.ts +4 -2
  24. package/dist/modules/Builder/components/BuilderArea/BuilderArea.d.ts +3 -1
  25. package/dist/modules/Builder/components/BuilderElementTools/ElementContentSettings.d.ts +22 -0
  26. package/dist/modules/Builder/components/BuilderElementTools/ElementMotion/helpers.d.ts +3 -1
  27. package/dist/modules/Builder/components/BuilderElementTools/contentAttributesFor.d.ts +7 -0
  28. package/dist/modules/Export/ExportSpace.d.ts +2 -2
  29. package/dist/modules/Export/components/ExportLocked/ExportLocked.d.ts +4 -2
  30. package/dist/modules/Export/helpers/exportFormats.d.ts +5 -0
  31. package/dist/modules/Export/helpers/repairs.d.ts +4 -4
  32. package/dist/modules/Export/hooks/useExportSession.d.ts +2 -2
  33. package/dist/modules/Navigation/NavigationProvider.d.ts +1 -1
  34. package/dist/modules/Space/components/PlanNotice/PlanNotice.d.ts +13 -0
  35. package/dist/modules/Space/components/PlanNotice/index.d.ts +2 -0
  36. package/dist/modules/Space/hooks/useNextPrune.d.ts +16 -0
  37. package/dist/modules/Space/hooks/useSpaceEntitlements.d.ts +17 -0
  38. package/dist/modules/Tests/Tests.d.ts +10 -0
  39. package/dist/modules/Tests/accounts.d.ts +18 -0
  40. package/dist/modules/Tests/components/AreaStats/AreaStats.d.ts +12 -0
  41. package/dist/modules/Tests/components/AreaStats/index.d.ts +1 -0
  42. package/dist/modules/Tests/components/CanvasPane/CanvasPane.d.ts +10 -0
  43. package/dist/modules/Tests/components/CanvasPane/index.d.ts +1 -0
  44. package/dist/modules/Tests/components/E2eRunView/E2eRunView.d.ts +13 -0
  45. package/dist/modules/Tests/components/E2eRunView/components/RunStep/RunStep.d.ts +10 -0
  46. package/dist/modules/Tests/components/E2eRunView/components/RunStep/index.d.ts +2 -0
  47. package/dist/modules/Tests/components/E2eRunView/index.d.ts +2 -0
  48. package/dist/modules/Tests/components/FlowList/FlowList.d.ts +25 -0
  49. package/dist/modules/Tests/components/FlowList/components/FlowRow/FlowRow.d.ts +34 -0
  50. package/dist/modules/Tests/components/FlowList/components/FlowRow/index.d.ts +2 -0
  51. package/dist/modules/Tests/components/FlowList/components/StatePill/StatePill.d.ts +10 -0
  52. package/dist/modules/Tests/components/FlowList/components/StatePill/index.d.ts +2 -0
  53. package/dist/modules/Tests/components/FlowList/components/TagFilter/TagFilter.d.ts +17 -0
  54. package/dist/modules/Tests/components/FlowList/components/TagFilter/index.d.ts +2 -0
  55. package/dist/modules/Tests/components/FlowList/index.d.ts +1 -0
  56. package/dist/modules/Tests/components/FlowPanel/FlowPanel.d.ts +16 -0
  57. package/dist/modules/Tests/components/FlowPanel/index.d.ts +1 -0
  58. package/dist/modules/Tests/components/FlowStrip/FlowStrip.d.ts +29 -0
  59. package/dist/modules/Tests/components/FlowStrip/index.d.ts +1 -0
  60. package/dist/modules/Tests/components/GateCard/GateCard.d.ts +16 -0
  61. package/dist/modules/Tests/components/GateCard/index.d.ts +1 -0
  62. package/dist/modules/Tests/components/JourneyTags/JourneyTags.d.ts +13 -0
  63. package/dist/modules/Tests/components/JourneyTags/index.d.ts +2 -0
  64. package/dist/modules/Tests/components/KindRow/KindRow.d.ts +26 -0
  65. package/dist/modules/Tests/components/KindRow/components/FieldInput/FieldInput.d.ts +17 -0
  66. package/dist/modules/Tests/components/KindRow/components/FieldInput/index.d.ts +2 -0
  67. package/dist/modules/Tests/components/KindRow/index.d.ts +2 -0
  68. package/dist/modules/Tests/components/NeedsLook/NeedsLook.d.ts +5 -0
  69. package/dist/modules/Tests/components/NeedsLook/index.d.ts +1 -0
  70. package/dist/modules/Tests/components/PlanUsage/PlanUsage.d.ts +14 -0
  71. package/dist/modules/Tests/components/PlanUsage/index.d.ts +2 -0
  72. package/dist/modules/Tests/components/ServerPlayCard/ServerPlayCard.d.ts +12 -0
  73. package/dist/modules/Tests/components/ServerPlayCard/index.d.ts +2 -0
  74. package/dist/modules/Tests/components/StartState/StartState.d.ts +12 -0
  75. package/dist/modules/Tests/components/StartState/index.d.ts +2 -0
  76. package/dist/modules/Tests/components/StepEditor/StepEditor.d.ts +16 -0
  77. package/dist/modules/Tests/components/StepEditor/index.d.ts +1 -0
  78. package/dist/modules/Tests/components/StudioStep/StudioStep.d.ts +27 -0
  79. package/dist/modules/Tests/components/StudioStep/index.d.ts +1 -0
  80. package/dist/modules/Tests/components/TestAccounts/TestAccounts.d.ts +6 -0
  81. package/dist/modules/Tests/components/TestAccounts/components/AccountForm/AccountForm.d.ts +15 -0
  82. package/dist/modules/Tests/components/TestAccounts/components/AccountForm/index.d.ts +1 -0
  83. package/dist/modules/Tests/components/TestAccounts/components/AccountRow/AccountRow.d.ts +12 -0
  84. package/dist/modules/Tests/components/TestAccounts/components/AccountRow/index.d.ts +1 -0
  85. package/dist/modules/Tests/components/TestAccounts/components/RoleChip/RoleChip.d.ts +10 -0
  86. package/dist/modules/Tests/components/TestAccounts/components/RoleChip/index.d.ts +1 -0
  87. package/dist/modules/Tests/components/TestAccounts/index.d.ts +1 -0
  88. package/dist/modules/Tests/components/TestsArea/TestsArea.d.ts +24 -0
  89. package/dist/modules/Tests/components/TestsArea/index.d.ts +1 -0
  90. package/dist/modules/Tests/components/TestsSummary/TestsSummary.d.ts +13 -0
  91. package/dist/modules/Tests/components/TestsSummary/index.d.ts +2 -0
  92. package/dist/modules/Tests/components/UnitTestForm/UnitTestForm.d.ts +14 -0
  93. package/dist/modules/Tests/components/UnitTestForm/index.d.ts +2 -0
  94. package/dist/modules/Tests/components/UnitTests/UnitTests.d.ts +19 -0
  95. package/dist/modules/Tests/components/UnitTests/components/UnitTestRow/UnitTestRow.d.ts +16 -0
  96. package/dist/modules/Tests/components/UnitTests/components/UnitTestRow/index.d.ts +2 -0
  97. package/dist/modules/Tests/components/UnitTests/index.d.ts +2 -0
  98. package/dist/modules/Tests/helpers.d.ts +143 -0
  99. package/dist/modules/Tests/hooks/useMayTest.d.ts +10 -0
  100. package/dist/modules/Tests/hooks/useSaveSpaceTests.d.ts +14 -0
  101. package/dist/modules/Tests/hooks/useServerPlay.d.ts +26 -0
  102. package/dist/modules/Tests/hooks/useSpaceTests.d.ts +20 -0
  103. package/dist/modules/Tests/hooks/useTestProblems.d.ts +9 -0
  104. package/dist/modules/Tests/index.d.ts +4 -0
  105. package/dist/modules/Tests/studio/JourneyVisitor.d.ts +11 -0
  106. package/dist/modules/Tests/studio/TestStudioContext.d.ts +126 -0
  107. package/dist/modules/Tests/studio/TestStudioProvider.d.ts +5 -0
  108. package/dist/modules/Tests/studio/canvasPage.d.ts +22 -0
  109. package/dist/modules/Tests/studio/canvasWaits.d.ts +9 -0
  110. package/dist/modules/Tests/studio/flowPlay.d.ts +38 -0
  111. package/dist/modules/Tests/studio/playsAsGuest.d.ts +5 -0
  112. package/dist/modules/Tests/studio/reveal.d.ts +8 -0
  113. package/dist/modules/Tests/studio/sentences.d.ts +34 -0
  114. package/dist/modules/Tests/studio/spotlight.d.ts +13 -0
  115. package/dist/modules/Tests/studio/stepDelay.d.ts +11 -0
  116. package/dist/modules/Tests/studio/stepOfEvent.d.ts +12 -0
  117. package/dist/modules/Tests/studio/useCanvasStudio.d.ts +9 -0
  118. package/dist/modules/Tests/studio/useStudioCanvas.d.ts +26 -0
  119. package/dist/modules/Usages/helpers/copy.d.ts +3 -1
  120. package/dist/package.json.d.ts +2 -2
  121. package/dist/plitzi-builder.css +1 -1
  122. package/dist/plitzi-builder.css.gz +0 -0
  123. package/dist/plitzi-builder.js +2167 -1942
  124. package/dist/plitzi-builder.js.gz +0 -0
  125. package/dist/plitzi-functions-worker.js +1 -1
  126. package/package.json +16 -16
  127. package/dist/modules/App/components/AppHeader/BorderButton.d.ts +0 -2
  128. package/dist/modules/App/components/AppHeader/GridButton.d.ts +0 -3
  129. package/dist/modules/App/components/AppHeader/MotionButton.d.ts +0 -6
@@ -0,0 +1,17 @@
1
+ import { TCapability, TSpaceAccess, TSpaceEntitlements } from '@plitzi/sdk-shared/network';
2
+ /**
3
+ * What the person's role on the space allows: the builder offers that and nothing the server would refuse —
4
+ * everything, until the server says otherwise.
5
+ */
6
+ export declare const useSpaceAccess: () => {
7
+ access: TSpaceAccess | undefined;
8
+ may: (permission: string) => boolean;
9
+ };
10
+ /** What the space's plan includes, and the way to what it does not. Everything, until the server says otherwise. */
11
+ declare const useSpaceEntitlements: () => {
12
+ entitlements: TSpaceEntitlements | undefined;
13
+ included: (capability: string) => boolean;
14
+ /** What the plan says of a capability it does not include: its words, the plan that does and the link. */
15
+ locked: (capability: string) => TCapability | undefined;
16
+ };
17
+ export default useSpaceEntitlements;
@@ -0,0 +1,10 @@
1
+ export type TestsProps = {
2
+ /** The editor's own CSS for the canvas the journeys are played on. */
3
+ externalStyle?: string;
4
+ };
5
+ /**
6
+ * The space's own tests, kept in its document and held where it ships. Its flows — what a visitor does, end
7
+ * to end — beside the page they are played on; its element checks — one element for a state, checked on every save.
8
+ */
9
+ declare const Tests: ({ externalStyle }: TestsProps) => import('react').JSX.Element;
10
+ export default Tests;
@@ -0,0 +1,18 @@
1
+ import { E2eAccount, E2eTest } from '@plitzi/sdk-shared';
2
+ /** An account as its form holds it: the roles chosen from the space's own. */
3
+ export type AccountDraft = {
4
+ id: string;
5
+ email: string;
6
+ roles: string[];
7
+ };
8
+ export declare const draftOf: (account?: E2eAccount) => AccountDraft;
9
+ /** The account a form holds, or what keeps it from being one — said where it is fixed. */
10
+ export declare const accountFrom: (draft: AccountDraft,
11
+ /** The other accounts' ids: an id is one account's. */
12
+ taken: readonly string[]) => E2eAccount | {
13
+ problem: string;
14
+ };
15
+ /** The accounts with this one in its place — or last, when it is new. */
16
+ export declare const withAccount: (accounts: readonly E2eAccount[], account: E2eAccount) => E2eAccount[];
17
+ /** The journeys that play as an account, by title: what keeps it from being removed. */
18
+ export declare const playedAs: (journeys: readonly E2eTest[], id: string) => string[];
@@ -0,0 +1,12 @@
1
+ export type AreaStat = {
2
+ value: string;
3
+ /** What it is out of, when it is a count of a whole: `/3`. */
4
+ of?: string;
5
+ label: string;
6
+ tone?: 'good' | 'bad';
7
+ };
8
+ /** The tests in a few numbers, large, across the width: flows passing, steps played, element checks, the last play. */
9
+ declare const AreaStats: ({ stats }: {
10
+ stats: AreaStat[];
11
+ }) => import('react').JSX.Element;
12
+ export default AreaStats;
@@ -0,0 +1 @@
1
+ export { default } from './AreaStats';
@@ -0,0 +1,10 @@
1
+ export type CanvasPaneProps = {
2
+ externalStyle: string;
3
+ };
4
+ /**
5
+ * The page the flows are played on: the space itself, live and in preview, in the device the flow chosen is played at —
6
+ * a phone, a tablet, or a browser window. What is pressed on the right is played here, and what is done here is
7
+ * recorded there. Drawn anew for each play, as a new visitor's page.
8
+ */
9
+ declare const CanvasPane: ({ externalStyle }: CanvasPaneProps) => import('react').JSX.Element;
10
+ export default CanvasPane;
@@ -0,0 +1 @@
1
+ export { default } from './CanvasPane';
@@ -0,0 +1,13 @@
1
+ import { E2eTest } from '@plitzi/sdk-shared';
2
+ import { TSpaceE2eResult } from '@plitzi/sdk-shared/network';
3
+ export type E2eRunViewProps = {
4
+ test: E2eTest;
5
+ result: TSpaceE2eResult;
6
+ onBack: () => void;
7
+ };
8
+ /**
9
+ * An e2e test's run, replayed: the page in a device frame as it was once a step was played, beside the steps as they
10
+ * went — the one that failed shown first, any other a click away.
11
+ */
12
+ declare const E2eRunView: ({ test, result, onBack }: E2eRunViewProps) => import('react').JSX.Element;
13
+ export default E2eRunView;
@@ -0,0 +1,10 @@
1
+ import { TSpaceE2eStepResult } from '@plitzi/sdk-shared/network';
2
+ export type RunStepProps = {
3
+ index: number;
4
+ step: TSpaceE2eStepResult;
5
+ shown: boolean;
6
+ onShow: (index: number) => void;
7
+ };
8
+ /** One step of a run, as the log says it: its mark, its words, how long it took — what it read, when it failed. */
9
+ declare const RunStep: ({ index, step, shown, onShow }: RunStepProps) => import('react').JSX.Element;
10
+ export default RunStep;
@@ -0,0 +1,2 @@
1
+ export { default } from './RunStep';
2
+ export type { RunStepProps } from './RunStep';
@@ -0,0 +1,2 @@
1
+ export { default } from './E2eRunView';
2
+ export type { E2eRunViewProps } from './E2eRunView';
@@ -0,0 +1,25 @@
1
+ import { JourneyFilter } from '../../helpers';
2
+ import { ServerPlay } from '../../hooks/useServerPlay';
3
+ import { TSpaceRunE2eTestsMutation } from '@plitzi/sdk-shared/network';
4
+ export type FlowListProps = {
5
+ /** The flows as the server last played them, when it did. */
6
+ serverRun?: TSpaceRunE2eTestsMutation;
7
+ /** The journeys the server is playing now: their pills say how far each got there. */
8
+ serverPlay?: ServerPlay;
9
+ /** What the server said is wrong with the tests as written: a flow it names is marked. */
10
+ problems: readonly string[];
11
+ /** What the list is narrowed to — the words searched for and a tag; Play all plays the same. */
12
+ filter: JourneyFilter;
13
+ onFilter: (filter: JourneyFilter) => void;
14
+ onSelect: (id: string) => void;
15
+ onCreate: () => void;
16
+ onRemove: (id: string) => void;
17
+ onViewServerRun: (id: string) => void;
18
+ };
19
+ /**
20
+ * The space's journeys: how many, a search and the way to add one, the tags to narrow them by, and a row each — the
21
+ * chosen one lit, played on the page on the left when it is chosen. The list takes the room the column has; the tags
22
+ * keep to one row however many there are.
23
+ */
24
+ declare const FlowList: ({ serverRun, serverPlay, problems, filter, onFilter, onSelect, onCreate, onRemove, onViewServerRun }: FlowListProps) => import('react').JSX.Element;
25
+ export default FlowList;
@@ -0,0 +1,34 @@
1
+ import { FlowState } from '../../../../studio/TestStudioContext';
2
+ import { E2eTest } from '@plitzi/sdk-shared';
3
+ export type FlowRowProps = {
4
+ journey: E2eTest;
5
+ /** Its letter: its place in the whole list, kept while the list is filtered. */
6
+ letter: string;
7
+ /** What it does first, in words. */
8
+ firstLine: string;
9
+ state: FlowState;
10
+ chosen: boolean;
11
+ /** Chosen and changed since it was saved. */
12
+ unsaved: boolean;
13
+ /** The tag the list is filtered by: lit where the journey carries it. */
14
+ tag?: string;
15
+ problems: readonly string[];
16
+ /** How the server last played it, when it did. */
17
+ onServer?: {
18
+ ok: boolean;
19
+ };
20
+ /** Whether it may be chosen now: not while every journey plays. */
21
+ selectable: boolean;
22
+ /** Whether it may be removed now: not while something plays, nor without the right to test. */
23
+ removable: boolean;
24
+ onSelect: (id: string) => void;
25
+ onRemove: (id: string) => void;
26
+ onViewServerRun: (id: string) => void;
27
+ };
28
+ /**
29
+ * A journey in the list: its letter, what it checks (two lines at most), where and as whom it plays and what it does
30
+ * first, its tags, and where it stands. Removing it is offered in its pill's place while the row is hovered or
31
+ * focused — no column kept empty for a button that is hidden.
32
+ */
33
+ declare const FlowRow: ({ journey, letter, firstLine, state, chosen, unsaved, tag, problems, onServer, selectable, removable, onSelect, onRemove, onViewServerRun }: FlowRowProps) => import('react').JSX.Element;
34
+ export default FlowRow;
@@ -0,0 +1,2 @@
1
+ export { default } from './FlowRow';
2
+ export type { FlowRowProps } from './FlowRow';
@@ -0,0 +1,10 @@
1
+ import { FlowState } from '../../../../studio/TestStudioContext';
2
+ export type StatePillProps = {
3
+ state: FlowState;
4
+ /** How many steps the journey has: what "Playing 3/5" counts against. */
5
+ steps: number;
6
+ className?: string;
7
+ };
8
+ /** Where a journey stands, as a pill: ready, waiting, playing and how far, passing, failing, or one only the server plays. */
9
+ declare const StatePill: ({ state, steps, className }: StatePillProps) => import('react').JSX.Element;
10
+ export default StatePill;
@@ -0,0 +1,2 @@
1
+ export { default } from './StatePill';
2
+ export type { StatePillProps } from './StatePill';
@@ -0,0 +1,17 @@
1
+ export type TagFilterProps = {
2
+ /** Every tag the journeys carry, with how many carry it. */
3
+ tags: readonly {
4
+ tag: string;
5
+ count: number;
6
+ }[];
7
+ /** The tag chosen — none: every journey. */
8
+ tag?: string;
9
+ onTag: (tag: string | undefined) => void;
10
+ };
11
+ /**
12
+ * The journeys' tags as chips, one row of them however many there are: what does not fit waits behind "+N", which
13
+ * opens the rest below — a few rows at most, scrolled as any list is. Never sideways: a mouse has no good way to.
14
+ * The tag chosen comes first, so it is never one of those hidden.
15
+ */
16
+ declare const TagFilter: ({ tags, tag, onTag }: TagFilterProps) => import('react').JSX.Element;
17
+ export default TagFilter;
@@ -0,0 +1,2 @@
1
+ export { default } from './TagFilter';
2
+ export type { TagFilterProps } from './TagFilter';
@@ -0,0 +1 @@
1
+ export { default } from './FlowList';
@@ -0,0 +1,16 @@
1
+ export type FlowPanelProps = {
2
+ /** What the server said is wrong with the tests as written: the flow chosen says its own. */
3
+ problems: readonly string[];
4
+ /** The flow chosen, or every flow played in turn — its log, and what came of it. */
5
+ view: 'steps' | 'run';
6
+ onView: (view: 'steps' | 'run') => void;
7
+ /** Says why a save was refused, or nothing once it was kept. */
8
+ onSaved: (problem: string | undefined) => void;
9
+ };
10
+ /**
11
+ * The flow chosen, below the page and the list: what plays, records and keeps it, then its steps in words — each
12
+ * pointed at lights its element on the page, each pressed plays the flow up to it. While every flow plays in turn, the
13
+ * log of their steps; once they have, what came of it in a line.
14
+ */
15
+ declare const FlowPanel: ({ problems, view, onView, onSaved }: FlowPanelProps) => import('react').JSX.Element;
16
+ export default FlowPanel;
@@ -0,0 +1 @@
1
+ export { default } from './FlowPanel';
@@ -0,0 +1,29 @@
1
+ import { StepPlay } from '../../studio/TestStudioContext';
2
+ import { E2eStep } from '@plitzi/sdk-shared';
3
+ export type FlowStripProps = {
4
+ steps: E2eStep[];
5
+ plays: (StepPlay | undefined)[];
6
+ /** What is wrong with a step as written, by its index: said on the step itself. */
7
+ stepProblems?: ReadonlyMap<number, string[]>;
8
+ /** The step open to be changed, if one is. */
9
+ editing?: number;
10
+ locked: boolean;
11
+ nameOf: (target: string) => string;
12
+ elements: {
13
+ value: string;
14
+ label: string;
15
+ }[];
16
+ onPoint: (step: E2eStep | undefined) => void;
17
+ onPlayTo: (index: number) => void;
18
+ onEdit: (index: number) => void;
19
+ onMove: (index: number, by: number) => void;
20
+ onRemove: (index: number) => void;
21
+ onDone: (index: number, step: E2eStep) => void;
22
+ };
23
+ /**
24
+ * A flow as it is read: its moments side by side — the page as it opens, then each thing done with what must hold once
25
+ * it is, joined by arrows; when this, then that — each topped by a bar of its own steps, filled as they are played, red
26
+ * where one failed, pressed to play up to it: the colour sits over the steps it stands for.
27
+ */
28
+ declare const FlowStrip: (props: FlowStripProps) => import('react').JSX.Element;
29
+ export default FlowStrip;
@@ -0,0 +1 @@
1
+ export { default } from './FlowStrip';
@@ -0,0 +1,16 @@
1
+ export type GateCardProps = {
2
+ ready: number;
3
+ total: number;
4
+ /** The journeys that cannot be read as written, by id: said calmly, the first one shown on asking. */
5
+ flowsNeedLook: readonly string[];
6
+ /** Element checks written so they cannot be read, or that do not hold. */
7
+ checksNeedLook: number;
8
+ onChecks: () => void;
9
+ onShowFlow: (id: string) => void;
10
+ };
11
+ /**
12
+ * The rule the tests are kept for, said where they are: a snapshot and a publish wait for every flow and every element
13
+ * check — and how many stand ready now.
14
+ */
15
+ declare const GateCard: ({ ready, total, flowsNeedLook, checksNeedLook, onChecks, onShowFlow }: GateCardProps) => import('react').JSX.Element;
16
+ export default GateCard;
@@ -0,0 +1 @@
1
+ export { default } from './GateCard';
@@ -0,0 +1,13 @@
1
+ export type JourneyTagsProps = {
2
+ tags?: string[];
3
+ /** The tags the space's other journeys carry: offered as it is typed, so one thing keeps one spelling. */
4
+ known: readonly string[];
5
+ locked: boolean;
6
+ onChange: (tags: string[] | undefined) => void;
7
+ };
8
+ /**
9
+ * What a journey is about, as chips beside its Save — how a long list is told apart and filtered. A word typed and
10
+ * Enter (or a comma) adds one, made one spelling as it is added; × takes it off.
11
+ */
12
+ declare const JourneyTags: ({ tags, known, locked, onChange }: JourneyTagsProps) => import('react').JSX.Element;
13
+ export default JourneyTags;
@@ -0,0 +1,2 @@
1
+ export { default } from './JourneyTags';
2
+ export type { JourneyTagsProps } from './JourneyTags';
@@ -0,0 +1,26 @@
1
+ import { KindSpec } from '../../helpers';
2
+ export type KindRowProps = {
3
+ index: number;
4
+ count: number;
5
+ row: {
6
+ kind: string;
7
+ } & Record<string, unknown>;
8
+ kinds: Record<string, KindSpec>;
9
+ elements: {
10
+ value: string;
11
+ label: string;
12
+ }[];
13
+ /** The element a new row of a kind that names one starts on. */
14
+ elementId: string;
15
+ onChange: (index: number, row: {
16
+ kind: string;
17
+ } & Record<string, unknown>) => void;
18
+ onRemove: (index: number) => void;
19
+ onMove: (index: number, by: number) => void;
20
+ };
21
+ /**
22
+ * One row of a list a test is made of — an expectation of a unit test, a step of an e2e test: its kind, the fields that
23
+ * kind takes, and its place in the list.
24
+ */
25
+ declare const KindRow: ({ index, count, row, kinds, elements, elementId, onChange, onRemove, onMove }: KindRowProps) => import('react').JSX.Element;
26
+ export default KindRow;
@@ -0,0 +1,17 @@
1
+ import { FieldSpec } from '../../../../helpers';
2
+ export type FieldInputProps = {
3
+ field: FieldSpec;
4
+ value: unknown;
5
+ /** The elements an element field may name. */
6
+ elements: {
7
+ value: string;
8
+ label: string;
9
+ }[];
10
+ onChange: (name: string, value: unknown) => void;
11
+ };
12
+ /**
13
+ * One field of a row, as its kind says: an element picked from the space, one of its element checks by its title, a
14
+ * number, words, or any value.
15
+ */
16
+ declare const FieldInput: ({ field, value, elements, onChange }: FieldInputProps) => import('react').JSX.Element;
17
+ export default FieldInput;
@@ -0,0 +1,2 @@
1
+ export { default } from './FieldInput';
2
+ export type { FieldInputProps } from './FieldInput';
@@ -0,0 +1,2 @@
1
+ export { default } from './KindRow';
2
+ export type { KindRowProps } from './KindRow';
@@ -0,0 +1,5 @@
1
+ /** The mark of a test that needs a look — written so it cannot be read as it is — with what is wrong, on hover. */
2
+ declare const NeedsLook: ({ problems }: {
3
+ problems: readonly string[];
4
+ }) => import('react').JSX.Element | null;
5
+ export default NeedsLook;
@@ -0,0 +1 @@
1
+ export { default } from './NeedsLook';
@@ -0,0 +1,14 @@
1
+ import { TSpaceServerPlays } from '@plitzi/sdk-shared/network';
2
+ export type PlanUsageProps = {
3
+ /** The journeys the space keeps now, the one being written included. */
4
+ journeys: number;
5
+ /** The month's plays on the server, as the server last said them. */
6
+ plays?: TSpaceServerPlays;
7
+ };
8
+ /**
9
+ * What the space's plan allows of its tests, and how much of it is used: the journeys it keeps, and the journeys played
10
+ * on the server this month — with when they come back, and the plan that gives more. Element checks, and plays in the
11
+ * builder, count against nothing. Nothing at all where the server answers no plan (a self-hosted deployment).
12
+ */
13
+ declare const PlanUsage: ({ journeys, plays }: PlanUsageProps) => import('react').JSX.Element | null;
14
+ export default PlanUsage;
@@ -0,0 +1,2 @@
1
+ export { default } from './PlanUsage';
2
+ export type { PlanUsageProps } from './PlanUsage';
@@ -0,0 +1,12 @@
1
+ import { ServerPlay } from '../../hooks/useServerPlay';
2
+ export type ServerPlayCardProps = {
3
+ play: ServerPlay;
4
+ /** The journey's title, as its author gave it. */
5
+ titleOf: (id: string) => string;
6
+ };
7
+ /**
8
+ * The journey the server is playing now, as it plays: which, how far, and the page after its last step — what the run
9
+ * will answer, seen while it is made.
10
+ */
11
+ declare const ServerPlayCard: ({ play, titleOf }: ServerPlayCardProps) => import('react').JSX.Element;
12
+ export default ServerPlayCard;
@@ -0,0 +1,2 @@
1
+ export { default } from './ServerPlayCard';
2
+ export type { ServerPlayCardProps } from './ServerPlayCard';
@@ -0,0 +1,12 @@
1
+ export type StartStateProps = {
2
+ /** The state the journey starts with, by key — none: a new visitor's. */
3
+ state?: Record<string, unknown>;
4
+ locked: boolean;
5
+ onChange: (state: Record<string, unknown> | undefined) => void;
6
+ };
7
+ /**
8
+ * Where a journey starts: as a new visitor, or with the page's state already set — a basket full, a step already past —
9
+ * so a case is reached without the steps that lead to it. Each value set is a chip; a key and a value add one.
10
+ */
11
+ declare const StartState: ({ state, locked, onChange }: StartStateProps) => import('react').JSX.Element;
12
+ export default StartState;
@@ -0,0 +1,2 @@
1
+ export { default } from './StartState';
2
+ export type { StartStateProps } from './StartState';
@@ -0,0 +1,16 @@
1
+ import { E2eStep } from '@plitzi/sdk-shared';
2
+ export type StepEditorProps = {
3
+ index: number;
4
+ step: E2eStep;
5
+ elements: {
6
+ value: string;
7
+ label: string;
8
+ }[];
9
+ /** The element a step of a kind that names one starts on. */
10
+ elementId: string;
11
+ onDone: (index: number, step: E2eStep) => void;
12
+ onRemove: (index: number) => void;
13
+ };
14
+ /** One step of the test, opened in place to be changed: what it does, and the fields that takes. */
15
+ declare const StepEditor: ({ index, step, elements, elementId, onDone, onRemove }: StepEditorProps) => import('react').JSX.Element;
16
+ export default StepEditor;
@@ -0,0 +1 @@
1
+ export { default } from './StepEditor';
@@ -0,0 +1,27 @@
1
+ import { StepPlay } from '../../studio/TestStudioContext';
2
+ import { E2eStep } from '@plitzi/sdk-shared';
3
+ export type StudioStepProps = {
4
+ index: number;
5
+ count: number;
6
+ step: E2eStep;
7
+ /** How it went the last time the test was played; none before. */
8
+ play?: StepPlay;
9
+ /** What is wrong with it as written: marked, and said on it. */
10
+ problems?: readonly string[];
11
+ /** What a person calls the element it names. */
12
+ nameOf: (target: string) => string;
13
+ /** Editing and moving are off while the test plays or records. */
14
+ locked: boolean;
15
+ onPoint: (step: E2eStep | undefined) => void;
16
+ /** Plays the flow from its start up to this step, and holds there: the page as it stands at it. */
17
+ onPlayTo: (index: number) => void;
18
+ onEdit: (index: number) => void;
19
+ onMove: (index: number, by: number) => void;
20
+ onRemove: (index: number) => void;
21
+ };
22
+ /**
23
+ * One step of the test open in the studio, as a sentence: what is done, or what is checked — its element a chip, its
24
+ * value quoted — with how it went when played. Pointing at it lights its element in the canvas.
25
+ */
26
+ declare const StudioStep: ({ index, count, step, play, problems, nameOf, locked, onPoint, onPlayTo, onEdit, onMove, onRemove }: StudioStepProps) => import('react').JSX.Element;
27
+ export default StudioStep;
@@ -0,0 +1 @@
1
+ export { default } from './StudioStep';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The space's test accounts: who a journey plays as, signed in, to see a page for signed-in visitors or a role's view —
3
+ * declared here alone, no account of the platform's. Saved as they are written, with the rest of the tests.
4
+ */
5
+ declare const TestAccounts: () => import('react').JSX.Element;
6
+ export default TestAccounts;
@@ -0,0 +1,15 @@
1
+ import { E2eAccount } from '@plitzi/sdk-shared';
2
+ export type AccountFormProps = {
3
+ /** The account edited — none for a new one. Its id is kept: the journeys name it by it. */
4
+ account?: E2eAccount;
5
+ /** The other accounts' ids. */
6
+ taken: readonly string[];
7
+ /** The space's visitor roles (`settings.visitorRoles`): the only ones an account may be given. */
8
+ spaceRoles: readonly string[];
9
+ /** Saves it: nothing when it was saved, or why not. */
10
+ onSave: (account: E2eAccount) => Promise<string | undefined>;
11
+ onCancel: () => void;
12
+ };
13
+ /** One test account written: its id and address, and its roles chosen from the space's own — never typed. */
14
+ declare const AccountForm: ({ account, taken, spaceRoles, onSave, onCancel }: AccountFormProps) => import('react').JSX.Element;
15
+ export default AccountForm;
@@ -0,0 +1 @@
1
+ export { default } from './AccountForm';
@@ -0,0 +1,12 @@
1
+ import { E2eAccount } from '@plitzi/sdk-shared';
2
+ export type AccountRowProps = {
3
+ account: E2eAccount;
4
+ /** The space's visitor roles: one of the account's it no longer has is warned of. */
5
+ spaceRoles: readonly string[];
6
+ locked: boolean;
7
+ onEdit: (id: string) => void;
8
+ onRemove: (id: string) => void;
9
+ };
10
+ /** One test account in the list: its id and its roles — one the space has removed since, warned of. */
11
+ declare const AccountRow: ({ account, spaceRoles, locked, onEdit, onRemove }: AccountRowProps) => import('react').JSX.Element;
12
+ export default AccountRow;
@@ -0,0 +1 @@
1
+ export { default } from './AccountRow';
@@ -0,0 +1,10 @@
1
+ export type RoleChipProps = {
2
+ role: string;
3
+ /** The space no longer declares it: said, in amber. */
4
+ gone: boolean;
5
+ /** Takes it off the account, where it can be. */
6
+ onRemove?: (role: string) => void;
7
+ };
8
+ /** One role of a test account — amber when the space has removed it since. */
9
+ declare const RoleChip: ({ role, gone, onRemove }: RoleChipProps) => import('react').JSX.Element;
10
+ export default RoleChip;
@@ -0,0 +1 @@
1
+ export { default } from './RoleChip';
@@ -0,0 +1 @@
1
+ export { default } from './TestAccounts';
@@ -0,0 +1,24 @@
1
+ import { ServerPlay } from '../../hooks/useServerPlay';
2
+ import { TSpaceRunE2eTestsMutation, TSpaceTests } from '@plitzi/sdk-shared/network';
3
+ export type TestsAreaProps = {
4
+ externalStyle: string;
5
+ answer?: TSpaceTests;
6
+ /** What is wrong with the tests as written, read against the document being edited. */
7
+ problems: readonly string[];
8
+ serverRun?: TSpaceRunE2eTestsMutation;
9
+ serverRunning: boolean;
10
+ /** The journeys the server is playing now, heard as they play — this person's run or anyone's. */
11
+ serverPlay?: ServerPlay;
12
+ onRunOnServer: () => void;
13
+ /** Playing them all on the canvas starts: the last run on the server is not what the rows say any more. */
14
+ onPlayAll: () => void;
15
+ onViewServerRun: (id: string) => void;
16
+ onChecks: () => void;
17
+ };
18
+ /**
19
+ * The space's flows, played on its page: the page live on the left, the flows on the right — each with how it
20
+ * went — and the flow chosen below, step by step. What is pressed on the right is played on the left; what is done on
21
+ * the left, recorded, is written on the right. Above, where things stand: what is playing, and the numbers that count.
22
+ */
23
+ declare const TestsArea: ({ externalStyle, answer, problems, serverRun, serverRunning, serverPlay, onRunOnServer, onPlayAll, onViewServerRun, onChecks }: TestsAreaProps) => import('react').JSX.Element;
24
+ export default TestsArea;
@@ -0,0 +1 @@
1
+ export { default } from './TestsArea';
@@ -0,0 +1,13 @@
1
+ import { TSpaceTests } from '@plitzi/sdk-shared/network';
2
+ export type TestsSummaryProps = {
3
+ answer: TSpaceTests;
4
+ /** What is wrong with the tests as written, read against the document being edited. */
5
+ problems: readonly string[];
6
+ };
7
+ /**
8
+ * How the space's tests stand against the saved document — what a snapshot would meet. What passes is said as passing;
9
+ * a test written so it cannot be read, or a check that does not hold yet, is said calmly beside it: by the title its
10
+ * author gave it, what is wrong, and what it holds back — a snapshot — and what it does not: the site as published.
11
+ */
12
+ declare const TestsSummary: ({ answer, problems: all }: TestsSummaryProps) => import('react').JSX.Element;
13
+ export default TestsSummary;
@@ -0,0 +1,2 @@
1
+ export { default } from './TestsSummary';
2
+ export type { TestsSummaryProps } from './TestsSummary';
@@ -0,0 +1,14 @@
1
+ import { UnitTest } from '@plitzi/sdk-shared';
2
+ export type UnitTestFormProps = {
3
+ test: UnitTest;
4
+ elements: {
5
+ value: string;
6
+ label: string;
7
+ }[];
8
+ /** Saves it; answers why it could not be, or nothing once it is. */
9
+ onSave: (test: UnitTest) => Promise<string | undefined>;
10
+ onBack: () => void;
11
+ };
12
+ /** A unit test written: its element, the state it is given, and what must hold of the element then. */
13
+ declare const UnitTestForm: ({ test, elements, onSave, onBack }: UnitTestFormProps) => import('react').JSX.Element;
14
+ export default UnitTestForm;
@@ -0,0 +1,2 @@
1
+ export { default } from './UnitTestForm';
2
+ export type { UnitTestFormProps } from './UnitTestForm';