@w6w/embed 0.1.1 → 0.2.1

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 (148) hide show
  1. package/README.md +231 -4
  2. package/dist/ConfirmModal-RLbZT5_k.js +181 -0
  3. package/dist/ConfirmModal-RLbZT5_k.js.map +1 -0
  4. package/dist/CreateFunctionModal-DRsFx-FB.js +221 -0
  5. package/dist/CreateFunctionModal-DRsFx-FB.js.map +1 -0
  6. package/dist/DocumentFormModal-BExK1V-B.js +89 -0
  7. package/dist/DocumentFormModal-BExK1V-B.js.map +1 -0
  8. package/dist/ImportSpecModal-BDQIf6rg.js +136 -0
  9. package/dist/ImportSpecModal-BDQIf6rg.js.map +1 -0
  10. package/dist/W6WEmbedProvider.d.ts +22 -4
  11. package/dist/WorkflowEditor-DlbVv6Fs.js +854 -0
  12. package/dist/WorkflowEditor-DlbVv6Fs.js.map +1 -0
  13. package/dist/api-calls--JHyif6a.js +107 -0
  14. package/dist/api-calls--JHyif6a.js.map +1 -0
  15. package/dist/apps-1FNUwbGv.js +77 -0
  16. package/dist/apps-1FNUwbGv.js.map +1 -0
  17. package/dist/callables-3mFrMVG_.js +151 -0
  18. package/dist/callables-3mFrMVG_.js.map +1 -0
  19. package/dist/chrome/index.d.ts +6 -0
  20. package/dist/chrome/workspace.d.ts +29 -1
  21. package/dist/coerce-input-BicYr7nc.js +139 -0
  22. package/dist/coerce-input-BicYr7nc.js.map +1 -0
  23. package/dist/connections-CjjYeRqb.js +78 -0
  24. package/dist/connections-CjjYeRqb.js.map +1 -0
  25. package/dist/document-sources-C0grrtdq.js +86 -0
  26. package/dist/document-sources-C0grrtdq.js.map +1 -0
  27. package/dist/draft/index.d.ts +3 -1
  28. package/dist/draft/use-callable-draft.d.ts +65 -0
  29. package/dist/draft/workflow-save.d.ts +3 -0
  30. package/dist/draft.mjs +9 -5
  31. package/dist/draft.mjs.map +1 -1
  32. package/dist/editor/CallableEditorFrame.d.ts +33 -0
  33. package/dist/editor/EditorShell.d.ts +16 -0
  34. package/dist/editor/EndpointCards.d.ts +56 -0
  35. package/dist/editor/EndpointEditor.d.ts +26 -0
  36. package/dist/editor/FunctionEditor.d.ts +21 -0
  37. package/dist/editor/InputListEditor.d.ts +29 -0
  38. package/dist/editor/TargetSelector.d.ts +30 -0
  39. package/dist/editor/TargetSelector.types.d.ts +62 -0
  40. package/dist/editor/editor-apps.d.ts +8 -2
  41. package/dist/editor/types.d.ts +57 -0
  42. package/dist/editor-apps-BdenSV1o.js +95 -0
  43. package/dist/editor-apps-BdenSV1o.js.map +1 -0
  44. package/dist/editor-tools-RxmY5iyi.js +1279 -0
  45. package/dist/editor-tools-RxmY5iyi.js.map +1 -0
  46. package/dist/editor.mjs +2 -2166
  47. package/dist/editor.mjs.map +1 -1
  48. package/dist/editors/DocumentEditor.d.ts +20 -0
  49. package/dist/editors/doc-format.d.ts +3 -0
  50. package/dist/editors.d.ts +12 -0
  51. package/dist/editors.mjs +1313 -0
  52. package/dist/editors.mjs.map +1 -0
  53. package/dist/embed-status.d.ts +20 -0
  54. package/dist/endpoints-B2ynbZo-.js +227 -0
  55. package/dist/endpoints-B2ynbZo-.js.map +1 -0
  56. package/dist/forms/CreateEndpointModal.d.ts +54 -0
  57. package/dist/forms/CreateFunctionModal.d.ts +55 -0
  58. package/dist/forms/DocumentFormModal.d.ts +8 -0
  59. package/dist/forms/SecretsManager.d.ts +12 -0
  60. package/dist/forms/VarsManager.d.ts +29 -0
  61. package/dist/forms.d.ts +6 -0
  62. package/dist/forms.mjs +407 -0
  63. package/dist/forms.mjs.map +1 -0
  64. package/dist/index.d.ts +3 -1
  65. package/dist/index.mjs +153 -50
  66. package/dist/index.mjs.map +1 -1
  67. package/dist/lib/callable-record.d.ts +21 -0
  68. package/dist/lib/coerce-input.d.ts +6 -0
  69. package/dist/lib/endpoint-editor.d.ts +23 -0
  70. package/dist/lib/index.d.ts +7 -0
  71. package/dist/lib/input-coverage.d.ts +28 -0
  72. package/dist/lib/input-seeding.d.ts +67 -0
  73. package/dist/lib/rail-settings.d.ts +3 -3
  74. package/dist/lib/recent-activity.d.ts +128 -0
  75. package/dist/lib/target-fields.d.ts +168 -0
  76. package/dist/lib/workflow-blank.d.ts +2 -0
  77. package/dist/lib.mjs +70 -48
  78. package/dist/lib.mjs.map +1 -1
  79. package/dist/lists/ActivitySummary.d.ts +29 -0
  80. package/dist/lists/CallableKindList.d.ts +34 -0
  81. package/dist/lists/ConnectionDetail.d.ts +17 -0
  82. package/dist/lists/ConnectionList.d.ts +16 -0
  83. package/dist/lists/DocumentList.d.ts +29 -0
  84. package/dist/lists/EndpointList.d.ts +19 -0
  85. package/dist/lists/FunctionList.d.ts +18 -0
  86. package/dist/lists/ReliabilityBoard.d.ts +23 -0
  87. package/dist/lists/RunHistory.d.ts +11 -0
  88. package/dist/lists/ServiceDetail.d.ts +20 -0
  89. package/dist/lists/WorkflowList.d.ts +19 -0
  90. package/dist/lists/vendor-history.d.ts +40 -0
  91. package/dist/lists.d.ts +20 -0
  92. package/dist/lists.mjs +1185 -0
  93. package/dist/lists.mjs.map +1 -0
  94. package/dist/project-context-BiCjv_E3.js +25 -0
  95. package/dist/project-context-BiCjv_E3.js.map +1 -0
  96. package/dist/project-context.d.ts +15 -1
  97. package/dist/rail/CallableRail.d.ts +12 -0
  98. package/dist/rail/CallableWorkspace.d.ts +16 -0
  99. package/dist/rail/SettingsTool.d.ts +7 -1
  100. package/dist/rail/settings-sections.d.ts +2 -2
  101. package/dist/rail-settings-XYGToh00.js +111 -0
  102. package/dist/rail-settings-XYGToh00.js.map +1 -0
  103. package/dist/rail.d.ts +11 -0
  104. package/dist/rail.mjs +35 -0
  105. package/dist/rail.mjs.map +1 -0
  106. package/dist/repos/api-calls.d.ts +4 -0
  107. package/dist/repos/apps.d.ts +14 -0
  108. package/dist/repos/callables.d.ts +91 -0
  109. package/dist/repos/connections.d.ts +33 -0
  110. package/dist/repos/dashboard.d.ts +4 -0
  111. package/dist/repos/endpoints.d.ts +125 -0
  112. package/dist/repos/functions.d.ts +79 -0
  113. package/dist/repos/index.d.ts +10 -0
  114. package/dist/repos/reliability.d.ts +42 -0
  115. package/dist/repos/saved-tests.d.ts +46 -0
  116. package/dist/repos/spec-export.d.ts +23 -0
  117. package/dist/repos/workflows.d.ts +138 -0
  118. package/dist/repos.mjs +174 -88
  119. package/dist/repos.mjs.map +1 -1
  120. package/dist/settings-rail--GdRMusb.js +33 -0
  121. package/dist/settings-rail--GdRMusb.js.map +1 -0
  122. package/dist/slug-C4ktDPdy.js +315 -0
  123. package/dist/slug-C4ktDPdy.js.map +1 -0
  124. package/dist/spec-export-Cf3VQSQS.js +176 -0
  125. package/dist/spec-export-Cf3VQSQS.js.map +1 -0
  126. package/dist/spec-import-CjmxyZDR.js +465 -0
  127. package/dist/spec-import-CjmxyZDR.js.map +1 -0
  128. package/dist/step-tests-CivICmTq.js +18 -0
  129. package/dist/step-tests-CivICmTq.js.map +1 -0
  130. package/dist/trigger-preview-VPkrryDl.js +120 -0
  131. package/dist/trigger-preview-VPkrryDl.js.map +1 -0
  132. package/dist/use-callable-draft-zHLpcr-b.js +271 -0
  133. package/dist/use-callable-draft-zHLpcr-b.js.map +1 -0
  134. package/dist/{use-workflow-draft-oI02dsP-.js → use-workflow-draft-DzAyUeA6.js} +48 -46
  135. package/dist/use-workflow-draft-DzAyUeA6.js.map +1 -0
  136. package/dist/vault-BSEWhMYC.js +117 -0
  137. package/dist/vault-BSEWhMYC.js.map +1 -0
  138. package/dist/workflow-blank-DyL3_RUA.js +14 -0
  139. package/dist/workflow-blank-DyL3_RUA.js.map +1 -0
  140. package/package.json +21 -5
  141. package/src/styles.css +408 -1
  142. package/dist/project-context-Dbk0Gr1K.js +0 -16
  143. package/dist/project-context-Dbk0Gr1K.js.map +0 -1
  144. package/dist/slug-ByKQgxrf.js +0 -642
  145. package/dist/slug-ByKQgxrf.js.map +0 -1
  146. package/dist/spec-import-HgO7ZkLZ.js +0 -898
  147. package/dist/spec-import-HgO7ZkLZ.js.map +0 -1
  148. package/dist/use-workflow-draft-oI02dsP-.js.map +0 -1
