@master/css 2.0.0-beta.10 → 2.0.0-beta.100
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 +94 -109
- package/dist/apis/render-from-html.d.ts +2 -2
- package/dist/apis/render-into-html.d.ts +2 -2
- package/dist/apis/render.d.ts +2 -2
- package/dist/config/breakpoints.d.ts +2 -2
- package/dist/config/colors.d.ts +2 -2
- package/dist/config/index.d.ts +38 -17
- package/dist/config/root-size.d.ts +2 -2
- package/dist/config/rules.d.ts +198 -2
- package/dist/config/scheme.d.ts +2 -3
- package/dist/config/selectors.d.ts +2 -2
- package/dist/config/semantics.d.ts +2 -2
- package/dist/config/themes.d.ts +2 -2
- package/dist/config/values.d.ts +2 -2
- package/dist/constants/start-symbol.d.ts +1 -0
- package/dist/css.d.ts +50 -31
- package/dist/index.browser.d.ts +1 -0
- package/dist/index.browser.js +1 -2
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +16 -15
- package/dist/index.mjs +1 -2
- package/dist/rule.d.ts +26 -26
- package/dist/rules/accent-color.d.ts +3 -4
- package/dist/rules/align-content.d.ts +4 -5
- package/dist/rules/align-items.d.ts +4 -5
- package/dist/rules/align-self.d.ts +4 -5
- package/dist/rules/animation-delay.d.ts +4 -5
- package/dist/rules/animation-direction.d.ts +4 -5
- package/dist/rules/animation-duration.d.ts +4 -5
- package/dist/rules/animation-fill-mode.d.ts +4 -5
- package/dist/rules/animation-iteration-count.d.ts +4 -5
- package/dist/rules/animation-name.d.ts +4 -5
- package/dist/rules/animation-play-state.d.ts +4 -5
- package/dist/rules/animation-timing-function.d.ts +4 -5
- package/dist/rules/animation.d.ts +3 -4
- package/dist/rules/appearance.d.ts +3 -4
- package/dist/rules/aspect-ratio.d.ts +6 -0
- package/dist/rules/backdrop-filter.d.ts +7 -7
- package/dist/rules/background-attachment.d.ts +4 -5
- package/dist/rules/background-blend-mode.d.ts +3 -4
- package/dist/rules/background-clip.d.ts +4 -5
- package/dist/rules/background-color.d.ts +3 -4
- package/dist/rules/background-image.d.ts +4 -5
- package/dist/rules/background-origin.d.ts +4 -5
- package/dist/rules/background-position.d.ts +4 -5
- package/dist/rules/background-repeat.d.ts +4 -5
- package/dist/rules/background-size.d.ts +4 -5
- package/dist/rules/background.d.ts +4 -5
- package/dist/rules/border-collapse.d.ts +4 -5
- package/dist/rules/border-color.d.ts +5 -4
- package/dist/rules/border-image-outset.d.ts +3 -4
- package/dist/rules/border-image-repeat.d.ts +4 -5
- package/dist/rules/border-image-slice.d.ts +3 -4
- package/dist/rules/border-image-source.d.ts +4 -5
- package/dist/rules/border-image-width.d.ts +4 -5
- package/dist/rules/border-image.d.ts +3 -4
- package/dist/rules/border-radius.d.ts +5 -4
- package/dist/rules/border-spacing.d.ts +3 -4
- package/dist/rules/border-style.d.ts +5 -4
- package/dist/rules/border-width.d.ts +5 -4
- package/dist/rules/border.d.ts +5 -4
- package/dist/rules/box-decoration-break.d.ts +4 -5
- package/dist/rules/box-shadow.d.ts +4 -5
- package/dist/rules/box-sizing.d.ts +4 -5
- package/dist/rules/break-after.d.ts +3 -4
- package/dist/rules/break-before.d.ts +3 -4
- package/dist/rules/break-inside.d.ts +3 -4
- package/dist/rules/caret-color.d.ts +3 -4
- package/dist/rules/clear.d.ts +3 -4
- package/dist/rules/clip-path.d.ts +4 -5
- package/dist/rules/color.d.ts +4 -5
- package/dist/rules/column-span.d.ts +4 -5
- package/dist/rules/columns.d.ts +4 -5
- package/dist/rules/contain.d.ts +3 -4
- package/dist/rules/content.d.ts +3 -4
- package/dist/rules/counter-increment.d.ts +3 -4
- package/dist/rules/counter-reset.d.ts +5 -0
- package/dist/rules/cursor.d.ts +3 -4
- package/dist/rules/cx.d.ts +3 -4
- package/dist/rules/cy.d.ts +3 -4
- package/dist/rules/direction.d.ts +3 -4
- package/dist/rules/display.d.ts +4 -5
- package/dist/rules/fill.d.ts +3 -4
- package/dist/rules/filter.d.ts +7 -7
- package/dist/rules/flex-basis.d.ts +3 -4
- package/dist/rules/flex-direction.d.ts +4 -5
- package/dist/rules/flex-grow.d.ts +3 -4
- package/dist/rules/flex-shrink.d.ts +3 -4
- package/dist/rules/flex-wrap.d.ts +4 -5
- package/dist/rules/flex.d.ts +3 -4
- package/dist/rules/float.d.ts +3 -4
- package/dist/rules/font-family.d.ts +4 -5
- package/dist/rules/font-feature-settings.d.ts +5 -0
- package/dist/rules/font-size.d.ts +4 -5
- package/dist/rules/font-smoothing.d.ts +5 -4
- package/dist/rules/font-style.d.ts +4 -5
- package/dist/rules/font-variant-numeric.d.ts +4 -5
- package/dist/rules/font-weight.d.ts +4 -5
- package/dist/rules/font.d.ts +4 -5
- package/dist/rules/gap.d.ts +5 -4
- package/dist/rules/grid-area.d.ts +3 -4
- package/dist/rules/grid-auto-columns.d.ts +4 -5
- package/dist/rules/grid-auto-flow.d.ts +4 -5
- package/dist/rules/grid-auto-rows.d.ts +3 -4
- package/dist/rules/grid-column-end.d.ts +4 -5
- package/dist/rules/grid-column-start.d.ts +4 -5
- package/dist/rules/grid-column.d.ts +4 -5
- package/dist/rules/grid-columns.d.ts +4 -5
- package/dist/rules/grid-row-end.d.ts +3 -4
- package/dist/rules/grid-row-start.d.ts +3 -4
- package/dist/rules/grid-row.d.ts +4 -5
- package/dist/rules/grid-rows.d.ts +3 -4
- package/dist/rules/grid-template-areas.d.ts +3 -4
- package/dist/rules/grid-template-columns.d.ts +4 -5
- package/dist/rules/grid-template-rows.d.ts +3 -4
- package/dist/rules/grid-template.d.ts +3 -4
- package/dist/rules/grid.d.ts +3 -4
- package/dist/rules/group.d.ts +10 -6
- package/dist/rules/height.d.ts +4 -5
- package/dist/rules/inset.d.ts +4 -5
- package/dist/rules/isolation.d.ts +3 -4
- package/dist/rules/justify-content.d.ts +4 -5
- package/dist/rules/justify-items.d.ts +4 -5
- package/dist/rules/justify-self.d.ts +4 -5
- package/dist/rules/letter-spacing.d.ts +4 -5
- package/dist/rules/line-clamp.d.ts +3 -4
- package/dist/rules/line-height.d.ts +4 -5
- package/dist/rules/lines.d.ts +5 -4
- package/dist/rules/list-style-image.d.ts +4 -5
- package/dist/rules/list-style-position.d.ts +4 -5
- package/dist/rules/list-style-type.d.ts +4 -5
- package/dist/rules/list-style.d.ts +3 -4
- package/dist/rules/margin.d.ts +5 -4
- package/dist/rules/mask-image.d.ts +3 -4
- package/dist/rules/max-height.d.ts +4 -5
- package/dist/rules/max-wh.d.ts +12 -0
- package/dist/rules/max-width.d.ts +4 -5
- package/dist/rules/min-height.d.ts +4 -5
- package/dist/rules/min-wh.d.ts +12 -0
- package/dist/rules/min-width.d.ts +4 -5
- package/dist/rules/mix-blend-mode.d.ts +4 -5
- package/dist/rules/object-fit.d.ts +4 -5
- package/dist/rules/object-position.d.ts +4 -5
- package/dist/rules/opacity.d.ts +3 -4
- package/dist/rules/order.d.ts +4 -5
- package/dist/rules/outline-color.d.ts +3 -4
- package/dist/rules/outline-offset.d.ts +3 -4
- package/dist/rules/outline-style.d.ts +4 -5
- package/dist/rules/outline-width.d.ts +4 -5
- package/dist/rules/outline.d.ts +3 -4
- package/dist/rules/overflow.d.ts +5 -4
- package/dist/rules/overscroll-behavior.d.ts +5 -4
- package/dist/rules/padding.d.ts +5 -4
- package/dist/rules/place-content.d.ts +3 -4
- package/dist/rules/place-items.d.ts +3 -4
- package/dist/rules/place-self.d.ts +3 -4
- package/dist/rules/pointer-events.d.ts +3 -4
- package/dist/rules/position.d.ts +3 -4
- package/dist/rules/quotes.d.ts +3 -4
- package/dist/rules/resize.d.ts +3 -4
- package/dist/rules/rx.d.ts +3 -4
- package/dist/rules/ry.d.ts +3 -4
- package/dist/rules/scroll-behavior.d.ts +3 -4
- package/dist/rules/scroll-margin.d.ts +5 -4
- package/dist/rules/scroll-padding.d.ts +5 -4
- package/dist/rules/scroll-snap-align.d.ts +4 -5
- package/dist/rules/scroll-snap-stop.d.ts +4 -5
- package/dist/rules/scroll-snap-type.d.ts +4 -5
- package/dist/rules/shape-image-threshold.d.ts +3 -4
- package/dist/rules/shape-margin.d.ts +4 -5
- package/dist/rules/shape-outside.d.ts +4 -5
- package/dist/rules/spacing.d.ts +5 -4
- package/dist/rules/stroke-dasharray.d.ts +3 -4
- package/dist/rules/stroke-dashoffset.d.ts +3 -4
- package/dist/rules/stroke-width.d.ts +4 -5
- package/dist/rules/stroke.d.ts +3 -4
- package/dist/rules/table-layout.d.ts +3 -4
- package/dist/rules/text-align.d.ts +4 -5
- package/dist/rules/text-decoration-color.d.ts +3 -4
- package/dist/rules/text-decoration-line.d.ts +4 -5
- package/dist/rules/text-decoration-style.d.ts +4 -5
- package/dist/rules/text-decoration-thickness.d.ts +4 -5
- package/dist/rules/text-decoration.d.ts +4 -5
- package/dist/rules/text-fill-color.d.ts +5 -4
- package/dist/rules/text-indent.d.ts +3 -4
- package/dist/rules/text-orientation.d.ts +4 -5
- package/dist/rules/text-overflow.d.ts +4 -5
- package/dist/rules/text-rendering.d.ts +4 -5
- package/dist/rules/text-shadow.d.ts +3 -4
- package/dist/rules/text-size.d.ts +5 -4
- package/dist/rules/text-stroke-color.d.ts +5 -4
- package/dist/rules/text-stroke-width.d.ts +5 -4
- package/dist/rules/text-stroke.d.ts +5 -4
- package/dist/rules/text-transform.d.ts +4 -5
- package/dist/rules/text-underline-offset.d.ts +3 -4
- package/dist/rules/touch-action.d.ts +3 -4
- package/dist/rules/transform-box.d.ts +4 -5
- package/dist/rules/transform-origin.d.ts +4 -5
- package/dist/rules/transform-style.d.ts +4 -5
- package/dist/rules/transform.d.ts +6 -7
- package/dist/rules/transition-delay.d.ts +4 -5
- package/dist/rules/transition-duration.d.ts +4 -5
- package/dist/rules/transition-property.d.ts +4 -5
- package/dist/rules/transition-timing-function.d.ts +4 -5
- package/dist/rules/transition.d.ts +3 -4
- package/dist/rules/user-drag.d.ts +3 -4
- package/dist/rules/user-select.d.ts +3 -4
- package/dist/rules/variable.d.ts +5 -4
- package/dist/rules/vertical-align.d.ts +4 -5
- package/dist/rules/visibility.d.ts +3 -4
- package/dist/rules/wh.d.ts +12 -0
- package/dist/rules/white-space.d.ts +3 -4
- package/dist/rules/width.d.ts +4 -5
- package/dist/rules/will-change.d.ts +3 -4
- package/dist/rules/word-break.d.ts +3 -4
- package/dist/rules/word-spacing.d.ts +3 -4
- package/dist/rules/writing-mode.d.ts +4 -5
- package/dist/rules/x.d.ts +3 -4
- package/dist/rules/y.d.ts +3 -4
- package/dist/rules/z-index.d.ts +4 -5
- package/dist/utils/analyze-unit-value.d.ts +4 -0
- package/dist/utils/analyze-value-token.d.ts +3 -0
- package/dist/utils/delay.d.ts +2 -0
- package/dist/utils/is-plain-object.d.ts +1 -1
- package/dist/utils/normalize-css-calc-text.d.ts +1 -1
- package/dist/utils/parse-value-unit.d.ts +2 -2
- package/dist/utils/parse-value.d.ts +1 -2
- package/dist/utils/test-css.d.ts +3 -0
- package/package.json +1 -162
- package/scripts/postinstall.js +22 -0
- package/LICENSE +0 -21
- package/dist/apis/extend.d.ts +0 -5
- package/dist/apis/init.d.ts +0 -3
- package/dist/index.browser.js.map +0 -7
- package/dist/index.cjs.map +0 -7
- package/dist/index.mjs.map +0 -7
- package/dist/rules/aspect-radio.d.ts +0 -7
- package/dist/rules/placement.d.ts +0 -8
- package/readme.md +0 -118
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TextSize";
|
|
4
|
+
static matches: string;
|
|
5
|
+
static get prop(): string;
|
|
5
6
|
get(declaration: any): {
|
|
6
7
|
[key: string]: any;
|
|
7
8
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TextStrokeColor";
|
|
4
|
+
static matches: string;
|
|
5
5
|
static colorStarts: string;
|
|
6
6
|
static colorful: boolean;
|
|
7
|
+
static get prop(): string;
|
|
7
8
|
get(declaration: any): {
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TextStrokeWidth";
|
|
4
|
+
static matches: string;
|
|
5
|
+
static get prop(): string;
|
|
5
6
|
get(declaration: any): {
|
|
6
7
|
[key: string]: any;
|
|
7
8
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TextStroke";
|
|
4
|
+
static matches: string;
|
|
5
|
+
static get prop(): string;
|
|
5
6
|
get(declaration: any): {
|
|
6
7
|
[key: string]: any;
|
|
7
8
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TextTransform";
|
|
4
|
+
static matches: string;
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TransformBox";
|
|
4
|
+
static matches: string;
|
|
6
5
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TransformOrigin";
|
|
4
|
+
static matches: string;
|
|
6
5
|
static unit: string;
|
|
7
6
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TransformStyle";
|
|
4
|
+
static matches: string;
|
|
6
5
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
export default class extends
|
|
4
|
-
static id:
|
|
5
|
-
static matches:
|
|
6
|
-
static propName: string;
|
|
1
|
+
import type { Config } from '../config';
|
|
2
|
+
import Rule from '../rule';
|
|
3
|
+
export default class extends Rule {
|
|
4
|
+
static id: "Transform";
|
|
5
|
+
static matches: string;
|
|
7
6
|
static unit: string;
|
|
8
|
-
parseValue(value: string, { rootSize }:
|
|
7
|
+
parseValue(value: string, { rootSize }: Config): string;
|
|
9
8
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TransitionDelay";
|
|
4
|
+
static matches: string;
|
|
6
5
|
static unit: string;
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TransitionDuration";
|
|
4
|
+
static matches: string;
|
|
6
5
|
static unit: string;
|
|
7
6
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TransitionProperty";
|
|
4
|
+
static matches: string;
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "TransitionTimingFunction";
|
|
4
|
+
static matches: string;
|
|
6
5
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "Transition";
|
|
4
4
|
static symbol: string;
|
|
5
|
-
static propName: string;
|
|
6
5
|
order: number;
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "UserDrag";
|
|
5
4
|
get(declaration: any): {
|
|
6
5
|
[key: string]: any;
|
|
7
6
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "UserSelect";
|
|
5
4
|
get(declaration: any): {
|
|
6
5
|
[key: string]: any;
|
|
7
6
|
};
|
package/dist/rules/variable.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "Variable";
|
|
4
|
+
static matches: string;
|
|
5
5
|
static unit: string;
|
|
6
|
+
static get prop(): string;
|
|
6
7
|
get(declaration: any): {
|
|
7
8
|
[key: string]: any;
|
|
8
9
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "VerticalAlign";
|
|
4
|
+
static matches: string;
|
|
6
5
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "WH";
|
|
4
|
+
static matches: string;
|
|
5
|
+
static get prop(): string;
|
|
6
|
+
analyzeToken(token: string, values: Record<string, string | number>, globalValues: Record<string, string | number>): [string, Array<string | {
|
|
7
|
+
value: string;
|
|
8
|
+
}>, string];
|
|
9
|
+
get(declaration: any): {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
}
|
package/dist/rules/width.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "Width";
|
|
4
|
+
static matches: string;
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "WritingMode";
|
|
4
|
+
static matches: string;
|
|
6
5
|
}
|
package/dist/rules/x.d.ts
CHANGED
package/dist/rules/y.d.ts
CHANGED
package/dist/rules/z-index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class extends
|
|
3
|
-
static id:
|
|
4
|
-
static matches:
|
|
5
|
-
static propName: string;
|
|
1
|
+
import Rule from '../rule';
|
|
2
|
+
export default class extends Rule {
|
|
3
|
+
static id: "ZIndex";
|
|
4
|
+
static matches: string;
|
|
6
5
|
static unit: string;
|
|
7
6
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function parseValueUnit(value: string, getUnit: (method: string) => string, { rootSize }:
|
|
1
|
+
import type { Config } from '../config';
|
|
2
|
+
export declare function parseValueUnit(value: string, getUnit: (method: string) => string, { rootSize }: Config): string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export declare function parseValue(token: string | number, defaultUnit?: string,
|
|
1
|
+
export declare function parseValue(token: string | number, defaultUnit?: string, colorNames?: string[], colorThemesMap?: Record<string, Record<string, string>>, rootSize?: number, themes?: string[]): {
|
|
2
2
|
value: string;
|
|
3
3
|
unit: string;
|
|
4
|
-
unitToken: string;
|
|
5
4
|
colorMatched?: boolean;
|
|
6
5
|
};
|
package/package.json
CHANGED
|
@@ -1,162 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@master/css",
|
|
3
|
-
"license": "MIT",
|
|
4
|
-
"description": "A Virtual CSS language with enhanced syntax. ( ~13KB )",
|
|
5
|
-
"author": "Aoyue Design LLC.",
|
|
6
|
-
"funding": "https://docs.master.co/css/donate",
|
|
7
|
-
"homepage": "https://css.master.co",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/master-co/css.git"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [
|
|
13
|
-
"style",
|
|
14
|
-
"styles",
|
|
15
|
-
"html",
|
|
16
|
-
"variants",
|
|
17
|
-
"virtual",
|
|
18
|
-
"virtual-css",
|
|
19
|
-
"utility",
|
|
20
|
-
"css",
|
|
21
|
-
"ui",
|
|
22
|
-
"lightweight",
|
|
23
|
-
"class",
|
|
24
|
-
"webpack",
|
|
25
|
-
"plugin",
|
|
26
|
-
"integration",
|
|
27
|
-
"vite",
|
|
28
|
-
"parcel",
|
|
29
|
-
"build-tools",
|
|
30
|
-
"mastercss"
|
|
31
|
-
],
|
|
32
|
-
"sideEffects": [
|
|
33
|
-
"./src/polyfills/css-escape.ts"
|
|
34
|
-
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build:iife": "esbuild src/index.ts --bundle --outfile=dist/index.browser.js --format=iife",
|
|
37
|
-
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.cjs --format=cjs --platform=node",
|
|
38
|
-
"build:esm": "esbuild src/index.ts --bundle --outfile=dist/index.mjs --format=esm --platform=node",
|
|
39
|
-
"build:css": "esbuild src/index.css --bundle --outfile=dist/index.css",
|
|
40
|
-
"dev:iife": "npm run build:iife -- --watch",
|
|
41
|
-
"dev:cjs": "npm run build:cjs -- --watch",
|
|
42
|
-
"dev:esm": "npm run build:esm -- --watch",
|
|
43
|
-
"prod": "rm -rf dist && npm run build:cjs -- --minify --sourcemap && npm run build:iife -- --minify --sourcemap && npm run build:esm -- --minify --sourcemap && tsc --emitDeclarationOnly",
|
|
44
|
-
"test": "jest",
|
|
45
|
-
"lint": "eslint ./src"
|
|
46
|
-
},
|
|
47
|
-
"main": "./dist/index.cjs",
|
|
48
|
-
"jsnext:main": "./dist/index.mjs",
|
|
49
|
-
"browser": "./dist/index.browser.js",
|
|
50
|
-
"esnext": "./dist/index.mjs",
|
|
51
|
-
"module": "./dist/index.mjs",
|
|
52
|
-
"types": "./dist/index.d.ts",
|
|
53
|
-
"exports": {
|
|
54
|
-
".": {
|
|
55
|
-
"require": "./dist/index.cjs",
|
|
56
|
-
"import": "./dist/index.mjs",
|
|
57
|
-
"types": "./dist/index.d.ts"
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"jest": {
|
|
61
|
-
"testEnvironment": "node",
|
|
62
|
-
"transform": {
|
|
63
|
-
"^.+\\.(t|j)sx?$": "@swc/jest"
|
|
64
|
-
},
|
|
65
|
-
"testMatch": [
|
|
66
|
-
"<rootDir>/tests/*.ts",
|
|
67
|
-
"<rootDir>/src/**/*.test.ts"
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
"private": false,
|
|
71
|
-
"publishConfig": {
|
|
72
|
-
"access": "public"
|
|
73
|
-
},
|
|
74
|
-
"engines": {
|
|
75
|
-
"node": ">=14"
|
|
76
|
-
},
|
|
77
|
-
"release": {
|
|
78
|
-
"plugins": [
|
|
79
|
-
[
|
|
80
|
-
"@semantic-release/commit-analyzer",
|
|
81
|
-
{
|
|
82
|
-
"preset": "angular",
|
|
83
|
-
"releaseRules": [
|
|
84
|
-
{
|
|
85
|
-
"type": "docs",
|
|
86
|
-
"scope": "README",
|
|
87
|
-
"release": "patch"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"type": "refactor",
|
|
91
|
-
"release": "patch"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"type": "style",
|
|
95
|
-
"release": "patch"
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
"parserOpts": {
|
|
99
|
-
"noteKeywords": [
|
|
100
|
-
"BREAKING CHANGE",
|
|
101
|
-
"BREAKING CHANGES"
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"@semantic-release/release-notes-generator",
|
|
107
|
-
[
|
|
108
|
-
"@semantic-release/exec",
|
|
109
|
-
{
|
|
110
|
-
"prepareCmd": "npm run prod"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
[
|
|
114
|
-
"@semantic-release/github",
|
|
115
|
-
{
|
|
116
|
-
"assets": [
|
|
117
|
-
{
|
|
118
|
-
"path": "dist/index.browser.js",
|
|
119
|
-
"label": "master-css.min.js"
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
[
|
|
125
|
-
"@semantic-release/npm"
|
|
126
|
-
]
|
|
127
|
-
],
|
|
128
|
-
"branches": [
|
|
129
|
-
"+([0-9])?(.{+([0-9]),x}).x",
|
|
130
|
-
"main",
|
|
131
|
-
"next",
|
|
132
|
-
"next-major",
|
|
133
|
-
{
|
|
134
|
-
"name": "beta",
|
|
135
|
-
"prerelease": true
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "alpha",
|
|
139
|
-
"prerelease": true
|
|
140
|
-
}
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
|
-
"files": [
|
|
144
|
-
"dist"
|
|
145
|
-
],
|
|
146
|
-
"devDependencies": {
|
|
147
|
-
"@semantic-release/exec": "^6.0.3",
|
|
148
|
-
"@swc/core": "^1.3.9",
|
|
149
|
-
"@swc/jest": "^0.2.23",
|
|
150
|
-
"@types/jest": "^29.2.0",
|
|
151
|
-
"@types/node": "^18.11.0",
|
|
152
|
-
"@typescript-eslint/eslint-plugin": "^5.40.1",
|
|
153
|
-
"@typescript-eslint/parser": "^5.40.1",
|
|
154
|
-
"esbuild": "^0.15.10",
|
|
155
|
-
"eslint": "^8.25.0",
|
|
156
|
-
"jest": "^29.2.2",
|
|
157
|
-
"semantic-release": "^19.0.5",
|
|
158
|
-
"typescript": "^4.8.4",
|
|
159
|
-
"dedent": "^0.7.0"
|
|
160
|
-
},
|
|
161
|
-
"version": "2.0.0-beta.10"
|
|
162
|
-
}
|
|
1
|
+
{"name":"@master/css","scripts":{"build":"aron pack --platform=node","dev":"npm run build -- --watch","test":"jest","type-check":"tsc --noEmit","lint":"eslint src","postinstall":"node scripts/postinstall.js"},"license":"MIT","description":"A Virtual CSS language with enhanced syntax ~13KB","author":"Aoyue Design LLC.","funding":"https://docs.master.co/css/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":["./src/polyfills/css-escape.ts"],"main":"./dist/index.cjs","jsnext:main":"./dist/index.mjs","browser":"./dist/index.browser.js","esnext":"./dist/index.mjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs","types":"./dist/index.d.ts"}},"files":["dist","scripts"],"publishConfig":{"access":"public"},"dependencies":{"@master/keyframes.css":"^2.0.0-beta.100","@master/normal.css":"^2.0.0-beta.100"},"devDependencies":{"to-extend":"^1.4.6"},"version":"2.0.0-beta.100"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
if (process.env.INIT_CWD === process.cwd()) {
|
|
2
|
+
process.exit()
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
const path = require('path')
|
|
6
|
+
const fs = require('fs')
|
|
7
|
+
|
|
8
|
+
const projectPath = path.resolve(process.cwd(), '../..')
|
|
9
|
+
if (!fs.existsSync(path.join(projectPath, 'master.css.js'))) {
|
|
10
|
+
try {
|
|
11
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(projectPath, 'package.json')))
|
|
12
|
+
let data = `/** @type {import('@master/css').Config} */\n`
|
|
13
|
+
if (packageJson.type === 'module') {
|
|
14
|
+
data += 'export default {\n}'
|
|
15
|
+
} else {
|
|
16
|
+
data += 'module.exports = {\n}'
|
|
17
|
+
}
|
|
18
|
+
fs.writeFileSync(path.join(projectPath, 'master.css.js'), data)
|
|
19
|
+
} catch (_) {
|
|
20
|
+
/* empty */
|
|
21
|
+
}
|
|
22
|
+
}
|