@superblocksteam/library 2.0.175-next.0 → 2.0.176-next.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 (31) hide show
  1. package/dist/build-manifest-BQAcrmit.js +6 -0
  2. package/dist/{build-manifest-tU0L2vSJ.js.map → build-manifest-BQAcrmit.js.map} +1 -1
  3. package/dist/{devtools-consolidated-DLnb73OV.js → devtools-consolidated-C5sXwPGD.js} +5 -3
  4. package/dist/{devtools-consolidated-DLnb73OV.js.map → devtools-consolidated-C5sXwPGD.js.map} +1 -1
  5. package/dist/{early-console-buffer-B88uX-DV.js → early-console-buffer-DMR1SCsN.js} +5 -4
  6. package/dist/{early-console-buffer-B88uX-DV.js.map → early-console-buffer-DMR1SCsN.js.map} +1 -1
  7. package/dist/jsx-dev-runtime/index.d.ts +7 -2
  8. package/dist/jsx-dev-runtime/index.d.ts.map +1 -1
  9. package/dist/jsx-dev-runtime/index.js +6 -3
  10. package/dist/jsx-dev-runtime/index.js.map +1 -1
  11. package/dist/jsx-runtime/index.d.ts +6 -3
  12. package/dist/jsx-runtime/index.d.ts.map +1 -1
  13. package/dist/jsx-runtime/index.js +2 -1
  14. package/dist/jsx-wrapper-B0I9j3Al.js +639 -0
  15. package/dist/jsx-wrapper-B0I9j3Al.js.map +1 -0
  16. package/dist/lib/index.d.ts +179 -72
  17. package/dist/lib/index.d.ts.map +1 -1
  18. package/dist/lib/index.js +378 -311
  19. package/dist/lib/index.js.map +1 -1
  20. package/dist/{logs-rwNn0yg7.js → logs-CUUgkcJf.js} +13 -13
  21. package/dist/{logs-rwNn0yg7.js.map → logs-CUUgkcJf.js.map} +1 -1
  22. package/dist/rolldown-runtime-CiIaOW0V.js +13 -0
  23. package/dist/{jsx-wrapper-BAO7prWO.js → root-store-G9HJE1Mf.js} +107 -771
  24. package/dist/root-store-G9HJE1Mf.js.map +1 -0
  25. package/dist/{sdk-api-discovery-CtyMcIGP.js → sdk-api-discovery-_lfMr9d5.js} +12 -8
  26. package/dist/{sdk-api-discovery-CtyMcIGP.js.map → sdk-api-discovery-_lfMr9d5.js.map} +1 -1
  27. package/dist/utils-DXaAwgS_.js +61 -0
  28. package/dist/utils-DXaAwgS_.js.map +1 -0
  29. package/package.json +22 -17
  30. package/dist/build-manifest-tU0L2vSJ.js +0 -5
  31. package/dist/jsx-wrapper-BAO7prWO.js.map +0 -1
@@ -3,16 +3,22 @@ import { DataRouter, Location, Params } from "react-router";
3
3
  import { EditorConfig, EvaluateOrValueComputedArgs, Property, TailwindPropertyKey } from "@superblocksteam/library-shared";
4
4
  import * as React$2 from "react";
5
5
  import React$1, { ReactNode, createElement } from "react";
6
- import { PlaceholderInfo, Profile } from "@superblocksteam/shared";
6
+ import { OrchestratorViewMode, PlaceholderInfo, Profile } from "@superblocksteam/shared";
7
7
  import { AiContextMode, AppToEditorMessage, Catalog, ComponentRegistryShareState, ConsoleLogEntry, CreateChild, CreateChild as CreateChild$1, DeleteMeLibraryApi, EditorConfig as EditorConfig$1, Entity, EntityOutputProp, ExecutionTimingBreakdown, InitData, InteractionMode, LoadErrorMessageTypesMap, PayloadAction, PropertyInfo, RuntimeErrorData, SbApiRunOptions, SbElement, SbSelector, SourceLocation, UrlState, ViteMessage, ViteMessageKind, WithBindingIdentifier } from "@superblocksteam/library-shared/types";
8
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
8
9
  import { CompiledApi, IntegrationDeclaration } from "@superblocksteam/sdk-api";
9
10
  import { Graph } from "@dagrejs/graphlib";
11
+ import { XYCoord } from "react-dnd";
12
+
13
+ //#region src/lib/internal-details/scope/types.d.ts
10
14
  declare const AppMode: {
11
15
  readonly EDIT: "EDIT";
12
16
  readonly PUBLISHED: "PUBLISHED";
13
17
  readonly PREVIEW: "PREVIEW";
14
18
  };
15
19
  type AppMode = (typeof AppMode)[keyof typeof AppMode];
20
+ //#endregion
21
+ //#region src/lib/internal-details/superblocks-context.d.ts
16
22
  type User = {
17
23
  name: string;
18
24
  email: string;
@@ -64,28 +70,39 @@ declare class SuperblocksAppContext {
64
70
  };
65
71
  } | undefined;
66
72
  }
