WorkspaceProps
Defined in: packages/ui-react/src/components/Workspace.tsx:73
Runtime 配置
Extends
Section titled “Extends”Properties
Section titled “Properties”enableOpfs?
Section titled “enableOpfs?”
optionalenableOpfs?:boolean
Defined in: packages/runtime/src/types.ts:48
是否启用 OPFS(默认 true,降级时关闭)
Inherited from
Section titled “Inherited from”enableIndexedDB?
Section titled “enableIndexedDB?”
optionalenableIndexedDB?:boolean
Defined in: packages/runtime/src/types.ts:50
是否启用 IndexedDB 元数据存储
Inherited from
Section titled “Inherited from”UseLokvisOptions.enableIndexedDB
storageQuota?
Section titled “storageQuota?”
optionalstorageQuota?:number
Defined in: packages/runtime/src/types.ts:52
存储配额(字节)
Inherited from
Section titled “Inherited from”enableLog?
Section titled “enableLog?”
optionalenableLog?:boolean
Defined in: packages/runtime/src/types.ts:54
是否启用日志
Inherited from
Section titled “Inherited from”engineStrategy?
Section titled “engineStrategy?”
optionalengineStrategy?:EngineSelectionStrategy
Defined in: packages/runtime/src/types.ts:60
引擎选择策略(默认 ‘first’)。 当多个引擎实现同一能力且未显式指定 preferredEngine 时,据此选择: ‘first’(注册顺序)/‘fastest’(性能最优)/‘balanced’(匹配能力声明性能,无则最快)。
Inherited from
Section titled “Inherited from”UseLokvisOptions.engineStrategy
assetStore?
Section titled “assetStore?”
optionalassetStore?:AssetStore
Defined in: packages/runtime/src/types.ts:66
注入自定义 AssetStore(测试或精细控制用)。 默认由 createRuntime 通过 createAssetStore 工厂自动创建, 按 OPFS → IndexedDB → Memory 降级。
Inherited from
Section titled “Inherited from”historyStore?
Section titled “historyStore?”
optionalhistoryStore?:HistoryStore
Defined in: packages/runtime/src/types.ts:72
注入自定义 HistoryStore(W7.2 历史持久化)。 默认由 createRuntime 在 enableIndexedDB 时通过 createHistoryStore 自动创建; IndexedDB 不可用时为 undefined,历史退化为仅内存模式。
Inherited from
Section titled “Inherited from”historyStoreOptions?
Section titled “historyStoreOptions?”
optionalhistoryStoreOptions?:HistoryStoreOptions
Defined in: packages/runtime/src/types.ts:77
HistoryStore 工厂选项(W7.2,仅 historyStore 未注入时生效)。 测试可注入 kvStore 或自定义 dbName。
Inherited from
Section titled “Inherited from”UseLokvisOptions.historyStoreOptions
isPro?
Section titled “isPro?”
optionalisPro?:boolean
Defined in: packages/runtime/src/types.ts:88
是否启用 Pro 模式(W6.2 / PROJECT_PLAN 17.4)。
- false(默认):批量上限 10 文件、并发 4、workflow 槽位 5
- true:批量无上限、并发 16、workflow 槽位无限 由 cloud 侧 createLokvis({ auth }) 注入 session 后置为 true。
注:isPro 仅控制本地批量/槽位门控(四环)。AI 调用配额由
@lokvis/cloud-bridge 的 CloudBilling 据 plan 精确判定
(‘pro’ 解锁四环但 AI 配额为 0,需 ‘cloud_pro’ 才有 AI 配额)。
Inherited from
Section titled “Inherited from”
optionalplan?:Plan
Defined in: packages/runtime/src/types.ts:99
用户订阅计划(G1)。比 isPro 更细粒度,用于 AI 调用计费判定。
- ‘free’(默认):免费用户,isPro=false
- ‘pro’:Pro 订阅($9/月),isPro=true(解锁四环),AI 配额=0
- ‘cloud_pro’:Cloud Pro 订阅,isPro=true,AI 配额=10/天
- ‘enterprise’:企业版,isPro=true,AI 配额=∞
由 SDK 据 auth.plan 注入;未传时默认 ‘free’。
isPro 派生自 plan !== 'free'(在 SDK resolvePlan 中计算)。
Inherited from
Section titled “Inherited from”memoryBudget?
Section titled “memoryBudget?”
optionalmemoryBudget?:number
Defined in: packages/runtime/src/types.ts:104
内存预算(字节,W3.3 MemoryGuard)。 默认 512MB。BatchProcessor 据此在内存压力高时收缩并发槽位。
Inherited from
Section titled “Inherited from”title?
Section titled “title?”
optionaltitle?:string
Defined in: packages/ui-react/src/components/Workspace.tsx:75
顶部标题
locale?
Section titled “locale?”
optionallocale?:"en"|"zh"|"ja"|"es"|"de"|"fr"
Defined in: packages/ui-react/src/components/Workspace.tsx:80
显式 UI 语言(优先级最高)。 不传时依次回退:外层 WorkspaceI18nProvider → document.documentElement.lang → URL 路径前缀。
translations?
Section titled “translations?”
optionaltranslations?:WorkspaceTranslations
Defined in: packages/ui-react/src/components/Workspace.tsx:85
翻译覆盖表(key → language → 文案),部分覆盖包内 6 语言字典。 不传时继承外层 WorkspaceI18nProvider 的 translations。
showStatusBar?
Section titled “showStatusBar?”
optionalshowStatusBar?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:87
是否显示状态栏(默认 true)
showHistoryPanel?
Section titled “showHistoryPanel?”
optionalshowHistoryPanel?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:89
是否显示历史面板(默认 true,W7.1)
enableGlobalDropzone?
Section titled “enableGlobalDropzone?”
optionalenableGlobalDropzone?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:91
是否启用全屏拖拽导入(默认 true,W9.3)
enableCommandPalette?
Section titled “enableCommandPalette?”
optionalenableCommandPalette?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:93
是否启用 Command Palette ⌘K(默认 true,W9.2)
enableThemeToggle?
Section titled “enableThemeToggle?”
optionalenableThemeToggle?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:95
是否启用 ThemeToggle(默认 true,W9.7)
enableCompare?
Section titled “enableCompare?”
optionalenableCompare?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:97
是否启用 CompareSlider(默认 true,W9.4)
enableDownloadPanel?
Section titled “enableDownloadPanel?”
optionalenableDownloadPanel?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:99
是否启用 DownloadPanel(默认 true,W9.5)
enableWorkflowEditor?
Section titled “enableWorkflowEditor?”
optionalenableWorkflowEditor?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:101
是否启用拖拽式 WorkflowEditor(默认 false,W10.4;关闭则用只读 PipelineBar)
enableProgressBar?
Section titled “enableProgressBar?”
optionalenableProgressBar?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:103
是否启用 ProgressBar + Cancel 按钮(默认 true,W11.6)
enableErrorBanner?
Section titled “enableErrorBanner?”
optionalenableErrorBanner?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:105
是否启用 ErrorBanner 错误信息横幅(默认 true,W11.3)
enableShareLink?
Section titled “enableShareLink?”
optionalenableShareLink?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:107
是否从 URL ?workflow= 参数加载分享工作流(默认 true,W11.5)
initialAssets?
Section titled “initialAssets?”
optionalinitialAssets?:object[]
Defined in: packages/ui-react/src/components/Workspace.tsx:113
初始化时自动导入的资产列表。 Runtime 就绪后,通过 runtime.importAsset() 逐个导入。
blob:
Blob
name:
string
initialCapability?
Section titled “initialCapability?”
optionalinitialCapability?:string
Defined in: packages/ui-react/src/components/Workspace.tsx:117
初始化时预选的能力名称(自动添加到工作流节点)。
initialParams?
Section titled “initialParams?”
optionalinitialParams?:Record<string,unknown>
Defined in: packages/ui-react/src/components/Workspace.tsx:121
初始化时预填的参数(与 initialCapability 配合使用)。
optionalmode?:"full"|"focused"
Defined in: packages/ui-react/src/components/Workspace.tsx:127
布局模式:
- ‘full’: 完整三栏布局(默认)
- ‘focused’: 精简模式,隐藏 AssetPanel 和 PipelineBar,适合单工具页跳转进入
showAssetPanel?
Section titled “showAssetPanel?”
optionalshowAssetPanel?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:130
是否显示左侧资产面板(默认 true;focused 模式下始终隐藏)
showInspector?
Section titled “showInspector?”
optionalshowInspector?:boolean
Defined in: packages/ui-react/src/components/Workspace.tsx:132
是否显示右侧 Inspector 面板(默认 true;关闭后整列不渲染)
canvasSlot?
Section titled “canvasSlot?”
optionalcanvasSlot?:ReactNode
Defined in: packages/ui-react/src/components/Workspace.tsx:138
替换中央画布(整体替换内置 Canvas)。 传入时内置 Canvas(含预览 / 对比 / 拖拽导入)不渲染; 三方需要完全自定义预览区时使用。渲染在 flex-1 容器内。
inspectorSlot?
Section titled “inspectorSlot?”
optionalinspectorSlot?:ReactNode
Defined in: packages/ui-react/src/components/Workspace.tsx:144
替换右侧 Inspector 内容(整体替换内置 Inspector)。 传入时内置 Inspector(节点参数表单)不渲染,插件 Panel (inspector 位置)仍会在其下方渲染。渲染在 flex-1 容器内。
canvasEmptyState?
Section titled “canvasEmptyState?”
optionalcanvasEmptyState?:ReactNode
Defined in: packages/ui-react/src/components/Workspace.tsx:149
自定义画布空状态(无选中资产时),替换内置导入引导。 透传给内置 Canvas 的 emptyState;canvasSlot 设置时本项无效。
className?
Section titled “className?”
optionalclassName?:string
Defined in: packages/ui-react/src/components/Workspace.tsx:151
plugins?
Section titled “plugins?”
optionalplugins?:PluginLoadEntry[]
Defined in: packages/ui-react/src/hooks/useLokvis.ts:35
预加载的插件列表
Inherited from
Section titled “Inherited from”autoInit?
Section titled “autoInit?”
optionalautoInit?:boolean
Defined in: packages/ui-react/src/hooks/useLokvis.ts:37
是否在挂载时自动初始化(默认 true)
Inherited from
Section titled “Inherited from”
optionalauth?:LokvisAuthSession
Defined in: packages/ui-react/src/hooks/useLokvis.ts:47
Cloud 注入的认证信息(W17.3 / W17.6)。
透传到 createLokvis({ auth }),SDK 据 presence 推导 isPro:
- 传入非空
session或token且未显式isPro: false→ Pro 模式 - 不传
auth:保持 free 模式
详见 @lokvis/sdk 的 LokvisAuthSession 与 resolveIsPro() 文档。