@sqlrooms/layout-config 0.25.0-rc.0 → 0.26.0-rc.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.
@@ -3,7 +3,9 @@ import { z } from 'zod';
3
3
  export declare const MAIN_VIEW = "main";
4
4
  export declare const LayoutTypes: z.ZodEnum<["mosaic"]>;
5
5
  export type LayoutTypes = z.infer<typeof MosaicLayoutDirection>;
6
+ /** @deprecated Use createDefaultMosaicLayout instead */
6
7
  export declare const DEFAULT_MOSAIC_LAYOUT: MosaicLayoutConfig;
8
+ export declare function createDefaultMosaicLayout(): MosaicLayoutConfig;
7
9
  export declare const MosaicLayoutDirection: z.ZodEnum<["row", "column"]>;
8
10
  export type MosaicLayoutDirection = z.infer<typeof MosaicLayoutDirection>;
9
11
  declare const BaseMosaicLayoutParent: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutConfig.d.ts","sourceRoot":"","sources":["../src/LayoutConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,+BAA+B;AAC/B,eAAO,MAAM,SAAS,SAAS,CAAC;AAEhC,eAAO,MAAM,WAAW,uBAAqB,CAAC;AAC9C,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB,EAAE,kBAGnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,8BAA4B,CAAC;AAC/D,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,QAAA,MAAM,sBAAsB;;;;;;;;;EAG1B,CAAC;AAGH,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAIzD,CAAC;AACL,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC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qB,CAAC,CAAC;AAE1E,QAAA,MAAM,sBAAsB;;;;;;;;;EAG1B,CAAC;AAGH,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAIzD,CAAC;AACL,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,GAAG;IACxE,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GACxC,IAAI,IAAI,kBAAkB,CAE5B;AAED,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,eAAO,MAAM,gBAAgB,4FAG3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;IAAqD,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -2,10 +2,17 @@ import { z } from 'zod';
2
2
  /** Main view room panel key */
3
3
  export const MAIN_VIEW = 'main';
4
4
  export const LayoutTypes = z.enum(['mosaic']);
5
+ /** @deprecated Use createDefaultMosaicLayout instead */
5
6
  export const DEFAULT_MOSAIC_LAYOUT = {
6
7
  type: LayoutTypes.enum.mosaic,
7
8
  nodes: MAIN_VIEW,
8
9
  };
10
+ export function createDefaultMosaicLayout() {
11
+ return {
12
+ type: LayoutTypes.enum.mosaic,
13
+ nodes: MAIN_VIEW,
14
+ };
15
+ }
9
16
  export const MosaicLayoutDirection = z.enum(['row', 'column']);
