@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +564 -2
- package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
- package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
- package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
- package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
- package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
- package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
- package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
- package/dist/DateTimeField-B1qR4ruo.js +51 -0
- package/dist/Disclosure-BNKij7-v.js +45 -0
- package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
- package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
- package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
- package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
- package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
- package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
- package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
- package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
- package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
- package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
- package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
- package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
- package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
- package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
- package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
- package/dist/FluidGridsMark-CE2blT7K.js +74 -0
- package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
- package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
- package/dist/HistoryPage-BSBISXoj.js +2835 -0
- package/dist/Icon-BtQ0HXLh.js +160 -0
- package/dist/InsightsPage-D7ybj8N9.js +11245 -0
- package/dist/IsolationSetting-vy911E8b.js +1153 -0
- package/dist/LibraryParts-DOeNgR8A.js +413 -0
- package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
- package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
- package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
- package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
- package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
- package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
- package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
- package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
- package/dist/NodesPage-O7KeeKtd.js +653 -0
- package/dist/OfflineIcon-TwMKYWjA.js +207 -0
- package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
- package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
- package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
- package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
- package/dist/RunActionsMenu-DodOgIQm.js +59 -0
- package/dist/RunnerStatusPill-C1v967iq.js +24 -0
- package/dist/RunnersPage-dB0RSdY_.js +1929 -0
- package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
- package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
- package/dist/SearchBox-BGtYjvfs.js +49 -0
- package/dist/SequenceEditor-CFiHeHkR.js +497 -0
- package/dist/SettingsPage-0CQBNPZV.js +8695 -0
- package/dist/StewardPages-DAJhepen.js +47 -0
- package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
- package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
- package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
- package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
- package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
- package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
- package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
- package/dist/TemplatePreview-cx7-NOeG.js +868 -0
- package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
- package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
- package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
- package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
- package/dist/TranslationBridge-Da-TPgQm.js +68 -0
- package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
- package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
- package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
- package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
- package/dist/VariablesPage-ChfGuW22.js +2243 -0
- package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
- package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
- package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
- package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
- package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
- package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
- package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
- package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
- package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
- package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
- package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
- package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
- package/dist/WorkflowsList--hR2_8gf.js +4593 -0
- package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
- package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
- package/dist/addonCatalog-CbZS4deh.js +58 -0
- package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
- package/dist/addons.d.ts +3 -0
- package/dist/addons.js +4 -0
- package/dist/agent-form-Bfvm32j1.js +83 -0
- package/dist/agent-tools.d.ts +3 -0
- package/dist/agent-tools.js +5 -0
- package/dist/agentTools-CyL7DLOF.js +320 -0
- package/dist/ai-usage-BrxDgvdR.js +240 -0
- package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
- package/dist/api-BKq-nIOZ.js +2286 -0
- package/dist/api-Ol7I8NxE.js +8289 -0
- package/dist/apollo-type-policies.d.ts +11 -0
- package/dist/apollo-type-policies.js +64 -0
- package/dist/askAboutBridge-ByYsQams.js +106 -0
- package/dist/askQuestions-Cmx7VnMm.js +742 -0
- package/dist/assert-rules-lfYEMc99.js +318 -0
- package/dist/assistant.d.ts +94 -0
- package/dist/assistant.js +99 -0
- package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/basil.generated-BK-EHbwN.js +10 -0
- package/dist/browser-steps-DMpS5TyB.js +533 -0
- package/dist/builderTimings-pvGnK1m-.js +510 -0
- package/dist/button-DG7y_FVJ.js +48 -0
- package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
- package/dist/card-Bomy_1UG.js +44 -0
- package/dist/catalogGrid-BOrfMgi-.js +41 -0
- package/dist/channel-CPyQ1NR1.js +212 -0
- package/dist/chips-CvNrYJZa.js +27 -0
- package/dist/client-holder-C0M5Cfwl.js +68 -0
- package/dist/cn-QqidFIgr.js +10 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/code-editor-field-x_JrY8KR.js +113 -0
- package/dist/codec-client-DPuD6mw7.js +515 -0
- package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
- package/dist/config-DO68jw5k.js +322 -0
- package/dist/constants-DgbVc24O.d.ts +296 -0
- package/dist/constants-DlRnHBfQ.js +217 -0
- package/dist/convert-browser-action-pfecelF7.js +347 -0
- package/dist/convert-dialog-B_o22NiJ.js +382 -0
- package/dist/create-workflow-first-Azg3JUdX.js +120 -0
- package/dist/definition-canvas-Bsda-rDT.js +31 -0
- package/dist/dialog-BVd152GS.js +94 -0
- package/dist/durable-nodes-BXyYCLxT.js +91 -0
- package/dist/duration-CDb7-mT_.js +33 -0
- package/dist/edge-mapper-wEAdGVU2.js +4477 -0
- package/dist/element-library-DkSlg_VE.js +727 -0
- package/dist/entities-I_0kio3q.js +38 -0
- package/dist/error-advice-QLr5NCm7.js +65 -0
- package/dist/errors-ClKb5sEt.js +188 -0
- package/dist/executions.d.ts +3 -0
- package/dist/executions.js +5 -0
- package/dist/feature-flags-B2qetXKd.js +385 -0
- package/dist/field-label-DPZRmE_B.js +153 -0
- package/dist/firstWorkflow-C_h0KMB2.js +133 -0
- package/dist/flags.d.ts +3 -0
- package/dist/flags.js +4 -0
- package/dist/flow-builder-DIvLOhz0.js +28038 -0
- package/dist/flow-store-holder-CUN7Terz.js +52 -0
- package/dist/fluent.generated-CA_e6-4l.js +14 -0
- package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
- package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
- package/dist/global-client-BQPuFrFa.js +433 -0
- package/dist/global-operations-BG6YgxrM.js +136 -0
- package/dist/graphql-types-UTYtujY9.js +21358 -0
- package/dist/history.d.ts +3 -0
- package/dist/history.js +4 -0
- package/dist/index-AoJAa5vU.d.ts +164958 -0
- package/dist/index-DEMT3iAM.d.ts +120 -0
- package/dist/index-ROZzNGyY.d.ts +76 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +8123 -0
- package/dist/ion.generated-mbajjcAg.js +10 -0
- package/dist/label-Lzb8ZXf_.js +29 -0
- package/dist/labels-rXd9gYQz.js +1236 -0
- package/dist/liveCanvas-D5ytXDp8.js +103 -0
- package/dist/logos.generated-X6_0kjVR.js +21 -0
- package/dist/logs-panel-Cw0DkG0l.js +468 -0
- package/dist/lucide.generated-B6NVd3GT.js +29 -0
- package/dist/marksStore-a9oIMMot.js +175 -0
- package/dist/mcp-trigger-D0nRdvq5.js +307 -0
- package/dist/mdi.generated-D1BV74d6.js +292 -0
- package/dist/menus-CU3hDGYl.js +160 -0
- package/dist/mynaui.generated-DMWr5cXz.js +66 -0
- package/dist/navigation-v2.d.ts +3 -0
- package/dist/navigation-v2.js +5 -0
- package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
- package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
- package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/node-role-TMbnkmeP.js +132 -0
- package/dist/node-type-icon-BZa8n4iG.js +33 -0
- package/dist/nodes.d.ts +3 -0
- package/dist/nodes.js +4 -0
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +3 -0
- package/dist/observability.js +5 -0
- package/dist/offset-pages-zghoClB3.js +55 -0
- package/dist/operations-BBmT9ToP.js +663 -0
- package/dist/operations-WxRJWeqO.js +3133 -0
- package/dist/output-files-Ba8bu5lv.js +196 -0
- package/dist/page-operation-DrWuhd6Y.js +129 -0
- package/dist/page-twins.d.ts +13 -0
- package/dist/page-twins.js +186 -0
- package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
- package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
- package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
- package/dist/panels-PfBBAToE.js +346 -0
- package/dist/parts-B7fBcw-B.js +346 -0
- package/dist/popover-Dms9Vz3j.js +3389 -0
- package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
- package/dist/proactive.d.ts +66 -0
- package/dist/proactive.js +237 -0
- package/dist/quick-config-panel-DFd77xho.js +451 -0
- package/dist/quota-DeA_CJ2e.js +175 -0
- package/dist/quota.d.ts +3 -0
- package/dist/quota.js +4 -0
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/relative-time-Dxt8ZIIu.js +55 -0
- package/dist/results-CwK_yDxK.js +325 -0
- package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
- package/dist/route-data.d.ts +12 -0
- package/dist/route-data.js +69 -0
- package/dist/route-match-C-0_EnAt.d.ts +5 -0
- package/dist/route-match-DMkUICYV.js +41 -0
- package/dist/route-preload-C4DlGoCd.js +120 -0
- package/dist/run-display-UjLAoYqQ.js +81 -0
- package/dist/run-history-arGiHzGU.js +285 -0
- package/dist/run-list-links-DJn4Mf1T.js +98 -0
- package/dist/run-mode-USmM0-Uo.js +82 -0
- package/dist/run-parity-CWXqEJqM.js +144 -0
- package/dist/runsQuota-B6SyTbne.js +100 -0
- package/dist/runsQuota-DsniKiSg.d.ts +20 -0
- package/dist/safe-expression-Cw7-SCsm.js +1251 -0
- package/dist/save-status-store-C7nEYpfb.js +631 -0
- package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
- package/dist/schedule-rules-ggVKRkBH.js +358 -0
- package/dist/secrets-Re_wSiE3.js +153 -0
- package/dist/settings.d.ts +4 -0
- package/dist/settings.js +6 -0
- package/dist/shared-DAWGGMSM.js +177 -0
- package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
- package/dist/solar.generated-CGYuUQAC.js +10 -0
- package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
- package/dist/start-url-CT6Yz96K.js +24 -0
- package/dist/status-CessxGpm.js +55 -0
- package/dist/store-icon-OctYp5zP.js +155 -0
- package/dist/styles-WGmTnZ2n.js +26 -0
- package/dist/styles.css +139 -0
- package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
- package/dist/template-code-CzN6JWNV.js +191 -0
- package/dist/template-graph-DLF9dygU.js +20 -0
- package/dist/template-preview-DcIIKOOL.js +32 -0
- package/dist/template-price-CdUHZRMF.js +40 -0
- package/dist/templates.d.ts +3 -0
- package/dist/templates.js +5 -0
- package/dist/theme-provider-CntfC4_i.js +23 -0
- package/dist/transient-DgZfhDfN.js +57 -0
- package/dist/typed-calls-C5tO03wq.js +26 -0
- package/dist/ui-script-By74Guk3.js +1094 -0
- package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
- package/dist/ui-step-fix-8uM2_Hft.js +67 -0
- package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
- package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
- package/dist/ui-target-editor-D2JhB_lD.js +673 -0
- package/dist/uiMarkTools-CSznnO1i.js +1054 -0
- package/dist/upgradePrompt-BAFBKKW5.js +72 -0
- package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
- package/dist/use-browser-available-hj8wc3Kb.js +241 -0
- package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
- package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
- package/dist/use-mobile-BTqCUjzS.js +27 -0
- package/dist/use-sdk-query-C697xZVv.js +116 -0
- package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
- package/dist/useActionParam-B2tU2BlY.js +85 -0
- package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
- package/dist/useBrowserClients-3v95-gSh.js +103 -0
- package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
- package/dist/useConnections-DsgEJs05.js +439 -0
- package/dist/useDebouncedValue-BFekcv6n.js +18 -0
- package/dist/useDurableParity-8fnMZmBc.js +1787 -0
- package/dist/useEntityTags-D0spL6Ut.js +460 -0
- package/dist/useExecutions-2u5nGJJk.js +681 -0
- package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
- package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
- package/dist/useHumanRequests-zlYDp3l1.js +221 -0
- package/dist/useNavigationV2-C2WeqN7d.js +29 -0
- package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
- package/dist/useObservability-BRlQ0tOA.js +285 -0
- package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
- package/dist/useRunHistory-CXCMUPyf.js +2759 -0
- package/dist/useRunLive-D0JvVZT2.js +1060 -0
- package/dist/useRunnerList-Dbi59i1K.js +446 -0
- package/dist/useRunners-URUc5quU.js +173 -0
- package/dist/useRunsPage-DG656UCK.js +2709 -0
- package/dist/useVariables-BIelxcWr.js +463 -0
- package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
- package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
- package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
- package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
- package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
- package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
- package/dist/utils-fvBb5qOD.js +89 -0
- package/dist/webhook-deliveries-AvQujaZy.js +99 -0
- package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
- package/dist/workflow-builder.d.ts +3 -0
- package/dist/workflow-builder.js +8 -0
- package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
- package/dist/workflow-embed.d.ts +3 -0
- package/dist/workflow-embed.js +4 -0
- package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
- package/dist/workflow-host.d.ts +6 -0
- package/dist/workflow-host.js +11 -0
- package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
- package/dist/workflow-pages.d.ts +3 -0
- package/dist/workflow-pages.js +115 -0
- package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
- package/dist/workflow-preview.d.ts +65 -0
- package/dist/workflow-preview.js +4 -0
- package/dist/workflow-route.d.ts +33 -0
- package/dist/workflow-route.js +4 -0
- package/dist/workflow-save-state-D0l-DkLf.js +767 -0
- package/dist/workflow-transfer-CQnQC-ke.js +104 -0
- package/dist/workflowRouteData-BkfVOc-O.js +169 -0
- package/dist/workflows-list.d.ts +10 -0
- package/dist/workflows-list.js +5 -0
- package/package.json +320 -4
package/dist/styles.css
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/* FluidGrids FE SDK Styles */
|
|
2
|
+
|
|
3
|
+
/* Import Tailwind base styles - consumers should have Tailwind configured */
|
|
4
|
+
@tailwind base;
|
|
5
|
+
@tailwind components;
|
|
6
|
+
@tailwind utilities;
|
|
7
|
+
|
|
8
|
+
/* CSS Variables for theming */
|
|
9
|
+
:root {
|
|
10
|
+
--background: 0 0% 100%;
|
|
11
|
+
--foreground: 222.2 84% 4.9%;
|
|
12
|
+
--card: 0 0% 100%;
|
|
13
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
14
|
+
--popover: 0 0% 100%;
|
|
15
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
16
|
+
--primary: 222.2 47.4% 11.2%;
|
|
17
|
+
--primary-foreground: 210 40% 98%;
|
|
18
|
+
--secondary: 210 40% 96.1%;
|
|
19
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
20
|
+
--muted: 210 40% 96.1%;
|
|
21
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
22
|
+
--accent: 210 40% 96.1%;
|
|
23
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
24
|
+
--destructive: 0 84.2% 60.2%;
|
|
25
|
+
--destructive-foreground: 210 40% 98%;
|
|
26
|
+
--border: 214.3 31.8% 91.4%;
|
|
27
|
+
--input: 214.3 31.8% 91.4%;
|
|
28
|
+
--ring: 222.2 84% 4.9%;
|
|
29
|
+
--radius: 0.5rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dark {
|
|
33
|
+
--background: 222.2 84% 4.9%;
|
|
34
|
+
--foreground: 210 40% 98%;
|
|
35
|
+
--card: 222.2 84% 4.9%;
|
|
36
|
+
--card-foreground: 210 40% 98%;
|
|
37
|
+
--popover: 222.2 84% 4.9%;
|
|
38
|
+
--popover-foreground: 210 40% 98%;
|
|
39
|
+
--primary: 210 40% 98%;
|
|
40
|
+
--primary-foreground: 222.2 47.4% 11.2%;
|
|
41
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
42
|
+
--secondary-foreground: 210 40% 98%;
|
|
43
|
+
--muted: 217.2 32.6% 17.5%;
|
|
44
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
45
|
+
--accent: 217.2 32.6% 17.5%;
|
|
46
|
+
--accent-foreground: 210 40% 98%;
|
|
47
|
+
--destructive: 0 62.8% 30.6%;
|
|
48
|
+
--destructive-foreground: 210 40% 98%;
|
|
49
|
+
--border: 217.2 32.6% 17.5%;
|
|
50
|
+
--input: 217.2 32.6% 17.5%;
|
|
51
|
+
--ring: 212.7 26.8% 83.9%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Base styles */
|
|
55
|
+
* {
|
|
56
|
+
border-color: hsl(var(--border));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
body {
|
|
60
|
+
background-color: hsl(var(--background));
|
|
61
|
+
color: hsl(var(--foreground));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* React Flow customizations */
|
|
65
|
+
.react-flow {
|
|
66
|
+
background-color: hsl(var(--background));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.react-flow__node {
|
|
70
|
+
cursor: grab;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.react-flow__node:active {
|
|
74
|
+
cursor: grabbing;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.react-flow__edge-path {
|
|
78
|
+
stroke: hsl(var(--border));
|
|
79
|
+
stroke-width: 2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.react-flow__edge.selected .react-flow__edge-path {
|
|
83
|
+
stroke: hsl(var(--primary));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.react-flow__handle {
|
|
87
|
+
width: 10px;
|
|
88
|
+
height: 10px;
|
|
89
|
+
background-color: hsl(var(--primary));
|
|
90
|
+
border: 2px solid hsl(var(--background));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.react-flow__controls {
|
|
94
|
+
box-shadow: var(--shadow-elevation-1);
|
|
95
|
+
border-radius: var(--radius);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.react-flow__controls-button {
|
|
99
|
+
background-color: hsl(var(--background));
|
|
100
|
+
border-color: hsl(var(--border));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.react-flow__controls-button:hover {
|
|
104
|
+
background-color: hsl(var(--accent));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.react-flow__minimap {
|
|
108
|
+
background-color: hsl(var(--card));
|
|
109
|
+
border-radius: var(--radius);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Animation utilities */
|
|
113
|
+
@keyframes fadeIn {
|
|
114
|
+
from {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
}
|
|
117
|
+
to {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@keyframes slideIn {
|
|
123
|
+
from {
|
|
124
|
+
transform: translateY(-10px);
|
|
125
|
+
opacity: 0;
|
|
126
|
+
}
|
|
127
|
+
to {
|
|
128
|
+
transform: translateY(0);
|
|
129
|
+
opacity: 1;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.animate-fade-in {
|
|
134
|
+
animation: fadeIn 0.2s ease-out;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.animate-slide-in {
|
|
138
|
+
animation: slideIn 0.2s ease-out;
|
|
139
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/icons/bundled/svg-spinners.generated.ts
|
|
3
|
+
const SVG_SPINNERS_ICONS = {
|
|
4
|
+
"prefix": "svg-spinners",
|
|
5
|
+
"width": 24,
|
|
6
|
+
"height": 24,
|
|
7
|
+
"icons": { "ring-resize": { "body": "<g stroke=\"currentColor\"><circle cx=\"12\" cy=\"12\" r=\"9.5\" fill=\"none\" stroke-linecap=\"round\" stroke-width=\"3\"><animate attributeName=\"stroke-dasharray\" calcMode=\"spline\" dur=\"1.5s\" keySplines=\"0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1\" keyTimes=\"0;0.475;0.95;1\" repeatCount=\"indefinite\" values=\"0 150;42 150;42 150;42 150\"/><animate attributeName=\"stroke-dashoffset\" calcMode=\"spline\" dur=\"1.5s\" keySplines=\"0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1\" keyTimes=\"0;0.475;0.95;1\" repeatCount=\"indefinite\" values=\"0;-16;-59;-59\"/></circle><animateTransform attributeName=\"transform\" dur=\"2s\" repeatCount=\"indefinite\" type=\"rotate\" values=\"0 12 12;360 12 12\"/></g>" } }
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { SVG_SPINNERS_ICONS };
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { b as utf8Length } from "./workflow-code-transfer-Bsy0JKAZ.js";
|
|
3
|
+
|
|
4
|
+
// src/utils/template-code.ts
|
|
5
|
+
/** DD3: the largest `content.sources` the store accepts, as UTF-8 JSON. */
|
|
6
|
+
const TEMPLATE_SOURCES_MAX_BYTES = 1048576;
|
|
7
|
+
/** DD3: the most files `content.sources` may hold. */
|
|
8
|
+
const TEMPLATE_SOURCES_MAX_FILES = 64;
|
|
9
|
+
/** The only package a tier-2 template's sources may import (C-TEMPLATE). */
|
|
10
|
+
const TEMPLATE_RUNTIME_PACKAGE = "@fluidgrids/workflows";
|
|
11
|
+
var TemplateCodeError = class extends Error {
|
|
12
|
+
problem;
|
|
13
|
+
constructor(problem) {
|
|
14
|
+
super(`Template code refused: ${problem.code}`);
|
|
15
|
+
this.problem = problem;
|
|
16
|
+
this.name = "TemplateCodeError";
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
function isRecord(value) {
|
|
20
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Whether a source path is a plain relative POSIX path, as global-store-svc
|
|
24
|
+
* requires: not empty, not absolute, no drive letter, no backslash, no `.`,
|
|
25
|
+
* `..` or empty segment, and no control character.
|
|
26
|
+
*/
|
|
27
|
+
function isSafeTemplateSourcePath(path) {
|
|
28
|
+
if (!path || path.startsWith("/") || path.includes("\\")) return false;
|
|
29
|
+
if (/^[A-Za-z]:/.test(path)) return false;
|
|
30
|
+
for (const character of path) {
|
|
31
|
+
const code = character.charCodeAt(0);
|
|
32
|
+
if (code < 32 || code === 127) return false;
|
|
33
|
+
}
|
|
34
|
+
return path.split("/").every((segment) => segment !== "" && segment !== "." && segment !== "..");
|
|
35
|
+
}
|
|
36
|
+
/** Bytes the store counts for a sources list: its UTF-8 JSON. */
|
|
37
|
+
function templateSourcesBytes(sources) {
|
|
38
|
+
return utf8Length(JSON.stringify(sources));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Module specifiers a source imports: static and dynamic `import`, `export
|
|
42
|
+
* … from` and `require`. Comments are not stripped, so a commented-out import
|
|
43
|
+
* is counted too; that only makes the check stricter.
|
|
44
|
+
*/
|
|
45
|
+
function importedSpecifiers(source) {
|
|
46
|
+
const found = [];
|
|
47
|
+
for (const pattern of [
|
|
48
|
+
/\b(?:import|export)\s[^'"`;]*?\bfrom\s*['"]([^'"]+)['"]/g,
|
|
49
|
+
/\bimport\s*['"]([^'"]+)['"]/g,
|
|
50
|
+
/\bimport\s*\(\s*['"]([^'"]+)['"]\s*\)/g,
|
|
51
|
+
/\brequire\s*\(\s*['"]([^'"]+)['"]\s*\)/g
|
|
52
|
+
]) for (const match of source.matchAll(pattern)) if (match[1] !== void 0) found.push(match[1]);
|
|
53
|
+
return found;
|
|
54
|
+
}
|
|
55
|
+
/** A specifier a tier-2 source may use: a project file or the SDK itself. */
|
|
56
|
+
function isAllowedSpecifier(specifier) {
|
|
57
|
+
return specifier.startsWith("./") || specifier.startsWith("../") || specifier === "@fluidgrids/workflows";
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Checks sources against the store's rules (and, for tier 2, the import
|
|
61
|
+
* rule). Throws {@link TemplateCodeError} with the first problem found.
|
|
62
|
+
*/
|
|
63
|
+
function assertTemplateSources(sources, tier) {
|
|
64
|
+
if (sources.length === 0) throw new TemplateCodeError({ code: "no-files" });
|
|
65
|
+
if (sources.length > 64) throw new TemplateCodeError({
|
|
66
|
+
code: "too-many-files",
|
|
67
|
+
limit: 64
|
|
68
|
+
});
|
|
69
|
+
const seen = /* @__PURE__ */ new Set();
|
|
70
|
+
for (const file of sources) {
|
|
71
|
+
if (!isSafeTemplateSourcePath(file.path)) throw new TemplateCodeError({
|
|
72
|
+
code: "unsafe-path",
|
|
73
|
+
path: file.path
|
|
74
|
+
});
|
|
75
|
+
const folded = file.path.toLowerCase();
|
|
76
|
+
if (seen.has(folded)) throw new TemplateCodeError({
|
|
77
|
+
code: "duplicate-path",
|
|
78
|
+
path: file.path
|
|
79
|
+
});
|
|
80
|
+
seen.add(folded);
|
|
81
|
+
if (tier === "tier2" && /\.[cm]?[jt]s$/.test(file.path)) {
|
|
82
|
+
const foreign = importedSpecifiers(file.content).find((specifier) => !isAllowedSpecifier(specifier));
|
|
83
|
+
if (foreign !== void 0) throw new TemplateCodeError({
|
|
84
|
+
code: "foreign-import",
|
|
85
|
+
path: file.path,
|
|
86
|
+
specifier: foreign
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (templateSourcesBytes(sources) > 1048576) throw new TemplateCodeError({
|
|
91
|
+
code: "too-large",
|
|
92
|
+
limitBytes: TEMPLATE_SOURCES_MAX_BYTES
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A template's code, or null when it has none or what it has is not usable
|
|
97
|
+
* (not a list of files, unsafe paths, an unknown format or tier). The store
|
|
98
|
+
* refuses such content on write; reading defensively keeps a template written
|
|
99
|
+
* before the guard, or by another client, from breaking the page.
|
|
100
|
+
*/
|
|
101
|
+
function readTemplateCode(content) {
|
|
102
|
+
if (!content || !Array.isArray(content.sources)) return null;
|
|
103
|
+
const files = [];
|
|
104
|
+
for (const entry of content.sources) {
|
|
105
|
+
if (!isRecord(entry) || typeof entry.path !== "string" || typeof entry.content !== "string") return null;
|
|
106
|
+
files.push({
|
|
107
|
+
path: entry.path,
|
|
108
|
+
contentType: typeof entry.contentType === "string" ? entry.contentType : contentTypeOf(entry.path),
|
|
109
|
+
content: entry.content
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
const format = content.sourceFormat ?? "TYPESCRIPT";
|
|
113
|
+
if (format !== "TYPESCRIPT" && format !== "PYTHON") return null;
|
|
114
|
+
const tier = content.codeTier ?? "tier1";
|
|
115
|
+
if (tier !== "tier1" && tier !== "tier2") return null;
|
|
116
|
+
try {
|
|
117
|
+
assertTemplateSources(files, "tier1");
|
|
118
|
+
} catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
files,
|
|
123
|
+
format,
|
|
124
|
+
tier,
|
|
125
|
+
irHash: typeof content.sourceIrHash === "string" ? content.sourceIrHash : null
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/** The content type a project file is stored with, by its extension. */
|
|
129
|
+
function contentTypeOf(path) {
|
|
130
|
+
if (/\.[cm]?ts$/.test(path)) return "text/typescript";
|
|
131
|
+
if (/\.[cm]?js$/.test(path)) return "text/javascript";
|
|
132
|
+
if (path.endsWith(".py")) return "text/x-python";
|
|
133
|
+
if (path.endsWith(".json")) return "application/json";
|
|
134
|
+
return "text/plain";
|
|
135
|
+
}
|
|
136
|
+
/** A file name segment that is safe on every OS. */
|
|
137
|
+
function safeSegment(value) {
|
|
138
|
+
return value.toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
139
|
+
}
|
|
140
|
+
/** The zip *Open as code* downloads for a template. */
|
|
141
|
+
function templateArchiveName(templateName) {
|
|
142
|
+
return `${safeSegment(templateName) || "template"}.code.zip`;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* *Open as code*: the template's project files as one zip that keeps their
|
|
146
|
+
* paths, so unpacking it gives a FluidGrids project (`fluidgrids push`
|
|
147
|
+
* reads it as it is).
|
|
148
|
+
*/
|
|
149
|
+
async function buildTemplateCodeDownload(templateName, code) {
|
|
150
|
+
const { default: JSZip } = await import("jszip");
|
|
151
|
+
const zip = new JSZip();
|
|
152
|
+
for (const file of code.files) zip.file(file.path, file.content);
|
|
153
|
+
return {
|
|
154
|
+
filename: templateArchiveName(templateName),
|
|
155
|
+
blob: await zip.generateAsync({
|
|
156
|
+
type: "blob",
|
|
157
|
+
mimeType: "application/zip"
|
|
158
|
+
})
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/** The `source` of an `importWorkflowTemplate` for a tier-2 install. */
|
|
162
|
+
function templateImportSource(code) {
|
|
163
|
+
return {
|
|
164
|
+
format: code.format,
|
|
165
|
+
files: code.files.map((file) => ({
|
|
166
|
+
path: file.path,
|
|
167
|
+
content: file.content
|
|
168
|
+
}))
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* What `importWorkflowTemplate` installs a template from (PLAN-D D2): its
|
|
173
|
+
* sources for a tier-2 TypeScript template while code-first, durable-functions and
|
|
174
|
+
* code-templates are on (`codeTemplatesDurable`), else null, and the caller
|
|
175
|
+
* sends `definitionJson` exactly as before (tier 1, Python, no code, or a
|
|
176
|
+
* gate off).
|
|
177
|
+
*/
|
|
178
|
+
function templateInstallSource(content, codeTemplatesDurable) {
|
|
179
|
+
if (!codeTemplatesDurable) return null;
|
|
180
|
+
const code = readTemplateCode(content);
|
|
181
|
+
return code?.tier === "tier2" && code.format === "TYPESCRIPT" ? templateImportSource(code) : null;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Whether a definition is a tier-2 workflow function: it carries a `code`
|
|
185
|
+
* block (entry, build id) that names its bundle.
|
|
186
|
+
*/
|
|
187
|
+
function isTier2Definition(definitionJson) {
|
|
188
|
+
return isRecord(definitionJson) && isRecord(definitionJson.code);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export { contentTypeOf as a, templateInstallSource as c, buildTemplateCodeDownload as i, TemplateCodeError as n, isTier2Definition as o, assertTemplateSources as r, readTemplateCode as s, TEMPLATE_SOURCES_MAX_BYTES as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/utils/template-graph.ts
|
|
3
|
+
/**
|
|
4
|
+
* Extract nodes/edges from a template `content` object.
|
|
5
|
+
* Returns null when the content carries no renderable graph.
|
|
6
|
+
*/
|
|
7
|
+
function extractTemplateGraph(content) {
|
|
8
|
+
const dj = content?.definitionJson;
|
|
9
|
+
if (!dj) return null;
|
|
10
|
+
const graph = dj.data ?? dj;
|
|
11
|
+
const nodes = graph?.nodes ?? [];
|
|
12
|
+
const edges = graph?.edges ?? [];
|
|
13
|
+
if (!nodes.length) return null;
|
|
14
|
+
return {
|
|
15
|
+
nodes,
|
|
16
|
+
edges
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { extractTemplateGraph as t };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { n as storeIconCandidates } from "./store-icon-OctYp5zP.js";
|
|
3
|
+
|
|
4
|
+
// src/utils/template-preview.ts
|
|
5
|
+
/**
|
|
6
|
+
* What a store template card shows as its preview (BOFF-10462).
|
|
7
|
+
*
|
|
8
|
+
* A store product's `icon` is either an image URL or an Iconify icon name such
|
|
9
|
+
* as `mdi:file-delimited`. Official workflow templates use Iconify names, the
|
|
10
|
+
* same format a workflow's own `icon` uses, so they must be drawn as an icon:
|
|
11
|
+
* set as an `<img src>`, `mdi:...` is read as a URL scheme and fails to load.
|
|
12
|
+
*
|
|
13
|
+
* The store also serves `iconUrl`, the browser-ready form of the icon (an
|
|
14
|
+
* https URL or an offline SVG data URI rendered from the Iconify set). It is
|
|
15
|
+
* preferred over the raw `icon` because it does not depend on the Iconify API,
|
|
16
|
+
* which rate-limits viewers after a few dozen icons.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Every preview a template can show, best first: its screenshots, then its
|
|
20
|
+
* `iconUrl`, then its raw `icon`. A card walks this list when an image fails
|
|
21
|
+
* to load, so a dead screenshot or an expired icon link falls back instead of
|
|
22
|
+
* leaving a broken-image glyph.
|
|
23
|
+
*/
|
|
24
|
+
function templatePreviewCandidates(template) {
|
|
25
|
+
return storeIconCandidates([
|
|
26
|
+
...template.screenshots ?? [],
|
|
27
|
+
template.iconUrl,
|
|
28
|
+
template.icon
|
|
29
|
+
]);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { templatePreviewCandidates as t };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/utils/template-price.ts
|
|
3
|
+
/**
|
|
4
|
+
* The price shown on a store template card and in the preview.
|
|
5
|
+
*
|
|
6
|
+
* USD (and a template with no currency) keeps the plain "$12" form the cards
|
|
7
|
+
* have always shown; any other currency is written with its own symbol, so a
|
|
8
|
+
* template priced in rupees or euros is not shown with a dollar sign.
|
|
9
|
+
*/
|
|
10
|
+
const formatters = /* @__PURE__ */ new Map();
|
|
11
|
+
function formatterFor(currency) {
|
|
12
|
+
const cached = formatters.get(currency);
|
|
13
|
+
if (cached) return cached;
|
|
14
|
+
try {
|
|
15
|
+
const created = new Intl.NumberFormat(void 0, {
|
|
16
|
+
style: "currency",
|
|
17
|
+
currency,
|
|
18
|
+
maximumFractionDigits: 2
|
|
19
|
+
});
|
|
20
|
+
formatters.set(currency, created);
|
|
21
|
+
return created;
|
|
22
|
+
} catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function formatTemplatePrice(price, currency) {
|
|
27
|
+
const code = currency?.trim().toUpperCase() || "USD";
|
|
28
|
+
if (code === "USD") return `$${price?.toString() || "0"}`;
|
|
29
|
+
const formatter = formatterFor(code);
|
|
30
|
+
return formatter ? formatter.format(price ?? 0) : `${price?.toString() || "0"} ${code}`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A template that costs money and has not been bought yet: "Use this
|
|
34
|
+
* template" asks first, naming the price (Navigation v2, BOFF-11848).
|
|
35
|
+
*/
|
|
36
|
+
function isPaidTemplate(template) {
|
|
37
|
+
return !!template.pricingModel && template.pricingModel !== "FREE" && (template.price ?? 0) > 0 && template.isPurchased !== true;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { isPaidTemplate as n, formatTemplatePrice as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as EnsureThemeProvider } from "./EnsureThemeProvider-BvlNjAd0.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
// src/builder/components/theme-provider.tsx
|
|
6
|
+
/**
|
|
7
|
+
* The theme of the SDK's read-only canvas views: the template preview, AI
|
|
8
|
+
* Studio's draft canvas and the public embed viewer.
|
|
9
|
+
*
|
|
10
|
+
* Inside an app shell these views use the shell's own fe-libs ThemeProvider.
|
|
11
|
+
* They used to mount a second one, which rewrote the document's theme
|
|
12
|
+
* attributes (`data-theme`, `data-brand`, density, glass, motion and the
|
|
13
|
+
* `.dark` class) with its own defaults (the system mode and the default
|
|
14
|
+
* brand) when the view opened. Nothing put the user's theme back when the
|
|
15
|
+
* view closed, so every page kept the wrong theme and brand until a reload
|
|
16
|
+
* (BOFF-14995). A page with no provider still gets the SDK's own; see
|
|
17
|
+
* {@link EnsureThemeProvider}.
|
|
18
|
+
*/
|
|
19
|
+
function ThemeProvider({ children }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(EnsureThemeProvider, { children });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { ThemeProvider as t };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CombinedGraphQLErrors, ServerError } from "@apollo/client/errors";
|
|
3
|
+
|
|
4
|
+
// src/graphql/transient.ts
|
|
5
|
+
/**
|
|
6
|
+
* Bounded retry for transient network failures (BOFF-12648 follow-up).
|
|
7
|
+
*
|
|
8
|
+
* A request through the gateway can fail for a moment without anything being
|
|
9
|
+
* wrong with it: a connection reset between the gateway and a service
|
|
10
|
+
* (ECONNRESET), a browser `fetch` that rejects with a TypeError, or a 502 /
|
|
11
|
+
* 503 / 504 while a pod rolls. Such a failure is retried a few times with a
|
|
12
|
+
* growing delay; any other failure (a GraphQL validation error, a 4xx, a
|
|
13
|
+
* permission denial) is thrown at once, since repeating it cannot help.
|
|
14
|
+
*/
|
|
15
|
+
/** HTTP statuses a gateway answers while an upstream is briefly unavailable. */
|
|
16
|
+
const TRANSIENT_STATUSES = /* @__PURE__ */ new Set([
|
|
17
|
+
502,
|
|
18
|
+
503,
|
|
19
|
+
504
|
|
20
|
+
]);
|
|
21
|
+
/**
|
|
22
|
+
* Messages of a dropped or refused connection, as Node services report them
|
|
23
|
+
* through the gateway and as browsers word a failed `fetch`.
|
|
24
|
+
*/
|
|
25
|
+
const TRANSIENT_MESSAGE = /\b(?:ECONNRESET|ECONNREFUSED|ETIMEDOUT|EPIPE|EAI_AGAIN|UND_ERR_SOCKET)\b|socket hang up|fetch failed|failed to fetch|networkerror|network request failed|load failed/i;
|
|
26
|
+
/** True when `error` is a failure worth trying again: see the module comment. */
|
|
27
|
+
function isTransientNetworkError(error) {
|
|
28
|
+
if (ServerError.is(error)) return TRANSIENT_STATUSES.has(error.statusCode) || TRANSIENT_MESSAGE.test(error.bodyText);
|
|
29
|
+
if (CombinedGraphQLErrors.is(error)) return error.errors.length > 0 && error.errors.every((graphQLError) => TRANSIENT_MESSAGE.test(graphQLError.message ?? ""));
|
|
30
|
+
if (error instanceof Error) {
|
|
31
|
+
if (TRANSIENT_MESSAGE.test(error.message)) return true;
|
|
32
|
+
if (error.cause !== void 0) return isTransientNetworkError(error.cause);
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
const TRANSIENT_RETRY_ATTEMPTS = 3;
|
|
37
|
+
const TRANSIENT_RETRY_BASE_DELAY_MS = 400;
|
|
38
|
+
const TRANSIENT_RETRY_MAX_DELAY_MS = 3e3;
|
|
39
|
+
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
40
|
+
/**
|
|
41
|
+
* Runs `operation`, trying again after a transient failure up to `attempts`
|
|
42
|
+
* times in all. The last failure, or the first non-transient one, is thrown.
|
|
43
|
+
*/
|
|
44
|
+
async function retryTransient(operation, options = {}) {
|
|
45
|
+
const attempts = Math.max(1, options.attempts ?? 3);
|
|
46
|
+
const base = options.baseDelayMs ?? 400;
|
|
47
|
+
const max = options.maxDelayMs ?? 3e3;
|
|
48
|
+
const sleep = options.sleep ?? wait;
|
|
49
|
+
for (let attempt = 1;; attempt++) try {
|
|
50
|
+
return await operation();
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (attempt >= attempts || !isTransientNetworkError(error)) throw error;
|
|
53
|
+
await sleep(Math.min(max, base * 3 ** (attempt - 1)));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { retryTransient as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { n as getFluidGridsClient } from "./client-holder-C0M5Cfwl.js";
|
|
3
|
+
import { s as throwIfResultError } from "./errors-ClKb5sEt.js";
|
|
4
|
+
|
|
5
|
+
// src/graphql/typed-calls.ts
|
|
6
|
+
async function readTyped(query, variables) {
|
|
7
|
+
const result = await getFluidGridsClient().query({
|
|
8
|
+
query,
|
|
9
|
+
variables,
|
|
10
|
+
fetchPolicy: "network-only"
|
|
11
|
+
});
|
|
12
|
+
throwIfResultError(result);
|
|
13
|
+
if (!result.data) throw new Error("The request returned no data");
|
|
14
|
+
return result.data;
|
|
15
|
+
}
|
|
16
|
+
async function writeTyped(mutation, variables) {
|
|
17
|
+
const result = await getFluidGridsClient().mutate({
|
|
18
|
+
mutation,
|
|
19
|
+
variables
|
|
20
|
+
});
|
|
21
|
+
throwIfResultError(result);
|
|
22
|
+
if (!result.data) throw new Error("The request returned no data");
|
|
23
|
+
return result.data;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { writeTyped as n, readTyped as t };
|