@plitzi/sdk-variables 0.37.10 → 0.38.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @plitzi/sdk-variables
2
2
 
3
+ ## 0.38.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 266e691: ## A shutdown that does not wait on idle connections
8
+
9
+ A server shutting down while it answered a request waited, once the answer was sent, for the client to let go of the
10
+ keep-alive connection it came on — three seconds for Node's own `fetch`, longer for others — before it could stop. The
11
+ connection is now closed as soon as its answer is finished.
12
+
13
+ - Updated dependencies [266e691]
14
+ - @plitzi/sdk-shared@0.38.1
15
+
16
+ ## 0.38.0
17
+
18
+ ### Minor Changes
19
+
20
+ - v0.38.0
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+ - @plitzi/sdk-shared@0.38.0
26
+
3
27
  ## 0.37.10
4
28
 
5
29
  ### Patch Changes
@@ -3,11 +3,11 @@ import n from "@plitzi/plitzi-ui/Button";
3
3
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
4
  import a, { useForm as o, useFormWatch as s } from "@plitzi/plitzi-ui/Form";
5
5
  import { z as c } from "zod";
6
- import { StyleVariableCategory as l } from "@plitzi/sdk-shared";
6
+ import { StyleVariableCategory as l, isStyleVariableCategory as u } from "@plitzi/sdk-shared";
7
7
  //#region src/models/StyleVariableForm/StyleVariableForm.tsx
