@master/css 2.0.0-beta.99 → 2.0.0-rc.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.
- package/README.md +38 -20
- package/dist/bin/index.bundle.js +36 -0
- package/dist/bin/index.d.ts +2 -0
- package/dist/config/animations.d.ts +110 -0
- package/dist/config/functions.d.ts +3 -0
- package/dist/config/index.d.ts +57 -38
- package/dist/config/media-queries.d.ts +1 -0
- package/dist/config/rules.d.ts +279 -199
- package/dist/config/selectors.d.ts +1 -0
- package/dist/config/semantics.d.ts +187 -78
- package/dist/config/styles.d.ts +3 -0
- package/dist/config/variables.d.ts +551 -0
- package/dist/constants/base-unit-regex.d.ts +1 -0
- package/dist/constants/config-esm-text.d.ts +1 -0
- package/dist/constants/config-text.d.ts +1 -0
- package/dist/constants/config-ts-text.d.ts +1 -0
- package/dist/constants/start-symbol.d.ts +1 -1
- package/dist/core.d.ts +96 -0
- package/dist/functions/reorder-for-readable-classes.d.ts +12 -0
- package/dist/functions/transform-color-with-opacity.d.ts +1 -0
- package/dist/index.bundle.js +35 -0
- package/dist/index.bundle.mjs +35 -0
- package/dist/index.d.ts +10 -21
- package/dist/layer.d.ts +11 -0
- package/dist/polyfills/css-escape.d.ts +0 -1
- package/dist/rule.d.ts +101 -55
- package/dist/{config/breakpoints.d.ts → tokens/screen-sizes.d.ts} +3 -2
- package/dist/types/global.d.ts +5 -0
- package/dist/utils/extend-config.d.ts +2 -0
- package/dist/utils/flatten-object.d.ts +1 -0
- package/dist/utils/hex-to-rgb.d.ts +1 -1
- package/dist/utils/rgb-to-hex.d.ts +1 -1
- package/package.json +1 -1
- package/dist/apis/fill-color-scale.d.ts +0 -1
- package/dist/apis/render-from-html.d.ts +0 -3
- package/dist/apis/render-into-html.d.ts +0 -3
- package/dist/apis/render.d.ts +0 -3
- package/dist/config/colors.d.ts +0 -25
- package/dist/config/root-size.d.ts +0 -2
- package/dist/config/scheme.d.ts +0 -7
- package/dist/config/themes.d.ts +0 -2
- package/dist/config/values.d.ts +0 -126
- package/dist/css.d.ts +0 -96
- package/dist/index.browser.d.ts +0 -1
- package/dist/index.browser.js +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.mjs +0 -1
- package/dist/rules/accent-color.d.ts +0 -6
- package/dist/rules/align-content.d.ts +0 -5
- package/dist/rules/align-items.d.ts +0 -5
- package/dist/rules/align-self.d.ts +0 -5
- package/dist/rules/animation-delay.d.ts +0 -6
- package/dist/rules/animation-direction.d.ts +0 -5
- package/dist/rules/animation-duration.d.ts +0 -6
- package/dist/rules/animation-fill-mode.d.ts +0 -5
- package/dist/rules/animation-iteration-count.d.ts +0 -6
- package/dist/rules/animation-name.d.ts +0 -5
- package/dist/rules/animation-play-state.d.ts +0 -5
- package/dist/rules/animation-timing-function.d.ts +0 -5
- package/dist/rules/animation.d.ts +0 -7
- package/dist/rules/appearance.d.ts +0 -4
- package/dist/rules/aspect-ratio.d.ts +0 -6
- package/dist/rules/backdrop-filter.d.ts +0 -11
- package/dist/rules/background-attachment.d.ts +0 -5
- package/dist/rules/background-blend-mode.d.ts +0 -4
- package/dist/rules/background-clip.d.ts +0 -8
- package/dist/rules/background-color.d.ts +0 -7
- package/dist/rules/background-image.d.ts +0 -6
- package/dist/rules/background-origin.d.ts +0 -5
- package/dist/rules/background-position.d.ts +0 -6
- package/dist/rules/background-repeat.d.ts +0 -5
- package/dist/rules/background-size.d.ts +0 -5
- package/dist/rules/background.d.ts +0 -7
- package/dist/rules/border-collapse.d.ts +0 -5
- package/dist/rules/border-color.d.ts +0 -12
- package/dist/rules/border-image-outset.d.ts +0 -4
- package/dist/rules/border-image-repeat.d.ts +0 -5
- package/dist/rules/border-image-slice.d.ts +0 -5
- package/dist/rules/border-image-source.d.ts +0 -5
- package/dist/rules/border-image-width.d.ts +0 -5
- package/dist/rules/border-image.d.ts +0 -5
- package/dist/rules/border-radius.d.ts +0 -10
- package/dist/rules/border-spacing.d.ts +0 -4
- package/dist/rules/border-style.d.ts +0 -10
- package/dist/rules/border-width.d.ts +0 -10
- package/dist/rules/border.d.ts +0 -11
- package/dist/rules/box-decoration-break.d.ts +0 -8
- package/dist/rules/box-shadow.d.ts +0 -6
- package/dist/rules/box-sizing.d.ts +0 -5
- package/dist/rules/break-after.d.ts +0 -4
- package/dist/rules/break-before.d.ts +0 -4
- package/dist/rules/break-inside.d.ts +0 -4
- package/dist/rules/caret-color.d.ts +0 -6
- package/dist/rules/clear.d.ts +0 -4
- package/dist/rules/clip-path.d.ts +0 -5
- package/dist/rules/color.d.ts +0 -7
- package/dist/rules/column-span.d.ts +0 -5
- package/dist/rules/columns.d.ts +0 -7
- package/dist/rules/contain.d.ts +0 -4
- package/dist/rules/content.d.ts +0 -4
- package/dist/rules/counter-increment.d.ts +0 -5
- package/dist/rules/counter-reset.d.ts +0 -5
- package/dist/rules/cursor.d.ts +0 -4
- package/dist/rules/cx.d.ts +0 -5
- package/dist/rules/cy.d.ts +0 -5
- package/dist/rules/direction.d.ts +0 -4
- package/dist/rules/display.d.ts +0 -5
- package/dist/rules/fill.d.ts +0 -6
- package/dist/rules/filter.d.ts +0 -8
- package/dist/rules/flex-basis.d.ts +0 -4
- package/dist/rules/flex-direction.d.ts +0 -5
- package/dist/rules/flex-grow.d.ts +0 -5
- package/dist/rules/flex-shrink.d.ts +0 -5
- package/dist/rules/flex-wrap.d.ts +0 -5
- package/dist/rules/flex.d.ts +0 -6
- package/dist/rules/float.d.ts +0 -4
- package/dist/rules/font-family.d.ts +0 -5
- package/dist/rules/font-feature-settings.d.ts +0 -5
- package/dist/rules/font-size.d.ts +0 -5
- package/dist/rules/font-smoothing.d.ts +0 -10
- package/dist/rules/font-style.d.ts +0 -6
- package/dist/rules/font-variant-numeric.d.ts +0 -5
- package/dist/rules/font-weight.d.ts +0 -6
- package/dist/rules/font.d.ts +0 -7
- package/dist/rules/gap.d.ts +0 -10
- package/dist/rules/grid-area.d.ts +0 -6
- package/dist/rules/grid-auto-columns.d.ts +0 -5
- package/dist/rules/grid-auto-flow.d.ts +0 -5
- package/dist/rules/grid-auto-rows.d.ts +0 -4
- package/dist/rules/grid-column-end.d.ts +0 -6
- package/dist/rules/grid-column-start.d.ts +0 -6
- package/dist/rules/grid-column.d.ts +0 -8
- package/dist/rules/grid-columns.d.ts +0 -9
- package/dist/rules/grid-row-end.d.ts +0 -5
- package/dist/rules/grid-row-start.d.ts +0 -5
- package/dist/rules/grid-row.d.ts +0 -8
- package/dist/rules/grid-rows.d.ts +0 -8
- package/dist/rules/grid-template-areas.d.ts +0 -4
- package/dist/rules/grid-template-columns.d.ts +0 -5
- package/dist/rules/grid-template-rows.d.ts +0 -4
- package/dist/rules/grid-template.d.ts +0 -5
- package/dist/rules/grid.d.ts +0 -5
- package/dist/rules/group.d.ts +0 -13
- package/dist/rules/height.d.ts +0 -5
- package/dist/rules/inset.d.ts +0 -8
- package/dist/rules/isolation.d.ts +0 -4
- package/dist/rules/justify-content.d.ts +0 -5
- package/dist/rules/justify-items.d.ts +0 -5
- package/dist/rules/justify-self.d.ts +0 -5
- package/dist/rules/letter-spacing.d.ts +0 -6
- package/dist/rules/line-clamp.d.ts +0 -8
- package/dist/rules/line-height.d.ts +0 -6
- package/dist/rules/lines.d.ts +0 -10
- package/dist/rules/list-style-image.d.ts +0 -5
- package/dist/rules/list-style-position.d.ts +0 -5
- package/dist/rules/list-style-type.d.ts +0 -5
- package/dist/rules/list-style.d.ts +0 -5
- package/dist/rules/margin.d.ts +0 -10
- package/dist/rules/mask-image.d.ts +0 -7
- package/dist/rules/max-height.d.ts +0 -5
- package/dist/rules/max-wh.d.ts +0 -12
- package/dist/rules/max-width.d.ts +0 -5
- package/dist/rules/min-height.d.ts +0 -5
- package/dist/rules/min-wh.d.ts +0 -12
- package/dist/rules/min-width.d.ts +0 -5
- package/dist/rules/mix-blend-mode.d.ts +0 -5
- package/dist/rules/object-fit.d.ts +0 -5
- package/dist/rules/object-position.d.ts +0 -5
- package/dist/rules/opacity.d.ts +0 -5
- package/dist/rules/order.d.ts +0 -6
- package/dist/rules/outline-color.d.ts +0 -6
- package/dist/rules/outline-offset.d.ts +0 -4
- package/dist/rules/outline-style.d.ts +0 -5
- package/dist/rules/outline-width.d.ts +0 -5
- package/dist/rules/outline.d.ts +0 -6
- package/dist/rules/overflow.d.ts +0 -10
- package/dist/rules/overscroll-behavior.d.ts +0 -9
- package/dist/rules/padding.d.ts +0 -10
- package/dist/rules/place-content.d.ts +0 -5
- package/dist/rules/place-items.d.ts +0 -5
- package/dist/rules/place-self.d.ts +0 -5
- package/dist/rules/pointer-events.d.ts +0 -4
- package/dist/rules/position.d.ts +0 -4
- package/dist/rules/quotes.d.ts +0 -4
- package/dist/rules/resize.d.ts +0 -4
- package/dist/rules/rx.d.ts +0 -5
- package/dist/rules/ry.d.ts +0 -5
- package/dist/rules/scroll-behavior.d.ts +0 -4
- package/dist/rules/scroll-margin.d.ts +0 -10
- package/dist/rules/scroll-padding.d.ts +0 -10
- package/dist/rules/scroll-snap-align.d.ts +0 -5
- package/dist/rules/scroll-snap-stop.d.ts +0 -5
- package/dist/rules/scroll-snap-type.d.ts +0 -5
- package/dist/rules/shape-image-threshold.d.ts +0 -5
- package/dist/rules/shape-margin.d.ts +0 -5
- package/dist/rules/shape-outside.d.ts +0 -5
- package/dist/rules/spacing.d.ts +0 -10
- package/dist/rules/stroke-dasharray.d.ts +0 -4
- package/dist/rules/stroke-dashoffset.d.ts +0 -4
- package/dist/rules/stroke-width.d.ts +0 -5
- package/dist/rules/stroke.d.ts +0 -5
- package/dist/rules/table-layout.d.ts +0 -4
- package/dist/rules/text-align.d.ts +0 -5
- package/dist/rules/text-decoration-color.d.ts +0 -6
- package/dist/rules/text-decoration-line.d.ts +0 -5
- package/dist/rules/text-decoration-style.d.ts +0 -5
- package/dist/rules/text-decoration-thickness.d.ts +0 -6
- package/dist/rules/text-decoration.d.ts +0 -7
- package/dist/rules/text-fill-color.d.ts +0 -11
- package/dist/rules/text-indent.d.ts +0 -4
- package/dist/rules/text-orientation.d.ts +0 -5
- package/dist/rules/text-overflow.d.ts +0 -5
- package/dist/rules/text-rendering.d.ts +0 -5
- package/dist/rules/text-shadow.d.ts +0 -5
- package/dist/rules/text-size.d.ts +0 -9
- package/dist/rules/text-stroke-color.d.ts +0 -11
- package/dist/rules/text-stroke-width.d.ts +0 -9
- package/dist/rules/text-stroke.d.ts +0 -9
- package/dist/rules/text-transform.d.ts +0 -5
- package/dist/rules/text-underline-offset.d.ts +0 -4
- package/dist/rules/touch-action.d.ts +0 -4
- package/dist/rules/transform-box.d.ts +0 -5
- package/dist/rules/transform-origin.d.ts +0 -6
- package/dist/rules/transform-style.d.ts +0 -5
- package/dist/rules/transform.d.ts +0 -8
- package/dist/rules/transition-delay.d.ts +0 -6
- package/dist/rules/transition-duration.d.ts +0 -6
- package/dist/rules/transition-property.d.ts +0 -5
- package/dist/rules/transition-timing-function.d.ts +0 -5
- package/dist/rules/transition.d.ts +0 -6
- package/dist/rules/user-drag.d.ts +0 -7
- package/dist/rules/user-select.d.ts +0 -7
- package/dist/rules/variable.d.ts +0 -10
- package/dist/rules/vertical-align.d.ts +0 -5
- package/dist/rules/visibility.d.ts +0 -4
- package/dist/rules/wh.d.ts +0 -12
- package/dist/rules/white-space.d.ts +0 -5
- package/dist/rules/width.d.ts +0 -5
- package/dist/rules/will-change.d.ts +0 -4
- package/dist/rules/word-break.d.ts +0 -5
- package/dist/rules/word-spacing.d.ts +0 -5
- package/dist/rules/writing-mode.d.ts +0 -5
- package/dist/rules/x.d.ts +0 -5
- package/dist/rules/y.d.ts +0 -5
- package/dist/rules/z-index.d.ts +0 -6
- package/dist/utils/analyze-unit-value.d.ts +0 -4
- package/dist/utils/analyze-value-token.d.ts +0 -3
- package/dist/utils/delay.d.ts +0 -2
- package/dist/utils/get-border-props.d.ts +0 -3
- package/dist/utils/get-css-property-text.d.ts +0 -5
- package/dist/utils/normalize-css-calc-text.d.ts +0 -5
- package/dist/utils/parse-value-unit.d.ts +0 -2
- package/dist/utils/parse-value.d.ts +0 -5
- package/dist/utils/test-css.d.ts +0 -3
package/dist/rule.d.ts
CHANGED
|
@@ -1,70 +1,116 @@
|
|
|
1
|
-
import MasterCSS from './
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import type { MasterCSS, Variable } from './core';
|
|
2
|
+
import { Layer } from './layer';
|
|
3
|
+
import { PropertiesHyphen } from 'csstype';
|
|
4
|
+
export declare class Rule {
|
|
4
5
|
readonly className: string;
|
|
5
|
-
readonly matching: RuleMatching;
|
|
6
6
|
css: MasterCSS;
|
|
7
|
-
readonly prefix: string;
|
|
8
|
-
readonly symbol: string;
|
|
9
|
-
readonly token: string;
|
|
10
|
-
readonly prefixSelectors: string[];
|
|
11
|
-
readonly vendorSuffixSelectors: Record<string, string[]>;
|
|
12
|
-
readonly important: boolean;
|
|
13
|
-
readonly media: MediaQuery;
|
|
14
7
|
readonly at: Record<string, string>;
|
|
15
|
-
readonly direction: string;
|
|
16
|
-
readonly theme: string;
|
|
17
|
-
readonly unitToken: string;
|
|
18
|
-
readonly hasWhere: boolean;
|
|
19
8
|
readonly priority: number;
|
|
20
|
-
readonly natives:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
static colorStarts: string;
|
|
30
|
-
static symbol: string;
|
|
31
|
-
static unit: string;
|
|
32
|
-
static colorful: boolean;
|
|
33
|
-
static get prop(): string;
|
|
34
|
-
static match(name: string, matches: RegExp, colorThemesMap: Record<string, Record<string, string>>, colorNames: string[]): RuleMatching;
|
|
35
|
-
constructor(className: string, matching: RuleMatching, css: MasterCSS);
|
|
9
|
+
readonly natives: NativeRule[];
|
|
10
|
+
readonly order: number;
|
|
11
|
+
readonly layer: Layer;
|
|
12
|
+
readonly stateToken: string;
|
|
13
|
+
readonly declarations?: PropertiesHyphen;
|
|
14
|
+
animationNames?: string[];
|
|
15
|
+
variableNames?: string[];
|
|
16
|
+
constructor(className: string, RegisteredRule: RegisteredRule, css: MasterCSS);
|
|
17
|
+
resolveValue: (valueComponents: ValueComponent[], unit: string, bypassVariableNames: string[], bypassParsing: boolean) => string;
|
|
36
18
|
get text(): string;
|
|
19
|
+
parseValue: (currentValueComponents: ValueComponent[], i: number, value: string, unit: string, endSymbol: string, parentFunctionName?: string, bypassParsing?: boolean, bypassVariableNames?: string[]) => number;
|
|
20
|
+
parseValueComponent(token: string | number, unit?: any): StringValueComponent | NumericValueComponent;
|
|
37
21
|
}
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
get(declaration: Declaration): Record<string, any>;
|
|
45
|
-
getThemeProps(declaration: Declaration, css: MasterCSS): Record<string, Record<string, string>>;
|
|
22
|
+
export type ValueComponent = StringValueComponent | NumericValueComponent | FunctionValueComponent | VariableValueComponent | SeparatorValueComponent;
|
|
23
|
+
export interface StringValueComponent {
|
|
24
|
+
text?: string;
|
|
25
|
+
token?: string;
|
|
26
|
+
type: 'string';
|
|
27
|
+
value: string;
|
|
46
28
|
}
|
|
47
|
-
export interface
|
|
29
|
+
export interface NumericValueComponent {
|
|
30
|
+
text?: string;
|
|
31
|
+
token?: string;
|
|
32
|
+
type: 'number';
|
|
33
|
+
value: number;
|
|
34
|
+
unit?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface FunctionValueComponent {
|
|
37
|
+
text?: string;
|
|
38
|
+
token?: string;
|
|
39
|
+
type: 'function';
|
|
40
|
+
name: string;
|
|
41
|
+
symbol: string;
|
|
42
|
+
children: ValueComponent[];
|
|
43
|
+
bypassTransform?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface VariableValueComponent {
|
|
46
|
+
text?: string;
|
|
47
|
+
token?: string;
|
|
48
|
+
type: 'variable';
|
|
49
|
+
name: string;
|
|
50
|
+
alpha?: string;
|
|
51
|
+
fallback?: string;
|
|
52
|
+
variable?: Variable;
|
|
53
|
+
}
|
|
54
|
+
export interface SeparatorValueComponent {
|
|
55
|
+
text?: string;
|
|
56
|
+
type: 'separator';
|
|
57
|
+
value: string;
|
|
58
|
+
}
|
|
59
|
+
export interface Rule extends RegisteredRule {
|
|
60
|
+
colored: boolean;
|
|
61
|
+
prefix: string;
|
|
48
62
|
token: string;
|
|
63
|
+
vendorPrefixSelectors: Record<string, string[]>;
|
|
64
|
+
vendorSuffixSelectors: Record<string, string[]>;
|
|
65
|
+
important: boolean;
|
|
66
|
+
media: MediaQuery;
|
|
67
|
+
direction: string;
|
|
68
|
+
theme: string;
|
|
69
|
+
unitToken: string;
|
|
70
|
+
hasWhere: boolean;
|
|
71
|
+
valueComponents: Array<ValueComponent>;
|
|
72
|
+
}
|
|
73
|
+
export interface RegisteredRule {
|
|
74
|
+
id: string;
|
|
75
|
+
match?: RegExp;
|
|
76
|
+
variables?: any;
|
|
77
|
+
order: number;
|
|
78
|
+
definition: RuleDefinition;
|
|
79
|
+
}
|
|
80
|
+
export interface RuleDefinition {
|
|
81
|
+
layer?: Layer;
|
|
82
|
+
match?: RegExp | [string, string[]?];
|
|
83
|
+
variables?: string[];
|
|
84
|
+
separators?: string[];
|
|
85
|
+
shorthand?: string;
|
|
86
|
+
colored?: boolean;
|
|
87
|
+
numeric?: boolean;
|
|
88
|
+
unit?: any;
|
|
89
|
+
native?: boolean;
|
|
90
|
+
declarations?: PropertiesHyphen;
|
|
91
|
+
analyze?: (this: Rule, className: string) => [valueToken: string, prefixToken?: string];
|
|
92
|
+
transformValue?(this: Rule, value: string): string;
|
|
93
|
+
transformValueComponents?(this: Rule, valueComponents: ValueComponent[]): ValueComponent[];
|
|
94
|
+
declare?(this: Rule, value: string, valueComponents: ValueComponent[]): PropertiesHyphen;
|
|
95
|
+
delete?(this: Rule, className: string): void;
|
|
96
|
+
create?(this: Rule, className: string): void;
|
|
97
|
+
insert?(this: Rule): void;
|
|
98
|
+
}
|
|
99
|
+
export interface NativeRule {
|
|
100
|
+
text: string;
|
|
101
|
+
cssRule?: CSSRule;
|
|
102
|
+
}
|
|
103
|
+
export type MediaFeatureComponent = {
|
|
104
|
+
type: string;
|
|
49
105
|
tokenType?: string;
|
|
50
106
|
operator?: string;
|
|
51
|
-
value
|
|
52
|
-
unit
|
|
53
|
-
}
|
|
107
|
+
value: number;
|
|
108
|
+
unit: string;
|
|
109
|
+
};
|
|
54
110
|
export interface MediaQuery {
|
|
55
111
|
token: string;
|
|
56
|
-
features
|
|
57
|
-
[key: string]:
|
|
112
|
+
features: {
|
|
113
|
+
[key: string]: MediaFeatureComponent;
|
|
58
114
|
};
|
|
59
115
|
type?: string;
|
|
60
116
|
}
|
|
61
|
-
export interface Declaration {
|
|
62
|
-
value: any;
|
|
63
|
-
unit: string;
|
|
64
|
-
important: boolean;
|
|
65
|
-
}
|
|
66
|
-
export interface RuleMatching {
|
|
67
|
-
origin: 'matches' | 'semantics' | 'symbol';
|
|
68
|
-
value?: [string, string | Record<string, string>];
|
|
69
|
-
Rule?: typeof Rule;
|
|
70
|
-
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'4xs': number;
|
|
2
3
|
'3xs': number;
|
|
3
4
|
'2xs': number;
|
|
4
5
|
xs: number;
|
|
@@ -10,4 +11,4 @@ declare const breakpoints: {
|
|
|
10
11
|
'3xl': number;
|
|
11
12
|
'4xl': number;
|
|
12
13
|
};
|
|
13
|
-
export default
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function flattenObject(obj: Record<string, any>, parentKey?: string): Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function hexToRgb(hex:
|
|
1
|
+
export declare function hexToRgb(hex: string): (number | undefined)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function rgbToHex(r:
|
|
1
|
+
export declare function rgbToHex(r: number, g: number, b: number): string;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@master/css","scripts":{"build":"
|
|
1
|
+
{"name":"@master/css","scripts":{"build":"techor pack --declare --external @master/css-renderer @master/css-extractor","dev":"pnpm run build --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src"},"license":"MIT","description":"A markup-driven CSS language with enhanced syntax","author":"Aoyue Design LLC.","funding":"https://css.master.co/docs/donate","homepage":"https://css.master.co","bugs":{"url":"https://github.com/master-co/css/issues"},"repository":{"type":"git","url":"https://github.com/master-co/css.git","directory":"packages/css"},"keywords":["style","styles","html","variants","virtual","virtual-css","utility","css","ui","lightweight","class","webpack","plugin","integration","vite","parcel","build-tools","mastercss"],"sideEffects":false,"main":"./dist/index.bundle.js","jsnext:main":"./dist/index.bundle.mjs","esnext":"./dist/index.bundle.mjs","module":"./dist/index.bundle.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.bundle.js","import":"./dist/index.bundle.mjs","types":"./dist/index.d.ts"}},"bin":{"mcss":"./dist/bin/index.bundle.js","mastercss":"./dist/bin/index.bundle.js"},"files":["dist"],"publishConfig":{"access":"public"},"dependencies":{"@master/normal.css":"^2.0.0-rc.1","@techor/fs":"^2.5.4","@techor/log":"^2.5.4","commander":"^11.0.0"},"devDependencies":{"@techor/extend":"^2.5.4","@techor/pack":"^2.5.4","@types/jest":"^29.5.11","css-shared":"^2.0.0-rc.1","csstype":"^3.1.2","puppeteer":"^21.0.1","vite":"^4.2.1"},"version":"2.0.0-rc.1"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function fillColorScale(data: any): any;
|
package/dist/apis/render.d.ts
DELETED
package/dist/config/colors.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
declare const colors: {
|
|
2
|
-
slate: any;
|
|
3
|
-
gray: any;
|
|
4
|
-
brown: any;
|
|
5
|
-
orange: any;
|
|
6
|
-
gold: any;
|
|
7
|
-
yellow: any;
|
|
8
|
-
grass: any;
|
|
9
|
-
green: any;
|
|
10
|
-
beryl: any;
|
|
11
|
-
teal: any;
|
|
12
|
-
cyan: any;
|
|
13
|
-
sky: any;
|
|
14
|
-
blue: any;
|
|
15
|
-
indigo: any;
|
|
16
|
-
violet: any;
|
|
17
|
-
purple: any;
|
|
18
|
-
fuchsia: any;
|
|
19
|
-
pink: any;
|
|
20
|
-
crimson: any;
|
|
21
|
-
red: any;
|
|
22
|
-
black: string;
|
|
23
|
-
white: string;
|
|
24
|
-
};
|
|
25
|
-
export default colors;
|
package/dist/config/scheme.d.ts
DELETED
package/dist/config/themes.d.ts
DELETED
package/dist/config/values.d.ts
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
declare const values: {
|
|
2
|
-
BackgroundClip: {
|
|
3
|
-
content: string;
|
|
4
|
-
border: string;
|
|
5
|
-
padding: string;
|
|
6
|
-
};
|
|
7
|
-
BackgroundOrigin: {
|
|
8
|
-
content: string;
|
|
9
|
-
border: string;
|
|
10
|
-
padding: string;
|
|
11
|
-
};
|
|
12
|
-
BoxSizing: {
|
|
13
|
-
content: string;
|
|
14
|
-
border: string;
|
|
15
|
-
};
|
|
16
|
-
ClipPath: {
|
|
17
|
-
margin: string;
|
|
18
|
-
fill: string;
|
|
19
|
-
stroke: string;
|
|
20
|
-
view: string;
|
|
21
|
-
content: string;
|
|
22
|
-
border: string;
|
|
23
|
-
padding: string;
|
|
24
|
-
};
|
|
25
|
-
FlexDirection: {
|
|
26
|
-
col: string;
|
|
27
|
-
'col-reverse': string;
|
|
28
|
-
};
|
|
29
|
-
FontFamily: {
|
|
30
|
-
mono: string;
|
|
31
|
-
sans: string;
|
|
32
|
-
serif: string;
|
|
33
|
-
};
|
|
34
|
-
FontWeight: {
|
|
35
|
-
thin: number;
|
|
36
|
-
extralight: number;
|
|
37
|
-
light: number;
|
|
38
|
-
regular: number;
|
|
39
|
-
medium: number;
|
|
40
|
-
semibold: number;
|
|
41
|
-
bold: number;
|
|
42
|
-
extrabold: number;
|
|
43
|
-
heavy: number;
|
|
44
|
-
};
|
|
45
|
-
GridAutoColumns: {
|
|
46
|
-
min: string;
|
|
47
|
-
max: string;
|
|
48
|
-
};
|
|
49
|
-
GridAutoRows: {
|
|
50
|
-
min: string;
|
|
51
|
-
max: string;
|
|
52
|
-
};
|
|
53
|
-
GridTemplateColumns: {
|
|
54
|
-
min: string;
|
|
55
|
-
max: string;
|
|
56
|
-
};
|
|
57
|
-
GridTemplateRows: {
|
|
58
|
-
min: string;
|
|
59
|
-
max: string;
|
|
60
|
-
};
|
|
61
|
-
Order: {
|
|
62
|
-
first: number;
|
|
63
|
-
last: number;
|
|
64
|
-
};
|
|
65
|
-
Position: {
|
|
66
|
-
abs: string;
|
|
67
|
-
rel: string;
|
|
68
|
-
};
|
|
69
|
-
ShapeOutside: {
|
|
70
|
-
margin: string;
|
|
71
|
-
content: string;
|
|
72
|
-
border: string;
|
|
73
|
-
padding: string;
|
|
74
|
-
};
|
|
75
|
-
TransformBox: {
|
|
76
|
-
fill: string;
|
|
77
|
-
stroke: string;
|
|
78
|
-
view: string;
|
|
79
|
-
content: string;
|
|
80
|
-
border: string;
|
|
81
|
-
padding: string;
|
|
82
|
-
};
|
|
83
|
-
Width: {
|
|
84
|
-
full: string;
|
|
85
|
-
fit: string;
|
|
86
|
-
max: string;
|
|
87
|
-
min: string;
|
|
88
|
-
};
|
|
89
|
-
MinWidth: {
|
|
90
|
-
full: string;
|
|
91
|
-
fit: string;
|
|
92
|
-
max: string;
|
|
93
|
-
min: string;
|
|
94
|
-
};
|
|
95
|
-
MinHeight: {
|
|
96
|
-
full: string;
|
|
97
|
-
fit: string;
|
|
98
|
-
max: string;
|
|
99
|
-
min: string;
|
|
100
|
-
};
|
|
101
|
-
MaxWidth: {
|
|
102
|
-
full: string;
|
|
103
|
-
fit: string;
|
|
104
|
-
max: string;
|
|
105
|
-
min: string;
|
|
106
|
-
};
|
|
107
|
-
MaxHeight: {
|
|
108
|
-
full: string;
|
|
109
|
-
fit: string;
|
|
110
|
-
max: string;
|
|
111
|
-
min: string;
|
|
112
|
-
};
|
|
113
|
-
Height: {
|
|
114
|
-
full: string;
|
|
115
|
-
fit: string;
|
|
116
|
-
max: string;
|
|
117
|
-
min: string;
|
|
118
|
-
};
|
|
119
|
-
FlexBasis: {
|
|
120
|
-
full: string;
|
|
121
|
-
fit: string;
|
|
122
|
-
max: string;
|
|
123
|
-
min: string;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
export default values;
|
package/dist/css.d.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { Config } from './config';
|
|
2
|
-
import Rule, { RuleMatching } from './rule';
|
|
3
|
-
declare const MutationObserver: ObjectConstructor | {
|
|
4
|
-
new (callback: MutationCallback): MutationObserver;
|
|
5
|
-
prototype: MutationObserver;
|
|
6
|
-
};
|
|
7
|
-
export declare type Options = {
|
|
8
|
-
config?: Config;
|
|
9
|
-
override?: boolean;
|
|
10
|
-
observe?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export default class MasterCSS extends MutationObserver {
|
|
13
|
-
#private;
|
|
14
|
-
options?: Options;
|
|
15
|
-
static instances: MasterCSS[];
|
|
16
|
-
static root: MasterCSS;
|
|
17
|
-
/**
|
|
18
|
-
* 全部 sheet 根據目前蒐集到的所有 DOM class 重新 create
|
|
19
|
-
*/
|
|
20
|
-
static refresh(config: Config): void;
|
|
21
|
-
readonly style: HTMLStyleElement;
|
|
22
|
-
readonly rules: Rule[];
|
|
23
|
-
readonly ruleOfClass: Record<string, Rule>;
|
|
24
|
-
readonly countOfClass: {};
|
|
25
|
-
readonly host: Element;
|
|
26
|
-
readonly root: Document | ShadowRoot;
|
|
27
|
-
readonly ready: boolean;
|
|
28
|
-
readonly config: Config;
|
|
29
|
-
semantics: [RegExp, [string, string | Record<string, string>]][];
|
|
30
|
-
classes: Record<string, string[]>;
|
|
31
|
-
colorThemesMap: Record<string, Record<string, string>>;
|
|
32
|
-
colorNames: string[];
|
|
33
|
-
themeNames: string[];
|
|
34
|
-
relationThemesMap: Record<string, Record<string, string[]>>;
|
|
35
|
-
relations: Record<string, string[]>;
|
|
36
|
-
selectors: Record<string, [RegExp, string[]][]>;
|
|
37
|
-
values: Record<string, Record<string, string | number>>;
|
|
38
|
-
globalValues: Record<string, string | number>;
|
|
39
|
-
breakpoints: Record<string, number>;
|
|
40
|
-
mediaQueries: Record<string, string>;
|
|
41
|
-
matches: Record<string, RegExp>;
|
|
42
|
-
private schemeMQL;
|
|
43
|
-
constructor(options?: Options);
|
|
44
|
-
get storageScheme(): string;
|
|
45
|
-
set scheme(scheme: string);
|
|
46
|
-
get scheme(): string;
|
|
47
|
-
set theme(theme: string);
|
|
48
|
-
get theme(): string;
|
|
49
|
-
private removeSchemeListener;
|
|
50
|
-
private onThemeChange;
|
|
51
|
-
private cache;
|
|
52
|
-
observe(root: Document | ShadowRoot, options?: MutationObserverInit): this;
|
|
53
|
-
disconnect(): void;
|
|
54
|
-
/**
|
|
55
|
-
* 比對是否為 Master CSS 的類名語法
|
|
56
|
-
*/
|
|
57
|
-
match(className: string): RuleMatching;
|
|
58
|
-
/**
|
|
59
|
-
* 透過類名 ( 包含 .classes ) 生成 rules[]
|
|
60
|
-
*/
|
|
61
|
-
create(className: string): Rule[];
|
|
62
|
-
/**
|
|
63
|
-
* 根據蒐集到的所有 DOM class 重新 create
|
|
64
|
-
*/
|
|
65
|
-
refresh(config: Config): void;
|
|
66
|
-
destroy(): void;
|
|
67
|
-
/**
|
|
68
|
-
* 透過類名來刪除對應的 Rules
|
|
69
|
-
*/
|
|
70
|
-
delete(className: string): void;
|
|
71
|
-
/**
|
|
72
|
-
* 依類名插入規則
|
|
73
|
-
*/
|
|
74
|
-
insert(eachClassName: string): boolean;
|
|
75
|
-
/**
|
|
76
|
-
* 加工插入規則
|
|
77
|
-
* 1. where
|
|
78
|
-
* 2. normal
|
|
79
|
-
* 3. where selectors
|
|
80
|
-
* 4. normal selectors
|
|
81
|
-
* 5. media where
|
|
82
|
-
* 6. media normal
|
|
83
|
-
* 7. media selectors
|
|
84
|
-
* 8. media width where
|
|
85
|
-
* 9. media width
|
|
86
|
-
* 10. media width selectors
|
|
87
|
-
*/
|
|
88
|
-
insertRules(rules: Rule[]): void;
|
|
89
|
-
get text(): string;
|
|
90
|
-
}
|
|
91
|
-
declare global {
|
|
92
|
-
interface Window {
|
|
93
|
-
MasterCSS: typeof MasterCSS;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
export {};
|
package/dist/index.browser.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|