@niche-works/style-layouts 0.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.
Files changed (227) hide show
  1. package/LICENSE +21 -0
  2. package/README.ja.md +320 -0
  3. package/README.md +320 -0
  4. package/_virtual/_rolldown/runtime.cjs +29 -0
  5. package/balance/index.cjs +4 -0
  6. package/balance/index.d.cts +3 -0
  7. package/balance/index.d.mts +3 -0
  8. package/balance/index.mjs +4 -0
  9. package/center/index.cjs +4 -0
  10. package/center/index.d.cts +3 -0
  11. package/center/index.d.mts +3 -0
  12. package/center/index.mjs +4 -0
  13. package/constants.cjs +59 -0
  14. package/constants.d.cts +2 -0
  15. package/constants.d.mts +2 -0
  16. package/constants.mjs +3 -0
  17. package/core/_constants.cjs +94 -0
  18. package/core/_constants.d.cts +83 -0
  19. package/core/_constants.d.mts +83 -0
  20. package/core/_constants.mjs +86 -0
  21. package/core/_internal/applyChildCount.cjs +26 -0
  22. package/core/_internal/applyChildCount.d.cts +11 -0
  23. package/core/_internal/applyChildCount.d.mts +12 -0
  24. package/core/_internal/applyChildCount.mjs +24 -0
  25. package/core/_internal/applyChildRatio.cjs +22 -0
  26. package/core/_internal/applyChildRatio.d.cts +11 -0
  27. package/core/_internal/applyChildRatio.d.mts +12 -0
  28. package/core/_internal/applyChildRatio.mjs +20 -0
  29. package/core/_internal/applyChildSize.cjs +27 -0
  30. package/core/_internal/applyChildSize.d.cts +11 -0
  31. package/core/_internal/applyChildSize.d.mts +12 -0
  32. package/core/_internal/applyChildSize.mjs +25 -0
  33. package/core/_internal/applyGap.cjs +30 -0
  34. package/core/_internal/applyGap.d.cts +12 -0
  35. package/core/_internal/applyGap.d.mts +13 -0
  36. package/core/_internal/applyGap.mjs +28 -0
  37. package/core/_internal/hasValue.cjs +15 -0
  38. package/core/_internal/hasValue.d.cts +8 -0
  39. package/core/_internal/hasValue.d.mts +9 -0
  40. package/core/_internal/hasValue.mjs +14 -0
  41. package/core/_internal/mergeLayoutResults.cjs +18 -0
  42. package/core/_internal/mergeLayoutResults.d.cts +5 -0
  43. package/core/_internal/mergeLayoutResults.d.mts +6 -0
  44. package/core/_internal/mergeLayoutResults.mjs +16 -0
  45. package/core/_internal/unit.cjs +16 -0
  46. package/core/_internal/unit.d.cts +10 -0
  47. package/core/_internal/unit.d.mts +11 -0
  48. package/core/_internal/unit.mjs +15 -0
  49. package/core/_internal/warnIfUnsupported.cjs +15 -0
  50. package/core/_internal/warnIfUnsupported.d.cts +3 -0
  51. package/core/_internal/warnIfUnsupported.d.mts +4 -0
  52. package/core/_internal/warnIfUnsupported.mjs +14 -0
  53. package/core/_styles.scss.cjs +1 -0
  54. package/core/_styles.scss.d.cts +1 -0
  55. package/core/_styles.scss.d.mts +1 -0
  56. package/core/_styles.scss.mjs +3 -0
  57. package/core/_types.cjs +0 -0
  58. package/core/_types.d.cts +123 -0
  59. package/core/_types.d.mts +123 -0
  60. package/core/_types.mjs +1 -0
  61. package/core/balance/balance.cjs +35 -0
  62. package/core/balance/balance.d.cts +11 -0
  63. package/core/balance/balance.d.mts +12 -0
  64. package/core/balance/balance.mjs +32 -0
  65. package/core/balance/index.cjs +3 -0
  66. package/core/balance/index.d.cts +3 -0
  67. package/core/balance/index.d.mts +3 -0
  68. package/core/balance/index.mjs +3 -0
  69. package/core/balance/styles.css +113 -0
  70. package/core/balance/types.cjs +0 -0
  71. package/core/balance/types.d.cts +21 -0
  72. package/core/balance/types.d.mts +21 -0
  73. package/core/balance/types.mjs +1 -0
  74. package/core/center/center.cjs +31 -0
  75. package/core/center/center.d.cts +11 -0
  76. package/core/center/center.d.mts +12 -0
  77. package/core/center/center.mjs +28 -0
  78. package/core/center/index.cjs +3 -0
  79. package/core/center/index.d.cts +3 -0
  80. package/core/center/index.d.mts +3 -0
  81. package/core/center/index.mjs +3 -0
  82. package/core/center/styles.css +166 -0
  83. package/core/center/types.cjs +0 -0
  84. package/core/center/types.d.cts +9 -0
  85. package/core/center/types.d.mts +9 -0
  86. package/core/center/types.mjs +1 -0
  87. package/core/constants.cjs +362 -0
  88. package/core/constants.d.cts +316 -0
  89. package/core/constants.d.mts +316 -0
  90. package/core/constants.mjs +305 -0
  91. package/core/flow/flow.cjs +71 -0
  92. package/core/flow/flow.d.cts +12 -0
  93. package/core/flow/flow.d.mts +13 -0
  94. package/core/flow/flow.mjs +68 -0
  95. package/core/flow/index.cjs +3 -0
  96. package/core/flow/index.d.cts +3 -0
  97. package/core/flow/index.d.mts +3 -0
  98. package/core/flow/index.mjs +3 -0
  99. package/core/flow/styles.css +166 -0
  100. package/core/flow/types.cjs +0 -0
  101. package/core/flow/types.d.cts +21 -0
  102. package/core/flow/types.d.mts +21 -0
  103. package/core/flow/types.mjs +1 -0
  104. package/core/index.cjs +20 -0
  105. package/core/index.d.cts +20 -0
  106. package/core/index.d.mts +20 -0
  107. package/core/index.mjs +11 -0
  108. package/core/layer/index.cjs +3 -0
  109. package/core/layer/index.d.cts +3 -0
  110. package/core/layer/index.d.mts +3 -0
  111. package/core/layer/index.mjs +3 -0
  112. package/core/layer/layer.cjs +34 -0
  113. package/core/layer/layer.d.cts +13 -0
  114. package/core/layer/layer.d.mts +14 -0
  115. package/core/layer/layer.mjs +31 -0
  116. package/core/layer/styles.css +64 -0
  117. package/core/layer/types.cjs +0 -0
  118. package/core/layer/types.d.cts +13 -0
  119. package/core/layer/types.d.mts +13 -0
  120. package/core/layer/types.mjs +1 -0
  121. package/core/matrix/index.cjs +3 -0
  122. package/core/matrix/index.d.cts +3 -0
  123. package/core/matrix/index.d.mts +3 -0
  124. package/core/matrix/index.mjs +3 -0
  125. package/core/matrix/matrix.cjs +110 -0
  126. package/core/matrix/matrix.d.cts +11 -0
  127. package/core/matrix/matrix.d.mts +12 -0
  128. package/core/matrix/matrix.mjs +107 -0
  129. package/core/matrix/styles.css +63 -0
  130. package/core/matrix/types.cjs +0 -0
  131. package/core/matrix/types.d.cts +46 -0
  132. package/core/matrix/types.d.mts +46 -0
  133. package/core/matrix/types.mjs +1 -0
  134. package/core/pack/index.cjs +3 -0
  135. package/core/pack/index.d.cts +3 -0
  136. package/core/pack/index.d.mts +3 -0
  137. package/core/pack/index.mjs +3 -0
  138. package/core/pack/pack.cjs +27 -0
  139. package/core/pack/pack.d.cts +11 -0
  140. package/core/pack/pack.d.mts +12 -0
  141. package/core/pack/pack.mjs +24 -0
  142. package/core/pack/styles.css +36 -0
  143. package/core/pack/types.cjs +0 -0
  144. package/core/pack/types.d.cts +6 -0
  145. package/core/pack/types.d.mts +6 -0
  146. package/core/pack/types.mjs +1 -0
  147. package/core/pin/index.cjs +3 -0
  148. package/core/pin/index.d.cts +3 -0
  149. package/core/pin/index.d.mts +3 -0
  150. package/core/pin/index.mjs +3 -0
  151. package/core/pin/pin.cjs +23 -0
  152. package/core/pin/pin.d.cts +11 -0
  153. package/core/pin/pin.d.mts +12 -0
  154. package/core/pin/pin.mjs +23 -0
  155. package/core/pin/styles.css +18 -0
  156. package/core/pin/types.cjs +0 -0
  157. package/core/pin/types.d.cts +6 -0
  158. package/core/pin/types.d.mts +6 -0
  159. package/core/pin/types.mjs +1 -0
  160. package/core/stack/index.cjs +3 -0
  161. package/core/stack/index.d.cts +3 -0
  162. package/core/stack/index.d.mts +3 -0
  163. package/core/stack/index.mjs +3 -0
  164. package/core/stack/stack.cjs +99 -0
  165. package/core/stack/stack.d.cts +11 -0
  166. package/core/stack/stack.d.mts +12 -0
  167. package/core/stack/stack.mjs +96 -0
  168. package/core/stack/styles.css +175 -0
  169. package/core/stack/types.cjs +0 -0
  170. package/core/stack/types.d.cts +21 -0
  171. package/core/stack/types.d.mts +21 -0
  172. package/core/stack/types.mjs +1 -0
  173. package/core/styles.css +917 -0
  174. package/core/tile/index.cjs +3 -0
  175. package/core/tile/index.d.cts +3 -0
  176. package/core/tile/index.d.mts +3 -0
  177. package/core/tile/index.mjs +3 -0
  178. package/core/tile/styles.css +108 -0
  179. package/core/tile/tile.cjs +86 -0
  180. package/core/tile/tile.d.cts +12 -0
  181. package/core/tile/tile.d.mts +13 -0
  182. package/core/tile/tile.mjs +83 -0
  183. package/core/tile/types.cjs +0 -0
  184. package/core/tile/types.d.cts +9 -0
  185. package/core/tile/types.d.mts +9 -0
  186. package/core/tile/types.mjs +1 -0
  187. package/core/types.cjs +0 -0
  188. package/core/types.d.cts +23 -0
  189. package/core/types.d.mts +23 -0
  190. package/core/types.mjs +1 -0
  191. package/flow/index.cjs +4 -0
  192. package/flow/index.d.cts +3 -0
  193. package/flow/index.d.mts +3 -0
  194. package/flow/index.mjs +4 -0
  195. package/index.cjs +20 -0
  196. package/index.d.cts +20 -0
  197. package/index.d.mts +20 -0
  198. package/index.mjs +11 -0
  199. package/layer/index.cjs +4 -0
  200. package/layer/index.d.cts +3 -0
  201. package/layer/index.d.mts +3 -0
  202. package/layer/index.mjs +4 -0
  203. package/matrix/index.cjs +4 -0
  204. package/matrix/index.d.cts +3 -0
  205. package/matrix/index.d.mts +3 -0
  206. package/matrix/index.mjs +4 -0
  207. package/pack/index.cjs +4 -0
  208. package/pack/index.d.cts +3 -0
  209. package/pack/index.d.mts +3 -0
  210. package/pack/index.mjs +4 -0
  211. package/package.json +51 -0
  212. package/pin/index.cjs +4 -0
  213. package/pin/index.d.cts +3 -0
  214. package/pin/index.d.mts +3 -0
  215. package/pin/index.mjs +4 -0
  216. package/stack/index.cjs +4 -0
  217. package/stack/index.d.cts +3 -0
  218. package/stack/index.d.mts +3 -0
  219. package/stack/index.mjs +4 -0
  220. package/tile/index.cjs +4 -0
  221. package/tile/index.d.cts +3 -0
  222. package/tile/index.d.mts +3 -0
  223. package/tile/index.mjs +4 -0
  224. package/types.cjs +0 -0
  225. package/types.d.cts +2 -0
  226. package/types.d.mts +2 -0
  227. package/types.mjs +1 -0