8
- var u = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([a-zA-Z_][a-zA-Z0-9_-]+)$/i, "Invalid Name"), d = c.discriminatedUnion("category", [
8
+ var d = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([a-zA-Z_][a-zA-Z0-9_-]+)$/i, "Invalid Name"), f = c.discriminatedUnion("category", [
9
9
  c.object({
10
- name: u,
10
+ name: d,
11
11
  category: c.literal(l.COLOR),
12
12
  value: c.object({
13
13
  light: c.string().min(1),
@@ -16,21 +16,21 @@ var u = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([
16
16
  })
17
17
  }),
18
18
  c.object({
19
- name: u,
19
+ name: d,
20
20
  category: c.literal(l.SHADOW),
21
21
  value: c.string().min(1)
22
22
  }),
23
23
  c.object({
24
- name: u,
24
+ name: d,
25
25
  category: c.literal(l.SPACING),
26
26
  value: c.string().trim().refine((e) => !!(e === "0" || e === "auto" || /^-?\d*\.?\d+(px|rem|em|%|vh|vw|vmin|vmax|dvh|svh|lvh|ch|ex|cm|mm|in|pt|pc)$/i.test(e) || /^(calc|min|max|clamp)\(.+\)$/i.test(e)), "Invalid CSS value")
27
27
  }),
28
28
  c.object({
29
- name: u,
29
+ name: d,
30
30
  category: c.literal(l.CUSTOM),
31
31
  value: c.string().min(1)
32
32
  })
33
- ]), f = (e, t, n) => {
33
+ ]), p = (e, t, n) => {
34
34
  switch (e) {
35
35
  case l.COLOR: {
36
36
  let { default: r = "", light: i = "", dark: a = "" } = n;
@@ -53,20 +53,20 @@ var u = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([
53
53
  value: typeof n == "string" ? n : ""
54
54
  };
55
55
  }
56
- }, p = ({ name: c = "New Page", category: u = l.COLOR, value: p, isNewRecord: m = !1, onClose: h, onSubmit: g }) => {
57
- let [_, v] = t(f(u, c, p)), y = o({
58
- defaultValues: _,
59
- config: { schema: d }
60
- }), b = s(y.formMethods, "category"), x = e((e) => {
61
- y.formMethods.setValue("value", e === l.COLOR ? {
56
+ }, m = ({ name: c = "New Page", category: d = l.COLOR, value: m, isNewRecord: h = !1, onClose: g, onSubmit: _ }) => {
57
+ let [v, y] = t(p(d, c, m)), b = o({
58
+ defaultValues: v,
59
+ config: { schema: f }
60
+ }), x = s(b.formMethods, "category"), S = e((e) => {
61
+ u(e) && (b.formMethods.setValue("value", e === l.COLOR ? {
62
62
  default: "",
63
63
  light: "",
64
64
  dark: ""
65
- } : ""), v(f(e, c, e));
66
- }, [y.formMethods, c]), S = e((e) => g?.(e), [g]);
65
+ } : ""), y(p(e, c, e)));
66
+ }, [b.formMethods, c]), C = e((e) => _?.(e), [_]);
67
67
  return /* @__PURE__ */ i(a, {
68
- form: y,
69
- onSubmit: S,
68
+ form: b,
69
+ onSubmit: C,
70
70
  className: "w-full gap-4 rounded border border-gray-300 bg-white p-2 text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800/50 dark:text-zinc-300",
71
71
  children: [/* @__PURE__ */ i(a.Body, {
72
72
  gap: 2,
@@ -75,12 +75,12 @@ var u = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([
75
75
  name: "name",
76
76
  placeholder: "Name",
77
77
  size: "xs",
78
- disabled: !m
78
+ disabled: !h
79
79
  }),
80
80
  /* @__PURE__ */ i(a.Select, {
81
81
  name: "category",
82
82
  size: "xs",
83
- onChange: x,
83
+ onChange: S,
84
84
  children: [
85
85
  /* @__PURE__ */ r("option", {
86
86
  value: l.COLOR,
@@ -100,7 +100,7 @@ var u = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([
100
100
  })
101
101
  ]
102
102
  }),
103
- b === l.COLOR && /* @__PURE__ */ i("div", {
103
+ x === l.COLOR && /* @__PURE__ */ i("div", {
104
104
  className: "flex w-full gap-2",
105
105
  children: [
106
106
  /* @__PURE__ */ r(a.Color, {
@@ -126,7 +126,7 @@ var u = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([
126
126
  })
127
127
  ]
128
128
  }),
129
- b !== l.COLOR && /* @__PURE__ */ r(a.Input, {
129
+ x !== l.COLOR && /* @__PURE__ */ r(a.Input, {
130
130
  name: "value",
131
131
  placeholder: "Value",
132
132
  size: "xs",
@@ -134,7 +134,7 @@ var u = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([
134
134
  })
135
135
  ]
136
136
  }), /* @__PURE__ */ i(a.Footer, { children: [/* @__PURE__ */ r(n, {
137
- onClick: h,
137
+ onClick: g,
138
138
  size: "xs",
139
139
  className: "grow basis-0",
140
140
  children: "Cancel"
@@ -142,9 +142,9 @@ var u = c.string().min(3, "Too Short").max(20, "Too Long").regex(/^(?:\w+\s+|)([
142
142
  type: "submit",
143
143
  size: "xs",
144
144
  className: "grow basis-0",
145
- children: m ? "Add" : "Update"
145
+ children: h ? "Add" : "Update"
146
146
  })] })]
147
147
  });
148
148
  };
149
149
  //#endregion
150
- export { p as default, d as styleVariableFormSchema };
150
+ export { m as default, f as styleVariableFormSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-variables",
3
- "version": "0.37.10",
3
+ "version": "0.38.1",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist"
@@ -152,14 +152,14 @@
152
152
  },
153
153
  "dependencies": {
154
154
  "@plitzi/plitzi-ui": "^1.6.29",
155
- "@plitzi/sdk-shared": "0.37.10",
155
+ "@plitzi/sdk-shared": "0.38.1",
156
156
  "clsx": "^2.1.1",
157
157
  "zod": "^4.6.5"
158
158
  },
159
159
  "devDependencies": {
160
160
  "eslint": "^9.39.5",
161
161
  "typescript": "^6.0.3",
162
- "vite": "^8.3.1",
163
- "vitest": "^5.0.1"
162
+ "vite": "^8.3.2",
163
+ "vitest": "^5.0.3"
164
164
  }
165
165
  }