10
17
  const BaseMosaicLayoutParent = z.object({
11
18
  direction: MosaicLayoutDirection,
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutConfig.js","sourceRoot":"","sources":["../src/LayoutConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC;AAEhC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAG9C,MAAM,CAAC,MAAM,qBAAqB,GAAuB;IACvD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM;IAC7B,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AAG/D,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,SAAS,EAAE,qBAAqB;IAChC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAEH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,kBAAkB,GAC7B,sBAAsB,CAAC,MAAM,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC;IACrC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC;CACvC,CAAC,CAAC;AAML,MAAM,UAAU,oBAAoB,CAClC,IAAyC;IAEzC,OAAO,OAAO,IAAI,KAAK,QAAQ,CAAC;AAClC,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;AAI9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC;IACtC,mBAAmB;IACnB,kBAAkB;CACnB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;IACxC,KAAK,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE;IAC/C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC","sourcesContent":["import {z} from 'zod';\n\n/** Main view room panel key */\nexport const MAIN_VIEW = 'main';\n\nexport const LayoutTypes = z.enum(['mosaic']);\nexport type LayoutTypes = z.infer<typeof MosaicLayoutDirection>;\n\nexport const DEFAULT_MOSAIC_LAYOUT: MosaicLayoutConfig = {\n type: LayoutTypes.enum.mosaic,\n nodes: MAIN_VIEW,\n};\n\nexport const MosaicLayoutDirection = z.enum(['row', 'column']);\nexport type MosaicLayoutDirection = z.infer<typeof MosaicLayoutDirection>;\n\nconst BaseMosaicLayoutParent = z.object({\n direction: MosaicLayoutDirection,\n splitPercentage: z.number().optional(),\n});\n\n// See https://zod.dev/?id=recursive-types\nexport const MosaicLayoutParent: z.ZodType<MosaicLayoutParent> =\n BaseMosaicLayoutParent.extend({\n first: z.lazy(() => MosaicLayoutNode),\n second: z.lazy(() => MosaicLayoutNode),\n });\nexport type MosaicLayoutParent = z.infer<typeof BaseMosaicLayoutParent> & {\n first: MosaicLayoutNode;\n second: MosaicLayoutNode;\n};\n\nexport function isMosaicLayoutParent(\n node: MosaicLayoutNode | null | undefined,\n): node is MosaicLayoutParent {\n return typeof node !== 'string';\n}\n\nexport const MosaicLayoutNodeKey = z.string();\nexport type MosaicLayoutNodeKey = z.infer<typeof MosaicLayoutNodeKey>;\n\nexport type MosaicLayoutNode = z.infer<typeof MosaicLayoutNode>;\nexport const MosaicLayoutNode = z.union([\n MosaicLayoutNodeKey,\n MosaicLayoutParent,\n]);\n\nexport const MosaicLayoutConfig = z.object({\n type: z.literal(LayoutTypes.enum.mosaic),\n nodes: MosaicLayoutNode.nullable(),\n pinned: z.array(MosaicLayoutNodeKey).optional(),\n fixed: z.array(MosaicLayoutNodeKey).optional(),\n});\nexport type MosaicLayoutConfig = z.infer<typeof MosaicLayoutConfig>;\n\nexport const LayoutConfig = z.discriminatedUnion('type', [MosaicLayoutConfig]);\nexport type LayoutConfig = z.infer<typeof LayoutConfig>;\n"]}
1
+ {"version":3,"file":"LayoutConfig.js","sourceRoot":"","sources":["../src/LayoutConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC;AAEhC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAG9C,wDAAwD;AACxD,MAAM,CAAC,MAAM,qBAAqB,GAAuB;IACvD,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM;IAC7B,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,MAAM,UAAU,yBAAyB;IACvC,OAAO;QACL,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM;QAC7B,KAAK,EAAE,SAAS;KACjB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AAG/D,MAAM,sBAAsB,G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.enum(['mosaic']);\nexport type LayoutTypes = z.infer<typeof MosaicLayoutDirection>;\n\n/** @deprecated Use createDefaultMosaicLayout instead */\nexport const DEFAULT_MOSAIC_LAYOUT: MosaicLayoutConfig = {\n type: LayoutTypes.enum.mosaic,\n nodes: MAIN_VIEW,\n};\n\nexport function createDefaultMosaicLayout(): MosaicLayoutConfig {\n return {\n type: LayoutTypes.enum.mosaic,\n nodes: MAIN_VIEW,\n };\n}\n\nexport const MosaicLayoutDirection = z.enum(['row', 'column']);\nexport type MosaicLayoutDirection = z.infer<typeof MosaicLayoutDirection>;\n\nconst BaseMosaicLayoutParent = z.object({\n direction: MosaicLayoutDirection,\n splitPercentage: z.number().optional(),\n});\n\n// See https://zod.dev/?id=recursive-types\nexport const MosaicLayoutParent: z.ZodType<MosaicLayoutParent> =\n BaseMosaicLayoutParent.extend({\n first: z.lazy(() => MosaicLayoutNode),\n second: z.lazy(() => MosaicLayoutNode),\n });\nexport type MosaicLayoutParent = z.infer<typeof BaseMosaicLayoutParent> & {\n first: MosaicLayoutNode;\n second: MosaicLayoutNode;\n};\n\nexport function isMosaicLayoutParent(\n node: MosaicLayoutNode | null | undefined,\n): node is MosaicLayoutParent {\n return typeof node !== 'string';\n}\n\nexport const MosaicLayoutNodeKey = z.string();\nexport type MosaicLayoutNodeKey = z.infer<typeof MosaicLayoutNodeKey>;\n\nexport type MosaicLayoutNode = z.infer<typeof MosaicLayoutNode>;\nexport const MosaicLayoutNode = z.union([\n MosaicLayoutNodeKey,\n MosaicLayoutParent,\n]);\n\nexport const MosaicLayoutConfig = z.object({\n type: z.literal(LayoutTypes.enum.mosaic),\n nodes: MosaicLayoutNode.nullable(),\n pinned: z.array(MosaicLayoutNodeKey).optional(),\n fixed: z.array(MosaicLayoutNodeKey).optional(),\n});\nexport type MosaicLayoutConfig = z.infer<typeof MosaicLayoutConfig>;\n\nexport const LayoutConfig = z.discriminatedUnion('type', [MosaicLayoutConfig]);\nexport type LayoutConfig = z.infer<typeof LayoutConfig>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlrooms/layout-config",
3
- "version": "0.25.0-rc.0",
3
+ "version": "0.26.0-rc.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
@@ -27,5 +27,5 @@
27
27
  "typecheck": "tsc --noEmit",
28
28
  "typedoc": "typedoc"
29
29
  },
30
- "gitHead": "063d7608fe608031c690ea3b2e67bb1f4e25a8dd"
30
+ "gitHead": "05d355acee6ea65b33b09c6e49d7746ffacb866e"
31
31
  }