@stubber/form-fields 1.4.1 → 1.4.3

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.
@@ -6,8 +6,6 @@ import { Label } from "@stubber/ui/label";
6
6
  import { basicSetup } from "codemirror";
7
7
  export let field;
8
8
  let value = $field.data.base || "";
9
- let params = $field.spec?.params || {};
10
- let globals = params?.globals || {};
11
9
  let editor_view;
12
10
  $: state_key = $field.state?.state_key;
13
11
  $: label = $field.spec?.title;
@@ -29,7 +27,7 @@ function globalCompletions(ctx) {
29
27
  const text = m?.text ?? "";
30
28
  const trailingDot = text.endsWith(".");
31
29
  const parts = (trailingDot ? text.slice(0, -1) : text).split(".").filter(Boolean);
32
- let container = globals;
30
+ let container = $field.spec?.params?.globals || {};
33
31
  for (let i = 0; i < Math.max(0, parts.length - (trailingDot ? 0 : 1)); i++) {
34
32
  container = container?.[parts[i]];
35
33
  if (!container) break;
@@ -107,9 +107,7 @@
107
107
  e.preventDefault();
108
108
  }
109
109
  }}
110
- type="checkbox"
111
110
  id="input_{state_key}"
112
- placeholder={label}
113
111
  name={state_key}
114
112
  bind:checked={$internal.checked}
115
113
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stubber/form-fields",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "An automatic form builder based on field specifications",
5
5
  "keywords": [
6
6
  "components",