67
- export declare function useSuperblocksUser(): User | undefined;
68
- export declare function useSuperblocksGroups(): Group[] | undefined;
69
- export declare function useSuperblocksDataTags(): {
73
+ declare function useSuperblocksUser(): User | undefined;
74
+ declare function useSuperblocksGroups(): Group[] | undefined;
75
+ declare function useSuperblocksDataTags(): {
70
76
  dataTags: DataTags | undefined;
71
77
  setDataTag: (dataTagKey: string) => void;
72
78
  };
73
79
  /** @deprecated Use useSuperblocksDataTags instead */
74
- export declare function useSuperblocksProfiles(): {
80
+ declare function useSuperblocksProfiles(): {
75
81
  profiles: DataTags | undefined;
76
82
  setProfile: (dataTagKey: string) => void;
77
83
  };
78
- export declare function getAppMode(): AppMode | undefined;
79
- declare const SbProvider: ({ name, children, className, context }: {
84
+ declare function getAppMode(): AppMode | undefined;
85
+ //#endregion
86
+ //#region src/lib/user-facing/sb-provider.d.ts
87
+ declare const SbProvider: ({
88
+ name,
89
+ children,
90
+ className,
91
+ context
92
+ }: {
80
93
  name?: string;
81
94
  children?: React$1.ReactNode;
82
95
  className?: string;
83
96
  context?: SuperblocksAppContext;
84
- }) => import("react/jsx-runtime").JSX.Element;
97
+ }) => _$react_jsx_runtime0.JSX.Element;
98
+ //#endregion
99
+ //#region src/lib/internal-details/lib/evaluator/entity-types.d.ts
85
100
  type SingleInputProp<T = EntityOutputProp, ARGS extends any[] = any[]> = T extends Callback ? Callback<ARGS> : T;
86
- type NestedInputProp<T, ARGS extends any[] = any[]> = T extends object ? { [K in keyof T]: SingleInputProp<T[K], ARGS> | NestedInputProp<T[K], ARGS>; } : never;
101
+ type NestedInputProp<T, ARGS extends any[] = any[]> = T extends object ? { [K in keyof T]: SingleInputProp<T[K], ARGS> | NestedInputProp<T[K], ARGS> } : never;
87
102
  type InputProp<T = EntityOutputProp, ARGS extends any[] = any[]> = SingleInputProp<T, ARGS> | NestedInputProp<T, ARGS>;
88
103
  type EntityFunction<ARGS extends any[] = any[], R = EntityOutputProp> = (this: Entity, ...ARGS: ARGS) => R;
104
+ //#endregion
105
+ //#region src/edit-mode/runtime-graph/types.d.ts
89
106
  type ComponentNode = {
90
107
  selectorId: SbSelector;
91
108
  sourceId: SbElement;
@@ -97,6 +114,8 @@ type ComponentNode = {
97
114
  nearestSelectableAncestor: SbSelector | undefined;
98
115
  displayName: string;
99
116
  };
117
+ //#endregion
118
+ //#region src/edit-mode/features/runtime-tracking-store.d.ts
100
119
  declare class RuntimeTrackingStore {
101
120
  readonly editStore: EditStore | undefined;
102
121
  constructor(editStore: EditStore | undefined);
@@ -142,6 +161,8 @@ declare class RuntimeTrackingStore {
142
161
  */
143
162
  getOutermostComponentForFirstRenderedTag(anchorSelectorId: SbSelector): SbSelector | undefined;
144
163
  }
164
+ //#endregion
165
+ //#region src/edit-mode/features/ai-store.d.ts
145
166
  declare class AiManager {
146
167
  private readonly runtimeTrackingStore;
147
168
  private _isTaggingEnabled;
@@ -185,6 +206,8 @@ declare class AiManager {
185
206
  private removeAllSharedSelectors;
186
207
  private removeAllSelectorsForSource;
187
208
  }
209
+ //#endregion
210
+ //#region src/edit-mode/features/connection-manager.d.ts
188
211
  type ConnectionStatus = "pre-init" | "disconnected" | "connecting" | "connected";
189
212
  declare class ConnectionManager {
190
213
  connectionStatus: ConnectionStatus;
@@ -193,9 +216,13 @@ declare class ConnectionManager {
193
216
  connect(): void;
194
217
  disconnect(): void;
195
218
  }
219
+ //#endregion
220
+ //#region src/edit-mode/features/operation-store.d.ts
196
221
  declare class OperationManager {
197
222
  ensureFilesSynced(): Promise<void>;
198
223
  }
224
+ //#endregion
225
+ //#region src/edit-mode/features/ui-store.d.ts
199
226
  declare class UIStore {
200
227
  readonly root: RootStore;
201
228
  readonly editStore: EditStore;
@@ -226,8 +253,11 @@ declare class UIStore {
226
253
  */
227
254
  selectNewComponentBySourceId(sourceId: SbElement, selectorIdsToIgnore?: Set<`S-${string}`>): Promise<void>;
228
255
  }
256
+ //#endregion
257
+ //#region src/edit-mode/edit-store.d.ts
229
258
  declare global {
230
259
  interface Window {
260
+ _SB_ENABLE_SESSION_RECORDING?: boolean;
231
261
  __SUPERBLOCKS_EDITOR_HOOK__: InstanceType<typeof EditStore>;
232
262
  }
233
263
  }
@@ -238,6 +268,7 @@ declare class EditStore {
238
268
  connectionManager: ConnectionManager;
239
269
  ai: AiManager;
240
270
  isInitialized: boolean;
271
+ recordingInitialized: boolean;
241
272
  interactionMode: InteractionMode;
242
273
  lastInteractionMode: InteractionMode;
243
274
  private viteMessageListeners;
@@ -250,7 +281,14 @@ declare class EditStore {
250
281
  triggerViteMessage<T extends ViteMessageKind, Message extends Extract<ViteMessage, {
251
282
  kind: T;
252
283
  }>>(kind: T, message: Message): void;
284
+ startRecording(recording: {
285
+ userId: string;
286
+ appId: string;
287
+ sessionRecordingKey: string;
288
+ }): void;
253
289
  }
290
+ //#endregion
291
+ //#region src/lib/internal-details/lib/types.d.ts
254
292
  type ExecutionError = {
255
293
  name?: string;
256
294
  message: string;
@@ -265,10 +303,10 @@ type ExecutionEventRequest = {
265
303
  };
266
304
  };
267
305
  type Resolutions = Record<string, // name of the field: eg: "range", for the range field let's say the code is {{[1,2,3]}}
268
- {
269
- value: any;
270
- bindings: any[];
271
- }>;
306
+ {
307
+ value: any;
308
+ bindings: any[];
309
+ }>;
272
310
  type ExecutionEvent = {
273
311
  name: string;
274
312
  type: string;
@@ -330,13 +368,9 @@ interface SdkApiMetadata {
330
368
  isStreaming: boolean;
331
369
  /** Declared integrations for this API */
332
370
  integrations: Array<{
333
- /** Key used in the API code to reference this integration */
334
- key: string;
335
- /** Plugin ID (e.g., "postgres", "slack") */
336
- pluginId: string;
337
- /** Integration name (e.g., "Production Postgres") */
338
- name: string;
339
- /** Integration ID (UUID) */
371
+ /** Key used in the API code to reference this integration */key: string; /** Plugin ID (e.g., "postgres", "slack") */
372
+ pluginId: string; /** Integration name (e.g., "Production Postgres") */
373
+ name: string; /** Integration ID (UUID) */
340
374
  id: string;
341
375
  }>;
342
376
  /** Entry point file path relative to app root (e.g. "server/apis/GetUsers/api.ts") */
@@ -474,11 +508,9 @@ type FromParentToChildMessageTypesMap = {
474
508
  agents: AgentInfo[];
475
509
  logContext: Record<string, unknown>;
476
510
  featureFlags?: Record<string, unknown>;
477
- /** Selected integration profile for API execution */
478
- profile?: SdkProfileInfo;
479
- /** Current git branch name (editor mode only) */
480
- branchName?: string;
481
- /** Deployed/preview commit ID (non-editor modes) */
511
+ sessionRecordingKey?: string; /** Selected integration profile for API execution */
512
+ profile?: SdkProfileInfo; /** Current git branch name (editor mode only) */
513
+ branchName?: string; /** Deployed/preview commit ID (non-editor modes) */
482
514
  commitId?: string;
483
515
  /**
484
516
  * Profile keys mapped to data-plane URLs when the gateway is enabled.
@@ -489,9 +521,7 @@ type FromParentToChildMessageTypesMap = {
489
521
  forceRefreshScopedToken?: boolean;
490
522
  };
491
523
  "sb-update-active-agents": {
492
- /** Pre-filtered URLs for current profile (cloud org fallback) */
493
- agentUrls: string[];
494
- /** All active on-premise agents for local profile filtering */
524
+ /** Pre-filtered URLs for current profile (cloud org fallback) */agentUrls: string[]; /** All active on-premise agents for local profile filtering */
495
525
  agents: AgentInfo[];
496
526
  /**
497
527
  * DP routing config mapping profile keys to DP URLs.
@@ -719,10 +749,7 @@ type FromChildToParentMessageTypesMap = LoadErrorMessageTypesMap & {
719
749
  interactionMode: InteractionMode;
720
750
  };
721
751
  getDropTargetResult: {
722
- offset: {
723
- x: number;
724
- y: number;
725
- };
752
+ offset: XYCoord;
726
753
  size: {
727
754
  height: number;
728
755
  width: number;
@@ -863,8 +890,7 @@ type FromChildToParentMessageTypesMap = LoadErrorMessageTypesMap & {
863
890
  /** Full page content dimensions (APPS-5714), so the caller can choose
864
891
  * sensible `region` coordinates on a follow-up capture. Absent on error. */
865
892
  pageWidth?: number;
866
- pageHeight?: number;
867
- /** Which rectangle this capture actually used. Absent on error. */
893
+ pageHeight?: number; /** Which rectangle this capture actually used. Absent on error. */
868
894
  mode?: ScreenshotCaptureMode;
869
895
  /** The part of the page the image shows, in full-page pixel coordinates.
870
896
  * Absent for selector captures. */
@@ -969,6 +995,8 @@ type FromChildToParentMessageTypesMap = LoadErrorMessageTypesMap & {
969
995
  };
970
996
  } & AppToEditorMessage;
971
997
  type FromChildToParentMessageTypes = keyof FromChildToParentMessageTypesMap;
998
+ //#endregion
999
+ //#region src/lib/internal-details/location-store.d.ts
972
1000
  declare class LocationStore {
973
1001
  route?: RouteInfo;
974
1002
  rootStore: RootStore;
@@ -978,6 +1006,8 @@ declare class LocationStore {
978
1006
  private matchesToRoutePattern;
979
1007
  locationToRouteInfo(location: Location, routes: DataRouter["routes"], params: Readonly<Params<string>>): RouteInfo | undefined;
980
1008
  }
1009
+ //#endregion
1010
+ //#region src/lib/internal-details/lib/features/api-store.d.ts
981
1011
  type ApiResult<T = any> = {
982
1012
  data?: T;
983
1013
  error?: string;
@@ -1036,14 +1066,23 @@ declare class ApiManager {
1036
1066
  private awaitBootstrapIfNeeded;
1037
1067
  notifyBootstrapComplete(): void;
1038
1068
  private prewarmExecutionPath;
1039
- loadApiManifest({ apis }: {
1069
+ loadApiManifest({
1070
+ apis
1071
+ }: {
1040
1072
  apis?: Record<string, {
1041
1073
  api: DeleteMeLibraryApi;
1042
1074
  scopeId: string;
1043
1075
  }>;
1044
1076
  }): void;
1045
1077
  rerunApiByCallId(callId: string): Promise<ApiResult>;
1046
- runApiByPath({ path, inputs, callId, callback, isTestRun, injectedCallerId }: {
1078
+ runApiByPath({
1079
+ path,
1080
+ inputs,
1081
+ callId,
1082
+ callback,
1083
+ isTestRun,
1084
+ injectedCallerId
1085
+ }: {
1047
1086
  path: string;
1048
1087
  inputs: SbApiRunOptions;
1049
1088
  callId?: string;
@@ -1084,6 +1123,8 @@ declare class ApiManager {
1084
1123
  }>;
1085
1124
  cancelApi(apiName: string, _scopeId?: string): Promise<void>;
1086
1125
  }
1126
+ //#endregion
1127
+ //#region src/lib/internal-details/lib/root-store.d.ts
1087
1128
  /**
1088
1129
  * User information extracted from JWT for SDK API execution.
1089
1130
  * Matches the ApiUser interface from @superblocksteam/sdk-api.
@@ -1214,6 +1255,8 @@ declare class RootStore {
1214
1255
  notifyEditorRegistered(): void;
1215
1256
  onEditorRegistered(fn: () => void): void;
1216
1257
  }
1258
+ //#endregion
1259
+ //#region src/lib/internal-details/lib/features/component-registry.d.ts
1217
1260
  type DefaultTagNames = {
1218
1261
  container: string;
1219
1262
  button: string;
@@ -1251,6 +1294,8 @@ declare class ComponentRegistry implements ComponentRegistryShareState {
1251
1294
  */
1252
1295
  hasComponent(component: React$2.ElementType | string): boolean;
1253
1296
  }
1297
+ //#endregion
1298
+ //#region src/lib/internal-details/sb-wrapper.d.ts
1254
1299
  type InjectedProps = {
1255
1300
  dropTargetRef?: React$1.Ref<HTMLElement> | React$1.LegacyRef<HTMLElement>;
1256
1301
  };
@@ -1263,7 +1308,7 @@ interface CreationContext {
1263
1308
  selfTagName: string;
1264
1309
  generateUniqueName: (prefix: string) => string;
1265
1310
  }
1266
- type PropertyValues<P extends React$1.ComponentProps<any>> = { [K in keyof P]?: PropertyInfo | PropertyValues<P[K]>; };
1311
+ type PropertyValues<P extends React$1.ComponentProps<any>> = { [K in keyof P]?: PropertyInfo | PropertyValues<P[K]> };
1267
1312
  interface EditorTemplate<P extends React$1.ComponentProps<any> = React$1.ComponentProps<any>> {
1268
1313
  catalog?: Catalog;
1269
1314
  /***
@@ -1299,6 +1344,8 @@ interface Chainable<PROPS extends React$1.ComponentProps<any> = React$1.Componen
1299
1344
  * @returns A chainable object that provides methods for editor integration (addEditorTemplate and editorConfig).
1300
1345
  */
1301
1346
  declare const registerComponentInternal: <T extends React$1.ElementType>(Component: T, propertiesDefinition: PropertiesDefinition) => Chainable<React$1.ComponentProps<T>>;
1347
+ //#endregion
1348
+ //#region src/lib/user-facing/component-base/sb-component.d.ts
1302
1349
  type SbComponentProps<El = HTMLElement> = {
1303
1350
  name?: string;
1304
1351
  bind?: WithBindingIdentifier;
@@ -1308,6 +1355,8 @@ type SbComponentProps<El = HTMLElement> = {
1308
1355
  */
1309
1356
  loading?: boolean;
1310
1357
  } & Omit<React.HTMLAttributes<El>, "height" | "width">;
1358
+ //#endregion
1359
+ //#region src/lib/user-facing/properties-panel/props-builder.d.ts
1311
1360
  type Exact<T, Shape> = T extends Shape ? Exclude<keyof T, keyof Shape> extends never ? T : never : never;
1312
1361
  type ManagedProp<T extends DataType = DataType> = PropertyForData<T> & {
1313
1362
  default?: SingleInputProp<T>;
@@ -1353,12 +1402,15 @@ type DefaultValueBehavior = "RequiredIfDefault" | "AlwaysOptional";
1353
1402
  * Extracts the concrete type from a property definition
1354
1403
  * Enhanced to handle contextual properties
1355
1404
  */
1356
- type ExtractPropType<T, DefaultsBehavior extends DefaultValueBehavior, IsEvaluated extends boolean> = T extends Record<string, Prop<any, any, any>> ? ExtractProps<T, DefaultsBehavior, IsEvaluated> : T extends RecordProp<infer U> ? Record<string, ExtractProps<U, DefaultsBehavior, IsEvaluated>> : T extends CompositeProp<infer U> ? IsEvaluated extends true ? ExtractProps<U, DefaultsBehavior, IsEvaluated> : InputProp<ExtractProps<U, DefaultsBehavior, true>> : T extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: ExtractProps<MergeUnionVariant<SHARED, VARIANTS[I]>, DefaultsBehavior, IsEvaluated>; }[number] : never : T extends Prop<infer V, infer _HasDefault, infer ContextualProps> ? IsEvaluated extends true ? ContextualProps extends undefined ? V extends Callback ? (...args: any[]) => Promise<void> : V : ContextualProps extends any[] ? (...args: ContextualProps) => V : InputProp<V> : InputProp<V> : never;
1405
+ type ExtractPropType<T, DefaultsBehavior extends DefaultValueBehavior, IsEvaluated extends boolean> = T extends Record<string, Prop<any, any, any>> ? ExtractProps<T, DefaultsBehavior, IsEvaluated> : T extends RecordProp<infer U> ? Record<string, ExtractProps<U, DefaultsBehavior, IsEvaluated>> : T extends CompositeProp<infer U> ? IsEvaluated extends true ? ExtractProps<U, DefaultsBehavior, IsEvaluated> : InputProp<ExtractProps<U, DefaultsBehavior, true>> : T extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: ExtractProps<MergeUnionVariant<SHARED, VARIANTS[I]>, DefaultsBehavior, IsEvaluated> }[number] : never : T extends Prop<infer V, infer _HasDefault, infer ContextualProps> ? IsEvaluated extends true ? ContextualProps extends undefined ? V extends Callback ? (...args: any[]) => Promise<void> : V : ContextualProps extends any[] ? (...args: ContextualProps) => V : InputProp<V> : InputProp<V> : never;
1357
1406
  /**
1358
1407
  * Extracts a flat props object from a properties definition
1359
1408
  * Handles optionality based on DefaultValueBehavior
1360
1409
  */
1361
- type ExtractProps<T, DefaultsBehavior extends DefaultValueBehavior, IsEvaluated extends boolean> = T extends Record<string, Section> ? ExtractProps<MergeSections<T>, DefaultsBehavior, IsEvaluated> : T extends SectionPropRecord ? DefaultsBehavior extends "AlwaysOptional" ? { [K in keyof T as T[K] extends Prop<any, any, any> ? K : never]?: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated>; } : { [K in keyof T as T[K] extends Prop<any, infer HasDefault, any> ? HasDefault extends true ? K : never : never]: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated>; } & { [K in keyof T as T[K] extends Prop<any, infer HasDefault, any> ? HasDefault extends false ? K : never : never]?: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated>; } : never;
1410
+ type ExtractProps<T, DefaultsBehavior extends DefaultValueBehavior, IsEvaluated extends boolean> = T extends Record<string, Section> ? ExtractProps<MergeSections<T>, DefaultsBehavior, IsEvaluated> : T extends SectionPropRecord ? DefaultsBehavior extends "AlwaysOptional" ? { [K in keyof T as T[K] extends Prop<any, any, any> ? K : never]?: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated> } : { [K in keyof T as T[K] extends Prop<any, infer HasDefault, any> ? HasDefault extends true ? K : never : never]: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated> } & { [K in keyof T as T[K] extends Prop<any, infer HasDefault, any> ? HasDefault extends false ? K : never : never]?: ExtractPropType<T[K], DefaultsBehavior, IsEvaluated> } : never;
1411
+ /**
1412
+ * Handles non Prop types, aka our default types and CSS props
1413
+ */
1362
1414
  type SectionPropertiesPanelConfig = {
1363
1415
  showHeader?: boolean;
1364
1416
  isDefaultOpen?: boolean;
@@ -1379,17 +1431,22 @@ type EntityProps<Definition extends PropertiesDefinition, MergedSections = Merge
1379
1431
  * - Properties are fully evaluated to their final types
1380
1432
  */
1381
1433
  type InternalProps<Definition extends PropertiesDefinition, FlattenedProps = EntityProps<Definition>, BaseProps = Omit<SbComponentProps, keyof FlattenedProps>> = FlattenedProps & BaseProps & InjectedProps;
1434
+ /**
1435
+ * External props exposed to component consumers
1436
+ * - All properties are optional regardless of defaults
1437
+ * - Properties accept InputProp values (bindings/functions)
1438
+ */
1382
1439
  type PropertiesDefinition = Record<string, Section>;
1383
- type SectionPropRecord<Props = Record<string, any>> = Partial<{ [K in keyof Props]: Prop<Props[K], any>; }>;
1440
+ type SectionPropRecord<Props = Record<string, any>> = Partial<{ [K in keyof Props]: Prop<Props[K], any> }>;
1384
1441
  declare class Section<TProps = any, // Component props type for validation
1385
- T extends SectionPropRecord<TProps> = SectionPropRecord<TProps>> {
1442
+ T extends SectionPropRecord<TProps> = SectionPropRecord<TProps>> {
1386
1443
  readonly category: PropsCategory;
1387
1444
  props: T;
1388
1445
  propertiesPanelConfig: SectionPropertiesPanelConfig;
1389
1446
  constructor(category: PropsCategory);
1390
- static category<Props = any>(category: PropsCategory): Section<Props, Partial<{ [K in keyof Props]: Prop<Props[K], any, undefined>; }>>;
1391
- children<INP extends SectionPropRecord<TProps> | CompositeProp<any> | UnionProp<any, any>, OUT extends (INP extends CompositeProp<infer CU> ? CU : INP extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: MergeUnionVariant<SHARED, VARIANTS[I]>; }[number] : never : INP)>(props: INP extends CompositeProp<any> | UnionProp<any, any> ? INP : Exact<INP, SectionPropRecord<TProps>>): Section<TProps, T & OUT>;
1392
- add: <INP extends SectionPropRecord<TProps> | CompositeProp<any> | UnionProp<any, any>, OUT extends (INP extends CompositeProp<infer CU> ? CU : INP extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: MergeUnionVariant<SHARED, VARIANTS[I]>; }[number] : never : INP)>(props: INP extends CompositeProp<any> | UnionProp<any, any> ? INP : Exact<INP, SectionPropRecord<TProps>>) => Section<TProps, T & OUT>;
1447
+ static category<Props = any>(category: PropsCategory): Section<Props, Partial<{ [K in keyof Props]: Prop<Props[K], any, undefined> }>>;
1448
+ children<INP extends SectionPropRecord<TProps> | CompositeProp<any> | UnionProp<any, any>, OUT extends (INP extends CompositeProp<infer CU> ? CU : INP extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: MergeUnionVariant<SHARED, VARIANTS[I]> }[number] : never : INP)>(props: INP extends CompositeProp<any> | UnionProp<any, any> ? INP : Exact<INP, SectionPropRecord<TProps>>): Section<TProps, T & OUT>;
1449
+ add: <INP extends SectionPropRecord<TProps> | CompositeProp<any> | UnionProp<any, any>, OUT extends (INP extends CompositeProp<infer CU> ? CU : INP extends UnionProp<infer SHARED, infer VARIANTS> ? VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: MergeUnionVariant<SHARED, VARIANTS[I]> }[number] : never : INP)>(props: INP extends CompositeProp<any> | UnionProp<any, any> ? INP : Exact<INP, SectionPropRecord<TProps>>) => Section<TProps, T & OUT>;
1393
1450
  /** @deprecated Panel configuration is accepted for source compatibility and ignored. */
1394
1451
  propertiesPanel(_config: SectionPropertiesPanelConfig): this;
1395
1452
  get name(): "Content" | "Routing" | "Interaction" | "Styles" | "Layout" | "Appearance" | "Permissions" | "Uncategorized" | "Actions";
@@ -1452,7 +1509,7 @@ declare class Prop<Type extends DataType, _HasDefault extends boolean = false, _
1452
1509
  static union<SHARED extends Record<string, Prop<unknown, boolean>>, VARIANTS extends UnionVariant<SHARED>[] = UnionVariant<SHARED>[]>(props: {
1453
1510
  shared: SHARED;
1454
1511
  variants: VARIANTS;
1455
- }): UnionProp<SHARED, VARIANTS, VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: SHARED & VARIANTS[I]; }[number] : never>;
1512
+ }): UnionProp<SHARED, VARIANTS, VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: SHARED & VARIANTS[I] }[number] : never>;
1456
1513
  default(de: SingleInputProp<DataType>): Prop<Type, true>;
1457
1514
  contextual<TContext extends any[] | undefined = any[]>(computedArgs?: EvaluateOrValueComputedArgs): Prop<Type, _HasDefault, TContext>;
1458
1515
  setName(name: string): this;
@@ -1500,14 +1557,16 @@ declare class FunctionProp<ARGS extends any[] = any[], RETURN = any> extends Pro
1500
1557
  actionPanel(_panel?: ActionPanel): this;
1501
1558
  getActionPanel(): ActionPanel | undefined;
1502
1559
  }
1503
- type UnionVariant<SHARED extends Record<string, Prop<any>>> = { [K in keyof SHARED]: Prop<any>; };
1504
- declare class UnionProp<SHARED extends Record<string, Prop<unknown, boolean>>, VARIANTS extends UnionVariant<SHARED>[] = UnionVariant<SHARED>[], _OUTPUT = VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: SHARED & VARIANTS[I]; }[number] : never> extends Prop<any> {
1560
+ type UnionVariant<SHARED extends Record<string, Prop<any>>> = { [K in keyof SHARED]: Prop<any> };
1561
+ declare class UnionProp<SHARED extends Record<string, Prop<unknown, boolean>>, VARIANTS extends UnionVariant<SHARED>[] = UnionVariant<SHARED>[], _OUTPUT = (VARIANTS extends readonly any[] ? { [I in keyof VARIANTS]: SHARED & VARIANTS[I] }[number] : never)> extends Prop<any> {
1505
1562
  typeString: "union";
1506
1563
  shared: SHARED;
1507
1564
  variants: VARIANTS;
1508
1565
  constructor(shared: SHARED, variants: VARIANTS);
1509
1566
  getProps(): Record<string, Prop<any, false, undefined>>;
1510
1567
  }
1568
+ //#endregion
1569
+ //#region src/lib/user-facing/components/app/props.d.ts
1511
1570
  declare const propertiesDefinition: {
1512
1571
  contents: Section<any, Partial<{
1513
1572
  [x: string]: Prop<any, any, undefined>;
@@ -1520,12 +1579,20 @@ declare const propertiesDefinition: {
1520
1579
  className: Prop<string, any, undefined>;
1521
1580
  }>>;
1522
1581
  };
1523
- declare const App: (({ children, className, context }: InternalProps<typeof propertiesDefinition> & {
1582
+ //#endregion
1583
+ //#region src/lib/user-facing/components/app/index.d.ts
1584
+ declare const App: (({
1585
+ children,
1586
+ className,
1587
+ context
1588
+ }: InternalProps<typeof propertiesDefinition> & {
1524
1589
  context?: SuperblocksAppContext;
1525
- }) => import("react/jsx-runtime").JSX.Element) & {
1590
+ }) => _$react_jsx_runtime0.JSX.Element) & {
1526
1591
  displayName: string;
1527
1592
  };
1528
- type PropertiesPanelDefinition<Props extends React$1.ComponentProps<any>> = SectionPropRecord<Props> | { [K in string]: Section<Props, SectionPropRecord<Props>>; };
1593
+ //#endregion
1594
+ //#region src/lib/user-facing/components/custom/register-custom-component.d.ts
1595
+ type PropertiesPanelDefinition<Props extends React$1.ComponentProps<any>> = SectionPropRecord<Props> | { [K in string]: Section<Props, SectionPropRecord<Props>> };
1529
1596
  /**
1530
1597
  * Registers a custom React component or HTML element with Superblocks.
1531
1598
  *
@@ -1561,16 +1628,29 @@ type PropertiesPanelDefinition<Props extends React$1.ComponentProps<any>> = Sect
1561
1628
  * });
1562
1629
  * ```
1563
1630
  */
1564
- export declare function registerComponent<T extends React$1.ElementType>(component: T, propertiesDefinition?: PropertiesPanelDefinition<React$1.ComponentProps<T>>): ReturnType<typeof registerComponentInternal>;
1565
- export declare const PageNotFound: ({ title, errorMessage, buttonPath, buttonText, onButtonClick, hideActions }: {
1631
+ declare function registerComponent<T extends React$1.ElementType>(component: T, propertiesDefinition?: PropertiesPanelDefinition<React$1.ComponentProps<T>>): ReturnType<typeof registerComponentInternal>;
1632
+ //#endregion
1633
+ //#region src/lib/user-facing/error-pages/page-not-found.d.ts
1634
+ declare const PageNotFound: ({
1635
+ title,
1636
+ errorMessage,
1637
+ buttonPath,
1638
+ buttonText,
1639
+ onButtonClick,
1640
+ hideActions
1641
+ }: {
1566
1642
  title?: string;
1567
1643
  errorMessage?: string | React$1.ReactElement;
1568
1644
  buttonPath?: string;
1569
1645
  buttonText?: string;
1570
1646
  onButtonClick?: () => void;
1571
1647
  hideActions?: boolean;
1572
- }) => import("react/jsx-runtime").JSX.Element;
1573
- export declare function RouteLoadError(): import("react/jsx-runtime").JSX.Element;
1648
+ }) => _$react_jsx_runtime0.JSX.Element;
1649
+ //#endregion
1650
+ //#region src/lib/internal-details/internal-components/route-load-error.d.ts
1651
+ declare function RouteLoadError(): _$react_jsx_runtime0.JSX.Element;
1652
+ //#endregion
1653
+ //#region src/lib/internal-details/use-api.d.ts
1574
1654
  declare global {
1575
1655
  interface SuperblocksAPIRegistry {}
1576
1656
  }
@@ -1588,6 +1668,12 @@ type ApiInterfaces<Name extends string> = Name extends keyof SuperblocksAPIRegis
1588
1668
  input: never;
1589
1669
  output: never;
1590
1670
  };
1671
+ /**
1672
+ * Get the API path for an API by name.
1673
+ *
1674
+ * When SDK APIs are enabled, paths point to `/server/apis/<name>/api.ts`.
1675
+ * When using legacy YAML mode, paths point to `/apis/<name>/api.yaml`.
1676
+ */
1591
1677
  /** Helper type to extract input type from a CompiledApi */
1592
1678
  type ApiInput<T> = T extends CompiledApi<infer TInput, any> ? TInput : never;
1593
1679
  /** Helper type to extract output type from a CompiledApi */
@@ -1670,14 +1756,14 @@ type UseApiReturnType<TName extends string> = TName extends keyof ApiRegistry ?
1670
1756
  * @param name - The name of the registered API to execute
1671
1757
  * @returns An object with `run` and `cancel` functions
1672
1758
  */
1673
- export declare function useApiStateful<Name extends RegisteredAPINames, Inputs = ApiInterfaces<Name>["input"], Response = ApiInterfaces<Name>["output"]>(name: Name): UseApiCoreMethods<Inputs, Response>;
1674
- export declare function useApi<TName extends string>(apiName: TName, inputs?: undefined): UseApiReturnType<TName>;
1759
+ declare function useApiStateful<Name extends RegisteredAPINames, Inputs = ApiInterfaces<Name>["input"], Response = ApiInterfaces<Name>["output"]>(name: Name): UseApiCoreMethods<Inputs, Response>;
1760
+ declare function useApi<TName extends string>(apiName: TName, inputs?: undefined): UseApiReturnType<TName>;
1675
1761
  /**
1676
1762
  * @deprecated Use `useApiData` for declarative data fetching.
1677
1763
  * This overload will be removed in a future major version.
1678
1764
  */
1679
- export declare function useApi<TName extends string>(apiName: TName, inputs: TName extends keyof ApiRegistry ? ApiInput<ApiRegistry[TName]> : Record<string, unknown>): UseApiReturnType<TName>;
1680
- export declare function useApi<TApi extends CompiledApi<unknown, unknown>>(apiName: string, inputs?: ApiInput<TApi>): UseApiResult<ApiInput<TApi>, ApiOutput<TApi>>;
1765
+ declare function useApi<TName extends string>(apiName: TName, inputs: TName extends keyof ApiRegistry ? ApiInput<ApiRegistry[TName]> : Record<string, unknown>): UseApiReturnType<TName>;
1766
+ declare function useApi<TApi extends CompiledApi<unknown, unknown>>(apiName: string, inputs?: ApiInput<TApi>): UseApiResult<ApiInput<TApi>, ApiOutput<TApi>>;
1681
1767
  /**
1682
1768
  * Type for a registry of compiled APIs.
1683
1769
  * Used with useTypedApi to enable automatic type inference.
@@ -1702,7 +1788,9 @@ interface TypedUseApi<TRegistry extends AnyApiRegistry> {
1702
1788
  *
1703
1789
  * @returns A typed useApi function
1704
1790
  */
1705
- export declare function useTypedApi<TRegistry extends AnyApiRegistry>(): TypedUseApi<TRegistry>;
1791
+ declare function useTypedApi<TRegistry extends AnyApiRegistry>(): TypedUseApi<TRegistry>;
1792
+ //#endregion
1793
+ //#region src/lib/internal-details/use-api-data.d.ts
1706
1794
  interface UseApiDataResult<TOutput> {
1707
1795
  /** The most recent successful response. Persists across background refetches. */
1708
1796
  data: TOutput | undefined;
@@ -1791,7 +1879,7 @@ interface UseApiDataOptions {
1791
1879
  /** Shown while the real fetch is in progress, before any data arrives. */
1792
1880
  placeholderData?: unknown;
1793
1881
  }
1794
- export declare function useApiData(apiName: string, inputs: Record<string, unknown>, options?: UseApiDataOptions): UseApiDataResult<unknown>;
1882
+ declare function useApiData(apiName: string, inputs: Record<string, unknown>, options?: UseApiDataOptions): UseApiDataResult<unknown>;
1795
1883
  interface TypedUseApiData<TRegistry extends AnyApiRegistry> {
1796
1884
  <TName extends keyof TRegistry & string>(apiName: TName, inputs: ApiInput<TRegistry[TName]>, options?: UseApiDataOptions): UseApiDataResult<ApiOutput<TRegistry[TName]>>;
1797
1885
  }
@@ -1805,7 +1893,9 @@ interface TypedUseApiData<TRegistry extends AnyApiRegistry> {
1805
1893
  * export const useApiData = useTypedApiData<ApiRegistry>();
1806
1894
  * ```
1807
1895
  */
1808
- export declare function useTypedApiData<TRegistry extends AnyApiRegistry>(): TypedUseApiData<TRegistry>;
1896
+ declare function useTypedApiData<TRegistry extends AnyApiRegistry>(): TypedUseApiData<TRegistry>;
1897
+ //#endregion
1898
+ //#region src/lib/internal-details/execute-api.d.ts
1809
1899
  interface ExecuteApiOptions {
1810
1900
  /** AbortSignal to cancel the request mid-flight. */
1811
1901
  signal?: AbortSignal;
@@ -1825,7 +1915,7 @@ interface ExecuteApiOptions {
1825
1915
  * @throws {DOMException} with name "AbortError" if cancelled via signal.
1826
1916
  * @throws The orchestrator error object on API failure.
1827
1917
  */
1828
- export declare function executeApi(apiName: string, inputs?: Record<string, unknown>, options?: ExecuteApiOptions): Promise<unknown>;
1918
+ declare function executeApi(apiName: string, inputs?: Record<string, unknown>, options?: ExecuteApiOptions): Promise<unknown>;
1829
1919
  type TypedExecuteApi<TRegistry extends AnyApiRegistry> = <TName extends keyof TRegistry & string>(apiName: TName, inputs?: ApiInput<TRegistry[TName]>, options?: ExecuteApiOptions) => Promise<ApiOutput<TRegistry[TName]>>;
1830
1920
  /**
1831
1921
  * Creates a typed version of executeApi bound to a specific API registry.
@@ -1837,7 +1927,9 @@ type TypedExecuteApi<TRegistry extends AnyApiRegistry> = <TName extends keyof TR
1837
1927
  * export const executeApi = createTypedExecuteApi<ApiRegistry>();
1838
1928
  * ```
1839
1929
  */
1840
- export declare function createTypedExecuteApi<TRegistry extends AnyApiRegistry>(): TypedExecuteApi<TRegistry>;
1930
+ declare function createTypedExecuteApi<TRegistry extends AnyApiRegistry>(): TypedExecuteApi<TRegistry>;
1931
+ //#endregion
1932
+ //#region src/lib/internal-details/query-cache.d.ts
1841
1933
  /**
1842
1934
  * Build a deterministic, string cache key from API name + inputs.
1843
1935
  * Sorts object entries so { b: 2, a: 1 } and { a: 1, b: 2 } produce
@@ -1853,7 +1945,9 @@ declare class QueryClient {
1853
1945
  clear: () => void;
1854
1946
  };
1855
1947
  }
1856
- export declare const queryClient: QueryClient;
1948
+ declare const queryClient: QueryClient;
1949
+ //#endregion
1950
+ //#region src/lib/user-facing/global-functions.d.ts
1857
1951
  /**
1858
1952
  * Logs out the user from all authenticated integrations used in APIs.
1859
1953
  *
@@ -1879,18 +1973,22 @@ export declare const queryClient: QueryClient;
1879
1973
  * }
1880
1974
  * ```
1881
1975
  */
1882
- export declare function logoutIntegrations(): Promise<{
1976
+ declare function logoutIntegrations(): Promise<{
1883
1977
  success: boolean;
1884
1978
  errors?: Array<{
1885
1979
  message: string;
1886
1980
  }>;
1887
1981
  }>;
1982
+ //#endregion
1983
+ //#region src/lib/user-facing/properties-panel/mixins/styles-category.d.ts
1888
1984
  /** @deprecated Accepted for source compatibility. Returns an empty section. */
1889
- export declare const tailwindStylesCategory: (_props?: {
1985
+ declare const tailwindStylesCategory: (_props?: {
1890
1986
  prioritizedTailwindProperties?: TailwindPropertyKey[];
1891
1987
  }) => Section<{
1892
1988
  className: string;
1893
1989
  }>;
1990
+ //#endregion
1991
+ //#region src/lib/internal-details/embed-store.d.ts
1894
1992
  /**
1895
1993
  * Store for managing embed properties and events.
1896
1994
  * Used when the library is embedded in an external application (third-party embedding).
@@ -1930,7 +2028,9 @@ declare class EmbedStore {
1930
2028
  message: string;
1931
2029
  }): void;
1932
2030
  }
1933
- export declare const embedStore: EmbedStore;
2031
+ declare const embedStore: EmbedStore;
2032
+ //#endregion
2033
+ //#region src/lib/user-facing/embed.d.ts
1934
2034
  /**
1935
2035
  * Emit a custom event to the external embedder.
1936
2036
  * This is used when the library is embedded in an iframe
@@ -1969,10 +2069,12 @@ declare function getEmbedProperties(): Record<string, unknown>;
1969
2069
  * The Superblocks object provides utilities for interacting with
1970
2070
  * the embedding context when the library is embedded in an iframe.
1971
2071
  */
1972
- export declare const Superblocks: {
2072
+ declare const Superblocks: {
1973
2073
  emitEvent: typeof emitEvent;
1974
2074
  getEmbedProperties: typeof getEmbedProperties;
1975
2075
  };
2076
+ //#endregion
2077
+ //#region src/lib/hooks/use-embed-properties.d.ts
1976
2078
  /**
1977
2079
  * React hook for accessing embed properties passed from the external embedder.
1978
2080
  * Automatically re-renders when properties change.
@@ -1994,7 +2096,9 @@ export declare const Superblocks: {
1994
2096
  * }
1995
2097
  * ```
1996
2098
  */
1997
- export declare function useEmbedProperties(): Record<string, unknown>;
2099
+ declare function useEmbedProperties(): Record<string, unknown>;
2100
+ //#endregion
2101
+ //#region src/lib/hooks/use-embed-event.d.ts
1998
2102
  /**
1999
2103
  * React hook for listening to events triggered by the external embedder.
2000
2104
  * The handler will be called whenever the embedder triggers the specified event.
@@ -2021,7 +2125,9 @@ export declare function useEmbedProperties(): Record<string, unknown>;
2021
2125
  * }
2022
2126
  * ```
2023
2127
  */
2024
- export declare function useEmbedEvent(eventName: string, handler: (payload: Record<string, unknown>) => void): void;
2128
+ declare function useEmbedEvent(eventName: string, handler: (payload: Record<string, unknown>) => void): void;
2129
+ //#endregion
2130
+ //#region src/lib/hooks/use-emit-embed-event.d.ts
2025
2131
  /**
2026
2132
  * React hook that returns a function to emit events to the external embedder.
2027
2133
  * Use this to communicate actions or state changes back to the parent application.
@@ -2055,6 +2161,7 @@ export declare function useEmbedEvent(eventName: string, handler: (payload: Reco
2055
2161
  * }
2056
2162
  * ```
2057
2163
  */
2058
- export declare function useEmitEmbedEvent(): (eventName: string, payload?: Record<string, unknown>) => void;
2059
- export { type AgentInfo, type AnyApiRegistry, type ApiInput, type ApiOutput, type ApiRegistry, App, type CreateChild, type CreationContext, type DataTag, type DataTags, type EditorConfig, type EditorTemplate, type ExecuteApiOptions, type FromChildToParentMessageTypes, type FromChildToParentMessageTypesMap, type FromParentToChildMessageTypes, type FromParentToChildMessageTypesMap, type IframeLoadTimings, Prop, type PropertiesPanelDefinition, Property, PropsCategory, Section, SbProvider as SuperblocksProvider, type TypedExecuteApi, type TypedUseApi, type TypedUseApiData, type UseApiDataOptions, type UseApiDataResult, type UseApiResult, type UseApiReturnType, createElement };
2164
+ declare function useEmitEmbedEvent(): (eventName: string, payload?: Record<string, unknown>) => void;
2165
+ //#endregion
2166
+ export { type AgentInfo, type AnyApiRegistry, type ApiInput, type ApiOutput, type ApiRegistry, App, type CreateChild, type CreationContext, type DataTag, type DataTags, type EditorConfig, type EditorTemplate, type ExecuteApiOptions, type FromChildToParentMessageTypes, type FromChildToParentMessageTypesMap, type FromParentToChildMessageTypes, type FromParentToChildMessageTypesMap, type IframeLoadTimings, PageNotFound, Prop, type PropertiesPanelDefinition, Property, PropsCategory, RouteLoadError, Section, Superblocks, SbProvider as SuperblocksProvider, type TypedExecuteApi, type TypedUseApi, type TypedUseApiData, type UseApiDataOptions, type UseApiDataResult, type UseApiResult, type UseApiReturnType, createElement, createTypedExecuteApi, embedStore, executeApi, getAppMode, logoutIntegrations, queryClient, registerComponent, tailwindStylesCategory, useApi, useApiData, useApiStateful, useEmbedEvent, useEmbedProperties, useEmitEmbedEvent, useSuperblocksDataTags, useSuperblocksGroups, useSuperblocksProfiles, useSuperblocksUser, useTypedApi, useTypedApiData };
2060
2167
  //# sourceMappingURL=index.d.ts.map