@@ -0,0 +1,3 @@
1
+ import { BalanceLayoutOptions } from "../core/balance/types.mjs";
2
+ import balance from "../core/balance/balance.mjs";
3
+ export { BalanceLayoutOptions, balance as default };
@@ -0,0 +1,4 @@
1
+ import "../core/balance/styles.css";
2
+ import balance from "../core/balance/balance.mjs";
3
+
4
+ export { balance as default };
@@ -0,0 +1,4 @@
1
+ require('../core/center/styles.css');
2
+ const require_core_center_center = require('../core/center/center.cjs');
3
+
4
+ module.exports = require_core_center_center;
@@ -0,0 +1,3 @@
1
+ import { CenterLayoutOptions } from "../core/center/types.cjs";
2
+ import center from "../core/center/center.cjs";
3
+ export { CenterLayoutOptions, center as default };
@@ -0,0 +1,3 @@
1
+ import { CenterLayoutOptions } from "../core/center/types.mjs";
2
+ import center from "../core/center/center.mjs";
3
+ export { CenterLayoutOptions, center as default };
@@ -0,0 +1,4 @@
1
+ import "../core/center/styles.css";
2
+ import center from "../core/center/center.mjs";
3
+
4
+ export { center as default };
package/constants.cjs ADDED
@@ -0,0 +1,59 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_core_constants = require('./core/constants.cjs');
3
+
4
+ exports.Adjust = require_core_constants.Adjust;
5
+ exports.AdjustBase = require_core_constants.AdjustBase;
6
+ exports.AlignX = require_core_constants.AlignX;
7
+ exports.AlignXBase = require_core_constants.AlignXBase;
8
+ exports.AlignY = require_core_constants.AlignY;
9
+ exports.AlignYBase = require_core_constants.AlignYBase;
10
+ exports.Direction = require_core_constants.Direction;
11
+ exports.clsLayoutAdjustXExpand = require_core_constants.clsLayoutAdjustXExpand;
12
+ exports.clsLayoutAdjustXFit = require_core_constants.clsLayoutAdjustXFit;
13
+ exports.clsLayoutAdjustXNone = require_core_constants.clsLayoutAdjustXNone;
14
+ exports.clsLayoutAdjustXShrink = require_core_constants.clsLayoutAdjustXShrink;
15
+ exports.clsLayoutAdjustYExpand = require_core_constants.clsLayoutAdjustYExpand;
16
+ exports.clsLayoutAdjustYFit = require_core_constants.clsLayoutAdjustYFit;
17
+ exports.clsLayoutAdjustYNone = require_core_constants.clsLayoutAdjustYNone;
18
+ exports.clsLayoutAdjustYShrink = require_core_constants.clsLayoutAdjustYShrink;
19
+ exports.clsLayoutAlignXCenter = require_core_constants.clsLayoutAlignXCenter;
20
+ exports.clsLayoutAlignXLeft = require_core_constants.clsLayoutAlignXLeft;
21
+ exports.clsLayoutAlignXRight = require_core_constants.clsLayoutAlignXRight;
22
+ exports.clsLayoutAlignXSpaceAround = require_core_constants.clsLayoutAlignXSpaceAround;
23
+ exports.clsLayoutAlignXSpaceBetween = require_core_constants.clsLayoutAlignXSpaceBetween;
24
+ exports.clsLayoutAlignXSpaceEvenly = require_core_constants.clsLayoutAlignXSpaceEvenly;
25
+ exports.clsLayoutAlignYBottom = require_core_constants.clsLayoutAlignYBottom;
26
+ exports.clsLayoutAlignYMiddle = require_core_constants.clsLayoutAlignYMiddle;
27
+ exports.clsLayoutAlignYSpaceAround = require_core_constants.clsLayoutAlignYSpaceAround;
28
+ exports.clsLayoutAlignYSpaceBetween = require_core_constants.clsLayoutAlignYSpaceBetween;
29
+ exports.clsLayoutAlignYSpaceEvenly = require_core_constants.clsLayoutAlignYSpaceEvenly;
30
+ exports.clsLayoutAlignYTop = require_core_constants.clsLayoutAlignYTop;
31
+ exports.clsLayoutBalance = require_core_constants.clsLayoutBalance;
32
+ exports.clsLayoutCenter = require_core_constants.clsLayoutCenter;
33
+ exports.clsLayoutChildCountX = require_core_constants.clsLayoutChildCountX;
34
+ exports.clsLayoutChildCountY = require_core_constants.clsLayoutChildCountY;
35
+ exports.clsLayoutChildRatio = require_core_constants.clsLayoutChildRatio;
36
+ exports.clsLayoutChildSizeX = require_core_constants.clsLayoutChildSizeX;
37
+ exports.clsLayoutChildSizeY = require_core_constants.clsLayoutChildSizeY;
38
+ exports.clsLayoutDirectionX = require_core_constants.clsLayoutDirectionX;
39
+ exports.clsLayoutDirectionY = require_core_constants.clsLayoutDirectionY;
40
+ exports.clsLayoutFlow = require_core_constants.clsLayoutFlow;
41
+ exports.clsLayoutGapX = require_core_constants.clsLayoutGapX;
42
+ exports.clsLayoutGapY = require_core_constants.clsLayoutGapY;
43
+ exports.clsLayoutLayer = require_core_constants.clsLayoutLayer;
44
+ exports.clsLayoutMatrix = require_core_constants.clsLayoutMatrix;
45
+ exports.clsLayoutPack = require_core_constants.clsLayoutPack;
46
+ exports.clsLayoutPin = require_core_constants.clsLayoutPin;
47
+ exports.clsLayoutStack = require_core_constants.clsLayoutStack;
48
+ exports.clsLayoutTile = require_core_constants.clsLayoutTile;
49
+ exports.varLayoutAutoTracX = require_core_constants.varLayoutAutoTracX;
50
+ exports.varLayoutAutoTracY = require_core_constants.varLayoutAutoTracY;
51
+ exports.varLayoutChildCountX = require_core_constants.varLayoutChildCountX;
52
+ exports.varLayoutChildCountY = require_core_constants.varLayoutChildCountY;
53
+ exports.varLayoutChildRatio = require_core_constants.varLayoutChildRatio;
54
+ exports.varLayoutChildSizeX = require_core_constants.varLayoutChildSizeX;
55
+ exports.varLayoutChildSizeY = require_core_constants.varLayoutChildSizeY;
56
+ exports.varLayoutGapX = require_core_constants.varLayoutGapX;
57
+ exports.varLayoutGapY = require_core_constants.varLayoutGapY;
58
+ exports.varLayoutTemplateX = require_core_constants.varLayoutTemplateX;
59
+ exports.varLayoutTemplateY = require_core_constants.varLayoutTemplateY;
@@ -0,0 +1,2 @@
1
+ import { Adjust, AdjustBase, AlignX, AlignXBase, AlignY, AlignYBase, Direction, clsLayoutAdjustXExpand, clsLayoutAdjustXFit, clsLayoutAdjustXNone, clsLayoutAdjustXShrink, clsLayoutAdjustYExpand, clsLayoutAdjustYFit, clsLayoutAdjustYNone, clsLayoutAdjustYShrink, clsLayoutAlignXCenter, clsLayoutAlignXLeft, clsLayoutAlignXRight, clsLayoutAlignXSpaceAround, clsLayoutAlignXSpaceBetween, clsLayoutAlignXSpaceEvenly, clsLayoutAlignYBottom, clsLayoutAlignYMiddle, clsLayoutAlignYSpaceAround, clsLayoutAlignYSpaceBetween, clsLayoutAlignYSpaceEvenly, clsLayoutAlignYTop, clsLayoutBalance, clsLayoutCenter, clsLayoutChildCountX, clsLayoutChildCountY, clsLayoutChildRatio, clsLayoutChildSizeX, clsLayoutChildSizeY, clsLayoutDirectionX, clsLayoutDirectionY, clsLayoutFlow, clsLayoutGapX, clsLayoutGapY, clsLayoutLayer, clsLayoutMatrix, clsLayoutPack, clsLayoutPin, clsLayoutStack, clsLayoutTile, varLayoutAutoTracX, varLayoutAutoTracY, varLayoutChildCountX, varLayoutChildCountY, varLayoutChildRatio, varLayoutChildSizeX, varLayoutChildSizeY, varLayoutGapX, varLayoutGapY, varLayoutTemplateX, varLayoutTemplateY } from "./core/constants.cjs";
2
+ export { Adjust, AdjustBase, AlignX, AlignXBase, AlignY, AlignYBase, Direction, clsLayoutAdjustXExpand, clsLayoutAdjustXFit, clsLayoutAdjustXNone, clsLayoutAdjustXShrink, clsLayoutAdjustYExpand, clsLayoutAdjustYFit, clsLayoutAdjustYNone, clsLayoutAdjustYShrink, clsLayoutAlignXCenter, clsLayoutAlignXLeft, clsLayoutAlignXRight, clsLayoutAlignXSpaceAround, clsLayoutAlignXSpaceBetween, clsLayoutAlignXSpaceEvenly, clsLayoutAlignYBottom, clsLayoutAlignYMiddle, clsLayoutAlignYSpaceAround, clsLayoutAlignYSpaceBetween, clsLayoutAlignYSpaceEvenly, clsLayoutAlignYTop, clsLayoutBalance, clsLayoutCenter, clsLayoutChildCountX, clsLayoutChildCountY, clsLayoutChildRatio, clsLayoutChildSizeX, clsLayoutChildSizeY, clsLayoutDirectionX, clsLayoutDirectionY, clsLayoutFlow, clsLayoutGapX, clsLayoutGapY, clsLayoutLayer, clsLayoutMatrix, clsLayoutPack, clsLayoutPin, clsLayoutStack, clsLayoutTile, varLayoutAutoTracX, varLayoutAutoTracY, varLayoutChildCountX, varLayoutChildCountY, varLayoutChildRatio, varLayoutChildSizeX, varLayoutChildSizeY, varLayoutGapX, varLayoutGapY, varLayoutTemplateX, varLayoutTemplateY };
@@ -0,0 +1,2 @@
1
+ import { Adjust, AdjustBase, AlignX, AlignXBase, AlignY, AlignYBase, Direction, clsLayoutAdjustXExpand, clsLayoutAdjustXFit, clsLayoutAdjustXNone, clsLayoutAdjustXShrink, clsLayoutAdjustYExpand, clsLayoutAdjustYFit, clsLayoutAdjustYNone, clsLayoutAdjustYShrink, clsLayoutAlignXCenter, clsLayoutAlignXLeft, clsLayoutAlignXRight, clsLayoutAlignXSpaceAround, clsLayoutAlignXSpaceBetween, clsLayoutAlignXSpaceEvenly, clsLayoutAlignYBottom, clsLayoutAlignYMiddle, clsLayoutAlignYSpaceAround, clsLayoutAlignYSpaceBetween, clsLayoutAlignYSpaceEvenly, clsLayoutAlignYTop, clsLayoutBalance, clsLayoutCenter, clsLayoutChildCountX, clsLayoutChildCountY, clsLayoutChildRatio, clsLayoutChildSizeX, clsLayoutChildSizeY, clsLayoutDirectionX, clsLayoutDirectionY, clsLayoutFlow, clsLayoutGapX, clsLayoutGapY, clsLayoutLayer, clsLayoutMatrix, clsLayoutPack, clsLayoutPin, clsLayoutStack, clsLayoutTile, varLayoutAutoTracX, varLayoutAutoTracY, varLayoutChildCountX, varLayoutChildCountY, varLayoutChildRatio, varLayoutChildSizeX, varLayoutChildSizeY, varLayoutGapX, varLayoutGapY, varLayoutTemplateX, varLayoutTemplateY } from "./core/constants.mjs";
2
+ export { Adjust, AdjustBase, AlignX, AlignXBase, AlignY, AlignYBase, Direction, clsLayoutAdjustXExpand, clsLayoutAdjustXFit, clsLayoutAdjustXNone, clsLayoutAdjustXShrink, clsLayoutAdjustYExpand, clsLayoutAdjustYFit, clsLayoutAdjustYNone, clsLayoutAdjustYShrink, clsLayoutAlignXCenter, clsLayoutAlignXLeft, clsLayoutAlignXRight, clsLayoutAlignXSpaceAround, clsLayoutAlignXSpaceBetween, clsLayoutAlignXSpaceEvenly, clsLayoutAlignYBottom, clsLayoutAlignYMiddle, clsLayoutAlignYSpaceAround, clsLayoutAlignYSpaceBetween, clsLayoutAlignYSpaceEvenly, clsLayoutAlignYTop, clsLayoutBalance, clsLayoutCenter, clsLayoutChildCountX, clsLayoutChildCountY, clsLayoutChildRatio, clsLayoutChildSizeX, clsLayoutChildSizeY, clsLayoutDirectionX, clsLayoutDirectionY, clsLayoutFlow, clsLayoutGapX, clsLayoutGapY, clsLayoutLayer, clsLayoutMatrix, clsLayoutPack, clsLayoutPin, clsLayoutStack, clsLayoutTile, varLayoutAutoTracX, varLayoutAutoTracY, varLayoutChildCountX, varLayoutChildCountY, varLayoutChildRatio, varLayoutChildSizeX, varLayoutChildSizeY, varLayoutGapX, varLayoutGapY, varLayoutTemplateX, varLayoutTemplateY };
package/constants.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { Adjust, AdjustBase, AlignX, AlignXBase, AlignY, AlignYBase, Direction, clsLayoutAdjustXExpand, clsLayoutAdjustXFit, clsLayoutAdjustXNone, clsLayoutAdjustXShrink, clsLayoutAdjustYExpand, clsLayoutAdjustYFit, clsLayoutAdjustYNone, clsLayoutAdjustYShrink, clsLayoutAlignXCenter, clsLayoutAlignXLeft, clsLayoutAlignXRight, clsLayoutAlignXSpaceAround, clsLayoutAlignXSpaceBetween, clsLayoutAlignXSpaceEvenly, clsLayoutAlignYBottom, clsLayoutAlignYMiddle, clsLayoutAlignYSpaceAround, clsLayoutAlignYSpaceBetween, clsLayoutAlignYSpaceEvenly, clsLayoutAlignYTop, clsLayoutBalance, clsLayoutCenter, clsLayoutChildCountX, clsLayoutChildCountY, clsLayoutChildRatio, clsLayoutChildSizeX, clsLayoutChildSizeY, clsLayoutDirectionX, clsLayoutDirectionY, clsLayoutFlow, clsLayoutGapX, clsLayoutGapY, clsLayoutLayer, clsLayoutMatrix, clsLayoutPack, clsLayoutPin, clsLayoutStack, clsLayoutTile, varLayoutAutoTracX, varLayoutAutoTracY, varLayoutChildCountX, varLayoutChildCountY, varLayoutChildRatio, varLayoutChildSizeX, varLayoutChildSizeY, varLayoutGapX, varLayoutGapY, varLayoutTemplateX, varLayoutTemplateY } from "./core/constants.mjs";
2
+
3
+ export { Adjust, AdjustBase, AlignX, AlignXBase, AlignY, AlignYBase, Direction, clsLayoutAdjustXExpand, clsLayoutAdjustXFit, clsLayoutAdjustXNone, clsLayoutAdjustXShrink, clsLayoutAdjustYExpand, clsLayoutAdjustYFit, clsLayoutAdjustYNone, clsLayoutAdjustYShrink, clsLayoutAlignXCenter, clsLayoutAlignXLeft, clsLayoutAlignXRight, clsLayoutAlignXSpaceAround, clsLayoutAlignXSpaceBetween, clsLayoutAlignXSpaceEvenly, clsLayoutAlignYBottom, clsLayoutAlignYMiddle, clsLayoutAlignYSpaceAround, clsLayoutAlignYSpaceBetween, clsLayoutAlignYSpaceEvenly, clsLayoutAlignYTop, clsLayoutBalance, clsLayoutCenter, clsLayoutChildCountX, clsLayoutChildCountY, clsLayoutChildRatio, clsLayoutChildSizeX, clsLayoutChildSizeY, clsLayoutDirectionX, clsLayoutDirectionY, clsLayoutFlow, clsLayoutGapX, clsLayoutGapY, clsLayoutLayer, clsLayoutMatrix, clsLayoutPack, clsLayoutPin, clsLayoutStack, clsLayoutTile, varLayoutAutoTracX, varLayoutAutoTracY, varLayoutChildCountX, varLayoutChildCountY, varLayoutChildRatio, varLayoutChildSizeX, varLayoutChildSizeY, varLayoutGapX, varLayoutGapY, varLayoutTemplateX, varLayoutTemplateY };
@@ -0,0 +1,94 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_core_constants = require('./constants.cjs');
3
+
4
+ //#region src/core/_constants.ts
5
+ /**
6
+ * 整列
7
+ */
8
+ const clsLayoutDirection = {
9
+ x: require_core_constants.clsLayoutDirectionX,
10
+ y: require_core_constants.clsLayoutDirectionY
11
+ };
12
+ /**
13
+ * 横位置・縦位置
14
+ */
15
+ const clsLayoutAlign = {
16
+ x: {
17
+ left: require_core_constants.clsLayoutAlignXLeft,
18
+ center: require_core_constants.clsLayoutAlignXCenter,
19
+ right: require_core_constants.clsLayoutAlignXRight,
20
+ "space-between": require_core_constants.clsLayoutAlignXSpaceBetween,
21
+ "space-around": require_core_constants.clsLayoutAlignXSpaceAround,
22
+ "space-evenly": require_core_constants.clsLayoutAlignXSpaceEvenly
23
+ },
24
+ y: {
25
+ top: require_core_constants.clsLayoutAlignYTop,
26
+ middle: require_core_constants.clsLayoutAlignYMiddle,
27
+ bottom: require_core_constants.clsLayoutAlignYBottom,
28
+ "space-between": require_core_constants.clsLayoutAlignYSpaceBetween,
29
+ "space-around": require_core_constants.clsLayoutAlignYSpaceAround,
30
+ "space-evenly": require_core_constants.clsLayoutAlignYSpaceEvenly
31
+ }
32
+ };
33
+ /**
34
+ * 子要素の幅・高さ調整
35
+ */
36
+ const clsLayoutAdjust = {
37
+ x: {
38
+ none: require_core_constants.clsLayoutAdjustXNone,
39
+ fit: require_core_constants.clsLayoutAdjustXFit,
40
+ grow: require_core_constants.clsLayoutAdjustXExpand,
41
+ shrink: require_core_constants.clsLayoutAdjustXShrink
42
+ },
43
+ y: {
44
+ none: require_core_constants.clsLayoutAdjustYNone,
45
+ fit: require_core_constants.clsLayoutAdjustYFit,
46
+ grow: require_core_constants.clsLayoutAdjustYExpand,
47
+ shrink: require_core_constants.clsLayoutAdjustYShrink
48
+ }
49
+ };
50
+ /**
51
+ * 子要素の幅・高さ
52
+ */
53
+ const clsLayoutChildSize = {
54
+ x: require_core_constants.clsLayoutChildSizeX,
55
+ y: require_core_constants.clsLayoutChildSizeY
56
+ };
57
+ /**
58
+ * 子要素の幅・高さ
59
+ */
60
+ const varLayoutChildSize = {
61
+ x: require_core_constants.varLayoutChildSizeX,
62
+ y: require_core_constants.varLayoutChildSizeY
63
+ };
64
+ /**
65
+ * 子要素のテンプレート
66
+ */
67
+ const varLayoutTemplate = {
68
+ x: require_core_constants.varLayoutTemplateX,
69
+ y: require_core_constants.varLayoutTemplateY
70
+ };
71
+ /**
72
+ * 間隔
73
+ */
74
+ const varLayoutGap = {
75
+ x: require_core_constants.varLayoutGapX,
76
+ y: require_core_constants.varLayoutGapY
77
+ };
78
+ /**
79
+ * 軸に対するサイズプロパティ
80
+ */
81
+ const cssLayoutAxisSizeProp = {
82
+ x: "width",
83
+ y: "height"
84
+ };
85
+
86
+ //#endregion
87
+ exports.clsLayoutAdjust = clsLayoutAdjust;
88
+ exports.clsLayoutAlign = clsLayoutAlign;
89
+ exports.clsLayoutChildSize = clsLayoutChildSize;
90
+ exports.clsLayoutDirection = clsLayoutDirection;
91
+ exports.cssLayoutAxisSizeProp = cssLayoutAxisSizeProp;
92
+ exports.varLayoutChildSize = varLayoutChildSize;
93
+ exports.varLayoutGap = varLayoutGap;
94
+ exports.varLayoutTemplate = varLayoutTemplate;
@@ -0,0 +1,83 @@
1
+ //#region src/core/_constants.d.ts
2
+ /**
3
+ * 整列
4
+ */
5
+ declare const clsLayoutDirection: {
6
+ readonly x: "nws-layout-direction-x";
7
+ readonly y: "nws-layout-direction-y";
8
+ };
9
+ /**
10
+ * 横位置・縦位置
11
+ */
12
+ declare const clsLayoutAlign: {
13
+ readonly x: {
14
+ readonly left: "nws-layout-alignX-left";
15
+ readonly center: "nws-layout-alignX-center";
16
+ readonly right: "nws-layout-alignX-right";
17
+ readonly 'space-between': "nws-layout-alignX-spaceBetween";
18
+ readonly 'space-around': "nws-layout-alignX-spaceAround";
19
+ readonly 'space-evenly': "nws-layout-alignX-spaceEvenly";
20
+ };
21
+ readonly y: {
22
+ readonly top: "nws-layout-alignY-top";
23
+ readonly middle: "nws-layout-alignY-middle";
24
+ readonly bottom: "nws-layout-alignY-bottom";
25
+ readonly 'space-between': "nws-layout-alignY-spaceBetween";
26
+ readonly 'space-around': "nws-layout-alignY-spaceAround";
27
+ readonly 'space-evenly': "nws-layout-alignY-spaceEvenly";
28
+ };
29
+ };
30
+ /**
31
+ * 子要素の幅・高さ調整
32
+ */
33
+ declare const clsLayoutAdjust: {
34
+ readonly x: {
35
+ readonly none: "nws-layout-adjustX-none";
36
+ readonly fit: "nws-layout-adjustX-fit";
37
+ readonly grow: "nws-layout-adjustX-grow";
38
+ readonly shrink: "nws-layout-adjustX-shrink";
39
+ };
40
+ readonly y: {
41
+ readonly none: "nws-layout-adjustY-none";
42
+ readonly fit: "nws-layout-adjustY-fit";
43
+ readonly grow: "nws-layout-adjustY-grow";
44
+ readonly shrink: "nws-layout-adjustY-shrink";
45
+ };
46
+ };
47
+ /**
48
+ * 子要素の幅・高さ
49
+ */
50
+ declare const clsLayoutChildSize: {
51
+ readonly x: "nws-layout-childSizeX";
52
+ readonly y: "nws-layout-childSizeY";
53
+ };
54
+ /**
55
+ * 子要素の幅・高さ
56
+ */
57
+ declare const varLayoutChildSize: {
58
+ readonly x: "--nws-layout-childSizeX";
59
+ readonly y: "--nws-layout-childSizeY";
60
+ };
61
+ /**
62
+ * 子要素のテンプレート
63
+ */
64
+ declare const varLayoutTemplate: {
65
+ readonly x: "--nws-layout-templateX";
66
+ readonly y: "--nws-layout-templateY";
67
+ };
68
+ /**
69
+ * 間隔
70
+ */
71
+ declare const varLayoutGap: {
72
+ readonly x: "--nws-layout-gapX";
73
+ readonly y: "--nws-layout-gapY";
74
+ };
75
+ /**
76
+ * 軸に対するサイズプロパティ
77
+ */
78
+ declare const cssLayoutAxisSizeProp: {
79
+ readonly x: "width";
80
+ readonly y: "height";
81
+ };
82
+ //#endregion
83
+ export { clsLayoutAdjust, clsLayoutAlign, clsLayoutChildSize, clsLayoutDirection, cssLayoutAxisSizeProp, varLayoutChildSize, varLayoutGap, varLayoutTemplate };
@@ -0,0 +1,83 @@
1
+ //#region src/core/_constants.d.ts
2
+ /**
3
+ * 整列
4
+ */
5
+ declare const clsLayoutDirection: {
6
+ readonly x: "nws-layout-direction-x";
7
+ readonly y: "nws-layout-direction-y";
8
+ };
9
+ /**
10
+ * 横位置・縦位置
11
+ */
12
+ declare const clsLayoutAlign: {
13
+ readonly x: {
14
+ readonly left: "nws-layout-alignX-left";
15
+ readonly center: "nws-layout-alignX-center";
16
+ readonly right: "nws-layout-alignX-right";
17
+ readonly 'space-between': "nws-layout-alignX-spaceBetween";
18
+ readonly 'space-around': "nws-layout-alignX-spaceAround";
19
+ readonly 'space-evenly': "nws-layout-alignX-spaceEvenly";
20
+ };
21
+ readonly y: {
22
+ readonly top: "nws-layout-alignY-top";
23
+ readonly middle: "nws-layout-alignY-middle";
24
+ readonly bottom: "nws-layout-alignY-bottom";
25
+ readonly 'space-between': "nws-layout-alignY-spaceBetween";
26
+ readonly 'space-around': "nws-layout-alignY-spaceAround";
27
+ readonly 'space-evenly': "nws-layout-alignY-spaceEvenly";
28
+ };
29
+ };
30
+ /**
31
+ * 子要素の幅・高さ調整
32
+ */
33
+ declare const clsLayoutAdjust: {
34
+ readonly x: {
35
+ readonly none: "nws-layout-adjustX-none";
36
+ readonly fit: "nws-layout-adjustX-fit";
37
+ readonly grow: "nws-layout-adjustX-grow";
38
+ readonly shrink: "nws-layout-adjustX-shrink";
39
+ };
40
+ readonly y: {
41
+ readonly none: "nws-layout-adjustY-none";
42
+ readonly fit: "nws-layout-adjustY-fit";
43
+ readonly grow: "nws-layout-adjustY-grow";
44
+ readonly shrink: "nws-layout-adjustY-shrink";
45
+ };
46
+ };
47
+ /**
48
+ * 子要素の幅・高さ
49
+ */
50
+ declare const clsLayoutChildSize: {
51
+ readonly x: "nws-layout-childSizeX";
52
+ readonly y: "nws-layout-childSizeY";
53
+ };
54
+ /**
55
+ * 子要素の幅・高さ
56
+ */
57
+ declare const varLayoutChildSize: {
58
+ readonly x: "--nws-layout-childSizeX";
59
+ readonly y: "--nws-layout-childSizeY";
60
+ };
61
+ /**
62
+ * 子要素のテンプレート
63
+ */
64
+ declare const varLayoutTemplate: {
65
+ readonly x: "--nws-layout-templateX";
66
+ readonly y: "--nws-layout-templateY";
67
+ };
68
+ /**
69
+ * 間隔
70
+ */
71
+ declare const varLayoutGap: {
72
+ readonly x: "--nws-layout-gapX";
73
+ readonly y: "--nws-layout-gapY";
74
+ };
75
+ /**
76
+ * 軸に対するサイズプロパティ
77
+ */
78
+ declare const cssLayoutAxisSizeProp: {
79
+ readonly x: "width";
80
+ readonly y: "height";
81
+ };
82
+ //#endregion
83
+ export { clsLayoutAdjust, clsLayoutAlign, clsLayoutChildSize, clsLayoutDirection, cssLayoutAxisSizeProp, varLayoutChildSize, varLayoutGap, varLayoutTemplate };
@@ -0,0 +1,86 @@
1
+ import { clsLayoutAdjustXExpand, clsLayoutAdjustXFit, clsLayoutAdjustXNone, clsLayoutAdjustXShrink, clsLayoutAdjustYExpand, clsLayoutAdjustYFit, clsLayoutAdjustYNone, clsLayoutAdjustYShrink, clsLayoutAlignXCenter, clsLayoutAlignXLeft, clsLayoutAlignXRight, clsLayoutAlignXSpaceAround, clsLayoutAlignXSpaceBetween, clsLayoutAlignXSpaceEvenly, clsLayoutAlignYBottom, clsLayoutAlignYMiddle, clsLayoutAlignYSpaceAround, clsLayoutAlignYSpaceBetween, clsLayoutAlignYSpaceEvenly, clsLayoutAlignYTop, clsLayoutChildSizeX, clsLayoutChildSizeY, clsLayoutDirectionX, clsLayoutDirectionY, varLayoutChildSizeX, varLayoutChildSizeY, varLayoutGapX, varLayoutGapY, varLayoutTemplateX, varLayoutTemplateY } from "./constants.mjs";
2
+
3
+ //#region src/core/_constants.ts
4
+ /**
5
+ * 整列
6
+ */
7
+ const clsLayoutDirection = {
8
+ x: clsLayoutDirectionX,
9
+ y: clsLayoutDirectionY
10
+ };
11
+ /**
12
+ * 横位置・縦位置
13
+ */
14
+ const clsLayoutAlign = {
15
+ x: {
16
+ left: clsLayoutAlignXLeft,
17
+ center: clsLayoutAlignXCenter,
18
+ right: clsLayoutAlignXRight,
19
+ "space-between": clsLayoutAlignXSpaceBetween,
20
+ "space-around": clsLayoutAlignXSpaceAround,
21
+ "space-evenly": clsLayoutAlignXSpaceEvenly
22
+ },
23
+ y: {
24
+ top: clsLayoutAlignYTop,
25
+ middle: clsLayoutAlignYMiddle,
26
+ bottom: clsLayoutAlignYBottom,
27
+ "space-between": clsLayoutAlignYSpaceBetween,
28
+ "space-around": clsLayoutAlignYSpaceAround,
29
+ "space-evenly": clsLayoutAlignYSpaceEvenly
30
+ }
31
+ };
32
+ /**
33
+ * 子要素の幅・高さ調整
34
+ */
35
+ const clsLayoutAdjust = {
36
+ x: {
37
+ none: clsLayoutAdjustXNone,
38
+ fit: clsLayoutAdjustXFit,
39
+ grow: clsLayoutAdjustXExpand,
40
+ shrink: clsLayoutAdjustXShrink
41
+ },
42
+ y: {
43
+ none: clsLayoutAdjustYNone,
44
+ fit: clsLayoutAdjustYFit,
45
+ grow: clsLayoutAdjustYExpand,
46
+ shrink: clsLayoutAdjustYShrink
47
+ }
48
+ };
49
+ /**
50
+ * 子要素の幅・高さ
51
+ */
52
+ const clsLayoutChildSize = {
53
+ x: clsLayoutChildSizeX,
54
+ y: clsLayoutChildSizeY
55
+ };
56
+ /**
57
+ * 子要素の幅・高さ
58
+ */
59
+ const varLayoutChildSize = {
60
+ x: varLayoutChildSizeX,
61
+ y: varLayoutChildSizeY
62
+ };
63
+ /**
64
+ * 子要素のテンプレート
65
+ */
66
+ const varLayoutTemplate = {
67
+ x: varLayoutTemplateX,
68
+ y: varLayoutTemplateY
69
+ };
70
+ /**
71
+ * 間隔
72
+ */
73
+ const varLayoutGap = {
74
+ x: varLayoutGapX,
75
+ y: varLayoutGapY
76
+ };
77
+ /**
78
+ * 軸に対するサイズプロパティ
79
+ */
80
+ const cssLayoutAxisSizeProp = {
81
+ x: "width",
82
+ y: "height"
83
+ };
84
+
85
+ //#endregion
86
+ export { clsLayoutAdjust, clsLayoutAlign, clsLayoutChildSize, clsLayoutDirection, cssLayoutAxisSizeProp, varLayoutChildSize, varLayoutGap, varLayoutTemplate };
@@ -0,0 +1,26 @@
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ const require_core_constants = require('../constants.cjs');
3
+ const require_core__internal_hasValue = require('./hasValue.cjs');
4
+ let clsx = require("clsx");
5
+ clsx = require_runtime.__toESM(clsx, 1);
6
+
7
+ //#region src/core/_internal/applyChildCount.ts
8
+ /**
9
+ * 子要素の数に関する設定の適用
10
+ * @param result
11
+ * @param childCountX
12
+ * @param childCountY
13
+ */
14
+ function applyChildCount(result, childCountX, childCountY) {
15
+ if (require_core__internal_hasValue(childCountX)) {
16
+ result.className = (0, clsx.default)(result.className, require_core_constants.clsLayoutChildCountX);
17
+ result.style[require_core_constants.varLayoutChildCountX] = childCountX;
18
+ }
19
+ if (require_core__internal_hasValue(childCountY)) {
20
+ result.className = (0, clsx.default)(result.className, require_core_constants.clsLayoutChildCountY);
21
+ result.style[require_core_constants.varLayoutChildCountY] = childCountY;
22
+ }
23
+ }
24
+
25
+ //#endregion
26
+ module.exports = applyChildCount;
@@ -0,0 +1,11 @@
1
+ import { StyleLayoutResult } from "../types.cjs";
2
+
3
+ //#region src/core/_internal/applyChildCount.d.ts
4
+ /**
5
+ * 子要素の数に関する設定の適用
6
+ * @param result
7
+ * @param childCountX
8
+ * @param childCountY
9
+ */
10
+ declare function applyChildCount(result: StyleLayoutResult, childCountX: number | null | undefined, childCountY: number | null | undefined): void;
11
+ export = applyChildCount;
@@ -0,0 +1,12 @@
1
+ import { StyleLayoutResult } from "../types.mjs";
2
+
3
+ //#region src/core/_internal/applyChildCount.d.ts
4
+ /**
5
+ * 子要素の数に関する設定の適用
6
+ * @param result
7
+ * @param childCountX
8
+ * @param childCountY
9
+ */
10
+ declare function applyChildCount(result: StyleLayoutResult, childCountX: number | null | undefined, childCountY: number | null | undefined): void;
11
+ //#endregion
12
+ export { applyChildCount as default };
@@ -0,0 +1,24 @@
1
+ import { clsLayoutChildCountX, clsLayoutChildCountY, varLayoutChildCountX, varLayoutChildCountY } from "../constants.mjs";
2
+ import hasValue from "./hasValue.mjs";
3
+ import clsx from "clsx";
4
+
5
+ //#region src/core/_internal/applyChildCount.ts
6
+ /**
7
+ * 子要素の数に関する設定の適用
8
+ * @param result
9
+ * @param childCountX
10
+ * @param childCountY
11
+ */
12
+ function applyChildCount(result, childCountX, childCountY) {
13
+ if (hasValue(childCountX)) {
14
+ result.className = clsx(result.className, clsLayoutChildCountX);
15
+ result.style[varLayoutChildCountX] = childCountX;
16
+ }
17
+ if (hasValue(childCountY)) {
18
+ result.className = clsx(result.className, clsLayoutChildCountY);
19
+ result.style[varLayoutChildCountY] = childCountY;
20
+ }
21
+ }
22
+
23
+ //#endregion
24
+ export { applyChildCount as default };
@@ -0,0 +1,22 @@
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ const require_core_constants = require('../constants.cjs');
3
+ const require_core__internal_hasValue = require('./hasValue.cjs');
4
+ let clsx = require("clsx");
5
+ clsx = require_runtime.__toESM(clsx, 1);
6
+
7
+ //#region src/core/_internal/applyChildRatio.ts
8
+ /**
9
+ * 子要素の縦横比に関する設定の適用
10
+ * @param result
11
+ * @param childRatioX
12
+ * @param childRatioY
13
+ */
14
+ function applyChildRatio(result, childRatioX, childRatioY) {
15
+ if (require_core__internal_hasValue(childRatioX) || require_core__internal_hasValue(childRatioY)) {
16
+ result.className = (0, clsx.default)(result.className, require_core_constants.clsLayoutChildRatio);
17
+ result.style[require_core_constants.varLayoutChildRatio] = `${childRatioX ?? 1} / ${childRatioY ?? 1}`;
18
+ }
19
+ }
20
+
21
+ //#endregion
22
+ module.exports = applyChildRatio;
@@ -0,0 +1,11 @@
1
+ import { StyleLayoutResult } from "../types.cjs";
2
+
3
+ //#region src/core/_internal/applyChildRatio.d.ts
4
+ /**
5
+ * 子要素の縦横比に関する設定の適用
6
+ * @param result
7
+ * @param childRatioX
8
+ * @param childRatioY
9
+ */
10
+ declare function applyChildRatio(result: StyleLayoutResult, childRatioX: number | null | undefined, childRatioY: number | null | undefined): void;
11
+ export = applyChildRatio;
@@ -0,0 +1,12 @@
1
+ import { StyleLayoutResult } from "../types.mjs";
2
+
3
+ //#region src/core/_internal/applyChildRatio.d.ts
4
+ /**
5
+ * 子要素の縦横比に関する設定の適用
6
+ * @param result
7
+ * @param childRatioX
8
+ * @param childRatioY
9
+ */
10
+ declare function applyChildRatio(result: StyleLayoutResult, childRatioX: number | null | undefined, childRatioY: number | null | undefined): void;
11
+ //#endregion
12
+ export { applyChildRatio as default };
@@ -0,0 +1,20 @@
1
+ import { clsLayoutChildRatio, varLayoutChildRatio } from "../constants.mjs";
2
+ import hasValue from "./hasValue.mjs";
3
+ import clsx from "clsx";
4
+
5
+ //#region src/core/_internal/applyChildRatio.ts
6
+ /**
7
+ * 子要素の縦横比に関する設定の適用
8
+ * @param result
9
+ * @param childRatioX
10
+ * @param childRatioY
11
+ */
12
+ function applyChildRatio(result, childRatioX, childRatioY) {
13
+ if (hasValue(childRatioX) || hasValue(childRatioY)) {
14
+ result.className = clsx(result.className, clsLayoutChildRatio);
15
+ result.style[varLayoutChildRatio] = `${childRatioX ?? 1} / ${childRatioY ?? 1}`;
16
+ }
17
+ }
18
+
19
+ //#endregion
20
+ export { applyChildRatio as default };
@@ -0,0 +1,27 @@
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+ const require_core_constants = require('../constants.cjs');
3
+ const require_core__internal_hasValue = require('./hasValue.cjs');
4
+ const require_core__internal_unit = require('./unit.cjs');
5
+ let clsx = require("clsx");
6
+ clsx = require_runtime.__toESM(clsx, 1);
7
+
8
+ //#region src/core/_internal/applyChildSize.ts
9
+ /**
10
+ * 子要素のサイズに関する設定の適用
11
+ * @param result
12
+ * @param childSizeX
13
+ * @param childSizeY
14
+ */
15
+ function applyChildSize(result, childSizeX, childSizeY) {
16
+ if (require_core__internal_hasValue(childSizeX)) {
17
+ result.className = (0, clsx.default)(result.className, require_core_constants.clsLayoutChildSizeX);
18
+ result.style[require_core_constants.varLayoutChildSizeX] = require_core__internal_unit(childSizeX);
19
+ }
20
+ if (require_core__internal_hasValue(childSizeY)) {
21
+ result.className = (0, clsx.default)(result.className, require_core_constants.clsLayoutChildSizeY);
22
+ result.style[require_core_constants.varLayoutChildSizeY] = require_core__internal_unit(childSizeY);
23
+ }
24
+ }
25
+
26
+ //#endregion
27
+ module.exports = applyChildSize;
@@ -0,0 +1,11 @@
1
+ import { StyleLayoutResult } from "../types.cjs";
2
+
3
+ //#region src/core/_internal/applyChildSize.d.ts
4
+ /**
5
+ * 子要素のサイズに関する設定の適用
6
+ * @param result
7
+ * @param childSizeX
8
+ * @param childSizeY
9
+ */
10
+ declare function applyChildSize(result: StyleLayoutResult, childSizeX: number | null | undefined, childSizeY: number | null | undefined): void;
11
+ export = applyChildSize;