@@ -0,0 +1,11 @@
1
+ import { ReactElement } from 'react';
2
+ import { HistoryViewProps } from '../chrome/HistoryView.tsx';
3
+ export interface RunHistoryProps extends Partial<HistoryViewProps> {
4
+ }
5
+ /**
6
+ * The execution history: stats, filters, the paged list and the selected run's detail. A thin
7
+ * wrapper over `chrome/HistoryView` (which owns the queries). `scope` omitted ⇒ the provider's
8
+ * project (disabled while it is unresolved); `filters` omitted ⇒ held here, given ⇒ controlled by
9
+ * the host. Never navigates.
10
+ */
11
+ export declare function RunHistory(props: RunHistoryProps): ReactElement;
@@ -0,0 +1,20 @@
1
+ import { MouseEvent, ReactElement, ReactNode } from 'react';
2
+ export interface ServiceDetailProps {
3
+ /** The service's app id (e.g. `twilio`). */
4
+ appId: string;
5
+ /** Omitted ⇒ the provider's project; none anywhere ⇒ no request and a "select a project" note. */
6
+ project?: string;
7
+ /** Window size in days, sent with the status request (default 30). */
8
+ days?: number;
9
+ /** With `backHref` the not-found card's back link is a real `<a href>`. */
10
+ backHref?: string;
11
+ /** Called on a click of the back link; never cancelled by the component. Alone ⇒ a `<button>`. */
12
+ onBack?: (event: MouseEvent<Element>) => void;
13
+ /** `header`/`actions` sit above the detail; `empty` replaces the not-found copy. */
14
+ slots?: {
15
+ header?: ReactNode;
16
+ actions?: ReactNode;
17
+ empty?: ReactNode;
18
+ };
19
+ }
20
+ export declare function ServiceDetail({ appId, project, days, backHref, onBack, slots, }: ServiceDetailProps): ReactElement;
@@ -0,0 +1,19 @@
1
+ import { CallableListProps } from '@w6w/ui';
2
+ export interface WorkflowListProps {
3
+ /** The project whose Workflows are listed and created. Omitted: the provider's project. */
4
+ project?: string | null;
5
+ /** A row was clicked, or an import completed. Navigation is the host's. */
6
+ onOpen?: (id: string, event?: React.MouseEvent<Element>) => void;
7
+ /** When set, each row is a real `<a href>`; a click still calls `onOpen`. */
8
+ getHref?: (id: string) => string;
9
+ /** A blank Workflow was created from the list's New button; receives the SERVER's id. */
10
+ onCreated?: (id: string) => void;
11
+ slots?: CallableListProps["slots"];
12
+ }
13
+ /**
14
+ * A project's Workflows: rows from `GET /workflows`, archived ones behind a Show-archived toggle,
15
+ * a New button that creates a blank Workflow (the row is POSTed before any editor exists), and
16
+ * Import. With no project there is nothing to list and New refuses. Never navigates — the host
17
+ * wires `onOpen` / `getHref` / `onCreated`.
18
+ */
19
+ export declare function WorkflowList(props: WorkflowListProps): import("react").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { ReliabilityComponentReport, ReliabilityTimelineEntry, ReliabilityVendorStatus } from '@w6w/sdk/console';
2
+ import { VendorIncidentBar } from '@w6w/ui';
3
+ /**
4
+ * `vendor.timeline` → `HistoryTimeline`'s `incidents` prop.
5
+ *
6
+ * `undefined` and `[]` are DIFFERENT FACTS carried through unchanged, never
7
+ * collapsed into each other: `undefined` means "this vendor publishes no
8
+ * incident history at all" (Stripe, and every app but Slack — the majority
9
+ * case), `[]` means "it does, and nothing is in it" (a quiet Slack window).
10
+ * Losing that distinction here would throw away Stripe's honest answer.
11
+ */
12
+ export declare function projectVendorIncidents(vendor: ReliabilityVendorStatus | null): VendorIncidentBar[] | undefined;
13
+ /**
14
+ * An entry counts as an OPEN incident iff it has a `startedAt` and no
15
+ * `resolvedAt`. An entry with neither is a feed-only update (a status-page
16
+ * note with no span attached) — never an outage — so it is deliberately
17
+ * excluded rather than defaulting to "open".
18
+ */
19
+ export declare function isOpenIncident(entry: ReliabilityTimelineEntry): boolean;
20
+ /**
21
+ * The age/recovery copy for one OPEN incident — `null` for anything else
22
+ * (not open, or missing `startedAt`), so this stays total rather than
23
+ * throwing on a shape the caller failed to filter.
24
+ *
25
+ * A TOTAL FUNCTION OF `(entry, nowMs)` — `nowMs` is always the caller's
26
+ * argument, never `Date.now()` read in here, which is what makes a
27
+ * ten-day-old incident whose last note is three days old provably render
28
+ * differently from one that started an hour ago: both facts (how long it has
29
+ * been open, how stale the last note is) are day counts computed against the
30
+ * SAME passed-in clock, not two independent reads of the real one.
31
+ */
32
+ export declare function incidentAgeCopy(entry: ReliabilityTimelineEntry, nowMs: number): string | null;
33
+ /**
34
+ * `vendor.components` → a stable `[name, report][]` list, `null`-safe. A
35
+ * `null` map (no public check ever reported a breakdown) and an empty one
36
+ * both come back `[]`, so the caller's "render nothing" branch is a single
37
+ * length check instead of a `null`-then-`Object.entries` chain repeated at
38
+ * every call site.
39
+ */
40
+ export declare function vendorComponentEntries(components: Record<string, ReliabilityComponentReport> | null): Array<[string, ReliabilityComponentReport]>;
@@ -0,0 +1,20 @@
1
+ export { FunctionList } from './lists/FunctionList.tsx';
2
+ export type { FunctionListProps } from './lists/FunctionList.tsx';
3
+ export { EndpointList } from './lists/EndpointList.tsx';
4
+ export type { EndpointListProps } from './lists/EndpointList.tsx';
5
+ export { WorkflowList } from './lists/WorkflowList.tsx';
6
+ export type { WorkflowListProps } from './lists/WorkflowList.tsx';
7
+ export { ReliabilityBoard } from './lists/ReliabilityBoard.tsx';
8
+ export type { ReliabilityBoardProps } from './lists/ReliabilityBoard.tsx';
9
+ export { DocumentList } from './lists/DocumentList.tsx';
10
+ export type { DocumentListProps, DocumentListRowSlots, DocumentListSlots, DocumentRowSlot, } from './lists/DocumentList.tsx';
11
+ export { ActivitySummary } from './lists/ActivitySummary.tsx';
12
+ export type { ActivitySummaryProps, ActivityTileTarget } from './lists/ActivitySummary.tsx';
13
+ export { RunHistory } from './lists/RunHistory.tsx';
14
+ export type { RunHistoryProps } from './lists/RunHistory.tsx';
15
+ export { ServiceDetail } from './lists/ServiceDetail.tsx';
16
+ export type { ServiceDetailProps } from './lists/ServiceDetail.tsx';
17
+ export { ConnectionList } from './lists/ConnectionList.tsx';
18
+ export type { ConnectionListProps } from './lists/ConnectionList.tsx';
19
+ export { ConnectionDetail } from './lists/ConnectionDetail.tsx';
20
+ export type { ConnectionDetailProps } from './lists/ConnectionDetail.tsx';