tinywidgets 1.1.4 → 1.1.5
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/.prettierignore +1 -0
- package/package.json +4 -4
- package/src/common/functions.tsx +2 -2
- package/src/components/App/index.css.ts +1 -1
- package/src/components/App/index.tsx +4 -5
- package/src/components/Button/index.css.ts +1 -1
- package/src/components/Button/index.tsx +2 -2
- package/src/components/Card/index.css.ts +1 -1
- package/src/components/Card/index.tsx +1 -2
- package/src/components/Code/index.css.ts +1 -1
- package/src/components/Code/index.tsx +0 -1
- package/src/components/Collapsible/index.css.ts +1 -1
- package/src/components/Collapsible/index.tsx +3 -3
- package/src/components/Detail/index.css.ts +1 -1
- package/src/components/Detail/index.tsx +1 -2
- package/src/components/Hr/index.css.ts +1 -1
- package/src/components/Hr/index.tsx +0 -1
- package/src/components/Image/index.css.ts +1 -1
- package/src/components/Image/index.tsx +1 -1
- package/src/components/Metric/index.tsx +1 -2
- package/src/components/Row/index.css.ts +1 -1
- package/src/components/Row/index.tsx +1 -2
- package/src/components/Summary/index.css.ts +1 -1
- package/src/components/Summary/index.tsx +1 -2
- package/src/components/Tag/index.css.ts +1 -1
- package/src/components/Tag/index.tsx +1 -2
- package/src/components/TasksProvider/index.tsx +1 -1
- package/src/css/global.css.ts +1 -1
- package/src/index.css.ts +1 -1
- package/src/index.ts +2 -2
- package/src/stores/LocalStore.tsx +1 -1
- package/src/stores/RouteStore.tsx +1 -1
- package/src/stores/SessionStore.tsx +1 -1
- package/tsconfig.json +1 -1
package/.prettierignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
package.json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinywidgets",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"author": "jamesgpearce",
|
|
5
5
|
"repository": "github:tinyplex/tinywidgets",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"type": "module",
|
|
18
18
|
"scripts": {
|
|
19
|
-
"prePublishPackage": "prettier
|
|
19
|
+
"prePublishPackage": "prettier --check . && eslint . && cspell --quiet . && tsc && cp ../README.md ./README.md"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "^19.0.12",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"eslint-plugin-react": "^7.37.4",
|
|
26
26
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
27
27
|
"prettier": "^3.5.3",
|
|
28
|
+
"prettier-plugin-organize-imports": "^4.1.0",
|
|
28
29
|
"typescript": "^5.8.2"
|
|
29
30
|
},
|
|
30
31
|
"exports": {
|
|
@@ -33,7 +34,6 @@
|
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@eslint/js": "^9.23.0",
|
|
36
|
-
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
37
37
|
"@vanilla-extract/css": "^1.17.1",
|
|
38
38
|
"eslint-plugin-import": "^2.31.0",
|
|
39
39
|
"globals": "^16.0.0",
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
"tinybase": "^6.0.0",
|
|
44
44
|
"typescript-eslint": "^8.28.0"
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
package/src/common/functions.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {screens} from '../css/screens';
|
|
2
1
|
import type {StyleRule} from '@vanilla-extract/css';
|
|
3
|
-
import
|
|
2
|
+
import {type ComponentType, type ReactNode} from 'react';
|
|
3
|
+
import {screens} from '../css/screens';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The `classNames` function returns a concatenated list of class names,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import {style} from '@vanilla-extract/css';
|
|
1
2
|
import {large} from '../../common/functions.tsx';
|
|
2
3
|
import {colors} from '../../css/colors.css.ts';
|
|
3
4
|
import {dimensions, dimensionsClass} from '../../css/dimensions.css.ts';
|
|
4
|
-
import {style} from '@vanilla-extract/css';
|
|
5
5
|
|
|
6
6
|
export const app = style([dimensionsClass, {color: colors.foreground}]);
|
|
7
7
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {Menu, Moon, Sun, SunMoon, X} from 'lucide-react';
|
|
2
|
+
import type {ComponentType, ReactNode} from 'react';
|
|
3
|
+
import * as UiReact from 'tinybase/ui-react/with-schemas';
|
|
4
|
+
import type {OptionalSchemas} from 'tinybase/with-schemas';
|
|
1
5
|
import {classNames, renderComponentOrNode} from '../../common/functions.tsx';
|
|
2
6
|
import {codeDark, codeLight} from '../../css/code.css.ts';
|
|
3
7
|
import {colorsDark, colorsLight} from '../../css/colors.css.ts';
|
|
@@ -28,11 +32,6 @@ import {
|
|
|
28
32
|
title,
|
|
29
33
|
topNav,
|
|
30
34
|
} from './index.css.ts';
|
|
31
|
-
import {Menu, Moon, Sun, SunMoon, X} from 'lucide-react';
|
|
32
|
-
import type {ComponentType, ReactNode} from 'react';
|
|
33
|
-
import React from 'react';
|
|
34
|
-
import * as UiReact from 'tinybase/ui-react/with-schemas';
|
|
35
|
-
import type {OptionalSchemas} from 'tinybase/with-schemas';
|
|
36
35
|
|
|
37
36
|
const {Provider} = UiReact as UiReact.WithSchemas<OptionalSchemas>;
|
|
38
37
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import {style, styleVariants} from '@vanilla-extract/css';
|
|
1
2
|
import {colors} from '../../css/colors.css';
|
|
2
3
|
import {dimensions} from '../../css/dimensions.css';
|
|
3
|
-
import {style, styleVariants} from '@vanilla-extract/css';
|
|
4
4
|
|
|
5
5
|
export const button = style({
|
|
6
6
|
display: 'inline-flex',
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type {ComponentType, ReactNode, Ref} from 'react';
|
|
2
|
+
import {forwardRef, useCallback} from 'react';
|
|
1
3
|
import {classNames, renderComponentOrNode} from '../../common/functions.tsx';
|
|
2
4
|
import {iconSize} from '../../css/dimensions.css.ts';
|
|
3
5
|
import {
|
|
@@ -7,8 +9,6 @@ import {
|
|
|
7
9
|
titleStyle,
|
|
8
10
|
titleStyleRight,
|
|
9
11
|
} from './index.css.ts';
|
|
10
|
-
import type {ComponentType, ReactNode, Ref} from 'react';
|
|
11
|
-
import React, {forwardRef, useCallback} from 'react';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The `Button` component displays an button, with a number of common variants.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type {ReactNode} from 'react';
|
|
1
2
|
import {classNames} from '../../common/functions';
|
|
2
3
|
import {card} from './index.css';
|
|
3
|
-
import type {ReactNode} from 'react';
|
|
4
|
-
import React from 'react';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* The `Card` component displays a simple rectangular container.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import {globalStyle, style} from '@vanilla-extract/css';
|
|
1
2
|
import {code} from '../../css/code.css';
|
|
2
3
|
import {colors} from '../../css/colors.css';
|
|
3
4
|
import {dimensions} from '../../css/dimensions.css';
|
|
4
|
-
import {globalStyle, style} from '@vanilla-extract/css';
|
|
5
5
|
|
|
6
6
|
export const pre = style({
|
|
7
7
|
padding: dimensions.padding,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {ChevronDown, ChevronRight} from 'lucide-react';
|
|
2
|
+
import type {ComponentType, ReactNode} from 'react';
|
|
3
|
+
import {useCallback, useRef, useState} from 'react';
|
|
1
4
|
import {classNames} from '../../common/functions.tsx';
|
|
2
5
|
import {
|
|
3
6
|
useCollapsibleIsOpen,
|
|
@@ -11,9 +14,6 @@ import {
|
|
|
11
14
|
collapsibleOpen,
|
|
12
15
|
content,
|
|
13
16
|
} from './index.css.ts';
|
|
14
|
-
import {ChevronDown, ChevronRight} from 'lucide-react';
|
|
15
|
-
import type {ComponentType, ReactNode} from 'react';
|
|
16
|
-
import React, {useCallback, useRef, useState} from 'react';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* The `Collapsible` component displays a titled box that can be expanded or
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type {ReactNode} from 'react';
|
|
1
2
|
import {classNames} from '../../common/functions';
|
|
2
3
|
import {detailCell, detailRow, detailTable} from './index.css';
|
|
3
|
-
import type {ReactNode} from 'react';
|
|
4
|
-
import React from 'react';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* The `Detail` component displays a set of key-value pairs in a two-column
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import {style, styleVariants} from '@vanilla-extract/css';
|
|
1
2
|
import {colors} from '../../css/colors.css';
|
|
2
3
|
import {dimensions} from '../../css/dimensions.css';
|
|
3
|
-
import {style, styleVariants} from '@vanilla-extract/css';
|
|
4
4
|
|
|
5
5
|
export const image = style({
|
|
6
6
|
display: 'inline-block',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import {useCallback} from 'react';
|
|
1
2
|
import {classNames} from '../../common/functions.tsx';
|
|
2
3
|
import {clickable, image, imageVariants} from './index.css.ts';
|
|
3
|
-
import React, {useCallback} from 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The `Image` component displays an image, with a number of common variants.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import type {ComponentType, ReactNode} from 'react';
|
|
1
2
|
import {classNames, renderComponentOrNode} from '../../common/functions';
|
|
2
3
|
import {iconSize} from '../../css/dimensions.css';
|
|
3
4
|
import {metric, metricLabel, metricNumber} from './index.css';
|
|
4
|
-
import type {ComponentType, ReactNode} from 'react';
|
|
5
|
-
import React from 'react';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* The `Metric` component displays a metric as a prominent numerical value with
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import {style, styleVariants} from '@vanilla-extract/css';
|
|
1
2
|
import {notLarge} from '../../common/functions.tsx';
|
|
2
3
|
import {dimensions} from '../../css/dimensions.css.ts';
|
|
3
|
-
import {style, styleVariants} from '@vanilla-extract/css';
|
|
4
4
|
|
|
5
5
|
export const row = style({
|
|
6
6
|
display: 'grid',
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type {ReactNode} from 'react';
|
|
1
2
|
import {classNames} from '../../common/functions';
|
|
2
3
|
import {row, rowVariants} from './index.css';
|
|
3
|
-
import type {ReactNode} from 'react';
|
|
4
|
-
import React from 'react';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* The `Row` component displays a row of 'cell' components, with a number of
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import type {ComponentType, ReactNode} from 'react';
|
|
1
2
|
import {classNames} from '../../common/functions';
|
|
2
3
|
import {Image} from '../Image';
|
|
3
4
|
import {image, summary} from './index.css';
|
|
4
|
-
import type {ComponentType, ReactNode} from 'react';
|
|
5
|
-
import React from 'react';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* The `Summary` component displays an image on the left, and other content
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type {ComponentType, ReactNode} from 'react';
|
|
1
2
|
import {classNames, renderComponentOrNode} from '../../common/functions';
|
|
2
3
|
import {tag, tagIcon, tagVariants} from './index.css';
|
|
3
|
-
import type {ComponentType, ReactNode} from 'react';
|
|
4
|
-
import React from 'react';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* The `Tag` component displays a small rectangular tag, suitable for minimal
|
package/src/css/global.css.ts
CHANGED
package/src/index.css.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -15,8 +15,8 @@ export {
|
|
|
15
15
|
useScheduleTask,
|
|
16
16
|
} from './components/TasksProvider/index.tsx';
|
|
17
17
|
|
|
18
|
-
export {useRoute, useSetRouteCallback} from './stores/RouteStore.tsx';
|
|
19
|
-
export {useDark} from './stores/LocalStore.tsx';
|
|
20
18
|
export {classNames} from './common/functions.tsx';
|
|
19
|
+
export {useDark} from './stores/LocalStore.tsx';
|
|
20
|
+
export {useRoute, useSetRouteCallback} from './stores/RouteStore.tsx';
|
|
21
21
|
|
|
22
22
|
export type {ScheduleTask} from './components/TasksProvider/index.tsx';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {CHANGE, READY, READY_SCHEMA} from './common';
|
|
2
1
|
import {useCallback, useEffect} from 'react';
|
|
3
2
|
import {createLocalPersister} from 'tinybase/persisters/persister-browser/with-schemas';
|
|
4
3
|
import * as UiReact from 'tinybase/ui-react/with-schemas';
|
|
5
4
|
import {type NoTablesSchema, createStore} from 'tinybase/with-schemas';
|
|
5
|
+
import {CHANGE, READY, READY_SCHEMA} from './common';
|
|
6
6
|
|
|
7
7
|
const PREFERS_DARK = matchMedia?.('(prefers-color-scheme: dark)');
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {READY, READY_SCHEMA} from './common';
|
|
2
1
|
import {createCustomPersister} from 'tinybase/persisters/with-schemas';
|
|
3
2
|
import * as UiReact from 'tinybase/ui-react/with-schemas';
|
|
4
3
|
import {type NoTablesSchema, createStore} from 'tinybase/with-schemas';
|
|
4
|
+
import {READY, READY_SCHEMA} from './common';
|
|
5
5
|
|
|
6
6
|
const ROUTE_STORE = 'tinywidgets/Route';
|
|
7
7
|
const ROUTE = 'route';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {READY, READY_SCHEMA} from './common';
|
|
2
1
|
import {createSessionPersister} from 'tinybase/persisters/persister-browser/with-schemas';
|
|
3
2
|
import * as UiReact from 'tinybase/ui-react/with-schemas';
|
|
4
3
|
import {createStore} from 'tinybase/with-schemas';
|
|
4
|
+
import {READY, READY_SCHEMA} from './common';
|
|
5
5
|
|
|
6
6
|
const SESSION_STORE = 'tinywidgets/Session';
|
|
7
7
|
const COLLAPSIBLE = 'collapsible';
|