@bettercms-ai/db 0.9.0 → 0.10.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.
package/dist/index.d.ts CHANGED
@@ -28185,6 +28185,35 @@ declare const components: drizzle_orm_pg_core.PgTableWithColumns<{
28185
28185
  identity: undefined;
28186
28186
  generated: undefined;
28187
28187
  }, {}, {}>;
28188
+ tabs: drizzle_orm_pg_core.PgColumn<{
28189
+ name: "tabs";
28190
+ tableName: "components";
28191
+ dataType: "json";
28192
+ columnType: "PgJsonb";
28193
+ data: {
28194
+ id: string;
28195
+ label: string;
28196
+ icon?: string;
28197
+ order?: number;
28198
+ }[] | null;
28199
+ driverParam: unknown;
28200
+ notNull: false;
28201
+ hasDefault: false;
28202
+ isPrimaryKey: false;
28203
+ isAutoincrement: false;
28204
+ hasRuntimeDefault: false;
28205
+ enumValues: undefined;
28206
+ baseColumn: never;
28207
+ identity: undefined;
28208
+ generated: undefined;
28209
+ }, {}, {
28210
+ $type: {
28211
+ id: string;
28212
+ label: string;
28213
+ icon?: string;
28214
+ order?: number;
28215
+ }[] | null;
28216
+ }>;
28188
28217
  preview: drizzle_orm_pg_core.PgColumn<{
28189
28218
  name: "preview";
28190
28219
  tableName: "components";
@@ -28492,6 +28521,7 @@ type ComponentPropDef = {
28492
28521
  /** Per-type settings; the save schema enforces each is present on the type that needs it. */
28493
28522
  config?: {
28494
28523
  componentIds?: string[];
28524
+ allow?: string[];
28495
28525
  options?: Array<string | {
28496
28526
  label: string;
28497
28527
  value: string;
@@ -28509,11 +28539,11 @@ type ComponentSubField = {
28509
28539
  key: string;
28510
28540
  label: string;
28511
28541
  /**
28512
- * No `slot` and no `form`: a nested component instance and a form reference both belong on the
28513
- * prop itself, not inside a row. A form per table row would mean N form documents with no way
28514
- * to author them.
28542
+ * No `form`: a form per table row would mean N form documents with no way to author them. A
28543
+ * `slot` IS a sub-field (V2 kit entries: an instance in an object or a row, `{ componentId,
28544
+ * overrides? }` at its key), with the slot prop's config keys. Mirrors @bettercms-ai/types.
28515
28545
  */
28516
- type: Exclude<ComponentPropDef["type"], "slot" | "form">;
28546
+ type: Exclude<ComponentPropDef["type"], "form">;
28517
28547
  defaultValue?: unknown;
28518
28548
  /** The same editor hints as the prop above, one level down. @see ComponentPropDef */
28519
28549
  required?: boolean;
@@ -28532,6 +28562,8 @@ type ComponentSubField = {
28532
28562
  /** V2 per-field localization: a stored marker. */
28533
28563
  localized?: boolean;
28534
28564
  fields?: ComponentSubField[];
28565
+ /** Per-type settings, the prop's keys one level down (a slot's `componentIds` / `allow`, a list's `itemType`). */
28566
+ config?: Record<string, unknown>;
28535
28567
  };
28536
28568
  type ComponentSelect = InferSelectModel<typeof components>;
28537
28569
  type ComponentInsert = InferInsertModel<typeof components>;
package/dist/index.js CHANGED
@@ -26886,6 +26886,9 @@ var components = pgTable83(
26886
26886
  // The component's BLOCK icon (migration 0460): a dock icon name for the root crumb, slot rows
26887
26887
  // and slot child frames. Draft-only authoring chrome like `design`. Null = unset. Validated at the API layer.
26888
26888
  icon: text84("icon"),
26889
+ // The V2 tabs NO top-level prop sits in (migration 0462): [{ id, label, icon?, order? }], declared
26890
+ // so a /kit schema round-trips. Draft-only authoring chrome like `design`. Null = none. Validated at the API layer.
26891
+ tabs: jsonb44("tabs").$type(),
26889
26892
  // How an instance reads as a ROW in a parent's slot list (migration 0459): { title?, subtitle?,
26890
26893
  // media?, fallback?, icon? }, title/subtitle/media naming top-level prop keys. Draft-only
26891
26894
  // authoring chrome like `design`. Null = unset. Validated at the API layer.