@elucim/dsl 0.4.1 → 0.6.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/dist/index.d.ts +21 -0
- package/dist/index.js +639 -583
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -586,6 +586,18 @@ export declare interface RenderToSvgStringOptions {
|
|
|
586
586
|
height?: number;
|
|
587
587
|
}
|
|
588
588
|
|
|
589
|
+
/**
|
|
590
|
+
* Resolve a color value. If it starts with `$`, treat it as a semantic token
|
|
591
|
+
* and return a CSS `var()` reference. Otherwise return the value unchanged.
|
|
592
|
+
*
|
|
593
|
+
* @example
|
|
594
|
+
* resolveColor('$foreground') // → 'var(--elucim-foreground, #e0e0e0)'
|
|
595
|
+
* resolveColor('$accent') // → 'var(--elucim-accent, #4fc3f7)'
|
|
596
|
+
* resolveColor('#ff0000') // → '#ff0000' (unchanged)
|
|
597
|
+
* resolveColor(undefined) // → undefined (pass-through)
|
|
598
|
+
*/
|
|
599
|
+
export declare function resolveColor(value: string | undefined): string | undefined;
|
|
600
|
+
|
|
589
601
|
/**
|
|
590
602
|
* Resolve an EasingSpec (string name or spring/cubicBezier object) to an EasingFunction.
|
|
591
603
|
* Returns undefined if the spec is undefined.
|
|
@@ -609,6 +621,12 @@ export declare interface SceneNode {
|
|
|
609
621
|
/** Preset dimensions for common scene sizes */
|
|
610
622
|
export declare type ScenePreset = 'card' | 'slide' | 'square';
|
|
611
623
|
|
|
624
|
+
/** Standard semantic color tokens with their CSS variable and default fallback. */
|
|
625
|
+
export declare const SEMANTIC_TOKENS: Record<string, {
|
|
626
|
+
cssVar: string;
|
|
627
|
+
fallback: string;
|
|
628
|
+
}>;
|
|
629
|
+
|
|
612
630
|
export declare interface SequenceNode {
|
|
613
631
|
type: 'sequence';
|
|
614
632
|
from: number;
|
|
@@ -924,6 +942,9 @@ export declare interface Theme {
|
|
|
924
942
|
palette: string[];
|
|
925
943
|
}
|
|
926
944
|
|
|
945
|
+
/** List of token names for documentation / autocomplete. */
|
|
946
|
+
export declare const TOKEN_NAMES: ReadonlyArray<string>;
|
|
947
|
+
|
|
927
948
|
export declare interface TransformNode {
|
|
928
949
|
type: 'transform';
|
|
929
950
|
duration?: number;
|