@oomol-lab/open-flow 0.1.0-beta.51 → 0.1.0-beta.52
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/dist/browser/{createResourceDialog-BDtXpRSt.js → createResourceDialog-BsaBMf7_.js} +2 -1
- package/dist/browser/flow-authoring.js +46 -3
- package/dist/browser/flow-change.d.ts +6 -1
- package/dist/browser/flow-change.js +46 -3
- package/dist/browser/{flowChanges-BWSXSnMX.js → flowChanges-DtraMpva.js} +3463 -1930
- package/dist/browser/{flowWorkspace-DBaq2Eks.js → flowWorkspace-DLgti4Lk.js} +896 -325
- package/dist/browser/{workbenchSelect-C9kwcUmN.js → icons-0s-Q_3lp.js} +48 -32
- package/dist/browser/licenses.md +204 -0
- package/dist/browser/preview.css +282 -179
- package/dist/browser/preview.js +4289 -2193
- package/dist/browser/theme.css +2 -0
- package/dist/browser/ui-hostNavigationActions.d.ts +13 -0
- package/dist/browser/ui-hostTooltip.d.ts +8 -0
- package/dist/browser/ui-logo.d.ts +5 -0
- package/dist/browser/ui.css +82 -8
- package/dist/browser/ui.d.ts +3 -0
- package/dist/browser/ui.js +172 -8
- package/dist/browser/workbench-contract.d.ts +4 -11
- package/dist/browser/workbench.css +346 -200
- package/dist/browser/workbench.d.ts +1 -1
- package/dist/browser/workbench.js +1029 -365
- package/dist/browser/workbenchSelect-BqUPacsr.js +31 -0
- package/dist/common/authoringExamples.d.ts +4 -3
- package/dist/common/control-api-conformance.js +47 -1
- package/dist/common/control-api.d.ts +4 -0
- package/dist/common/control-api.js +51 -2
- package/dist/common/control-requests.d.ts +4 -0
- package/dist/common/control-requests.js +1299 -68
- package/dist/common/flow-encoding.js +34 -0
- package/dist/common/flow-semantics.js +674 -252
- package/dist/common/integration-trigger.js +23 -0
- package/dist/common/mcp.js +47 -1
- package/dist/common/openapi.d.ts +53 -0
- package/dist/common/openapi.js +10390 -0
- package/dist/common/poll-trigger.js +23 -0
- package/dist/common/provider-triggers.js +23 -0
- package/dist/common/run-events.js +1 -0
- package/dist/common/scheduler.d.ts +1 -1
- package/dist/common/scheduler.js +31 -1
- package/dist/common/webhook-trigger.js +23 -0
- package/package.json +5 -1
package/dist/browser/theme.css
CHANGED
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
--open-flow-input: #d2d2d2;
|
|
30
30
|
--open-flow-ring: #777777;
|
|
31
31
|
--open-flow-radius: 10px;
|
|
32
|
+
--ui-code-gutter-background: light-dark(#fff, #333338);
|
|
33
|
+
--ui-code-gutter-border: light-dark(#ddd, #333338);
|
|
32
34
|
--ui-background: var(--open-flow-background);
|
|
33
35
|
--ui-foreground: var(--open-flow-foreground);
|
|
34
36
|
--ui-card: var(--open-flow-card);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { UiLanguage } from '../common/localization.js';
|
|
3
|
+
export type HostThemeMode = 'light' | 'dark' | 'auto';
|
|
4
|
+
export interface HostNavigationActionsProps {
|
|
5
|
+
readonly className?: string;
|
|
6
|
+
readonly language: UiLanguage;
|
|
7
|
+
readonly onLanguageChange: (language: UiLanguage) => void;
|
|
8
|
+
readonly theme: HostThemeMode;
|
|
9
|
+
readonly onThemeChange: (theme: HostThemeMode) => void;
|
|
10
|
+
readonly labels: Readonly<Record<HostThemeMode | 'theme' | 'language', string>>;
|
|
11
|
+
}
|
|
12
|
+
/** Shared host navigation; each host owns preference storage and localized labels. */
|
|
13
|
+
export declare function HostNavigationActions({ className, language, onLanguageChange, theme, onThemeChange, labels }: HostNavigationActionsProps): ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
export interface HostTooltipProps {
|
|
3
|
+
readonly children: ReactElement;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly side?: 'top' | 'bottom' | 'left' | 'right';
|
|
6
|
+
}
|
|
7
|
+
/** Compose a host control with the shared tooltip while preserving its theme and semantics. */
|
|
8
|
+
export declare function HostTooltip({ children, label, side }: HostTooltipProps): ReactElement;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface OpenFlowLogoProps extends Omit<ComponentPropsWithoutRef<'img'>, 'src' | 'srcSet'> {
|
|
3
|
+
readonly theme: 'light' | 'dark';
|
|
4
|
+
}
|
|
5
|
+
export declare function OpenFlowLogo({ theme, alt, width, height, style, ...props }: OpenFlowLogoProps): import("react").JSX.Element;
|
package/dist/browser/ui.css
CHANGED
|
@@ -125,6 +125,8 @@
|
|
|
125
125
|
--open-flow-input: #d2d2d2;
|
|
126
126
|
--open-flow-ring: #777;
|
|
127
127
|
--open-flow-radius: 10px;
|
|
128
|
+
--ui-code-gutter-background: light-dark(#fff, #333338);
|
|
129
|
+
--ui-code-gutter-border: light-dark(#ddd, #333338);
|
|
128
130
|
--ui-background: var(--open-flow-background);
|
|
129
131
|
--ui-foreground: var(--open-flow-foreground);
|
|
130
132
|
--ui-card: var(--open-flow-card);
|
|
@@ -1688,10 +1690,6 @@
|
|
|
1688
1690
|
min-width: calc(var(--spacing) * 36);
|
|
1689
1691
|
}
|
|
1690
1692
|
|
|
1691
|
-
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .min-w-40 {
|
|
1692
|
-
min-width: calc(var(--spacing) * 40);
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
1693
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .min-w-44 {
|
|
1696
1694
|
min-width: calc(var(--spacing) * 44);
|
|
1697
1695
|
}
|
|
@@ -2055,10 +2053,10 @@
|
|
|
2055
2053
|
column-gap: calc(var(--spacing) * 3);
|
|
2056
2054
|
}
|
|
2057
2055
|
|
|
2058
|
-
:where(:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .-space-x-
|
|
2056
|
+
:where(:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .-space-x-0\.5 > :not(:last-child)) {
|
|
2059
2057
|
--tw-space-x-reverse: 0;
|
|
2060
|
-
margin-inline-start: calc(calc(var(--spacing) *
|
|
2061
|
-
margin-inline-end: calc(calc(var(--spacing) *
|
|
2058
|
+
margin-inline-start: calc(calc(var(--spacing) * -.5) * var(--tw-space-x-reverse));
|
|
2059
|
+
margin-inline-end: calc(calc(var(--spacing) * -.5) * calc(1 - var(--tw-space-x-reverse)));
|
|
2062
2060
|
}
|
|
2063
2061
|
|
|
2064
2062
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .gap-y-1 {
|
|
@@ -3190,6 +3188,10 @@
|
|
|
3190
3188
|
--content-icon-initials-background: transparent;
|
|
3191
3189
|
}
|
|
3192
3190
|
|
|
3191
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .\[--ui-control-hover-background\:var\(--ui-control-background\,var\(--ui-muted\)\)\] {
|
|
3192
|
+
--ui-control-hover-background: var(--ui-control-background, var(--ui-muted));
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3193
3195
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .\[--ui-control-hover-background\:var\(--warning-subtle-hover\)\] {
|
|
3194
3196
|
--ui-control-hover-background: var(--warning-subtle-hover);
|
|
3195
3197
|
}
|
|
@@ -3438,6 +3440,21 @@
|
|
|
3438
3440
|
}
|
|
3439
3441
|
}
|
|
3440
3442
|
|
|
3443
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .placeholder\:opacity-70::placeholder {
|
|
3444
|
+
opacity: .7;
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .placeholder\:transition-opacity::placeholder {
|
|
3448
|
+
transition-property: opacity;
|
|
3449
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
3450
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
3451
|
+
}
|
|
3452
|
+
|
|
3453
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .placeholder\:duration-300::placeholder {
|
|
3454
|
+
--tw-duration: .3s;
|
|
3455
|
+
transition-duration: .3s;
|
|
3456
|
+
}
|
|
3457
|
+
|
|
3441
3458
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .before\:absolute:before {
|
|
3442
3459
|
content: var(--tw-content);
|
|
3443
3460
|
position: absolute;
|
|
@@ -3677,6 +3694,10 @@
|
|
|
3677
3694
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
|
|
3678
3695
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
3679
3696
|
}
|
|
3697
|
+
|
|
3698
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .hover\:placeholder\:opacity-50:hover::placeholder {
|
|
3699
|
+
opacity: .5;
|
|
3700
|
+
}
|
|
3680
3701
|
}
|
|
3681
3702
|
|
|
3682
3703
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .focus\:z-10:focus {
|
|
@@ -3695,6 +3716,10 @@
|
|
|
3695
3716
|
color: var(--ui-accent-foreground);
|
|
3696
3717
|
}
|
|
3697
3718
|
|
|
3719
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .focus\:placeholder\:opacity-30:focus::placeholder {
|
|
3720
|
+
opacity: .3;
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3698
3723
|
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .focus-visible\:z-10:focus-visible {
|
|
3699
3724
|
z-index: 10;
|
|
3700
3725
|
}
|
|
@@ -4651,6 +4676,33 @@
|
|
|
4651
4676
|
border-radius: calc(var(--ui-radius) - 2px);
|
|
4652
4677
|
}
|
|
4653
4678
|
|
|
4679
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .data-\[slot\=native-select\]\:focus-visible\:text-field-focus[data-slot="native-select"]:focus-visible {
|
|
4680
|
+
outline: 2px solid var(--ui-ring);
|
|
4681
|
+
outline-offset: -1px;
|
|
4682
|
+
box-shadow: none;
|
|
4683
|
+
transition-property: color, background-color;
|
|
4684
|
+
}
|
|
4685
|
+
|
|
4686
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .data-\[slot\=native-select\]\:focus-visible\:text-field-focus[data-slot="native-select"]:focus-visible[readonly] {
|
|
4687
|
+
outline: var(--ui-readonly-focus-outline, 2px solid var(--ui-ring));
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4690
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .data-\[slot\=native-select\]\:focus-visible\:aria-invalid\:invalid-text-field-focus[data-slot="native-select"]:focus-visible[aria-invalid="true"] {
|
|
4691
|
+
outline: 2px solid var(--ui-ring);
|
|
4692
|
+
outline-offset: -1px;
|
|
4693
|
+
box-shadow: none;
|
|
4694
|
+
transition-property: color, background-color;
|
|
4695
|
+
}
|
|
4696
|
+
|
|
4697
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .data-\[slot\=native-select\]\:focus-visible\:aria-invalid\:invalid-text-field-focus[data-slot="native-select"]:focus-visible[aria-invalid="true"][readonly] {
|
|
4698
|
+
outline: var(--ui-readonly-focus-outline, 2px solid var(--ui-ring));
|
|
4699
|
+
}
|
|
4700
|
+
|
|
4701
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .data-\[slot\=native-select\]\:focus-visible\:aria-invalid\:invalid-text-field-focus[data-slot="native-select"]:focus-visible[aria-invalid="true"] {
|
|
4702
|
+
outline-color: var(--ui-destructive);
|
|
4703
|
+
outline-offset: calc(-1 * var(--ui-danger-border-width, 1px));
|
|
4704
|
+
}
|
|
4705
|
+
|
|
4654
4706
|
:is(:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .\*\:data-\[slot\=select-value\]\:line-clamp-1 > *)[data-slot="select-value"] {
|
|
4655
4707
|
-webkit-line-clamp: 1;
|
|
4656
4708
|
-webkit-box-orient: vertical;
|
|
@@ -4765,7 +4817,7 @@
|
|
|
4765
4817
|
animation: none;
|
|
4766
4818
|
}
|
|
4767
4819
|
|
|
4768
|
-
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .motion-reduce\:transition-none {
|
|
4820
|
+
:where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .motion-reduce\:transition-none, :where(.open-flow-theme, .open-flow-workbench, .open-flow-canvas-root) .motion-reduce\:placeholder\:transition-none::placeholder {
|
|
4769
4821
|
transition-property: none;
|
|
4770
4822
|
}
|
|
4771
4823
|
|
|
@@ -5735,6 +5787,28 @@
|
|
|
5735
5787
|
width: 28px;
|
|
5736
5788
|
}
|
|
5737
5789
|
|
|
5790
|
+
.open-flow-navigation-menu {
|
|
5791
|
+
border: 1px solid var(--ui-border);
|
|
5792
|
+
border-radius: var(--ui-radius);
|
|
5793
|
+
background: var(--ui-popover);
|
|
5794
|
+
color: var(--ui-popover-foreground);
|
|
5795
|
+
margin: 0;
|
|
5796
|
+
padding: 4px;
|
|
5797
|
+
position: fixed;
|
|
5798
|
+
inset: 48px 16px auto auto;
|
|
5799
|
+
box-shadow: 0 4px 12px #0002;
|
|
5800
|
+
}
|
|
5801
|
+
|
|
5802
|
+
.open-flow-navigation-menu:popover-open {
|
|
5803
|
+
flex-direction: column;
|
|
5804
|
+
align-items: stretch;
|
|
5805
|
+
display: flex;
|
|
5806
|
+
}
|
|
5807
|
+
|
|
5808
|
+
.open-flow-navigation-menu button[aria-pressed="true"] {
|
|
5809
|
+
background: var(--ui-muted);
|
|
5810
|
+
}
|
|
5811
|
+
|
|
5738
5812
|
.npm__react-simple-code-editor__textarea:focus {
|
|
5739
5813
|
outline: none;
|
|
5740
5814
|
}
|
package/dist/browser/ui.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export declare const InputGroupAddon: ComponentType<ComponentPropsWithoutRef<'di
|
|
|
37
37
|
}>;
|
|
38
38
|
export declare const InputGroupInput: ForwardRefExoticComponent<ComponentPropsWithoutRef<'input'> & RefAttributes<HTMLInputElement>>;
|
|
39
39
|
export { Label } from './ui-label.js';
|
|
40
|
+
export { OpenFlowLogo, type OpenFlowLogoProps } from './ui-logo.js';
|
|
40
41
|
export { Textarea } from './ui-textarea.js';
|
|
41
42
|
/** Shared Sonner presentation for hosts and the component Lab. */
|
|
42
43
|
export declare const notificationToasterProps: {
|
|
@@ -60,3 +61,5 @@ export declare const notificationToasterProps: {
|
|
|
60
61
|
export declare function NotificationUndoLabel({ children }: {
|
|
61
62
|
children: ReactNode;
|
|
62
63
|
}): ReactNode;
|
|
64
|
+
export { HostTooltip, type HostTooltipProps } from './ui-hostTooltip.js';
|
|
65
|
+
export { HostNavigationActions, type HostNavigationActionsProps, type HostThemeMode } from './ui-hostNavigationActions.js';
|
package/dist/browser/ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { createElement, forwardRef, useLayoutEffect } from "react";
|
|
2
|
+
import { createElement, forwardRef, useId, useLayoutEffect, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
//#region \0rolldown/runtime.js
|
|
@@ -4526,7 +4526,7 @@ var maybeReactUseId = SafeReact.useId;
|
|
|
4526
4526
|
* @param idOverride
|
|
4527
4527
|
* @returns {string}
|
|
4528
4528
|
*/
|
|
4529
|
-
function useId(idOverride, prefix) {
|
|
4529
|
+
function useId$1(idOverride, prefix) {
|
|
4530
4530
|
if (maybeReactUseId !== void 0) {
|
|
4531
4531
|
const reactId = maybeReactUseId();
|
|
4532
4532
|
return idOverride ?? (prefix ? `${prefix}-${reactId}` : reactId);
|
|
@@ -4541,7 +4541,7 @@ function useId(idOverride, prefix) {
|
|
|
4541
4541
|
* @returns {string | undefined}
|
|
4542
4542
|
*/
|
|
4543
4543
|
function useBaseUiId(idOverride) {
|
|
4544
|
-
return useId(idOverride, "base-ui");
|
|
4544
|
+
return useId$1(idOverride, "base-ui");
|
|
4545
4545
|
}
|
|
4546
4546
|
//#endregion
|
|
4547
4547
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/dialog/description/DialogDescription.js
|
|
@@ -5506,7 +5506,7 @@ var usePortalContext = () => React.useContext(PortalContext);
|
|
|
5506
5506
|
var attr = createAttribute("portal");
|
|
5507
5507
|
function useFloatingPortalNode(props = {}) {
|
|
5508
5508
|
const { ref, container: containerProp, componentProps = EMPTY_OBJECT, elementProps } = props;
|
|
5509
|
-
const uniqueId = useId();
|
|
5509
|
+
const uniqueId = useId$1();
|
|
5510
5510
|
const parentPortalNode = usePortalContext()?.portalNode;
|
|
5511
5511
|
const [containerElement, setContainerElement] = React.useState(null);
|
|
5512
5512
|
const [portalNode, setPortalNode] = React.useState(null);
|
|
@@ -9157,7 +9157,7 @@ var popupStoreSelectors = {
|
|
|
9157
9157
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloatingRootContext.js
|
|
9158
9158
|
function useFloatingRootContext(options) {
|
|
9159
9159
|
const { open = false, onOpenChange, elements = {} } = options;
|
|
9160
|
-
const floatingId = useId();
|
|
9160
|
+
const floatingId = useId$1();
|
|
9161
9161
|
const nested = useFloatingParentNodeId() != null;
|
|
9162
9162
|
if (process.env.NODE_ENV !== "production") {
|
|
9163
9163
|
const optionDomReference = elements.reference;
|
|
@@ -9315,7 +9315,7 @@ function useFloating(options = {}) {
|
|
|
9315
9315
|
*/
|
|
9316
9316
|
function useSyncedFloatingRootContext(options) {
|
|
9317
9317
|
const { popupStore, treatPopupAsFloatingElement = false, onOpenChange } = options;
|
|
9318
|
-
const floatingId = useId();
|
|
9318
|
+
const floatingId = useId$1();
|
|
9319
9319
|
const nested = useFloatingParentNodeId() != null;
|
|
9320
9320
|
const open = popupStore.useState("open");
|
|
9321
9321
|
const referenceElement = popupStore.useState("activeTriggerElement");
|
|
@@ -9992,7 +9992,7 @@ function useRole(context, props = {}) {
|
|
|
9992
9992
|
const domReference = store.useState("domReferenceElement");
|
|
9993
9993
|
const floatingElement = store.useState("floatingElement");
|
|
9994
9994
|
const { role = "dialog" } = props;
|
|
9995
|
-
const defaultReferenceId = useId();
|
|
9995
|
+
const defaultReferenceId = useId$1();
|
|
9996
9996
|
const referenceId = domReference?.id || defaultReferenceId;
|
|
9997
9997
|
const floatingId = React.useMemo(() => getFloatingFocusElement(floatingElement)?.id || defaultFloatingId, [floatingElement, defaultFloatingId]);
|
|
9998
9998
|
const ariaRole = componentRoleToAriaRoleMap.get(role) ?? role;
|
|
@@ -12611,6 +12611,28 @@ function Label({ className, ...props }) {
|
|
|
12611
12611
|
});
|
|
12612
12612
|
}
|
|
12613
12613
|
//#endregion
|
|
12614
|
+
//#region ../../assets/logo/open-flow-dark.svg
|
|
12615
|
+
var open_flow_dark_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='100'%20viewBox='0%200%20100%20100'%20role='img'%20aria-label='Open%20Flow'%3e%3cpath%20fill='%23e0e2e6'%20d='M32%2016H68Q84%2016%2084%2032V36H68C46%2036%2054%2056%2032%2056H16V32Q16%2016%2032%2016Z'/%3e%3cpath%20fill='%238c919a'%20d='M16%2068H32C54%2068%2046%2048%2068%2048H84V68Q84%2084%2068%2084H32Q16%2084%2016%2068Z'/%3e%3c/svg%3e";
|
|
12616
|
+
//#endregion
|
|
12617
|
+
//#region ../../assets/logo/open-flow-light.svg
|
|
12618
|
+
var open_flow_light_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='100'%20viewBox='0%200%20100%20100'%20role='img'%20aria-label='Open%20Flow'%3e%3cpath%20fill='%2344474c'%20d='M32%2016H68Q84%2016%2084%2032V36H68C46%2036%2054%2056%2032%2056H16V32Q16%2016%2032%2016Z'/%3e%3cpath%20fill='%2393979f'%20d='M16%2068H32C54%2068%2046%2048%2068%2048H84V68Q84%2084%2068%2084H32Q16%2084%2016%2068Z'/%3e%3c/svg%3e";
|
|
12619
|
+
//#endregion
|
|
12620
|
+
//#region src/ui/browser/logo.tsx
|
|
12621
|
+
function OpenFlowLogo({ theme, alt = "Open Flow", width = 24, height = 24, style, ...props }) {
|
|
12622
|
+
return /* @__PURE__ */ jsx("img", {
|
|
12623
|
+
...props,
|
|
12624
|
+
src: theme === "dark" ? open_flow_dark_default : open_flow_light_default,
|
|
12625
|
+
alt,
|
|
12626
|
+
width,
|
|
12627
|
+
height,
|
|
12628
|
+
style: {
|
|
12629
|
+
flexShrink: 0,
|
|
12630
|
+
objectFit: "contain",
|
|
12631
|
+
...style
|
|
12632
|
+
}
|
|
12633
|
+
});
|
|
12634
|
+
}
|
|
12635
|
+
//#endregion
|
|
12614
12636
|
//#region src/ui/browser/textarea.tsx
|
|
12615
12637
|
var Textarea = React.forwardRef(function Textarea({ className, ...props }, ref) {
|
|
12616
12638
|
return /* @__PURE__ */ jsx("textarea", {
|
|
@@ -12621,6 +12643,148 @@ var Textarea = React.forwardRef(function Textarea({ className, ...props }, ref)
|
|
|
12621
12643
|
});
|
|
12622
12644
|
});
|
|
12623
12645
|
//#endregion
|
|
12646
|
+
//#region src/ui/browser/hostTooltip.tsx
|
|
12647
|
+
/** Compose a host control with the shared tooltip while preserving its theme and semantics. */
|
|
12648
|
+
function HostTooltip({ children, label, side = "top" }) {
|
|
12649
|
+
const [anchor, setAnchor] = useState(null);
|
|
12650
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
12651
|
+
ref: setAnchor,
|
|
12652
|
+
render: children
|
|
12653
|
+
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
12654
|
+
container: anchor?.closest(".open-flow-theme"),
|
|
12655
|
+
side,
|
|
12656
|
+
children: label
|
|
12657
|
+
})] });
|
|
12658
|
+
}
|
|
12659
|
+
//#endregion
|
|
12660
|
+
//#region src/localization/common/languages.ts
|
|
12661
|
+
var uiLanguages = [
|
|
12662
|
+
"en",
|
|
12663
|
+
"zh-CN",
|
|
12664
|
+
"zh-TW",
|
|
12665
|
+
"ja",
|
|
12666
|
+
"ko",
|
|
12667
|
+
"ru",
|
|
12668
|
+
"fr"
|
|
12669
|
+
];
|
|
12670
|
+
/** Endonyms, shown in language pickers regardless of the current UI language. */
|
|
12671
|
+
var uiLanguageNames = {
|
|
12672
|
+
"en": "English",
|
|
12673
|
+
"zh-CN": "简体中文",
|
|
12674
|
+
"zh-TW": "繁體中文",
|
|
12675
|
+
"ja": "日本語",
|
|
12676
|
+
"ko": "한국어",
|
|
12677
|
+
"ru": "Русский",
|
|
12678
|
+
"fr": "Français"
|
|
12679
|
+
};
|
|
12680
|
+
new Map(uiLanguages.map((language) => [language.toLowerCase(), language]));
|
|
12681
|
+
//#endregion
|
|
12682
|
+
//#region src/ui/browser/hostNavigationActions.tsx
|
|
12683
|
+
var themeIcons = {
|
|
12684
|
+
light: "i-lucide-light:sun",
|
|
12685
|
+
dark: "i-lucide-light:moon",
|
|
12686
|
+
auto: "i-lucide-light:sun-moon"
|
|
12687
|
+
};
|
|
12688
|
+
/** Shared host navigation; each host owns preference storage and localized labels. */
|
|
12689
|
+
function HostNavigationActions({ className, language, onLanguageChange, theme, onThemeChange, labels }) {
|
|
12690
|
+
const themeId = useId();
|
|
12691
|
+
const languageId = useId();
|
|
12692
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12693
|
+
className,
|
|
12694
|
+
children: [
|
|
12695
|
+
/* @__PURE__ */ jsx(HostTooltip, {
|
|
12696
|
+
label: "GitHub",
|
|
12697
|
+
side: "bottom",
|
|
12698
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
12699
|
+
href: "https://github.com/oomol-lab/open-flow",
|
|
12700
|
+
target: "_blank",
|
|
12701
|
+
rel: "noopener noreferrer",
|
|
12702
|
+
className: buttonVariants({
|
|
12703
|
+
variant: "ghost",
|
|
12704
|
+
size: "icon-sm",
|
|
12705
|
+
className: "text-foreground"
|
|
12706
|
+
}),
|
|
12707
|
+
"aria-label": "GitHub",
|
|
12708
|
+
children: /* @__PURE__ */ jsx("i", {
|
|
12709
|
+
"aria-hidden": "true",
|
|
12710
|
+
className: "i-lucide-light:github size-4"
|
|
12711
|
+
})
|
|
12712
|
+
})
|
|
12713
|
+
}),
|
|
12714
|
+
/* @__PURE__ */ jsx(HostTooltip, {
|
|
12715
|
+
label: labels.theme,
|
|
12716
|
+
side: "bottom",
|
|
12717
|
+
children: /* @__PURE__ */ jsx(Button$1, {
|
|
12718
|
+
variant: "ghost",
|
|
12719
|
+
size: "icon-sm",
|
|
12720
|
+
type: "button",
|
|
12721
|
+
"aria-label": labels.theme,
|
|
12722
|
+
popovertarget: themeId,
|
|
12723
|
+
children: /* @__PURE__ */ jsx("i", {
|
|
12724
|
+
"aria-hidden": "true",
|
|
12725
|
+
className: `${themeIcons[theme]} size-4`
|
|
12726
|
+
})
|
|
12727
|
+
})
|
|
12728
|
+
}),
|
|
12729
|
+
/* @__PURE__ */ jsx(HostTooltip, {
|
|
12730
|
+
label: labels.language,
|
|
12731
|
+
side: "bottom",
|
|
12732
|
+
children: /* @__PURE__ */ jsx(Button$1, {
|
|
12733
|
+
variant: "ghost",
|
|
12734
|
+
size: "icon-sm",
|
|
12735
|
+
type: "button",
|
|
12736
|
+
popovertarget: languageId,
|
|
12737
|
+
"aria-label": labels.language,
|
|
12738
|
+
children: /* @__PURE__ */ jsx("i", {
|
|
12739
|
+
"aria-hidden": "true",
|
|
12740
|
+
className: "i-lucide-light:languages size-4"
|
|
12741
|
+
})
|
|
12742
|
+
})
|
|
12743
|
+
}),
|
|
12744
|
+
/* @__PURE__ */ jsx("div", {
|
|
12745
|
+
id: themeId,
|
|
12746
|
+
popover: "auto",
|
|
12747
|
+
className: "open-flow-navigation-menu",
|
|
12748
|
+
children: [
|
|
12749
|
+
"light",
|
|
12750
|
+
"dark",
|
|
12751
|
+
"auto"
|
|
12752
|
+
].map((value) => /* @__PURE__ */ jsxs(Button$1, {
|
|
12753
|
+
className: "justify-start gap-2",
|
|
12754
|
+
variant: "ghost",
|
|
12755
|
+
size: "sm",
|
|
12756
|
+
type: "button",
|
|
12757
|
+
"aria-pressed": theme == value,
|
|
12758
|
+
onClick: (event) => {
|
|
12759
|
+
onThemeChange(value);
|
|
12760
|
+
event.currentTarget.closest("[popover]")?.hidePopover();
|
|
12761
|
+
},
|
|
12762
|
+
children: [/* @__PURE__ */ jsx("i", {
|
|
12763
|
+
"aria-hidden": "true",
|
|
12764
|
+
className: `${themeIcons[value]} size-4`
|
|
12765
|
+
}), labels[value]]
|
|
12766
|
+
}, value))
|
|
12767
|
+
}),
|
|
12768
|
+
/* @__PURE__ */ jsx("div", {
|
|
12769
|
+
id: languageId,
|
|
12770
|
+
popover: "auto",
|
|
12771
|
+
className: "open-flow-navigation-menu",
|
|
12772
|
+
children: uiLanguages.map((value) => /* @__PURE__ */ jsx(Button$1, {
|
|
12773
|
+
variant: "ghost",
|
|
12774
|
+
size: "sm",
|
|
12775
|
+
type: "button",
|
|
12776
|
+
"aria-pressed": language == value,
|
|
12777
|
+
onClick: (event) => {
|
|
12778
|
+
onLanguageChange(value);
|
|
12779
|
+
event.currentTarget.closest("[popover]")?.hidePopover();
|
|
12780
|
+
},
|
|
12781
|
+
children: uiLanguageNames[value]
|
|
12782
|
+
}, value))
|
|
12783
|
+
})
|
|
12784
|
+
]
|
|
12785
|
+
});
|
|
12786
|
+
}
|
|
12787
|
+
//#endregion
|
|
12624
12788
|
//#region src/ui/browser/public.ts
|
|
12625
12789
|
var Button = Button$1;
|
|
12626
12790
|
var Dialog = Dialog$1;
|
|
@@ -12669,4 +12833,4 @@ function NotificationUndoLabel({ children }) {
|
|
|
12669
12833
|
}), children);
|
|
12670
12834
|
}
|
|
12671
12835
|
//#endregion
|
|
12672
|
-
export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Input, InputGroup, InputGroupAddon, InputGroupInput, Label, NotificationUndoLabel, Textarea, notificationToasterProps };
|
|
12836
|
+
export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, HostNavigationActions, HostTooltip, Input, InputGroup, InputGroupAddon, InputGroupInput, Label, NotificationUndoLabel, OpenFlowLogo, Textarea, notificationToasterProps };
|
|
@@ -21,13 +21,10 @@ export interface WorkbenchActor {
|
|
|
21
21
|
export interface WorkbenchHost {
|
|
22
22
|
/** Optional deployment-owned identity lookup. Return null for an unknown actor. */
|
|
23
23
|
readonly resolveActor?: (actorId: string, signal: AbortSignal) => Promise<WorkbenchActor | null>;
|
|
24
|
-
/**
|
|
25
|
-
readonly
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
readonly connectionCache?: {
|
|
29
|
-
readonly storage?: WorkbenchPreferences;
|
|
30
|
-
};
|
|
24
|
+
/** Cache deployment identity. The session id must be stable and non-secret. */
|
|
25
|
+
readonly cacheEnvironment?: string;
|
|
26
|
+
/** Host-selected connector owner identity, typically the Team from the host route. */
|
|
27
|
+
readonly connectorOwnerId?: string;
|
|
31
28
|
notify(notification: WorkbenchNotification | undefined): void;
|
|
32
29
|
openExternalPage(resolveUrl: () => Promise<string>): Promise<boolean>;
|
|
33
30
|
request(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
@@ -57,7 +54,3 @@ export interface WorkbenchPreferences {
|
|
|
57
54
|
/** The host resolves deployment and Flow scope before rendering navigation links. */
|
|
58
55
|
export type ConnectionHref = (flowId: string, providerId: string, connectionId?: string) => string | undefined;
|
|
59
56
|
/** Object values are complete response/ETag records; implementations must reject failures. */
|
|
60
|
-
export interface CatalogCacheStorage {
|
|
61
|
-
get(key: string): Promise<unknown>;
|
|
62
|
-
set(key: string, value: unknown): Promise<void>;
|
|
63
|
-
}
|