@modelform/react-native 0.8.0 → 0.9.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.mjs CHANGED
@@ -61,6 +61,7 @@ import {
61
61
  describeRange,
62
62
  diffJson,
63
63
  documentIdFor,
64
+ documentKind,
64
65
  documentUses,
65
66
  dropTarget,
66
67
  duplicatePanel,
@@ -221,7 +222,7 @@ import {
221
222
  variableWithType,
222
223
  visibleVariables,
223
224
  zoomRange
224
- } from "./chunk-AQO56KS2.mjs";
225
+ } from "./chunk-KOCUG6GH.mjs";
225
226
 
226
227
  // src/ui/theme.tsx
227
228
  import { createContext, useContext } from "react";
@@ -4376,6 +4377,7 @@ export {
4376
4377
  describeRange,
4377
4378
  diffJson,
4378
4379
  documentIdFor,
4380
+ documentKind,
4379
4381
  documentUses,
4380
4382
  dropTarget,
4381
4383
  duplicatePanel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelform/react-native",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Render Grafana-compatible dashboard JSON, and input forms in the same format, as native React Native panels.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -7,6 +7,10 @@
7
7
  "Dashboard": {
8
8
  "type": "object",
9
9
  "properties": {
10
+ "kind": {
11
+ "$ref": "#/definitions/DocumentKind",
12
+ "description": "Whether this document is a form (for recording entries) or a dashboard (for showing them). Without it, a document with input-* panels counts as a form. See documentKind()."
13
+ },
10
14
  "uid": {
11
15
  "type": "string"
12
16
  },
@@ -98,8 +102,15 @@
98
102
  "required": [
99
103
  "title",
100
104
  "panels"
105
+ ]
106
+ },
107
+ "DocumentKind": {
108
+ "type": "string",
109
+ "enum": [
110
+ "form",
111
+ "dashboard"
101
112
  ],
102
- "description": "The subset of the Grafana dashboard JSON model that modelform understands. Unknown keys are tolerated and ignored, so dashboards exported from Grafana load as-is. See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/view-dashboard-json-model/\n\nmodelform adds two extensions, both of which Grafana ignores: - `panel.mobile` to tune phone layout per panel - `input-*` panel types for data entry forms (see inputs.ts)"
113
+ "description": "The subset of the Grafana dashboard JSON model that modelform understands. Unknown keys are tolerated and ignored, so dashboards exported from Grafana load as-is. See https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/view-dashboard-json-model/\n\nmodelform adds three extensions, all of which Grafana ignores: - `kind` to say whether the document is a form or a dashboard - `panel.mobile` to tune phone layout per panel - `input-*` panel types for data entry forms (see inputs.ts)"
103
114
  },
104
115
  "Panel": {
105
116
  "type": "object",