cirrojs 0.0.10 → 0.0.11
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/CHANGELOG.md +12 -1
- package/dist/layout.d.ts +2 -0
- package/dist/layout.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
13
13
|
|
|
14
14
|
## [Unreleased]
|
|
15
15
|
|
|
16
|
+
## [0.0.11] - 2026-06-28
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- `createLayout`'s `cluster` now accepts an optional `wrap` option (`Properties["flex_wrap"]`) to override its flex-wrap behavior.
|
|
20
|
+
- Two new `LayoutDefaults` fields: `clusterWrap`, the default flex-wrap applied by `cluster`, and `sidebarSideWidth`, the default inline size of the sidebar's side slot.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- The sidebar's side slot now defaults its `flex-basis` to `sidebarSideWidth` (default `30ch`) instead of `auto`.
|
|
24
|
+
- Changed the `sidebarContentMin` default from `50%` to `65ch`.
|
|
25
|
+
|
|
16
26
|
## [0.0.10] - 2026-06-27
|
|
17
27
|
|
|
18
28
|
### Added
|
|
@@ -81,7 +91,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
81
91
|
## 0.0.1 - 2026-06-15
|
|
82
92
|
- initial release
|
|
83
93
|
|
|
84
|
-
[Unreleased]: https://github.com/osawa-naotaka/cirro/compare/v0.0.
|
|
94
|
+
[Unreleased]: https://github.com/osawa-naotaka/cirro/compare/v0.0.11...HEAD
|
|
95
|
+
[0.0.11]: https://github.com/osawa-naotaka/cirro/compare/v0.0.10...v0.0.11
|
|
85
96
|
[0.0.10]: https://github.com/osawa-naotaka/cirro/compare/v0.0.9...v0.0.10
|
|
86
97
|
[0.0.9]: https://github.com/osawa-naotaka/cirro/compare/v0.0.8...v0.0.9
|
|
87
98
|
[0.0.8]: https://github.com/osawa-naotaka/cirro/compare/v0.0.7...v0.0.8
|
package/dist/layout.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ interface LayoutDefaults {
|
|
|
6
6
|
gap: string;
|
|
7
7
|
stackGap?: string;
|
|
8
8
|
clusterGap?: string;
|
|
9
|
+
clusterWrap?: Properties["flex_wrap"];
|
|
9
10
|
gridGap?: string;
|
|
10
11
|
switcherGap?: string;
|
|
11
12
|
sidebarGap?: string;
|
|
@@ -16,6 +17,7 @@ interface LayoutDefaults {
|
|
|
16
17
|
switcherThreshold: string;
|
|
17
18
|
switcherLimit: number;
|
|
18
19
|
sidebarContentMin: string;
|
|
20
|
+
sidebarSideWidth: string;
|
|
19
21
|
coverMinHeight: string;
|
|
20
22
|
frameRatio: string;
|
|
21
23
|
boxPadding?: string;
|
package/dist/layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./css-CPDjsrSK.js";const t={gap:`1rem`,clusterJustify:`flex-start`,clusterAlign:`center`,centerMax:`60ch`,gridMin:`16rem`,switcherThreshold:`30rem`,switcherLimit:4,sidebarContentMin:`
|
|
1
|
+
import{n as e}from"./css-CPDjsrSK.js";const t={gap:`1rem`,clusterJustify:`flex-start`,clusterAlign:`center`,centerMax:`60ch`,gridMin:`16rem`,switcherThreshold:`30rem`,switcherLimit:4,sidebarContentMin:`65ch`,sidebarSideWidth:`30ch`,coverMinHeight:`100vh`,frameRatio:`16 / 9`};function n(...e){return e.filter(Boolean).join(` `)}function r(r={}){let i=r.css??e({layer:`low`}),a={...t,...r.defaults};function o(e){return i({display:`flex`,flex_direction:`column`,gap:e?.gap??a.stackGap??a.gap})}function s(e){return i({display:`flex`,flex_wrap:e?.wrap??a.clusterWrap??`wrap`,gap:e?.gap??a.clusterGap??a.gap,justify_content:e?.justify??a.clusterJustify,align_items:e?.align??a.clusterAlign})}function c(e){return n(i({box_sizing:`border-box`,margin_inline:`auto`,max_inline_size:e?.max??a.centerMax}),e?.gutters?i({padding_inline:e.gutters}):``,e?.intrinsic?i({display:`flex`,flex_direction:`column`,align_items:`center`}):``,e?.andText?i({text_align:`center`}):``)}function l(e){let t=e?.min??a.gridMin;return i({display:`grid`,gap:e?.gap??a.gridGap??a.gap,grid_template_columns:`repeat(auto-fit, minmax(min(${t}, 100%), 1fr))`})}function u(e){let t=e?.threshold??a.switcherThreshold,r=e?.limit??a.switcherLimit;return n(i({display:`flex`,flex_wrap:`wrap`,gap:e?.gap??a.switcherGap??a.gap}),i({flex_grow:`1`,flex_basis:`calc((${t} - 100%) * 999)`},{selector:`& > *`}),i({flex_basis:`100%`},{selector:`& > :nth-last-child(n+${r+1})`}),i({flex_basis:`100%`},{selector:`& > :nth-last-child(n+${r+1}) ~ *`}))}function d(e){return{root:i({display:`flex`,flex_wrap:`wrap`,gap:e?.gap??a.sidebarGap??a.gap}),side:i({flex_grow:`1`,flex_basis:e?.sideWidth??a.sidebarSideWidth??`auto`}),content:i({flex_grow:`999`,flex_basis:`0`,min_inline_size:e?.contentMin??a.sidebarContentMin})}}function f(e){let t=e?.gap??a.gap,r=i({margin_block:`auto`});return{root:n(i({display:`flex`,flex_direction:`column`,min_block_size:e?.minHeight??a.coverMinHeight,padding:e?.padding??t}),i({margin_block:t},{selector:`& > :not(.${r})`}),i({margin_block_start:`0`},{selector:`& > :first-child:not(.${r})`}),i({margin_block_end:`0`},{selector:`& > :last-child:not(.${r})`})),centered:r}}function p(e){return n(i({aspect_ratio:e?.ratio??a.frameRatio,overflow:`hidden`,display:`flex`,justify_content:`center`,align_items:`center`}),i({inline_size:`100%`,block_size:`100%`,object_fit:`cover`},{selector:`& > img, & > video`}))}function m(e){return n(i({display:`flex`,block_size:e?.height??`auto`,overflow_x:`auto`,overflow_y:`hidden`,gap:e?.gap??a.gap}),i({flex:`0 0 ${e?.itemWidth??`auto`}`},{selector:`& > *`}),i({block_size:`100%`,flex_basis:`auto`,inline_size:`auto`},{selector:`& > img`}))}function h(e){let t=e?.margin??`0px`;return n(i({position:e?.fixed?`fixed`:`absolute`,inset_block_start:`50%`,inset_inline_start:`50%`,transform:`translate(-50%, -50%)`}),e?.contain?i({overflow:`auto`,max_inline_size:`calc(100% - (${t} * 2))`,max_block_size:`calc(100% - (${t} * 2))`}):``)}function g(e){return n(i({box_sizing:`border-box`,padding:e?.padding??a.boxPadding??a.gap}),e?.border?i({border:e.border}):``)}return{stack:o,cluster:s,center:c,grid:l,switcher:u,sidebar:d,cover:f,frame:p,reel:m,imposter:h,box:g}}export{r as createLayout};
|