next-style 1.2.1 → 2.0.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.
@@ -0,0 +1,17 @@
1
+ import postcss from 'postcss';
2
+ /** Path to the temp file used as IPC bridge between runtime and PostCSS. */
3
+ export declare const CACHE_FILE: string;
4
+ interface PluginOptions {
5
+ /**
6
+ * Override the cache file path.
7
+ * Defaults to `os.tmpdir()/next-style.css`.
8
+ */
9
+ cacheFile?: string;
10
+ }
11
+ declare function nextStylePlugin(opts?: PluginOptions): postcss.Plugin;
12
+ declare namespace nextStylePlugin {
13
+ var postcss: boolean;
14
+ }
15
+ export default nextStylePlugin;
16
+ export declare const plugin: typeof nextStylePlugin;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/postcss-plugin/index.ts"],"names":[],"mappings":"AAGA,OAAO,OAAO,MAAM,SAAS,CAAA;AAoB7B,4EAA4E;AAC5E,eAAO,MAAM,UAAU,QAA2C,CAAA;AAElE,UAAU,aAAa;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,iBAAS,eAAe,CAAC,IAAI,GAAE,aAAkB,kBAqChD;kBArCQ,eAAe;;;AAyCxB,eAAe,eAAe,CAAA;AAC9B,eAAO,MAAM,MAAM,wBAAkB,CAAA"}
@@ -0,0 +1,61 @@
1
+ import fs from 'node:fs';
2
+ import os from 'node:os';
3
+ import path from 'node:path';
4
+ import postcss from 'postcss';
5
+ /**
6
+ * PostCSS plugin for next-style.
7
+ *
8
+ * How it works with Turbopack:
9
+ * 1. `css()` / `global()` calls in component files write compiled CSS to a
10
+ * temp file (`os.tmpdir()/next-style.css`) via `styleCollector.flush()`.
11
+ * 2. This plugin reads that temp file and replaces `@import "next-style"`
12
+ * with its contents at PostCSS processing time.
13
+ *
14
+ * Because PostCSS runs in a separate process from the module graph,
15
+ * in-memory collectors cannot be shared. The temp file is the IPC bridge.
16
+ *
17
+ * Usage in postcss.config.js:
18
+ * export default { plugins: { "next-style/plugin": {} } }
19
+ */
20
+ const IMPORT_RE = /^next-style$/;
21
+ /** Path to the temp file used as IPC bridge between runtime and PostCSS. */
22
+ export const CACHE_FILE = path.join(os.tmpdir(), 'next-style.css');
23
+ function nextStylePlugin(opts = {}) {
24
+ const cacheFile = opts.cacheFile ?? CACHE_FILE;
25
+ const plugin = {
26
+ postcssPlugin: 'next-style',
27
+ Once(root) {
28
+ // Read compiled CSS from the temp file written by the runtime
29
+ let cssContent = '';
30
+ try {
31
+ cssContent = fs.readFileSync(cacheFile, 'utf-8');
32
+ }
33
+ catch {
34
+ // Cache file doesn't exist yet (first cold boot before any css() call)
35
+ // — leave the @import in place so PostCSS doesn't error, just remove it
36
+ }
37
+ // Replace @import "next-style" with compiled CSS (or remove if empty)
38
+ let replaced = false;
39
+ root.walkAtRules('import', atRule => {
40
+ const val = atRule.params.replace(/['"]/g, '').trim();
41
+ if (!IMPORT_RE.test(val))
42
+ return;
43
+ if (cssContent.trim()) {
44
+ atRule.replaceWith(postcss.parse(cssContent));
45
+ }
46
+ else {
47
+ atRule.remove();
48
+ }
49
+ replaced = true;
50
+ });
51
+ // No @import directive — prepend at top if there's content
52
+ if (!replaced && cssContent.trim()) {
53
+ root.prepend(postcss.parse(cssContent));
54
+ }
55
+ }
56
+ };
57
+ return plugin;
58
+ }
59
+ nextStylePlugin.postcss = true;
60
+ export default nextStylePlugin;
61
+ 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,CAI7C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAI,CAK9D;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,65 @@
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
+ const className = collector.addStyle(styles);
27
+ collector.flush();
28
+ return className;
29
+ }
30
+ /**
31
+ * Registers global CSS styles applied directly to selectors (no scoped class).
32
+ *
33
+ * Useful for CSS resets, base typography, and third-party element overrides.
34
+ * Like `css()`, styles are extracted at build time — no runtime cost.
35
+ *
36
+ * @param styles - A record mapping CSS selectors to `CSSObject` style definitions.
37
+ *
38
+ * @example
39
+ * global({
40
+ * '*': { boxSizing: 'border-box', margin: '0' },
41
+ * 'body': { fontFamily: 'Inter, sans-serif', lineHeight: '1.6' },
42
+ * 'h1, h2, h3': { fontWeight: 500 },
43
+ * })
44
+ */
45
+ export function global(styles) {
46
+ Object.entries(styles).forEach(([selector, styleObj]) => {
47
+ collector.addGlobalStyle(selector, styleObj);
48
+ });
49
+ collector.flush();
50
+ }
51
+ /**
52
+ * The shared `StyleCollector` instance.
53
+ *
54
+ * Consumed by the PostCSS plugin at build time to drain all registered styles
55
+ * into the output CSS file. Not intended for direct use in application code.
56
+ *
57
+ * @internal
58
+ */
59
+ export { collector as styleCollector };
60
+ const collector = new StyleCollector();
61
+ /** @deprecated Use `styleCollector` instead. */
62
+ export const styleRegistry = {
63
+ get: (key) => collector.getStyleMap().get(key),
64
+ getAllStyles: () => collector.getAllStyles()
65
+ };
@@ -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,52 @@
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.1",
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
+ "typescript": "^5"
61
45
  },
62
- "publishConfig": {
63
- "access": "public"
64
- }
46
+ "peerDependencies": {
47
+ "postcss": ">=8.4.31"
48
+ },
49
+ "keywords": ["css-in-js", "zero-runtime", "next.js", "turbopack", "postcss", "style", "next-style", "css"],
50
+ "author": "TiwPhiraphan",
51
+ "license": "MIT"
65
52
  }