chaincss 2.1.4 → 2.1.5
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/runtime/index.d.ts +9 -1
- package/dist/runtime/index.js +99 -39
- package/package.json +1 -1
- package/src/runtime/index.ts +21 -12
- package/dist/runtime/svelte.d.ts +0 -15
package/dist/runtime/index.d.ts
CHANGED
|
@@ -10,7 +10,15 @@ export { useChainStyles, useDynamicChainStyles, useThemeChainStyles, ChainCSSGlo
|
|
|
10
10
|
export { useAtomicClasses, ChainCSSGlobal as ChainCSSGlobalVue, createStyledComponent as createStyledVueComponent, // This is fine - it renames
|
|
11
11
|
createStyledComponents as createStyledVueComponents, useComputedStyles as useComputedStylesVue, // This renames useComputedStyles
|
|
12
12
|
provideStyleContext, injectStyleContext } from './vue.js';
|
|
13
|
-
export
|
|
13
|
+
export declare const useAtomicClassesSvelte: (...args: any[]) => any;
|
|
14
|
+
export declare const cxSvelte: (...args: any[]) => any;
|
|
15
|
+
export declare const ChainCSSGlobalSvelte: (props: any) => any;
|
|
16
|
+
export declare const createStyledSvelteComponent: (...args: any[]) => any;
|
|
17
|
+
export declare const createStyledSvelteComponents: (...args: any[]) => any;
|
|
18
|
+
export declare const useComputedStylesSvelte: (...args: any[]) => any;
|
|
19
|
+
export declare const provideStyleContextSvelte: (...args: any[]) => any;
|
|
20
|
+
export declare const injectStyleContextSvelte: (...args: any[]) => any;
|
|
21
|
+
export declare const chainStyles: (...args: any[]) => any;
|
|
14
22
|
export { setupHMR, registerForHMR } from './hmr.js';
|
|
15
23
|
export { generateStyleId, hashString, kebabCase, isBrowser, isDevelopment, isProduction, debounce, memoize, cn as cnUtils, devWarn, devLog, logError, createDebugger } from './utils.js';
|
|
16
24
|
export type { RuntimeStyleDefinition, UseChainStylesOptions, RuntimeCompiledResult, StyleInjector, UseAtomicClassesReturn, HMRPayload, ChainCSSDebugger } from './types.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,3 +1,71 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __esm = (fn, res) => function __init() {
|
|
6
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
7
|
+
};
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/runtime/svelte.ts
|
|
23
|
+
var svelte_exports = {};
|
|
24
|
+
__export(svelte_exports, {
|
|
25
|
+
ChainCSSGlobal: () => ChainCSSGlobal3,
|
|
26
|
+
chainStyles: () => chainStyles,
|
|
27
|
+
createStyledComponent: () => createStyledComponent3,
|
|
28
|
+
createStyledComponents: () => createStyledComponents2,
|
|
29
|
+
cx: () => cx2,
|
|
30
|
+
injectStyleContext: () => injectStyleContext2,
|
|
31
|
+
provideStyleContext: () => provideStyleContext2,
|
|
32
|
+
useAtomicClasses: () => useAtomicClasses2,
|
|
33
|
+
useComputedStyles: () => useComputedStyles3
|
|
34
|
+
});
|
|
35
|
+
function useAtomicClasses2() {
|
|
36
|
+
return { subscribe: () => {
|
|
37
|
+
}, get: () => ({}) };
|
|
38
|
+
}
|
|
39
|
+
function cx2(...args) {
|
|
40
|
+
return args.filter(Boolean).join(" ");
|
|
41
|
+
}
|
|
42
|
+
function ChainCSSGlobal3() {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
function createStyledComponent3() {
|
|
46
|
+
return () => null;
|
|
47
|
+
}
|
|
48
|
+
function createStyledComponents2() {
|
|
49
|
+
return {};
|
|
50
|
+
}
|
|
51
|
+
function useComputedStyles3() {
|
|
52
|
+
return { subscribe: () => {
|
|
53
|
+
}, get: () => "" };
|
|
54
|
+
}
|
|
55
|
+
function provideStyleContext2() {
|
|
56
|
+
}
|
|
57
|
+
function injectStyleContext2() {
|
|
58
|
+
return {};
|
|
59
|
+
}
|
|
60
|
+
function chainStyles() {
|
|
61
|
+
return {};
|
|
62
|
+
}
|
|
63
|
+
var init_svelte = __esm({
|
|
64
|
+
"src/runtime/svelte.ts"() {
|
|
65
|
+
"use strict";
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
1
69
|
// src/compiler/suggestions.ts
|
|
2
70
|
var KNOWN_SHORTHANDS = [
|
|
3
71
|
// Spacing
|
|
@@ -3639,36 +3707,6 @@ function injectStyleContext() {
|
|
|
3639
3707
|
return inject(CHAIN_CSS_KEY, ref({}));
|
|
3640
3708
|
}
|
|
3641
3709
|
|
|
3642
|
-
// src/runtime/svelte.ts
|
|
3643
|
-
function useAtomicClasses2() {
|
|
3644
|
-
return { subscribe: () => {
|
|
3645
|
-
}, get: () => ({}) };
|
|
3646
|
-
}
|
|
3647
|
-
function cx2(...args) {
|
|
3648
|
-
return args.filter(Boolean).join(" ");
|
|
3649
|
-
}
|
|
3650
|
-
function ChainCSSGlobal3() {
|
|
3651
|
-
return null;
|
|
3652
|
-
}
|
|
3653
|
-
function createStyledComponent3() {
|
|
3654
|
-
return () => null;
|
|
3655
|
-
}
|
|
3656
|
-
function createStyledComponents2() {
|
|
3657
|
-
return {};
|
|
3658
|
-
}
|
|
3659
|
-
function useComputedStyles3() {
|
|
3660
|
-
return { subscribe: () => {
|
|
3661
|
-
}, get: () => "" };
|
|
3662
|
-
}
|
|
3663
|
-
function provideStyleContext2() {
|
|
3664
|
-
}
|
|
3665
|
-
function injectStyleContext2() {
|
|
3666
|
-
return {};
|
|
3667
|
-
}
|
|
3668
|
-
function chainStyles() {
|
|
3669
|
-
return {};
|
|
3670
|
-
}
|
|
3671
|
-
|
|
3672
3710
|
// src/runtime/hmr.ts
|
|
3673
3711
|
function getHMREnvironment() {
|
|
3674
3712
|
if (typeof window === "undefined") return "none";
|
|
@@ -3847,24 +3885,46 @@ function createDebugger(module2) {
|
|
|
3847
3885
|
error: (...args) => logError(`[${module2}]`, ...args)
|
|
3848
3886
|
};
|
|
3849
3887
|
}
|
|
3888
|
+
|
|
3889
|
+
// src/runtime/index.ts
|
|
3890
|
+
var _svelteExports = null;
|
|
3891
|
+
function getSvelteExports() {
|
|
3892
|
+
if (!_svelteExports) {
|
|
3893
|
+
try {
|
|
3894
|
+
_svelteExports = (init_svelte(), __toCommonJS(svelte_exports));
|
|
3895
|
+
} catch (e) {
|
|
3896
|
+
_svelteExports = {};
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3899
|
+
return _svelteExports;
|
|
3900
|
+
}
|
|
3901
|
+
var useAtomicClassesSvelte = (...args) => getSvelteExports().useAtomicClasses?.(...args);
|
|
3902
|
+
var cxSvelte = (...args) => getSvelteExports().cx?.(...args);
|
|
3903
|
+
var ChainCSSGlobalSvelte = (props) => getSvelteExports().ChainCSSGlobal?.(props);
|
|
3904
|
+
var createStyledSvelteComponent = (...args) => getSvelteExports().createStyledComponent?.(...args);
|
|
3905
|
+
var createStyledSvelteComponents = (...args) => getSvelteExports().createStyledComponents?.(...args);
|
|
3906
|
+
var useComputedStylesSvelte = (...args) => getSvelteExports().useComputedStyles?.(...args);
|
|
3907
|
+
var provideStyleContextSvelte = (...args) => getSvelteExports().provideStyleContext?.(...args);
|
|
3908
|
+
var injectStyleContextSvelte = (...args) => getSvelteExports().injectStyleContext?.(...args);
|
|
3909
|
+
var chainStyles2 = (...args) => getSvelteExports().chainStyles?.(...args);
|
|
3850
3910
|
export {
|
|
3851
3911
|
$,
|
|
3852
3912
|
$t,
|
|
3853
3913
|
ChainCSSGlobal,
|
|
3854
|
-
|
|
3914
|
+
ChainCSSGlobalSvelte,
|
|
3855
3915
|
ChainCSSGlobal2 as ChainCSSGlobalVue,
|
|
3856
3916
|
chain,
|
|
3857
|
-
chainStyles,
|
|
3917
|
+
chainStyles2 as chainStyles,
|
|
3858
3918
|
cn as cnUtils,
|
|
3859
3919
|
compileRuntime as compile,
|
|
3860
3920
|
createDebugger,
|
|
3861
3921
|
createStyledComponent,
|
|
3862
|
-
|
|
3863
|
-
|
|
3922
|
+
createStyledSvelteComponent,
|
|
3923
|
+
createStyledSvelteComponents,
|
|
3864
3924
|
createStyledComponent2 as createStyledVueComponent,
|
|
3865
3925
|
createStyledComponents as createStyledVueComponents,
|
|
3866
3926
|
cx,
|
|
3867
|
-
|
|
3927
|
+
cxSvelte,
|
|
3868
3928
|
debounce,
|
|
3869
3929
|
devLog,
|
|
3870
3930
|
devWarn,
|
|
@@ -3873,7 +3933,7 @@ export {
|
|
|
3873
3933
|
generateStyleId,
|
|
3874
3934
|
hashString,
|
|
3875
3935
|
injectStyleContext,
|
|
3876
|
-
|
|
3936
|
+
injectStyleContextSvelte,
|
|
3877
3937
|
isBrowser,
|
|
3878
3938
|
isDebugEnabled,
|
|
3879
3939
|
isDevelopment,
|
|
@@ -3882,17 +3942,17 @@ export {
|
|
|
3882
3942
|
logError,
|
|
3883
3943
|
memoize,
|
|
3884
3944
|
provideStyleContext,
|
|
3885
|
-
|
|
3945
|
+
provideStyleContextSvelte,
|
|
3886
3946
|
registerForHMR,
|
|
3887
3947
|
runRuntime as run,
|
|
3888
3948
|
setManifest,
|
|
3889
3949
|
setupHMR,
|
|
3890
3950
|
styleInjector,
|
|
3891
3951
|
useAtomicClasses,
|
|
3892
|
-
|
|
3952
|
+
useAtomicClassesSvelte,
|
|
3893
3953
|
useChainStyles,
|
|
3894
3954
|
useComputedStyles,
|
|
3895
|
-
|
|
3955
|
+
useComputedStylesSvelte,
|
|
3896
3956
|
useComputedStyles2 as useComputedStylesVue,
|
|
3897
3957
|
useDynamicChainStyles,
|
|
3898
3958
|
useThemeChainStyles,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chaincss",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "ChainCSS v3.0 - The first CSS-in-JS library with true auto-detection mixed mode. Zero runtime by default, dynamic when you need it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/runtime/index.ts
CHANGED
|
@@ -37,18 +37,27 @@ export {
|
|
|
37
37
|
injectStyleContext
|
|
38
38
|
} from './vue.js';
|
|
39
39
|
|
|
40
|
-
// Svelte
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
40
|
+
// Svelte — loaded lazily
|
|
41
|
+
let _svelteExports: any = null;
|
|
42
|
+
function getSvelteExports() {
|
|
43
|
+
if (!_svelteExports) {
|
|
44
|
+
try {
|
|
45
|
+
_svelteExports = require('./svelte.js');
|
|
46
|
+
} catch(e) {
|
|
47
|
+
_svelteExports = {};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return _svelteExports;
|
|
51
|
+
}
|
|
52
|
+
export const useAtomicClassesSvelte = (...args: any[]) => getSvelteExports().useAtomicClasses?.(...args);
|
|
53
|
+
export const cxSvelte = (...args: any[]) => getSvelteExports().cx?.(...args);
|
|
54
|
+
export const ChainCSSGlobalSvelte = (props: any) => getSvelteExports().ChainCSSGlobal?.(props);
|
|
55
|
+
export const createStyledSvelteComponent = (...args: any[]) => getSvelteExports().createStyledComponent?.(...args);
|
|
56
|
+
export const createStyledSvelteComponents = (...args: any[]) => getSvelteExports().createStyledComponents?.(...args);
|
|
57
|
+
export const useComputedStylesSvelte = (...args: any[]) => getSvelteExports().useComputedStyles?.(...args);
|
|
58
|
+
export const provideStyleContextSvelte = (...args: any[]) => getSvelteExports().provideStyleContext?.(...args);
|
|
59
|
+
export const injectStyleContextSvelte = (...args: any[]) => getSvelteExports().injectStyleContext?.(...args);
|
|
60
|
+
export const chainStyles = (...args: any[]) => getSvelteExports().chainStyles?.(...args);
|
|
52
61
|
|
|
53
62
|
// HMR
|
|
54
63
|
export { setupHMR, registerForHMR } from './hmr.js';
|
package/dist/runtime/svelte.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare function useAtomicClasses(): {
|
|
2
|
-
subscribe: () => void;
|
|
3
|
-
get: () => {};
|
|
4
|
-
};
|
|
5
|
-
export declare function cx(...args: any[]): string;
|
|
6
|
-
export declare function ChainCSSGlobal(): null;
|
|
7
|
-
export declare function createStyledComponent(): () => null;
|
|
8
|
-
export declare function createStyledComponents(): {};
|
|
9
|
-
export declare function useComputedStyles(): {
|
|
10
|
-
subscribe: () => void;
|
|
11
|
-
get: () => string;
|
|
12
|
-
};
|
|
13
|
-
export declare function provideStyleContext(): void;
|
|
14
|
-
export declare function injectStyleContext(): {};
|
|
15
|
-
export declare function chainStyles(): {};
|