@protobase/server 0.19.13 → 0.19.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.
@@ -23,7 +23,8 @@ const pruneGallery = (item, resource, model, models) => {
23
23
  kind: "gallery",
24
24
  title: item.title,
25
25
  ...image !== void 0 && { image },
26
- ...photos && { photos }
26
+ ...photos && { photos },
27
+ ...item.when !== void 0 && { when: item.when }
27
28
  };
28
29
  };
29
30
  const tidyList = (model) => ({ default: opens, displays, columns, relatedColumns, ...list }) => {
@@ -121,11 +122,13 @@ const layoutShape = (resource, model, models) => shapes.oneOf({
121
122
  help: shapes.data,
122
123
  helpWhen: shapes.data,
123
124
  presentation: shapes.data,
125
+ when: shapes.data,
124
126
  fields: shapes.list(shapes.field, { nonEmpty: true })
125
127
  }, { requires: ["fields"] }),
126
128
  sidebar: shapes.object({
127
129
  kind: shapes.data,
128
- fields: shapes.list(shapes.field, { nonEmpty: true })
130
+ fields: shapes.list(shapes.field, { nonEmpty: true }),
131
+ when: shapes.data
129
132
  }, { requires: ["fields"] }),
130
133
  related: shapes.map((item) => pruneRelated(item, resource, models)),
131
134
  custom: shapes.object({
@@ -133,6 +136,7 @@ const layoutShape = (resource, model, models) => shapes.oneOf({
133
136
  component: shapes.data,
134
137
  title: shapes.data,
135
138
  sidebar: shapes.data,
139
+ when: shapes.data,
136
140
  props: shapes.refs
137
141
  }, { requires: ["props"] }),
138
142
  map: shapes.object({
@@ -141,7 +145,8 @@ const layoutShape = (resource, model, models) => shapes.oneOf({
141
145
  latitude: shapes.field,
142
146
  longitude: shapes.field,
143
147
  zoom: shapes.data,
144
- sidebar: shapes.data
148
+ sidebar: shapes.data,
149
+ when: shapes.data
145
150
  }, { requires: ["latitude", "longitude"] }),
146
151
  gallery: shapes.map((item) => pruneGallery(item, resource, model, models))
147
152
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/server",
3
- "version": "0.19.13",
3
+ "version": "0.19.14",
4
4
  "description": "The Protobase REST API as a Hono app, with Better Auth sign-in.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@better-auth/passkey": "^1.7.7",
33
- "@protobase/layout": "0.19.13",
34
- "@protobase/query": "0.19.13",
35
- "@protobase/schema": "0.19.13",
33
+ "@protobase/layout": "0.19.14",
34
+ "@protobase/query": "0.19.14",
35
+ "@protobase/schema": "0.19.14",
36
36
  "@react-email/render": "^2.1.0",
37
37
  "@scalar/hono-api-reference": "^0.12.10",
38
38
  "@sentry/core": "^11.7.0",