@seyuna/postcss 1.0.0-canary.16 → 1.0.0-canary.17

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.0.0-canary.17](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.16...v1.0.0-canary.17) (2026-01-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * transition to proper ESM with correct file extensions ([b330b4f](https://github.com/seyuna-corp/seyuna-postcss/commit/b330b4fcd3394b78ecc39ef5f23f5e993bd425be))
7
+
1
8
  # [1.0.0-canary.16](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.15...v1.0.0-canary.16) (2026-01-10)
2
9
 
3
10
 
@@ -1,4 +1,4 @@
1
1
  import { AtRule } from "postcss";
2
- import { PluginContext } from "../config";
2
+ import { PluginContext } from "../config.js";
3
3
  export declare const light: (atRule: AtRule, context: PluginContext) => void;
4
4
  export declare const dark: (atRule: AtRule, context: PluginContext) => void;
@@ -1,5 +1,5 @@
1
1
  import { AtRule } from "postcss";
2
- import { PluginContext } from "../config";
2
+ import { PluginContext } from "../config.js";
3
3
  /**
4
4
  * Handler for @each-standard-color
5
5
  */
@@ -1,4 +1,4 @@
1
- import { generateRules } from "../helpers";
1
+ import { generateRules } from "../helpers.js";
2
2
  /**
3
3
  * Handler for @each-standard-color
4
4
  */
@@ -1,5 +1,5 @@
1
1
  import { AtRule } from "postcss";
2
- import { PluginContext } from "../config";
2
+ import { PluginContext } from "../config.js";
3
3
  /**
4
4
  * Custom PostCSS plugin handler for responsive at-rules.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { AtRule } from "postcss";
2
- import { PluginContext } from "../config";
2
+ import { PluginContext } from "../config.js";
3
3
  export interface AtRuleHandler {
4
4
  name: string;
5
5
  handler: (atRule: AtRule, context: PluginContext) => void;
@@ -1,6 +1,6 @@
1
- import { eachStandardColor, eachFixedColor } from "./color";
2
- import container from "./container";
3
- import { light, dark } from "./color-scheme";
1
+ import { eachStandardColor, eachFixedColor } from "./color.js";
2
+ import container from "./container.js";
3
+ import { light, dark } from "./color-scheme.js";
4
4
  // Ordered array ensures execution order
5
5
  export const atRuleHandlers = [
6
6
  { name: "each-standard-color", handler: eachStandardColor },
package/dist/config.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { SeyunaConfig } from './types';
2
- import { FunctionMap } from './parser';
1
+ import { SeyunaConfig } from './types.js';
2
+ import { FunctionMap } from './parser.js';
3
3
  export interface PluginOptions {
4
4
  configPath?: string;
5
5
  modeAttribute?: string;
package/dist/errors.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Node } from 'postcss';
2
- import { PluginContext } from './config';
2
+ import { PluginContext } from "./config.js";
3
3
  export declare function reportError(message: string, node: Node, context: PluginContext, options?: {
4
4
  word?: string;
5
5
  index?: number;
@@ -1,4 +1,4 @@
1
- import { PluginContext } from "../config";
1
+ import { PluginContext } from "../config.js";
2
2
  export declare function sc(context: PluginContext, name: string, alpha?: string, lightness?: string, chroma?: string): string;
3
3
  export declare function fc(context: PluginContext, name: string, alpha?: string, lightness?: string, chroma?: string): string;
4
4
  export declare function alpha(context: PluginContext, color: string, value: string): string;
@@ -1,3 +1,3 @@
1
- import { PluginContext } from "../config";
1
+ import { PluginContext } from "../config.js";
2
2
  export type FnHandler = (context: PluginContext, ...args: string[]) => string;
3
3
  export declare const functions: Record<string, FnHandler>;
@@ -1,5 +1,5 @@
1
- import { sc, fc, alpha, lighten, darken, contrast } from "./color";
2
- import { theme } from "./theme";
1
+ import { sc, fc, alpha, lighten, darken, contrast } from "./color.js";
2
+ import { theme } from "./theme.js";
3
3
  export const functions = {
4
4
  sc,
5
5
  fc,
@@ -1,4 +1,4 @@
1
- import { PluginContext } from "../config";
1
+ import { PluginContext } from "../config.js";
2
2
  /**
3
3
  * Accesses values from the Seyuna configuration using dot notation
4
4
  * Example: theme(ui.theme.breakpoints.tablet)
package/dist/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Rule, ChildNode, AtRule } from "postcss";
2
- import { PluginContext } from "./config";
2
+ import { PluginContext } from "./config.js";
3
3
  /**
4
4
  * Helper: clone nodes and replace {name} placeholders safely
5
5
  * Returns only valid Rules or Declarations (never raw AtRules)
package/dist/helpers.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Rule } from "postcss";
2
- import { processFunctions } from "./parser";
2
+ import { processFunctions } from "./parser.js";
3
3
  /**
4
4
  * Helper: clone nodes and replace {name} placeholders safely
5
5
  * Returns only valid Rules or Declarations (never raw AtRules)
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- declare const plugin: import("postcss").PluginCreator<import("./config").PluginOptions> & {
1
+ declare const plugin: import("postcss").PluginCreator<import("./config.js").PluginOptions> & {
2
2
  postcss: boolean;
3
- functions: Record<string, import("./functions").FnHandler>;
3
+ functions: Record<string, import("./functions/index.js").FnHandler>;
4
4
  };
5
5
  export default plugin;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { dynamicFunctionsPlugin } from './plugin';
2
- import { functions } from './functions';
1
+ import { dynamicFunctionsPlugin } from './plugin.js';
2
+ import { functions } from './functions/index.js';
3
3
  // CommonJS-friendly export
4
4
  const plugin = Object.assign(dynamicFunctionsPlugin, {
5
5
  postcss: true,
package/dist/parser.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Node } from 'postcss';
2
- import { PluginContext } from './config';
2
+ import { PluginContext } from './config.js';
3
3
  export type FunctionMap = Record<string, (context: PluginContext, ...args: string[]) => string>;
4
4
  export declare function processFunctions(value: string, fnMap: FunctionMap, node: Node, context: PluginContext): string;
package/dist/parser.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import valueParser from 'postcss-value-parser';
2
- import { reportError } from './errors';
2
+ import { reportError } from './errors.js';
3
3
  export function processFunctions(value, fnMap, node, context) {
4
4
  const parsed = valueParser(value);
5
5
  // Helper to process nodes recursively (inner-first)
package/dist/plugin.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { PluginCreator } from "postcss";
2
- import { PluginOptions as ConfigOptions } from "./config";
2
+ import { PluginOptions as ConfigOptions } from "./config.js";
3
3
  export declare const dynamicFunctionsPlugin: PluginCreator<ConfigOptions>;
package/dist/plugin.js CHANGED
@@ -1,7 +1,7 @@
1
- import { functions } from "./functions";
2
- import { atRuleHandlers } from "./at-rules";
3
- import { loadConfig } from "./config";
4
- import { processFunctions } from "./parser";
1
+ import { functions } from "./functions/index.js";
2
+ import { atRuleHandlers } from "./at-rules/index.js";
3
+ import { loadConfig } from "./config.js";
4
+ import { processFunctions } from "./parser.js";
5
5
  export const dynamicFunctionsPlugin = (opts = {}) => {
6
6
  const { config, options } = loadConfig(opts);
7
7
  const fnMap = { ...functions, ...opts.functions };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@seyuna/postcss",
3
- "version": "1.0.0-canary.16",
3
+ "version": "1.0.0-canary.17",
4
4
  "description": "Seyuna UI's postcss plugin",
5
+ "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  import { Rule, AtRule, ChildNode } from "postcss";
2
- import { PluginContext } from "../config";
2
+ import { PluginContext } from "../config.js";
3
3
 
4
4
  /**
5
5
  * Custom PostCSS plugin handler factory for `@light` and `@dark` at-rules.
@@ -1,6 +1,6 @@
1
1
  import { AtRule } from "postcss";
2
- import { PluginContext } from "../config";
3
- import { generateRules } from "../helpers";
2
+ import { PluginContext } from "../config.js";
3
+ import { generateRules } from "../helpers.js";
4
4
 
5
5
  /**
6
6
  * Handler for @each-standard-color
@@ -1,5 +1,5 @@
1
1
  import { AtRule, ChildNode } from "postcss";
2
- import { PluginContext } from "../config";
2
+ import { PluginContext } from "../config.js";
3
3
 
4
4
  /**
5
5
  * Custom PostCSS plugin handler for responsive at-rules.
@@ -1,8 +1,8 @@
1
1
  import { AtRule } from "postcss";
2
- import { eachStandardColor, eachFixedColor } from "./color";
3
- import container from "./container";
4
- import { light, dark } from "./color-scheme";
5
- import { PluginContext } from "../config";
2
+ import { eachStandardColor, eachFixedColor } from "./color.js";
3
+ import container from "./container.js";
4
+ import { light, dark } from "./color-scheme.js";
5
+ import { PluginContext } from "../config.js";
6
6
 
7
7
  // Each handler has a name (matches the at-rule) and the function
8
8
  export interface AtRuleHandler {
package/src/config.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
- import { SeyunaConfig } from './types';
4
- import { FunctionMap } from './parser';
3
+ import { SeyunaConfig } from './types.js';
4
+ import { FunctionMap } from './parser.js';
5
5
 
6
6
  export interface PluginOptions {
7
7
  configPath?: string;
package/src/errors.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Node } from 'postcss';
2
- import { PluginContext } from './config';
2
+ import { PluginContext } from "./config.js";
3
3
 
4
4
  export function reportError(
5
5
  message: string,
@@ -1,4 +1,4 @@
1
- import { PluginContext } from "../config";
1
+ import { PluginContext } from "../config.js";
2
2
 
3
3
  /**
4
4
  * Resolves a color name to its CSS variables based on its type (standard or fixed)
@@ -1,6 +1,6 @@
1
- import { sc, fc, alpha, lighten, darken, contrast } from "./color";
2
- import { theme } from "./theme";
3
- import { PluginContext } from "../config";
1
+ import { sc, fc, alpha, lighten, darken, contrast } from "./color.js";
2
+ import { theme } from "./theme.js";
3
+ import { PluginContext } from "../config.js";
4
4
 
5
5
  export type FnHandler = (context: PluginContext, ...args: string[]) => string;
6
6
 
@@ -1,4 +1,4 @@
1
- import { PluginContext } from "../config";
1
+ import { PluginContext } from "../config.js";
2
2
 
3
3
  /**
4
4
  * Accesses values from the Seyuna configuration using dot notation
package/src/helpers.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Rule, ChildNode, Declaration, AtRule } from "postcss";
2
- import { processFunctions } from "./parser";
3
- import { PluginContext } from "./config";
2
+ import { processFunctions } from "./parser.js";
3
+ import { PluginContext } from "./config.js";
4
4
 
5
5
  /**
6
6
  * Helper: clone nodes and replace {name} placeholders safely
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { dynamicFunctionsPlugin } from './plugin';
2
- import { functions } from './functions';
1
+ import { dynamicFunctionsPlugin } from './plugin.js';
2
+ import { functions } from './functions/index.js';
3
3
 
4
4
  // CommonJS-friendly export
5
5
  const plugin = Object.assign(dynamicFunctionsPlugin, {
package/src/parser.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import valueParser from 'postcss-value-parser';
2
2
  import { Node } from 'postcss';
3
- import { PluginContext } from './config';
4
- import { reportError } from './errors';
3
+ import { PluginContext } from './config.js';
4
+ import { reportError } from './errors.js';
5
5
 
6
6
  export type FunctionMap = Record<string, (context: PluginContext, ...args: string[]) => string>;
7
7
 
package/src/plugin.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { PluginCreator } from "postcss";
2
- import { functions } from "./functions";
3
- import { atRuleHandlers } from "./at-rules";
4
- import { loadConfig, PluginOptions as ConfigOptions, PluginContext } from "./config";
5
- import { processFunctions, FunctionMap } from "./parser";
2
+ import { functions } from "./functions/index.js";
3
+ import { atRuleHandlers } from "./at-rules/index.js";
4
+ import { loadConfig, PluginOptions as ConfigOptions, PluginContext } from "./config.js";
5
+ import { processFunctions, FunctionMap } from "./parser.js";
6
6
 
7
7
  export const dynamicFunctionsPlugin: PluginCreator<ConfigOptions> = (
8
8
  opts = {}
@@ -0,0 +1,2 @@
1
+ import plugin from './dist/index.js';
2
+ console.log('Plugin loaded:', plugin);
package/tsconfig.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2020",
4
- "module": "ES2020",
4
+ "module": "NodeNext",
5
5
  "lib": ["ES2020"],
6
6
  "declaration": true,
7
7
  "outDir": "dist",
8
8
  "strict": true,
9
- "moduleResolution": "bundler",
9
+ "moduleResolution": "NodeNext",
10
10
  "esModuleInterop": true,
11
11
  "skipLibCheck": true
12
12
  },