tinywidgets 1.3.9 → 1.3.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinywidgets",
3
- "version": "1.3.9",
3
+ "version": "1.3.11",
4
4
  "author": "jamesgpearce",
5
5
  "repository": "github:tinyplex/tinywidgets",
6
6
  "license": "MIT",
@@ -20,28 +20,28 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@eslint/js": "^9.30.1",
23
- "@types/react": "^19.1.8",
24
- "@types/react-dom": "^19.1.6",
25
- "cspell": "^9.1.3",
23
+ "@types/react": "^19.2.14",
24
+ "@types/react-dom": "^19.2.3",
25
+ "cspell": "^9.7.0",
26
26
  "eslint": "^9.30.1",
27
27
  "eslint-plugin-import": "^2.32.0",
28
28
  "eslint-plugin-react": "^7.37.5",
29
29
  "eslint-plugin-react-hooks": "^5.2.0",
30
- "globals": "^16.3.0",
31
- "prettier": "^3.6.2",
32
- "prettier-plugin-organize-imports": "^4.1.0",
33
- "typescript": "^5.8.3",
34
- "typescript-eslint": "^8.36.0"
30
+ "globals": "^17.4.0",
31
+ "prettier": "^3.8.1",
32
+ "prettier-plugin-organize-imports": "^4.3.0",
33
+ "typescript": "^5.9.3",
34
+ "typescript-eslint": "^8.57.1"
35
35
  },
36
36
  "exports": {
37
37
  ".": "./src/index.ts",
38
38
  "./css": "./src/index.css.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@vanilla-extract/css": "^1.17.4",
42
- "lucide-react": "^0.525.0",
43
- "react": "^19.1.0",
44
- "react-dom": "^19.1.0",
45
- "tinybase": "^6.4.0"
41
+ "@vanilla-extract/css": "^1.19.0",
42
+ "lucide-react": "^0.577.0",
43
+ "react": "^19.2.4",
44
+ "react-dom": "^19.2.4",
45
+ "tinybase": "^8.0.1"
46
46
  }
47
47
  }
@@ -180,7 +180,6 @@ export const Button = ({
180
180
  );
181
181
 
182
182
  return (
183
- // @ts-expect-error anchorName not typed for React yet
184
183
  <button
185
184
  className={classNames(
186
185
  button,
@@ -128,7 +128,6 @@ export const Flyout = ({
128
128
  ? createPortal(
129
129
  <div
130
130
  className={classNames(flyout, anchoredFlyout, className)}
131
- // @ts-expect-error positionAnchor not typed for React yet
132
131
  style={{positionAnchor: anchor}}
133
132
  >
134
133
  {children}
@@ -1,4 +1,4 @@
1
- import {useCallback, useState} from 'react';
1
+ import {useCallback, useEffect, useState} from 'react';
2
2
  import {classNames} from '../../common/functions.tsx';
3
3
  import {select} from './index.css.ts';
4
4
 
@@ -49,13 +49,22 @@ export const Select = ({
49
49
  ref?: React.RefObject<HTMLSelectElement | null>;
50
50
  }) => {
51
51
  const [option, setOption] = useState(initialOption ?? '');
52
- const handleChange = useCallback(
53
- ({target: {value}}: React.ChangeEvent<HTMLSelectElement>) => {
52
+
53
+ const change = useCallback(
54
+ (value: string) => {
54
55
  setOption(value);
55
56
  onChange?.(value);
56
57
  },
57
58
  [onChange],
58
59
  );
60
+
61
+ const handleChange = useCallback(
62
+ ({target: {value}}: React.ChangeEvent<HTMLSelectElement>) => change(value),
63
+ [change],
64
+ );
65
+
66
+ useEffect(() => change(initialOption ?? ''), [change, initialOption]);
67
+
59
68
  return (
60
69
  <select
61
70
  value={option}