chaincss 2.1.38 → 2.2.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/ROADMAP.md +31 -0
- package/dist/cli/index.js +458 -3
- package/dist/compiler/analyzer.d.ts +12 -0
- package/dist/compiler/css-if-transpiler.d.ts +33 -0
- package/dist/compiler/design-orchestrator.d.ts +119 -0
- package/dist/compiler/intent-engine.d.ts +49 -0
- package/dist/compiler/math-engine.d.ts +89 -0
- package/dist/compiler/scroll-timeline.d.ts +91 -0
- package/dist/compiler/style-graph.d.ts +30 -0
- package/dist/core/compiler.d.ts +12 -0
- package/dist/core/types.d.ts +145 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1765 -9
- package/dist/plugins/vite.js +451 -3
- package/package.json +1 -1
- package/src/compiler/analyzer.ts +62 -0
- package/src/compiler/css-if-transpiler.ts +117 -0
- package/src/compiler/design-orchestrator.ts +322 -0
- package/src/compiler/intent-engine.ts +402 -0
- package/src/compiler/math-engine.ts +511 -0
- package/src/compiler/scroll-timeline.ts +284 -0
- package/src/compiler/style-graph.ts +660 -0
- package/src/core/compiler.ts +40 -0
- package/src/core/types.ts +206 -0
- package/src/index.ts +103 -1
- package/demo/demo/node_modules/caniuse-db/fulldata-json/data-2.0.json +0 -1
- package/demo/index.html +0 -16
- package/demo/package.json +0 -20
- package/demo/src/App.tsx +0 -117
- package/demo/src/chaincss-barrel.ts +0 -9
- package/demo/src/main.tsx +0 -8
- package/demo/src/styles.chain.ts +0 -300
- package/demo/vite.config.ts +0 -46
package/src/core/types.ts
CHANGED
|
@@ -256,4 +256,210 @@ export function isCompileResult(value: any): value is CompileResult {
|
|
|
256
256
|
typeof value.css === 'string' &&
|
|
257
257
|
typeof value.classMap === 'object' &&
|
|
258
258
|
typeof value.stats === 'object';
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// ============================================================================
|
|
262
|
+
// 🆕 Math Engine Types (v3.0)
|
|
263
|
+
// ============================================================================
|
|
264
|
+
|
|
265
|
+
export type CSSUnit =
|
|
266
|
+
| 'px' | 'rem' | 'em' | '%'
|
|
267
|
+
| 'vw' | 'vh' | 'vmin' | 'vmax'
|
|
268
|
+
| 'ch' | 'ex' | 'cm' | 'mm' | 'in' | 'pt' | 'pc'
|
|
269
|
+
| 'deg' | 'rad' | 'turn' | 'grad'
|
|
270
|
+
| 's' | 'ms'
|
|
271
|
+
| 'dpi' | 'dpcm' | 'dppx';
|
|
272
|
+
|
|
273
|
+
export interface CSSMathValue {
|
|
274
|
+
value: number;
|
|
275
|
+
unit: CSSUnit;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export interface MathContext {
|
|
279
|
+
rootFontSize?: number; // px, default 16
|
|
280
|
+
viewportWidth?: number; // px, default 1920
|
|
281
|
+
viewportHeight?: number; // px, default 1080
|
|
282
|
+
parentFontSize?: number; // px, default 16
|
|
283
|
+
dpi?: number; // default 96
|
|
284
|
+
elementWidth?: number; // px
|
|
285
|
+
elementHeight?: number; // px
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface MathResult {
|
|
289
|
+
value: number;
|
|
290
|
+
unit: CSSUnit | 'calc' | 'mixed';
|
|
291
|
+
expression: string;
|
|
292
|
+
resolved: CSSMathValue | null;
|
|
293
|
+
explanations: string[];
|
|
294
|
+
toString(): string;
|
|
295
|
+
toCalc(): string;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface FluidTypeConfig {
|
|
299
|
+
minSize: number;
|
|
300
|
+
maxSize: number;
|
|
301
|
+
minWidth?: number; // default 320
|
|
302
|
+
maxWidth?: number; // default 1280
|
|
303
|
+
unit?: 'px' | 'rem';
|
|
304
|
+
rootFontSize?: number; // for rem conversion
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// ============================================================================
|
|
308
|
+
// 🆕 Self-Healing / Intent Engine Types (v3.0)
|
|
309
|
+
// ============================================================================
|
|
310
|
+
|
|
311
|
+
export interface IntentRule {
|
|
312
|
+
input: string | RegExp;
|
|
313
|
+
output: string | ((match: RegExpMatchArray) => string);
|
|
314
|
+
defaults?: Record<string, string | number>;
|
|
315
|
+
confidence: number;
|
|
316
|
+
description: string;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface CorrectionResult {
|
|
320
|
+
original: string;
|
|
321
|
+
property: string;
|
|
322
|
+
corrected: string;
|
|
323
|
+
defaults: Record<string, string | number>;
|
|
324
|
+
confidence: number;
|
|
325
|
+
intent: string;
|
|
326
|
+
explanation: string;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export interface IntentContext {
|
|
330
|
+
property?: string;
|
|
331
|
+
value?: string;
|
|
332
|
+
selector?: string;
|
|
333
|
+
parentStyles?: Record<string, any>;
|
|
334
|
+
mediaContext?: string;
|
|
335
|
+
themeContext?: string;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export type HealMode = 'strict' | 'dev' | 'smart';
|
|
339
|
+
|
|
340
|
+
export interface HealResult {
|
|
341
|
+
fixed: Record<string, any>;
|
|
342
|
+
corrections: CorrectionResult[];
|
|
343
|
+
warnings: string[];
|
|
344
|
+
mode: HealMode;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// ============================================================================
|
|
348
|
+
// 🆕 Style Graph Types (v3.0)
|
|
349
|
+
// ============================================================================
|
|
350
|
+
|
|
351
|
+
export interface StyleGraphNode {
|
|
352
|
+
id: string;
|
|
353
|
+
selector: string;
|
|
354
|
+
properties: Record<string, string | number>;
|
|
355
|
+
specificity: number;
|
|
356
|
+
dependencies: string[];
|
|
357
|
+
dependents: string[];
|
|
358
|
+
mediaQuery?: string;
|
|
359
|
+
isDead: boolean;
|
|
360
|
+
hash: string;
|
|
361
|
+
sourceComponent?: string;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export interface StyleGraphEdge {
|
|
365
|
+
from: string;
|
|
366
|
+
to: string;
|
|
367
|
+
type: 'extends' | 'overrides' | 'references';
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface StyleGraph {
|
|
371
|
+
nodes: Map<string, StyleGraphNode>;
|
|
372
|
+
edges: StyleGraphEdge[];
|
|
373
|
+
rootNodes: string[];
|
|
374
|
+
leafNodes: string[];
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface GraphCompileOptions {
|
|
378
|
+
eliminateDead?: boolean;
|
|
379
|
+
knownSelectors?: string[];
|
|
380
|
+
mergeIdentical?: boolean;
|
|
381
|
+
mergeThreshold?: number; // min properties to consider merging
|
|
382
|
+
sortOutput?: 'specificity' | 'source-order' | 'topological';
|
|
383
|
+
verbose?: boolean;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export interface GraphCompileResult extends CompileResult {
|
|
387
|
+
graph: StyleGraph;
|
|
388
|
+
eliminatedDead: number;
|
|
389
|
+
mergedRules: number;
|
|
390
|
+
optimizationTime: number;
|
|
391
|
+
preOptimizationSize: number;
|
|
392
|
+
postOptimizationSize: number;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// ============================================================================
|
|
396
|
+
// 🆕 Analyzer / IDE Types (v3.0)
|
|
397
|
+
// ============================================================================
|
|
398
|
+
|
|
399
|
+
export type DiagnosticSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
400
|
+
|
|
401
|
+
export interface StyleDiagnostic {
|
|
402
|
+
property: string;
|
|
403
|
+
value?: string;
|
|
404
|
+
selector?: string;
|
|
405
|
+
severity: DiagnosticSeverity;
|
|
406
|
+
message: string;
|
|
407
|
+
suggestion?: string;
|
|
408
|
+
code?: string;
|
|
409
|
+
source?: string;
|
|
410
|
+
range?: {
|
|
411
|
+
startLine: number;
|
|
412
|
+
startColumn: number;
|
|
413
|
+
endLine: number;
|
|
414
|
+
endColumn: number;
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export interface StyleAnalysis {
|
|
419
|
+
diagnostics: StyleDiagnostic[];
|
|
420
|
+
conflicts: StyleDiagnostic[];
|
|
421
|
+
breakpoints: BreakpointConfig[];
|
|
422
|
+
unusedSelectors: string[];
|
|
423
|
+
deadStyles: string[];
|
|
424
|
+
duplicationWarnings: StyleDiagnostic[];
|
|
425
|
+
optimizationSuggestions: StyleDiagnostic[];
|
|
426
|
+
stats: {
|
|
427
|
+
totalProperties: number;
|
|
428
|
+
totalSelectors: number;
|
|
429
|
+
shorthandOpportunities: number;
|
|
430
|
+
animationSuggestions: number;
|
|
431
|
+
responsiveIssues: number;
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface BreakpointInference {
|
|
436
|
+
selector: string;
|
|
437
|
+
property: string;
|
|
438
|
+
currentValue: string;
|
|
439
|
+
suggestedBreakpoint: string;
|
|
440
|
+
suggestedValue: string;
|
|
441
|
+
reason: string;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// ============================================================================
|
|
445
|
+
// 🆕 Type Guards for new types
|
|
446
|
+
// ============================================================================
|
|
447
|
+
|
|
448
|
+
export function isMathResult(value: any): value is MathResult {
|
|
449
|
+
return value && typeof value === 'object' &&
|
|
450
|
+
typeof value.expression === 'string' &&
|
|
451
|
+
typeof value.toString === 'function';
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export function isCorrectionResult(value: any): value is CorrectionResult {
|
|
455
|
+
return value && typeof value === 'object' &&
|
|
456
|
+
typeof value.original === 'string' &&
|
|
457
|
+
typeof value.corrected === 'string' &&
|
|
458
|
+
typeof value.confidence === 'number';
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export function isGraphCompileResult(value: any): value is GraphCompileResult {
|
|
462
|
+
return isCompileResult(value) &&
|
|
463
|
+
typeof (value as any).graph === 'object' &&
|
|
464
|
+
typeof (value as any).eliminatedDead === 'number';
|
|
259
465
|
}
|
package/src/index.ts
CHANGED
|
@@ -162,6 +162,40 @@ export type { BreakpointsMap, ResponsiveStyle } from './compiler/breakpoints.js'
|
|
|
162
162
|
// ============================================================================
|
|
163
163
|
export const VERSION = '3.0.0';
|
|
164
164
|
|
|
165
|
+
// ============================================================================
|
|
166
|
+
// Default Export - Keep original chain for backward compatibility
|
|
167
|
+
// ============================================================================
|
|
168
|
+
// ============================================================================
|
|
169
|
+
// 🆕 Design System Orchestrator (v2.3)
|
|
170
|
+
// ============================================================================
|
|
171
|
+
export {
|
|
172
|
+
orchestrator,
|
|
173
|
+
contrastRatio,
|
|
174
|
+
checkContrast,
|
|
175
|
+
auditContrast,
|
|
176
|
+
createContextualToken,
|
|
177
|
+
resolveContextual,
|
|
178
|
+
generateContextualCSS,
|
|
179
|
+
validateTokenRelationships,
|
|
180
|
+
} from './compiler/design-orchestrator.js';
|
|
181
|
+
export type { ContrastResult, ContrastReport, ContextualToken, TokenContext } from './compiler/design-orchestrator.js';
|
|
182
|
+
|
|
183
|
+
// ============================================================================
|
|
184
|
+
// Default Export - Keep original chain for backward compatibility
|
|
185
|
+
// ============================================================================
|
|
186
|
+
// ============================================================================
|
|
187
|
+
// 🆕 Scroll Timeline Engine (v2.3)
|
|
188
|
+
// ============================================================================
|
|
189
|
+
export {
|
|
190
|
+
scrollTimeline,
|
|
191
|
+
compileScrollAnimation,
|
|
192
|
+
compileScrollAnimations,
|
|
193
|
+
createScrollAnimation,
|
|
194
|
+
getScrollPresets,
|
|
195
|
+
SCROLL_PRESETS,
|
|
196
|
+
} from './compiler/scroll-timeline.js';
|
|
197
|
+
export type { ScrollTimelineConfig, ScrollAnimation, ScrollTimelineResult, KeyframeStep } from './compiler/scroll-timeline.js';
|
|
198
|
+
|
|
165
199
|
// ============================================================================
|
|
166
200
|
// Default Export - Keep original chain for backward compatibility
|
|
167
201
|
// ============================================================================
|
|
@@ -207,4 +241,72 @@ export type ResponsiveValue<T> = T | {
|
|
|
207
241
|
|
|
208
242
|
export type StyleWithTokens<T = any> = T | ((tokens: DesignTokens) => T);
|
|
209
243
|
|
|
210
|
-
import { DesignTokens } from './compiler/tokens.js';
|
|
244
|
+
import { DesignTokens } from './compiler/tokens.js';
|
|
245
|
+
|
|
246
|
+
// ============================================================================
|
|
247
|
+
// 🆕 Math Engine (v3.0)
|
|
248
|
+
// ============================================================================
|
|
249
|
+
export {
|
|
250
|
+
math,
|
|
251
|
+
add,
|
|
252
|
+
subtract,
|
|
253
|
+
multiply,
|
|
254
|
+
divide,
|
|
255
|
+
fluidType,
|
|
256
|
+
convert,
|
|
257
|
+
toPx,
|
|
258
|
+
scale
|
|
259
|
+
} from './compiler/math-engine.js';
|
|
260
|
+
export type {
|
|
261
|
+
CSSUnit,
|
|
262
|
+
CSSMathValue,
|
|
263
|
+
MathContext,
|
|
264
|
+
MathResult,
|
|
265
|
+
FluidTypeConfig
|
|
266
|
+
} from './compiler/math-engine.js';
|
|
267
|
+
|
|
268
|
+
// ============================================================================
|
|
269
|
+
// 🆕 Intent Engine — Self-Healing CSS (v3.0)
|
|
270
|
+
// ============================================================================
|
|
271
|
+
export {
|
|
272
|
+
intent,
|
|
273
|
+
correct,
|
|
274
|
+
heal,
|
|
275
|
+
validate as validateValue,
|
|
276
|
+
getIntent
|
|
277
|
+
} from './compiler/intent-engine.js';
|
|
278
|
+
export type {
|
|
279
|
+
CorrectionResult,
|
|
280
|
+
HealMode,
|
|
281
|
+
HealResult,
|
|
282
|
+
IntentContext
|
|
283
|
+
} from './compiler/intent-engine.js';
|
|
284
|
+
|
|
285
|
+
// ============================================================================
|
|
286
|
+
// 🆕 Style Graph Compiler (v3.0)
|
|
287
|
+
// ============================================================================
|
|
288
|
+
export {
|
|
289
|
+
StyleGraphCompiler,
|
|
290
|
+
compileGraph
|
|
291
|
+
} from './compiler/style-graph.js';
|
|
292
|
+
export type {
|
|
293
|
+
StyleGraph,
|
|
294
|
+
StyleGraphNode,
|
|
295
|
+
StyleGraphEdge,
|
|
296
|
+
GraphCompileOptions,
|
|
297
|
+
GraphCompileResult
|
|
298
|
+
} from './compiler/style-graph.js';
|
|
299
|
+
|
|
300
|
+
// ============================================================================
|
|
301
|
+
// 🆕 Static Analyzer — IDE Intelligence Layer (v3.0)
|
|
302
|
+
// ============================================================================
|
|
303
|
+
export {
|
|
304
|
+
StyleAnalyzer,
|
|
305
|
+
analyze as analyzeStyle
|
|
306
|
+
} from './compiler/analyzer.js';
|
|
307
|
+
export type {
|
|
308
|
+
StyleDiagnostic,
|
|
309
|
+
StyleAnalysis,
|
|
310
|
+
BreakpointInference,
|
|
311
|
+
DiagnosticSeverity
|
|
312
|
+
} from './compiler/analyzer.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"data":{}}
|
package/demo/index.html
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>ChainCSS Demo | Zero-Runtime CSS-in-JS</title>
|
|
7
|
-
<style>
|
|
8
|
-
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
9
|
-
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
|
|
10
|
-
</style>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div id="app"></div>
|
|
14
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
package/demo/package.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "chaincss-demo",
|
|
3
|
-
"private": true,
|
|
4
|
-
"type": "module",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "vite",
|
|
7
|
-
"build": "vite build"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"autoprefixer": "^10.5.0",
|
|
11
|
-
"browserslist": "^4.28.2",
|
|
12
|
-
"caniuse-lite": "^1.0.30001791",
|
|
13
|
-
"react": "^18.2.0",
|
|
14
|
-
"react-dom": "^18.2.0"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@vitejs/plugin-react": "^4.0.0",
|
|
18
|
-
"vite": "^5.0.0"
|
|
19
|
-
}
|
|
20
|
-
}
|
package/demo/src/App.tsx
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as S from './styles.chain';
|
|
3
|
-
|
|
4
|
-
const features = [
|
|
5
|
-
{ icon: '⚡', title: 'Zero Runtime', desc: 'Static styles compile to plain CSS. No JavaScript shipped for styling.' },
|
|
6
|
-
{ icon: '🎯', title: 'Auto Detection', desc: 'smartChain() detects static vs dynamic automatically.' },
|
|
7
|
-
{ icon: '🧩', title: '57 Macros', desc: 'flex(), center(), glass(), pill() — complex CSS as single method calls.' },
|
|
8
|
-
{ icon: '🎨', title: 'Design Tokens', desc: 'Themeable with full token resolution system.' },
|
|
9
|
-
{ icon: '🔄', title: 'Variant System', desc: 'Type-safe component variants with compound conditions.' },
|
|
10
|
-
{ icon: '📱', title: 'Responsive', desc: '20 breakpoints. Mobile-first to feature queries.' },
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
const plans = [
|
|
14
|
-
{ name: 'Starter', price: 'Free', features: ['5 components', 'Basic macros', 'Community support'], featured: false },
|
|
15
|
-
{ name: 'Pro', price: '$29/mo', features: ['Unlimited components', 'All 57 macros', 'Priority support', 'Atomic CSS', 'Design tokens'], featured: true },
|
|
16
|
-
{ name: 'Enterprise', price: '$99/mo', features: ['Everything in Pro', 'Theme contracts', 'SSR support', 'Custom plugins', 'Dedicated support'], featured: false },
|
|
17
|
-
];
|
|
18
|
-
|
|
19
|
-
export function App() {
|
|
20
|
-
return (
|
|
21
|
-
<div style={{ background: '#0f172a', minHeight: '100vh' }}>
|
|
22
|
-
{/* NAV */}
|
|
23
|
-
<nav className={S.nav.selectors?.[0]}>
|
|
24
|
-
<div className={S.navInner.selectors?.[0]}>
|
|
25
|
-
<span className={S.navLogo.selectors?.[0]}>ChainCSS</span>
|
|
26
|
-
<div className={S.navLinks.selectors?.[0]}>
|
|
27
|
-
{['Features', 'Pricing', 'Docs', 'GitHub'].map(item => (
|
|
28
|
-
<a key={item} href="#" className={S.navLink.selectors?.[0]}>{item}</a>
|
|
29
|
-
))}
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</nav>
|
|
33
|
-
|
|
34
|
-
{/* HERO */}
|
|
35
|
-
<section className={S.hero.selectors?.[0]}>
|
|
36
|
-
<h1 className={S.heroTitle.selectors?.[0]}>
|
|
37
|
-
Write Styles Like JavaScript.<br />Ship Zero Runtime.
|
|
38
|
-
</h1>
|
|
39
|
-
<p className={S.heroSubtitle.selectors?.[0]}>
|
|
40
|
-
ChainCSS auto-detects static vs dynamic styles. CSS where possible, JS where needed.
|
|
41
|
-
</p>
|
|
42
|
-
<div style={{ display: 'flex', gap: 16 }}>
|
|
43
|
-
<button className={S.buttonPrimary.selectors?.[0]}>Get Started →</button>
|
|
44
|
-
<button className={S.buttonSecondary.selectors?.[0]}>View on GitHub</button>
|
|
45
|
-
</div>
|
|
46
|
-
</section>
|
|
47
|
-
|
|
48
|
-
{/* FEATURES */}
|
|
49
|
-
<section className={S.section.selectors?.[0]}>
|
|
50
|
-
<div className={S.sectionHeader.selectors?.[0]}>
|
|
51
|
-
<h2 className={S.sectionTitle.selectors?.[0]}>Everything You Need</h2>
|
|
52
|
-
<p className={S.sectionDesc.selectors?.[0]}>550+ features. One JavaScript API. Zero runtime CSS.</p>
|
|
53
|
-
</div>
|
|
54
|
-
<div className={S.featureGrid.selectors?.[0]}>
|
|
55
|
-
{features.map(f => (
|
|
56
|
-
<div key={f.title} className={S.featureCard.selectors?.[0]}>
|
|
57
|
-
<div className={S.featureIcon.selectors?.[0]}>{f.icon}</div>
|
|
58
|
-
<h3 className={S.featureTitle.selectors?.[0]}>{f.title}</h3>
|
|
59
|
-
<p className={S.featureDesc.selectors?.[0]}>{f.desc}</p>
|
|
60
|
-
</div>
|
|
61
|
-
))}
|
|
62
|
-
</div>
|
|
63
|
-
</section>
|
|
64
|
-
|
|
65
|
-
{/* PRICING */}
|
|
66
|
-
<section className={S.section.selectors?.[0]}>
|
|
67
|
-
<div className={S.sectionHeader.selectors?.[0]}>
|
|
68
|
-
<h2 className={S.sectionTitle.selectors?.[0]}>Simple Pricing</h2>
|
|
69
|
-
<p className={S.sectionDesc.selectors?.[0]}>Start free, scale as you grow.</p>
|
|
70
|
-
</div>
|
|
71
|
-
<div className={S.pricingGrid.selectors?.[0]}>
|
|
72
|
-
{plans.map(p => (
|
|
73
|
-
<div key={p.name} className={(p.featured ? S.pricingCardFeatured : S.pricingCard).selectors?.[0]}>
|
|
74
|
-
{p.featured && <span className={S.pricingBadge.selectors?.[0]}>POPULAR</span>}
|
|
75
|
-
<h3 className={S.pricingPlanName.selectors?.[0]}>{p.name}</h3>
|
|
76
|
-
<div className={S.pricingPrice.selectors?.[0]}>{p.price}</div>
|
|
77
|
-
<div style={{ flex: 1, marginBottom: 24 }}>
|
|
78
|
-
{p.features.map(f => (
|
|
79
|
-
<div key={f} className={S.pricingFeature.selectors?.[0]}>✓ {f}</div>
|
|
80
|
-
))}
|
|
81
|
-
</div>
|
|
82
|
-
<button className={(p.featured ? S.buttonPrimary : S.buttonSecondary).selectors?.[0]}>
|
|
83
|
-
Get Started
|
|
84
|
-
</button>
|
|
85
|
-
</div>
|
|
86
|
-
))}
|
|
87
|
-
</div>
|
|
88
|
-
</section>
|
|
89
|
-
|
|
90
|
-
{/* FOOTER */}
|
|
91
|
-
<footer className={S.footer.selectors?.[0]}>
|
|
92
|
-
<div className={S.footerGrid.selectors?.[0]}>
|
|
93
|
-
<div>
|
|
94
|
-
<h4 className={S.footerHeading.selectors?.[0]}>ChainCSS</h4>
|
|
95
|
-
<a href="#" className={S.footerLink.selectors?.[0]}>About</a>
|
|
96
|
-
<a href="#" className={S.footerLink.selectors?.[0]}>Blog</a>
|
|
97
|
-
</div>
|
|
98
|
-
<div>
|
|
99
|
-
<h4 className={S.footerHeading.selectors?.[0]}>Product</h4>
|
|
100
|
-
<a href="#" className={S.footerLink.selectors?.[0]}>Features</a>
|
|
101
|
-
<a href="#" className={S.footerLink.selectors?.[0]}>Pricing</a>
|
|
102
|
-
</div>
|
|
103
|
-
<div>
|
|
104
|
-
<h4 className={S.footerHeading.selectors?.[0]}>Resources</h4>
|
|
105
|
-
<a href="#" className={S.footerLink.selectors?.[0]}>Docs</a>
|
|
106
|
-
<a href="#" className={S.footerLink.selectors?.[0]}>Examples</a>
|
|
107
|
-
</div>
|
|
108
|
-
<div>
|
|
109
|
-
<h4 className={S.footerHeading.selectors?.[0]}>Legal</h4>
|
|
110
|
-
<a href="#" className={S.footerLink.selectors?.[0]}>Privacy</a>
|
|
111
|
-
<a href="#" className={S.footerLink.selectors?.[0]}>Terms</a>
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
</footer>
|
|
115
|
-
</div>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Lightweight barrel for demo - excludes compiler/prefixer
|
|
2
|
-
export { chain, enableDebug, setTokenContext, getTokenContext } from '../../src/compiler/Chain.js';
|
|
3
|
-
export { recipe } from '../../src/compiler/btt.js';
|
|
4
|
-
export { createTokens, DesignTokens } from '../../src/compiler/tokens.js';
|
|
5
|
-
export { smartChain, buildChain, runtimeChain } from '../../src/core/smart-chain.js';
|
|
6
|
-
export { createThemeContract, createTheme, validateTheme, Theme } from '../../src/compiler/theme-contract.js';
|
|
7
|
-
export { helpers } from '../../src/compiler/helpers.js';
|
|
8
|
-
export { animationPresets, createAnimation, getAnimationPreset } from '../../src/compiler/animations.js';
|
|
9
|
-
export { shorthandMap, macros } from '../../src/compiler/shorthands.js';
|