@niche-works/style-layouts 0.3.0 → 0.4.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/README.ja.md +8 -8
- package/README.md +8 -8
- package/balance/index.cjs +6 -2
- package/balance/index.mjs +6 -2
- package/center/index.cjs +6 -2
- package/center/index.mjs +6 -2
- package/constants.cjs +1 -50
- package/constants.d.cts +2 -2
- package/constants.d.mts +2 -2
- package/constants.mjs +2 -2
- package/core/_constants.cjs +287 -34
- package/core/_constants.d.cts +206 -1
- package/core/_constants.d.mts +206 -1
- package/core/_constants.mjs +206 -3
- package/core/_internal/applyChildCount.cjs +6 -8
- package/core/_internal/applyChildCount.mjs +6 -6
- package/core/_internal/applyChildRatio.cjs +4 -6
- package/core/_internal/applyChildRatio.mjs +3 -3
- package/core/_internal/applyChildSize.cjs +6 -8
- package/core/_internal/applyChildSize.mjs +4 -4
- package/core/_internal/applyGap.cjs +6 -8
- package/core/_internal/applyGap.mjs +4 -4
- package/core/_internal/mergeClassName.cjs +11 -0
- package/core/_internal/mergeClassName.d.cts +3 -0
- package/core/_internal/mergeClassName.d.mts +4 -0
- package/core/_internal/mergeClassName.mjs +10 -0
- package/core/_internal/mergeLayoutResults.cjs +2 -4
- package/core/_internal/mergeLayoutResults.mjs +2 -2
- package/core/_types.d.cts +1 -9
- package/core/_types.d.mts +1 -9
- package/core/balance/balance.cjs +4 -4
- package/core/balance/balance.d.cts +2 -0
- package/core/balance/balance.d.mts +2 -0
- package/core/balance/balance.mjs +5 -4
- package/core/balance/styles.css +38 -6
- package/core/center/center.cjs +3 -4
- package/core/center/center.d.cts +1 -0
- package/core/center/center.d.mts +1 -0
- package/core/center/center.mjs +4 -4
- package/core/center/styles.css +4 -26
- package/core/constants.cjs +4 -255
- package/core/constants.d.cts +4 -206
- package/core/constants.d.mts +4 -206
- package/core/constants.mjs +4 -206
- package/core/flow/flow.cjs +5 -7
- package/core/flow/flow.mjs +6 -7
- package/core/index.d.cts +2 -2
- package/core/index.d.mts +2 -2
- package/core/layer/layer.cjs +2 -4
- package/core/layer/layer.mjs +3 -4
- package/core/layer/styles.css +0 -4
- package/core/matrix/matrix.cjs +3 -4
- package/core/matrix/matrix.d.cts +1 -0
- package/core/matrix/matrix.d.mts +1 -0
- package/core/matrix/matrix.mjs +4 -4
- package/core/matrix/styles.css +0 -6
- package/core/pack/pack.cjs +2 -4
- package/core/pack/pack.mjs +3 -4
- package/core/pin/pin.cjs +2 -2
- package/core/pin/pin.mjs +1 -1
- package/core/stack/stack.cjs +12 -14
- package/core/stack/stack.d.cts +1 -1
- package/core/stack/stack.d.mts +1 -1
- package/core/stack/stack.mjs +13 -14
- package/core/stack/styles.css +0 -2
- package/core/styles.css +42 -44
- package/core/tile/tile.cjs +2 -4
- package/core/tile/tile.mjs +3 -4
- package/core/types.d.cts +7 -2
- package/core/types.d.mts +7 -2
- package/flow/index.cjs +6 -2
- package/flow/index.mjs +6 -2
- package/helpers/_internal/constants.cjs +25 -0
- package/helpers/_internal/constants.d.cts +13 -0
- package/helpers/_internal/constants.d.mts +13 -0
- package/helpers/_internal/constants.mjs +16 -0
- package/helpers/_internal/createExtractLayoutOptions.cjs +25 -0
- package/helpers/_internal/createExtractLayoutOptions.d.cts +8 -0
- package/helpers/_internal/createExtractLayoutOptions.d.mts +9 -0
- package/helpers/_internal/createExtractLayoutOptions.mjs +24 -0
- package/helpers/extractBalanceOptions.cjs +15 -0
- package/helpers/extractBalanceOptions.d.cts +5 -0
- package/helpers/extractBalanceOptions.d.mts +6 -0
- package/helpers/extractBalanceOptions.mjs +15 -0
- package/helpers/extractCenterOptions.cjs +14 -0
- package/helpers/extractCenterOptions.d.cts +6 -0
- package/helpers/extractCenterOptions.d.mts +7 -0
- package/helpers/extractCenterOptions.mjs +14 -0
- package/helpers/extractFlowOptions.cjs +15 -0
- package/helpers/extractFlowOptions.d.cts +6 -0
- package/helpers/extractFlowOptions.d.mts +7 -0
- package/helpers/extractFlowOptions.mjs +15 -0
- package/helpers/extractLayerOptions.cjs +13 -0
- package/helpers/extractLayerOptions.d.cts +6 -0
- package/helpers/extractLayerOptions.d.mts +7 -0
- package/helpers/extractLayerOptions.mjs +13 -0
- package/helpers/extractMatrixOptions.cjs +17 -0
- package/helpers/extractMatrixOptions.d.cts +5 -0
- package/helpers/extractMatrixOptions.d.mts +6 -0
- package/helpers/extractMatrixOptions.mjs +17 -0
- package/helpers/extractPackOptions.cjs +8 -0
- package/helpers/extractPackOptions.d.cts +6 -0
- package/helpers/extractPackOptions.d.mts +7 -0
- package/helpers/extractPackOptions.mjs +8 -0
- package/helpers/extractPinOptions.cjs +8 -0
- package/helpers/extractPinOptions.d.cts +6 -0
- package/helpers/extractPinOptions.d.mts +7 -0
- package/helpers/extractPinOptions.mjs +8 -0
- package/helpers/extractStackOptions.cjs +15 -0
- package/helpers/extractStackOptions.d.cts +6 -0
- package/helpers/extractStackOptions.d.mts +7 -0
- package/helpers/extractStackOptions.mjs +15 -0
- package/helpers/extractTileOptions.cjs +15 -0
- package/helpers/extractTileOptions.d.cts +6 -0
- package/helpers/extractTileOptions.d.mts +7 -0
- package/helpers/extractTileOptions.mjs +15 -0
- package/helpers/index.cjs +20 -0
- package/helpers/index.d.cts +10 -0
- package/helpers/index.d.mts +10 -0
- package/helpers/index.mjs +11 -0
- package/index.cjs +18 -18
- package/index.d.cts +2 -2
- package/index.d.mts +2 -2
- package/index.mjs +10 -10
- package/layer/index.cjs +6 -2
- package/layer/index.mjs +6 -2
- package/matrix/index.cjs +6 -2
- package/matrix/index.mjs +6 -2
- package/pack/index.cjs +6 -2
- package/pack/index.mjs +6 -2
- package/package.json +6 -4
- package/pin/index.cjs +6 -2
- package/pin/index.mjs +6 -2
- package/stack/index.cjs +6 -2
- package/stack/index.mjs +6 -2
- package/tile/index.cjs +6 -2
- package/tile/index.mjs +6 -2
- package/types.d.cts +2 -2
- package/types.d.mts +2 -2
- package/core/_internal/warnIfUnsupported.cjs +0 -15
- package/core/_internal/warnIfUnsupported.d.cts +0 -3
- package/core/_internal/warnIfUnsupported.d.mts +0 -4
- package/core/_internal/warnIfUnsupported.mjs +0 -14
package/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import balance_default from "./balance/index.mjs";
|
|
2
|
+
import center_default from "./center/index.mjs";
|
|
3
|
+
import flow_default from "./flow/index.mjs";
|
|
4
|
+
import layer_default from "./layer/index.mjs";
|
|
5
|
+
import matrix_default from "./matrix/index.mjs";
|
|
6
|
+
import pack_default from "./pack/index.mjs";
|
|
7
|
+
import pin_default from "./pin/index.mjs";
|
|
8
|
+
import stack_default from "./stack/index.mjs";
|
|
9
|
+
import tile_default from "./tile/index.mjs";
|
|
10
10
|
|
|
11
|
-
export { balance, center, flow, layer, matrix, pack, pin, stack, tile };
|
|
11
|
+
export { balance_default as balance, center_default as center, flow_default as flow, layer_default as layer, matrix_default as matrix, pack_default as pack, pin_default as pin, stack_default as stack, tile_default as tile };
|
package/layer/index.cjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
require('../core/layer/styles.css');
|
|
2
1
|
const require_core_layer_layer = require('../core/layer/layer.cjs');
|
|
2
|
+
require('../core/layer/styles.css');
|
|
3
|
+
|
|
4
|
+
//#region src/layer/index.ts
|
|
5
|
+
var layer_default = require_core_layer_layer;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
module.exports = layer_default;
|
package/layer/index.mjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import "../core/layer/styles.css";
|
|
2
1
|
import layer from "../core/layer/layer.mjs";
|
|
2
|
+
import "../core/layer/styles.css";
|
|
3
|
+
|
|
4
|
+
//#region src/layer/index.ts
|
|
5
|
+
var layer_default = layer;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { layer_default as default };
|
package/matrix/index.cjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
require('../core/matrix/styles.css');
|
|
2
1
|
const require_core_matrix_matrix = require('../core/matrix/matrix.cjs');
|
|
2
|
+
require('../core/matrix/styles.css');
|
|
3
|
+
|
|
4
|
+
//#region src/matrix/index.ts
|
|
5
|
+
var matrix_default = require_core_matrix_matrix;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
module.exports = matrix_default;
|
package/matrix/index.mjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import "../core/matrix/styles.css";
|
|
2
1
|
import matrix from "../core/matrix/matrix.mjs";
|
|
2
|
+
import "../core/matrix/styles.css";
|
|
3
|
+
|
|
4
|
+
//#region src/matrix/index.ts
|
|
5
|
+
var matrix_default = matrix;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { matrix_default as default };
|
package/pack/index.cjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
require('../core/pack/styles.css');
|
|
2
1
|
const require_core_pack_pack = require('../core/pack/pack.cjs');
|
|
2
|
+
require('../core/pack/styles.css');
|
|
3
|
+
|
|
4
|
+
//#region src/pack/index.ts
|
|
5
|
+
var pack_default = require_core_pack_pack;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
module.exports = pack_default;
|
package/pack/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@niche-works/style-layouts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"css",
|
|
6
6
|
"style",
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
"import": "./core/constants.mjs",
|
|
38
38
|
"require": "./core/constants.cjs"
|
|
39
39
|
},
|
|
40
|
+
"./helpers/*": {
|
|
41
|
+
"import": "./helpers/*.mjs",
|
|
42
|
+
"require": "./helpers/*.cjs"
|
|
43
|
+
},
|
|
40
44
|
"./core/styles.css": "./core/styles.css",
|
|
41
45
|
"./core/*.css": "./core/*/styles.css"
|
|
42
46
|
},
|
|
@@ -44,8 +48,6 @@
|
|
|
44
48
|
"module": "./index.mjs",
|
|
45
49
|
"dependencies": {
|
|
46
50
|
"@niche-works/types": "^0.3.1",
|
|
47
|
-
"@niche-works/utils": "^0.4.0"
|
|
48
|
-
"clsx": "^2.1.1",
|
|
49
|
-
"csstype": "^3.2.3"
|
|
51
|
+
"@niche-works/utils": "^0.4.0"
|
|
50
52
|
}
|
|
51
53
|
}
|
package/pin/index.cjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
require('../core/pin/styles.css');
|
|
2
1
|
const require_core_pin_pin = require('../core/pin/pin.cjs');
|
|
2
|
+
require('../core/pin/styles.css');
|
|
3
|
+
|
|
4
|
+
//#region src/pin/index.ts
|
|
5
|
+
var pin_default = require_core_pin_pin;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
module.exports = pin_default;
|
package/pin/index.mjs
CHANGED
package/stack/index.cjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
require('../core/stack/styles.css');
|
|
2
1
|
const require_core_stack_stack = require('../core/stack/stack.cjs');
|
|
2
|
+
require('../core/stack/styles.css');
|
|
3
|
+
|
|
4
|
+
//#region src/stack/index.ts
|
|
5
|
+
var stack_default = require_core_stack_stack;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
module.exports = stack_default;
|
package/stack/index.mjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import "../core/stack/styles.css";
|
|
2
1
|
import stack from "../core/stack/stack.mjs";
|
|
2
|
+
import "../core/stack/styles.css";
|
|
3
|
+
|
|
4
|
+
//#region src/stack/index.ts
|
|
5
|
+
var stack_default = stack;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
export { stack_default as default };
|
package/tile/index.cjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
require('../core/tile/styles.css');
|
|
2
1
|
const require_core_tile_tile = require('../core/tile/tile.cjs');
|
|
2
|
+
require('../core/tile/styles.css');
|
|
3
|
+
|
|
4
|
+
//#region src/tile/index.ts
|
|
5
|
+
var tile_default = require_core_tile_tile;
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
//#endregion
|
|
8
|
+
module.exports = tile_default;
|
package/tile/index.mjs
CHANGED
package/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StyleLayout, StyleLayoutResult } from "./core/types.cjs";
|
|
2
|
-
export { StyleLayout, StyleLayoutResult };
|
|
1
|
+
import { CSSCustomProperties, StyleLayout, StyleLayoutResult } from "./core/types.cjs";
|
|
2
|
+
export { CSSCustomProperties, StyleLayout, StyleLayoutResult };
|
package/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StyleLayout, StyleLayoutResult } from "./core/types.mjs";
|
|
2
|
-
export { StyleLayout, StyleLayoutResult };
|
|
1
|
+
import { CSSCustomProperties, StyleLayout, StyleLayoutResult } from "./core/types.mjs";
|
|
2
|
+
export { CSSCustomProperties, StyleLayout, StyleLayoutResult };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/core/_internal/warnIfUnsupported.ts
|
|
3
|
-
const _checkCSSSupport = (property, value) => {
|
|
4
|
-
if (typeof CSS === "undefined" || !CSS.supports) return true;
|
|
5
|
-
return CSS.supports(property, value);
|
|
6
|
-
};
|
|
7
|
-
function warnIfUnsupported(layout, checks) {
|
|
8
|
-
if (process.env.NODE_ENV === "production") return;
|
|
9
|
-
checks.forEach(([property, value]) => {
|
|
10
|
-
if (!_checkCSSSupport(property, value)) console.warn(`[@niche-works/style-layouts] "${property}: ${value}" is not supported in this browser. The "${layout}" layout may not work as expected.`);
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
module.exports = warnIfUnsupported;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/core/_internal/warnIfUnsupported.ts
|
|
2
|
-
const _checkCSSSupport = (property, value) => {
|
|
3
|
-
if (typeof CSS === "undefined" || !CSS.supports) return true;
|
|
4
|
-
return CSS.supports(property, value);
|
|
5
|
-
};
|
|
6
|
-
function warnIfUnsupported(layout, checks) {
|
|
7
|
-
if (process.env.NODE_ENV === "production") return;
|
|
8
|
-
checks.forEach(([property, value]) => {
|
|
9
|
-
if (!_checkCSSSupport(property, value)) console.warn(`[@niche-works/style-layouts] "${property}: ${value}" is not supported in this browser. The "${layout}" layout may not work as expected.`);
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { warnIfUnsupported as default };
|