@umber-style/styled 0.0.0-stage → 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +26 -2
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +7 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.mjs +1 -0
- package/package.json +72 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 soroush.tech
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @umber-style/styled
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
**Legacy.** This package exists for code that imports `styled` as the default export of a package of its own, so that only the name of the package has to change. It holds one line: a re-export of the `styled` of `@umber-style/react`. It is for React only.
|
|
4
|
+
|
|
5
|
+
New code uses `@umber-style/react` instead, and does not need this package:
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { styled } from '@umber-style/react'
|
|
9
|
+
|
|
10
|
+
const Card = styled.div({ padding: 16, borderRadius: 8 })
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The two are the same function, with the same engine, cache and theme.
|
|
14
|
+
|
|
15
|
+
## For existing code
|
|
16
|
+
|
|
17
|
+
Install: `pnpm add @umber-style/styled @umber-style/react`.
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import styled from '@umber-style/styled'
|
|
21
|
+
|
|
22
|
+
const Card = styled.div({ padding: 16, borderRadius: 8 })
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
A server component gets the server build of `styled`, as with `@umber-style/react`.
|
|
26
|
+
|
|
27
|
+
Documentation: [docs](../../docs/README.md), and [Writing styles](../../docs/writing-styles.md) for `styled`.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
let _umber_style_react = require("@umber-style/react");
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function() {
|
|
9
|
+
return _umber_style_react.styled;
|
|
10
|
+
}
|
|
11
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `styled` of the default style of `@umber-style/react`, as the default export. It is the same function:
|
|
3
|
+
* `configure` of `@umber-style/react` sets its engine, and a server component gets the server build, which
|
|
4
|
+
* the `react-server` condition picks when `@umber-style/react` is resolved.
|
|
5
|
+
*/
|
|
6
|
+
import { CSSObject, CreateStyled, FilteringStyledOptions, Interpolation, PropsOf, StyleProp, Styled, StyledComponent, StyledFactory, StyledOptions, StyledStatics, StyledTags, Theme, styled as react_default } from "@umber-style/react";
|
|
7
|
+
export { type CSSObject, type CreateStyled, type FilteringStyledOptions, type Interpolation, type PropsOf, type StyleProp, type Styled, type StyledComponent, type StyledFactory, type StyledOptions, type StyledStatics, type StyledTags, type Theme, react_default as default };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `styled` of the default style of `@umber-style/react`, as the default export. It is the same function:
|
|
3
|
+
* `configure` of `@umber-style/react` sets its engine, and a server component gets the server build, which
|
|
4
|
+
* the `react-server` condition picks when `@umber-style/react` is resolved.
|
|
5
|
+
*/
|
|
6
|
+
import { CSSObject, CreateStyled, FilteringStyledOptions, Interpolation, PropsOf, StyleProp, Styled, StyledComponent, StyledFactory, StyledOptions, StyledStatics, StyledTags, Theme, styled as react_default } from "@umber-style/react";
|
|
7
|
+
export { type CSSObject, type CreateStyled, type FilteringStyledOptions, type Interpolation, type PropsOf, type StyleProp, type Styled, type StyledComponent, type StyledFactory, type StyledOptions, type StyledStatics, type StyledTags, type Theme, react_default as default };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { styled as default } from "@umber-style/react";
|
package/package.json
CHANGED
|
@@ -1,6 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umber-style/styled",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"description": "UmberStyle's styled as a default export: the styled of the React binding, with its server build for server components.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"styling",
|
|
7
|
+
"styled",
|
|
8
|
+
"react",
|
|
9
|
+
"server-components",
|
|
10
|
+
"typescript"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "Masoud Soroush <masoud@soroush.tech>",
|
|
14
|
+
"homepage": "https://umber-style.soroush.design",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/soroush-tech/umber-style.git",
|
|
18
|
+
"directory": "packages/styled"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/soroush-tech/umber-style/issues"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/index.d.mts",
|
|
32
|
+
"default": "./dist/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./dist/index.d.cts",
|
|
36
|
+
"default": "./dist/index.cjs"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@umber-style/react": "0.1.0-alpha.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"react": "^19.2.8"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@testing-library/react": "^16.3.3",
|
|
51
|
+
"@types/node": "^26.6.6",
|
|
52
|
+
"@types/react": "^19.3.0",
|
|
53
|
+
"@types/react-dom": "^19.3.0",
|
|
54
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
55
|
+
"jsdom": "^31.0.0",
|
|
56
|
+
"oxlint": "^1.93.0",
|
|
57
|
+
"react": "^19.3.1",
|
|
58
|
+
"react-dom": "^19.3.1",
|
|
59
|
+
"tsdown": "^0.23.7",
|
|
60
|
+
"typescript": "~7.0.2",
|
|
61
|
+
"vitest": "^5.1.0",
|
|
62
|
+
"@umber-style/core": "0.1.0",
|
|
63
|
+
"@umber-style/eslint-config": "0.0.0"
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"build": "tsdown",
|
|
67
|
+
"lint": "oxlint --deny-warnings",
|
|
68
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.server.json",
|
|
69
|
+
"test": "vitest run",
|
|
70
|
+
"test:coverage": "vitest run --coverage"
|
|
71
|
+
},
|
|
72
|
+
"main": "./dist/index.cjs",
|
|
73
|
+
"module": "./dist/index.mjs",
|
|
74
|
+
"types": "./dist/index.d.mts"
|
|
6
75
|
}
|