@protobase/layout 0.66.13 → 0.66.14

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.
@@ -21,7 +21,8 @@ const blockSpecs = {
21
21
  props: {
22
22
  title: required("text"),
23
23
  description: optional("text"),
24
- actions: optional("elements")
24
+ actions: optional("elements"),
25
+ width: optional("pageWidth")
25
26
  }
26
27
  },
27
28
  Grid: {
@@ -279,6 +280,7 @@ const cardWidths = [
279
280
  "1/2",
280
281
  "2/3"
281
282
  ];
283
+ const pageWidths = ["column", "full"];
282
284
  const oneOf = (values) => [(value) => typeof value === "string" && values.includes(value), values.join(", ")];
283
285
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
284
286
  const checks = {
@@ -300,6 +302,7 @@ const checks = {
300
302
  range: oneOf(ranges),
301
303
  cardsLayout: oneOf(cardsLayouts),
302
304
  cardWidth: oneOf(cardWidths),
305
+ pageWidth: oneOf(pageWidths),
303
306
  address: [(value) => isObject(value) && !isLayoutNode(value) && typeof value.kind === "string", "an address, such as { kind: 'list', resource: 'orders' }"]
304
307
  };
305
308
  /** Problems with one element's props and children against its block's spec. */
package/dist/blocks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Block, LayoutChildren, LayoutNode, LayoutValue } from "./node.js";
2
- import { AppAddress, FieldFormat } from "@protobase/schema";
2
+ import { AppAddress, FieldFormat, PageWidth } from "@protobase/schema";
3
3
  //#region src/blocks.d.ts
4
4
  /** One element or several, for slots such as a card's header `actions`. */
5
5
  export type Elements = LayoutNode | LayoutNode[];
@@ -21,6 +21,8 @@ export type PageProps = {
21
21
  title: string;
22
22
  description?: string;
23
23
  actions?: Elements;
24
+ /** `full` fills the content pane beside the sidebar instead of the centred column, the default. */
25
+ width?: PageWidth;
24
26
  children?: LayoutChildren;
25
27
  };
26
28
  export type GridProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/layout",
3
- "version": "0.66.13",
3
+ "version": "0.66.14",
4
4
  "description": "Composed pages for Protobase, written as JSX that compiles to plain data, with its JSX runtime.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@protobase/schema": "0.66.13",
34
+ "@protobase/schema": "0.66.14",
35
35
  "aip-parsers": "^1.0.0"
36
36
  }
37
37
  }