next-style 1.2.1 → 2.0.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.
@@ -0,0 +1,28 @@
1
+ import postcss from 'postcss';
2
+ import type { StyleCollector } from '../compiler';
3
+ /**
4
+ * PostCSS plugin for next-style.
5
+ *
6
+ * Replaces `@import "next-style";` (or `@import 'next-style';`) in CSS files
7
+ * with the compiled CSS collected by the StyleCollector.
8
+ *
9
+ * The collector is populated by the runtime `css()` / `global()` calls that
10
+ * run during the build-time module evaluation (SWC / tsc transform pass).
11
+ * At that point all `css({})` calls have been executed and their styles are
12
+ * sitting in the collector — the PostCSS plugin just needs to drain it.
13
+ *
14
+ * Usage in postcss.config.js:
15
+ * import nextStylePlugin from 'next-style/plugin'
16
+ * export default { plugins: { 'next-style/plugin': {} } }
17
+ */
18
+ interface PluginOptions {
19
+ /** Provide a custom collector (useful for testing / server integration). */
20
+ collector?: StyleCollector;
21
+ }
22
+ declare function nextStylePlugin(opts?: PluginOptions): postcss.Plugin;
23
+ declare namespace nextStylePlugin {
24
+ var postcss: boolean;
25
+ }
26
+ export default nextStylePlugin;
27
+ export declare const plugin: typeof nextStylePlugin;
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/postcss-plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAC7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAIjD;;;;;;;;;;;;;;GAcG;AAEH,UAAU,aAAa;IACtB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,cAAc,CAAA;CAC1B;AAED,iBAAS,eAAe,CAAC,IAAI,GAAE,aAAkB,kBA6ChD;kBA7CQ,eAAe;;;AAiDxB,eAAe,eAAe,CAAA;AAC9B,eAAO,MAAM,MAAM,wBAAkB,CAAA"}
@@ -0,0 +1,48 @@
1
+ import postcss from 'postcss';
2
+ const IMPORT_RE = /^next-style$/;
3
+ function nextStylePlugin(opts = {}) {
4
+ // Lazy-import the runtime collector so the plugin works even when
5
+ // the runtime module hasn't been evaluated yet (returns empty string then).
6
+ let collector = opts.collector ?? null;
7
+ const plugin = {
8
+ postcssPlugin: 'next-style',
9
+ Once(root) {
10
+ // Resolve collector from runtime if not provided
11
+ if (!collector) {
12
+ try {
13
+ // Dynamic require so the plugin can be loaded before the
14
+ // runtime module is on disk (e.g. during type-check only builds).
15
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
16
+ const runtime = require('../runtime');
17
+ collector = runtime.styleCollector;
18
+ }
19
+ catch {
20
+ // Runtime not available — skip injection silently
21
+ return;
22
+ }
23
+ }
24
+ const cssContent = collector.getAllStyles();
25
+ if (!cssContent.trim())
26
+ return;
27
+ // Walk @import "next-style" / @import 'next-style' declarations
28
+ let injected = false;
29
+ root.walkAtRules('import', atRule => {
30
+ const val = atRule.params.replace(/['"]/g, '').trim();
31
+ if (!IMPORT_RE.test(val))
32
+ return;
33
+ const parsed = postcss.parse(cssContent);
34
+ atRule.replaceWith(parsed);
35
+ injected = true;
36
+ });
37
+ // If there was no @import directive, prepend styles at the top
38
+ if (!injected) {
39
+ const parsed = postcss.parse(cssContent);
40
+ root.prepend(parsed);
41
+ }
42
+ }
43
+ };
44
+ return plugin;
45
+ }
46
+ nextStylePlugin.postcss = true;
47
+ export default nextStylePlugin;
48
+ export const plugin = nextStylePlugin;
@@ -0,0 +1,104 @@
1
+ import type { Properties, Pseudos } from 'csstype';
2
+ import { StyleCollector } from '../compiler';
3
+ /**
4
+ * CSS properties with full type safety and autocomplete via csstype.
5
+ * Accepts both string and number values (e.g. `fontSize: 16` or `fontSize: '16px'`).
6
+ */
7
+ export type CSSProperties = Properties<string | number>;
8
+ /** @internal Mapped type for pseudo-classes/elements — avoids index signature limitation */
9
+ type PseudoStyles = {
10
+ [P in Pseudos]?: CSSProperties;
11
+ };
12
+ /** @internal At-rule keys (@media, @container, @supports, @layer, @keyframes) */
13
+ type AtRuleStyles = {
14
+ '@sm'?: CSSProperties;
15
+ '@md'?: CSSProperties;
16
+ '@lg'?: CSSProperties;
17
+ '@xl'?: CSSProperties;
18
+ '@2xl'?: CSSProperties;
19
+ [media: `@media ${string}`]: CSSProperties;
20
+ [container: `@container ${string}`]: CSSProperties;
21
+ [supports: `@supports ${string}`]: CSSProperties;
22
+ [layer: `@layer ${string}`]: CSSProperties;
23
+ [keyframes: `@keyframes ${string}`]: Record<string, CSSProperties>;
24
+ };
25
+ /**
26
+ * Style object passed to `css()` and `global()`.
27
+ *
28
+ * Supports:
29
+ * - All CSS properties (typed via csstype)
30
+ * - Responsive breakpoints: `'@sm'`, `'@md'`, `'@lg'`, `'@xl'`, `'@2xl'`
31
+ * - Arbitrary media queries: `'@media (min-width: 900px)'`
32
+ * - Pseudo-classes and pseudo-elements: `':hover'`, `'::before'`, etc.
33
+ * - Container queries: `'@container sidebar (min-width: 300px)'`
34
+ * - Feature queries: `'@supports (display: grid)'`
35
+ * - Keyframe animations: `'@keyframes fadeIn'`
36
+ * - Cascade layers: `'@layer utilities'`
37
+ *
38
+ * @example
39
+ * const style: CSSObject = {
40
+ * fontSize: '16px',
41
+ * '@md': { fontSize: '20px' },
42
+ * ':hover': { color: 'blue' },
43
+ * '@keyframes spin': { to: { transform: 'rotate(360deg)' } },
44
+ * }
45
+ */
46
+ export type CSSObject = CSSProperties & PseudoStyles & AtRuleStyles & {
47
+ [key: string]: any;
48
+ };
49
+ /**
50
+ * Converts a style object into a unique CSS class name.
51
+ *
52
+ * Styles are collected at build time by the PostCSS plugin and emitted as
53
+ * a single static CSS file — there is zero runtime overhead in production.
54
+ * Identical style objects always return the same class name (deduplication).
55
+ *
56
+ * @param styles - A `CSSObject` describing the styles for this element.
57
+ * @returns A stable class name string (e.g. `"ns-1x2y3z"`).
58
+ *
59
+ * @example
60
+ * const button = css({
61
+ * padding: '8px 16px',
62
+ * borderRadius: '6px',
63
+ * backgroundColor: '#7F77DD',
64
+ * ':hover': { backgroundColor: '#534AB7' },
65
+ * '@md': { padding: '10px 20px' },
66
+ * })
67
+ *
68
+ * export function Button() {
69
+ * return <button className={button}>Click me</button>
70
+ * }
71
+ */
72
+ export declare function css(styles: CSSObject): string;
73
+ /**
74
+ * Registers global CSS styles applied directly to selectors (no scoped class).
75
+ *
76
+ * Useful for CSS resets, base typography, and third-party element overrides.
77
+ * Like `css()`, styles are extracted at build time — no runtime cost.
78
+ *
79
+ * @param styles - A record mapping CSS selectors to `CSSObject` style definitions.
80
+ *
81
+ * @example
82
+ * global({
83
+ * '*': { boxSizing: 'border-box', margin: '0' },
84
+ * 'body': { fontFamily: 'Inter, sans-serif', lineHeight: '1.6' },
85
+ * 'h1, h2, h3': { fontWeight: 500 },
86
+ * })
87
+ */
88
+ export declare function global(styles: Record<string, CSSObject>): void;
89
+ /**
90
+ * The shared `StyleCollector` instance.
91
+ *
92
+ * Consumed by the PostCSS plugin at build time to drain all registered styles
93
+ * into the output CSS file. Not intended for direct use in application code.
94
+ *
95
+ * @internal
96
+ */
97
+ export { collector as styleCollector };
98
+ declare const collector: StyleCollector;
99
+ /** @deprecated Use `styleCollector` instead. */
100
+ export declare const styleRegistry: {
101
+ get: (key: string) => import("..").CompiledStyle | undefined;
102
+ getAllStyles: () => string;
103
+ };
104
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;AAEvD,4FAA4F;AAC5F,KAAK,YAAY,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,aAAa;CAAE,CAAA;AAEtD,iFAAiF;AACjF,KAAK,YAAY,GAAG;IACnB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,CAAC,KAAK,EAAE,UAAU,MAAM,EAAE,GAAG,aAAa,CAAA;IAC1C,CAAC,SAAS,EAAE,cAAc,MAAM,EAAE,GAAG,aAAa,CAAA;IAClD,CAAC,QAAQ,EAAE,aAAa,MAAM,EAAE,GAAG,aAAa,CAAA;IAChD,CAAC,KAAK,EAAE,UAAU,MAAM,EAAE,GAAG,aAAa,CAAA;IAC1C,CAAC,SAAS,EAAE,cAAc,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CAClE,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,GACpC,YAAY,GACZ,YAAY,GAAG;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAClB,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAE7C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI,CAI9D;AAED;;;;;;;GAOG;AACH,OAAO,EAAE,SAAS,IAAI,cAAc,EAAE,CAAA;AAEtC,QAAA,MAAM,SAAS,gBAAuB,CAAA;AAEtC,gDAAgD;AAChD,eAAO,MAAM,aAAa;eACd,MAAM;;CAEjB,CAAA"}
@@ -0,0 +1,62 @@
1
+ import { StyleCollector } from '../compiler';
2
+ /**
3
+ * Converts a style object into a unique CSS class name.
4
+ *
5
+ * Styles are collected at build time by the PostCSS plugin and emitted as
6
+ * a single static CSS file — there is zero runtime overhead in production.
7
+ * Identical style objects always return the same class name (deduplication).
8
+ *
9
+ * @param styles - A `CSSObject` describing the styles for this element.
10
+ * @returns A stable class name string (e.g. `"ns-1x2y3z"`).
11
+ *
12
+ * @example
13
+ * const button = css({
14
+ * padding: '8px 16px',
15
+ * borderRadius: '6px',
16
+ * backgroundColor: '#7F77DD',
17
+ * ':hover': { backgroundColor: '#534AB7' },
18
+ * '@md': { padding: '10px 20px' },
19
+ * })
20
+ *
21
+ * export function Button() {
22
+ * return <button className={button}>Click me</button>
23
+ * }
24
+ */
25
+ export function css(styles) {
26
+ return collector.addStyle(styles);
27
+ }
28
+ /**
29
+ * Registers global CSS styles applied directly to selectors (no scoped class).
30
+ *
31
+ * Useful for CSS resets, base typography, and third-party element overrides.
32
+ * Like `css()`, styles are extracted at build time — no runtime cost.
33
+ *
34
+ * @param styles - A record mapping CSS selectors to `CSSObject` style definitions.
35
+ *
36
+ * @example
37
+ * global({
38
+ * '*': { boxSizing: 'border-box', margin: '0' },
39
+ * 'body': { fontFamily: 'Inter, sans-serif', lineHeight: '1.6' },
40
+ * 'h1, h2, h3': { fontWeight: 500 },
41
+ * })
42
+ */
43
+ export function global(styles) {
44
+ Object.entries(styles).forEach(([selector, styleObj]) => {
45
+ collector.addGlobalStyle(selector, styleObj);
46
+ });
47
+ }
48
+ /**
49
+ * The shared `StyleCollector` instance.
50
+ *
51
+ * Consumed by the PostCSS plugin at build time to drain all registered styles
52
+ * into the output CSS file. Not intended for direct use in application code.
53
+ *
54
+ * @internal
55
+ */
56
+ export { collector as styleCollector };
57
+ const collector = new StyleCollector();
58
+ /** @deprecated Use `styleCollector` instead. */
59
+ export const styleRegistry = {
60
+ get: (key) => collector.getStyleMap().get(key),
61
+ getAllStyles: () => collector.getAllStyles()
62
+ };
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Converts a camelCase CSS property name to kebab-case.
3
+ *
4
+ * @param str - camelCase string, e.g. `"backgroundColor"`.
5
+ * @returns kebab-case string, e.g. `"background-color"`.
6
+ *
7
+ * @example
8
+ * camelToKebab('fontSize') // "font-size"
9
+ * camelToKebab('borderTopWidth') // "border-top-width"
10
+ */
11
+ export declare function camelToKebab(str: string): string;
12
+ /**
13
+ * Generates a short, stable hash string from a style object or string.
14
+ * Used to produce unique class name suffixes (e.g. `"ns-1x2y3z"`).
15
+ *
16
+ * @param styles - Style object or pre-serialised string.
17
+ * @returns Base-36 hash string.
18
+ */
19
+ export declare function generateClassHash(styles: any): string;
20
+ /**
21
+ * Shorthand breakpoint aliases mapped to their full `@media` query strings.
22
+ *
23
+ * | Key | Expands to |
24
+ * |--------|-------------------------------------|
25
+ * | `@sm` | `@media (min-width: 640px)` |
26
+ * | `@md` | `@media (min-width: 768px)` |
27
+ * | `@lg` | `@media (min-width: 1024px)` |
28
+ * | `@xl` | `@media (min-width: 1280px)` |
29
+ * | `@2xl` | `@media (min-width: 1536px)` |
30
+ */
31
+ export declare const BREAKPOINTS: Record<string, string>;
32
+ /**
33
+ * Resolves a breakpoint shorthand to its full `@media` query string.
34
+ * Passes through unrecognised strings unchanged.
35
+ *
36
+ * @param query - Shorthand key (e.g. `"@md"`) or an arbitrary media query.
37
+ * @returns Full media query string (e.g. `"@media (min-width: 768px)"`).
38
+ *
39
+ * @example
40
+ * normalizeMediaQuery('@md') // "@media (min-width: 768px)"
41
+ * normalizeMediaQuery('@media (max-width: 600px)') // "@media (max-width: 600px)"
42
+ */
43
+ export declare function normalizeMediaQuery(query: string): string;
44
+ /**
45
+ * Returns `true` if the value is a valid CSS property value that can be
46
+ * serialised to a declaration (string, number, or nested object).
47
+ *
48
+ * @param _key - CSS property name (unused, reserved for future validation).
49
+ * @param value - Value to check.
50
+ */
51
+ export declare function validateCSSProperty(_key: string, value: any): boolean;
52
+ /**
53
+ * Removes duplicate entries from a style map, keeping the first occurrence.
54
+ * Two entries are considered duplicates when their serialised values are identical.
55
+ *
56
+ * @param styles - Map of class name → style data.
57
+ * @returns New map with duplicates removed.
58
+ */
59
+ export declare function deduplicateStyles(styles: Map<string, any>): Map<string, any>;
60
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CASrD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM9C,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAQrE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAW5E"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Converts a camelCase CSS property name to kebab-case.
3
+ *
4
+ * @param str - camelCase string, e.g. `"backgroundColor"`.
5
+ * @returns kebab-case string, e.g. `"background-color"`.
6
+ *
7
+ * @example
8
+ * camelToKebab('fontSize') // "font-size"
9
+ * camelToKebab('borderTopWidth') // "border-top-width"
10
+ */
11
+ export function camelToKebab(str) {
12
+ return str.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);
13
+ }
14
+ /**
15
+ * Generates a short, stable hash string from a style object or string.
16
+ * Used to produce unique class name suffixes (e.g. `"ns-1x2y3z"`).
17
+ *
18
+ * @param styles - Style object or pre-serialised string.
19
+ * @returns Base-36 hash string.
20
+ */
21
+ export function generateClassHash(styles) {
22
+ const str = typeof styles === 'string' ? styles : JSON.stringify(styles);
23
+ let hash = 0;
24
+ for (let i = 0; i < str.length; i++) {
25
+ const char = str.charCodeAt(i);
26
+ hash = (hash << 5) - hash + char;
27
+ hash = hash & hash;
28
+ }
29
+ return Math.abs(hash).toString(36);
30
+ }
31
+ /**
32
+ * Shorthand breakpoint aliases mapped to their full `@media` query strings.
33
+ *
34
+ * | Key | Expands to |
35
+ * |--------|-------------------------------------|
36
+ * | `@sm` | `@media (min-width: 640px)` |
37
+ * | `@md` | `@media (min-width: 768px)` |
38
+ * | `@lg` | `@media (min-width: 1024px)` |
39
+ * | `@xl` | `@media (min-width: 1280px)` |
40
+ * | `@2xl` | `@media (min-width: 1536px)` |
41
+ */
42
+ export const BREAKPOINTS = {
43
+ '@sm': '@media (min-width: 640px)',
44
+ '@md': '@media (min-width: 768px)',
45
+ '@lg': '@media (min-width: 1024px)',
46
+ '@xl': '@media (min-width: 1280px)',
47
+ '@2xl': '@media (min-width: 1536px)'
48
+ };
49
+ /**
50
+ * Resolves a breakpoint shorthand to its full `@media` query string.
51
+ * Passes through unrecognised strings unchanged.
52
+ *
53
+ * @param query - Shorthand key (e.g. `"@md"`) or an arbitrary media query.
54
+ * @returns Full media query string (e.g. `"@media (min-width: 768px)"`).
55
+ *
56
+ * @example
57
+ * normalizeMediaQuery('@md') // "@media (min-width: 768px)"
58
+ * normalizeMediaQuery('@media (max-width: 600px)') // "@media (max-width: 600px)"
59
+ */
60
+ export function normalizeMediaQuery(query) {
61
+ return BREAKPOINTS[query] ?? query;
62
+ }
63
+ /**
64
+ * Returns `true` if the value is a valid CSS property value that can be
65
+ * serialised to a declaration (string, number, or nested object).
66
+ *
67
+ * @param _key - CSS property name (unused, reserved for future validation).
68
+ * @param value - Value to check.
69
+ */
70
+ export function validateCSSProperty(_key, value) {
71
+ if (typeof value === 'string' || typeof value === 'number') {
72
+ return true;
73
+ }
74
+ if (typeof value === 'object' && !Array.isArray(value)) {
75
+ return true;
76
+ }
77
+ return false;
78
+ }
79
+ /**
80
+ * Removes duplicate entries from a style map, keeping the first occurrence.
81
+ * Two entries are considered duplicates when their serialised values are identical.
82
+ *
83
+ * @param styles - Map of class name → style data.
84
+ * @returns New map with duplicates removed.
85
+ */
86
+ export function deduplicateStyles(styles) {
87
+ const deduplicated = new Map();
88
+ const seen = new Set();
89
+ styles.forEach((value, key) => {
90
+ const serialized = JSON.stringify(value);
91
+ if (!seen.has(serialized)) {
92
+ seen.add(serialized);
93
+ deduplicated.set(key, value);
94
+ }
95
+ });
96
+ return deduplicated;
97
+ }
package/package.json CHANGED
@@ -1,65 +1,53 @@
1
1
  {
2
2
  "name": "next-style",
3
- "version": "1.2.1",
4
- "description": "Lightweight runtime CSS-in-JS engine with nested pseudo selectors, media queries, global styles, keyframes, and font-face support.",
5
- "author": {
6
- "name": "kingslimes",
7
- "email": "natontmp123@gmail.com",
8
- "url": "https://github.com/kingslimes"
9
- },
10
- "license": "MIT",
11
- "private": false,
12
- "sideEffects": false,
3
+ "version": "2.0.0",
4
+ "description": "Zero-Runtime CSS-in-JS for Next.js + Turbopack",
13
5
  "type": "module",
14
- "files": [
15
- "dist",
16
- "LICENSE",
17
- "README.md"
18
- ],
19
6
  "main": "./dist/index.js",
20
7
  "types": "./dist/index.d.ts",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/TiwPhiraphan/next-style.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/TiwPhiraphan/next-style/issues"
14
+ },
15
+ "homepage": "https://github.com/TiwPhiraphan/next-style#readme",
21
16
  "exports": {
22
17
  ".": {
23
18
  "import": "./dist/index.js",
24
19
  "types": "./dist/index.d.ts"
20
+ },
21
+ "./plugin": {
22
+ "import": "./dist/postcss-plugin/index.js",
23
+ "types": "./dist/postcss-plugin/index.d.ts"
25
24
  }
26
25
  },
27
- "repository": {
28
- "type": "git",
29
- "url": "https://github.com/kingslimes/next-style.git"
30
- },
31
- "bugs": {
32
- "url": "https://github.com/kingslimes/next-style/issues"
26
+ "publishConfig": {
27
+ "access": "public"
33
28
  },
34
- "homepage": "https://github.com/kingslimes/next-style#readme",
35
- "keywords": [
36
- "css",
37
- "css-in-js",
38
- "runtime-css",
39
- "styled",
40
- "style-engine",
41
- "atomic-css",
42
- "postcss",
43
- "autoprefixer",
44
- "nextjs",
45
- "react",
46
- "bun",
47
- "typescript",
48
- "design-system",
49
- "theming",
50
- "media-queries",
51
- "keyframes",
52
- "font-face"
53
- ],
54
- "peerDependencies": {
55
- "react": ">=18",
56
- "postcss": "^8",
57
- "autoprefixer": "^10"
29
+ "files": ["dist"],
30
+ "scripts": {
31
+ "export": "bun run build:ts && bun run build:types",
32
+ "build:ts": "tsc",
33
+ "build:types": "tsc --emitDeclarationOnly",
34
+ "dev": "tsc --watch",
35
+ "test": "bun test",
36
+ "lint": "biome lint",
37
+ "format": "biome format --write"
58
38
  },
59
39
  "devDependencies": {
60
- "csstype": "latest"
40
+ "@biomejs/biome": "^2.4.15",
41
+ "@types/bun": "^1.3.14",
42
+ "@types/node": "^25.7.0",
43
+ "csstype": "^3.2.3",
44
+ "postcss": "^8.5.14",
45
+ "typescript": "^5"
61
46
  },
62
- "publishConfig": {
63
- "access": "public"
64
- }
47
+ "peerDependencies": {
48
+ "postcss": "^8.4.31"
49
+ },
50
+ "keywords": ["css-in-js", "zero-runtime", "next.js", "turbopack", "postcss", "style", "next-style", "css"],
51
+ "author": "TiwPhiraphan",
52
+ "license": "MIT"
65
53
  }