@selimssevgi/cube-design-angular 0.6.1 → 0.6.2

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 CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  nothing yet.
6
6
 
7
+ ## 0.6.2 (4 november 2026: a held square stands in the middle)
8
+
9
+ - **`align` on `<cube-square>`**, `'center'` by default: a square narrower than its place (held to the window's height so it is seen whole, or to `maxSide`) stands in the middle of it, its spare width shared on both sides. before, it stood at the start and left the spare width empty on the right: selim saw it on mosaic's todarch at 1280 × 860, a 4 × 4 (eight tiles, `least: 'room'`) held to 756 px in an 812 px column. `align: 'start'` keeps the old place. the turning rows' band is centred the same way. an app changes nothing.
10
+
7
11
  ## 0.6.1 (4 november 2026: an empty square is seen whole on a short desktop window)
8
12
 
9
13
  - **the square counts what stands above it.** `<cube-square>` held the square view to the window's height less a fixed 48 px, so under mosaic's top bar and head an empty piece's 5 × 5 (`least`) ran below a short desktop window. the room's `tall` is now the window's height less where the square starts on the page and 16 px below, never less than 320: the pure `squareTall(windowHeight, top, { below, least })`, `SQUARE_ROOM_BELOW` (16) and `SQUARE_LEAST_TALL` (320). it is measured again when the page above it changes (a head's line arriving). an app changes nothing; a square low on a page is smaller than before, and `least` follows it (3 × 3 or 4 × 4 where the window is short).
@@ -2044,6 +2044,7 @@ var CubeSquare = class CubeSquare {
2044
2044
  tiles = input.required(...ngDevMode ? [{ debugName: "tiles" }] : /* istanbul ignore next */ []);
2045
2045
  view = input("square", ...ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []);
2046
2046
  maxSide = input(880, ...ngDevMode ? [{ debugName: "maxSide" }] : /* istanbul ignore next */ []);
2047
+ align = input("center", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
2047
2048
  listRow = input(76, ...ngDevMode ? [{ debugName: "listRow" }] : /* istanbul ignore next */ []);
2048
2049
  dashed = input(false, ...ngDevMode ? [{ debugName: "dashed" }] : /* istanbul ignore next */ []);
2049
2050
  least = input("room", ...ngDevMode ? [{ debugName: "least" }] : /* istanbul ignore next */ []);
@@ -2324,6 +2325,13 @@ var CubeSquare = class CubeSquare {
2324
2325
  isRequired: false,
2325
2326
  transformFunction: null
2326
2327
  },
2328
+ align: {
2329
+ classPropertyName: "align",
2330
+ publicName: "align",
2331
+ isSignal: true,
2332
+ isRequired: false,
2333
+ transformFunction: null
2334
+ },
2327
2335
  listRow: {
2328
2336
  classPropertyName: "listRow",
2329
2337
  publicName: "listRow",
@@ -2409,6 +2417,7 @@ var CubeSquare = class CubeSquare {
2409
2417
  <div
2410
2418
  class="cs-turning"
2411
2419
  [class]="'cs-turning cs-l' + sq.level"
2420
+ [class.cs-start]="align() === 'start'"
2412
2421
  [class.cs-dashed]="dashed()"
2413
2422
  [attr.data-level]="sq.level"
2414
2423
  [style.width.px]="sq.width"
@@ -2480,6 +2489,7 @@ var CubeSquare = class CubeSquare {
2480
2489
  #grid
2481
2490
  [class]="'cs-square cs-l' + sq.level"
2482
2491
  [class.cs-list]="sq.list"
2492
+ [class.cs-start]="align() === 'start'"
2483
2493
  [class.cs-dashed]="dashed()"
2484
2494
  [attr.data-level]="sq.level"
2485
2495
  [style.width.px]="sq.width"
@@ -2512,7 +2522,7 @@ var CubeSquare = class CubeSquare {
2512
2522
  }
2513
2523
  `,
2514
2524
  isInline: true,
2515
- styles: [":host{display:block}.cs-square{display:grid;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));--cs-radius: var(--cube-square-radius, 20px)}.cs-cell{display:grid;min-width:0;min-height:0}.cs-place{box-sizing:border-box;border:var(--cube-square-place-width, 1.5px) solid var(--cube-square-place, color-mix(in srgb, #dae0d9 55%, transparent));border-radius:var(--cs-radius)}.cs-dashed .cs-place{border-style:dashed;border-color:var(--cube-square-place-dashed, #dae0d9)}.cs-l0{--cs-radius: 28px}.cs-l2{--cs-radius: 16px}.cs-l3{--cs-radius: 12px}.cs-l4{--cs-radius: 9px}.cs-l4 .cs-place{border-width:1px}.cs-turning{display:flex;flex-direction:column;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));--cs-radius: var(--cube-square-radius, 20px)}.cs-row{position:relative;perspective:1400px;touch-action:pan-y;user-select:none;-webkit-user-select:none;outline:none}.cs-row:focus-visible{outline:2px solid var(--cube-square-focus, #5f9a80);outline-offset:3px;border-radius:var(--cs-radius)}.cs-band{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .38s cubic-bezier(.2,.8,.2,1)}.cs-band.cs-nudging{transition:transform .52s cubic-bezier(.4,0,.2,1)}.cs-band.cs-still{transition:none}.cs-side{position:absolute;inset:0;display:grid;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));backface-visibility:hidden}.cs-edge{pointer-events:none;position:absolute;top:18%;bottom:18%;right:calc(-1*max(4px,var(--cs-gap) - 2px));z-index:1;width:3px;border-radius:999px;background:var(--cube-square-edge, color-mix(in srgb, #5f9a80 45%, transparent))}\n"],
2525
+ styles: [":host{display:block}.cs-square,.cs-turning{margin-inline:auto}.cs-square.cs-start,.cs-turning.cs-start{margin-inline:0}.cs-square{display:grid;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));--cs-radius: var(--cube-square-radius, 20px)}.cs-cell{display:grid;min-width:0;min-height:0}.cs-place{box-sizing:border-box;border:var(--cube-square-place-width, 1.5px) solid var(--cube-square-place, color-mix(in srgb, #dae0d9 55%, transparent));border-radius:var(--cs-radius)}.cs-dashed .cs-place{border-style:dashed;border-color:var(--cube-square-place-dashed, #dae0d9)}.cs-l0{--cs-radius: 28px}.cs-l2{--cs-radius: 16px}.cs-l3{--cs-radius: 12px}.cs-l4{--cs-radius: 9px}.cs-l4 .cs-place{border-width:1px}.cs-turning{display:flex;flex-direction:column;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));--cs-radius: var(--cube-square-radius, 20px)}.cs-row{position:relative;perspective:1400px;touch-action:pan-y;user-select:none;-webkit-user-select:none;outline:none}.cs-row:focus-visible{outline:2px solid var(--cube-square-focus, #5f9a80);outline-offset:3px;border-radius:var(--cs-radius)}.cs-band{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .38s cubic-bezier(.2,.8,.2,1)}.cs-band.cs-nudging{transition:transform .52s cubic-bezier(.4,0,.2,1)}.cs-band.cs-still{transition:none}.cs-side{position:absolute;inset:0;display:grid;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));backface-visibility:hidden}.cs-edge{pointer-events:none;position:absolute;top:18%;bottom:18%;right:calc(-1*max(4px,var(--cs-gap) - 2px));z-index:1;width:3px;border-radius:999px;background:var(--cube-square-edge, color-mix(in srgb, #5f9a80 45%, transparent))}\n"],
2516
2526
  dependencies: [{
2517
2527
  kind: "directive",
2518
2528
  type: NgTemplateOutlet,
@@ -2542,6 +2552,7 @@ i0.ɵɵngDeclareClassMetadata({
2542
2552
  <div
2543
2553
  class="cs-turning"
2544
2554
  [class]="'cs-turning cs-l' + sq.level"
2555
+ [class.cs-start]="align() === 'start'"
2545
2556
  [class.cs-dashed]="dashed()"
2546
2557
  [attr.data-level]="sq.level"
2547
2558
  [style.width.px]="sq.width"
@@ -2613,6 +2624,7 @@ i0.ɵɵngDeclareClassMetadata({
2613
2624
  #grid
2614
2625
  [class]="'cs-square cs-l' + sq.level"
2615
2626
  [class.cs-list]="sq.list"
2627
+ [class.cs-start]="align() === 'start'"
2616
2628
  [class.cs-dashed]="dashed()"
2617
2629
  [attr.data-level]="sq.level"
2618
2630
  [style.width.px]="sq.width"
@@ -2645,7 +2657,7 @@ i0.ɵɵngDeclareClassMetadata({
2645
2657
  }
2646
2658
  `,
2647
2659
  changeDetection: ChangeDetectionStrategy.OnPush,
2648
- styles: [":host{display:block}.cs-square{display:grid;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));--cs-radius: var(--cube-square-radius, 20px)}.cs-cell{display:grid;min-width:0;min-height:0}.cs-place{box-sizing:border-box;border:var(--cube-square-place-width, 1.5px) solid var(--cube-square-place, color-mix(in srgb, #dae0d9 55%, transparent));border-radius:var(--cs-radius)}.cs-dashed .cs-place{border-style:dashed;border-color:var(--cube-square-place-dashed, #dae0d9)}.cs-l0{--cs-radius: 28px}.cs-l2{--cs-radius: 16px}.cs-l3{--cs-radius: 12px}.cs-l4{--cs-radius: 9px}.cs-l4 .cs-place{border-width:1px}.cs-turning{display:flex;flex-direction:column;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));--cs-radius: var(--cube-square-radius, 20px)}.cs-row{position:relative;perspective:1400px;touch-action:pan-y;user-select:none;-webkit-user-select:none;outline:none}.cs-row:focus-visible{outline:2px solid var(--cube-square-focus, #5f9a80);outline-offset:3px;border-radius:var(--cs-radius)}.cs-band{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .38s cubic-bezier(.2,.8,.2,1)}.cs-band.cs-nudging{transition:transform .52s cubic-bezier(.4,0,.2,1)}.cs-band.cs-still{transition:none}.cs-side{position:absolute;inset:0;display:grid;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));backface-visibility:hidden}.cs-edge{pointer-events:none;position:absolute;top:18%;bottom:18%;right:calc(-1*max(4px,var(--cs-gap) - 2px));z-index:1;width:3px;border-radius:999px;background:var(--cube-square-edge, color-mix(in srgb, #5f9a80 45%, transparent))}\n"]
2660
+ styles: [":host{display:block}.cs-square,.cs-turning{margin-inline:auto}.cs-square.cs-start,.cs-turning.cs-start{margin-inline:0}.cs-square{display:grid;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));--cs-radius: var(--cube-square-radius, 20px)}.cs-cell{display:grid;min-width:0;min-height:0}.cs-place{box-sizing:border-box;border:var(--cube-square-place-width, 1.5px) solid var(--cube-square-place, color-mix(in srgb, #dae0d9 55%, transparent));border-radius:var(--cs-radius)}.cs-dashed .cs-place{border-style:dashed;border-color:var(--cube-square-place-dashed, #dae0d9)}.cs-l0{--cs-radius: 28px}.cs-l2{--cs-radius: 16px}.cs-l3{--cs-radius: 12px}.cs-l4{--cs-radius: 9px}.cs-l4 .cs-place{border-width:1px}.cs-turning{display:flex;flex-direction:column;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));--cs-radius: var(--cube-square-radius, 20px)}.cs-row{position:relative;perspective:1400px;touch-action:pan-y;user-select:none;-webkit-user-select:none;outline:none}.cs-row:focus-visible{outline:2px solid var(--cube-square-focus, #5f9a80);outline-offset:3px;border-radius:var(--cs-radius)}.cs-band{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .38s cubic-bezier(.2,.8,.2,1)}.cs-band.cs-nudging{transition:transform .52s cubic-bezier(.4,0,.2,1)}.cs-band.cs-still{transition:none}.cs-side{position:absolute;inset:0;display:grid;gap:calc(var(--cs-gap) * var(--cube-square-gap-scale, 1));backface-visibility:hidden}.cs-edge{pointer-events:none;position:absolute;top:18%;bottom:18%;right:calc(-1*max(4px,var(--cs-gap) - 2px));z-index:1;width:3px;border-radius:999px;background:var(--cube-square-edge, color-mix(in srgb, #5f9a80 45%, transparent))}\n"]
2649
2661
  }]
2650
2662
  }],
2651
2663
  ctorParameters: () => [],
@@ -2674,6 +2686,14 @@ i0.ɵɵngDeclareClassMetadata({
2674
2686
  required: false
2675
2687
  }]
2676
2688
  }],
2689
+ align: [{
2690
+ type: i0.Input,
2691
+ args: [{
2692
+ isSignal: true,
2693
+ alias: "align",
2694
+ required: false
2695
+ }]
2696
+ }],
2677
2697
  listRow: [{
2678
2698
  type: i0.Input,
2679
2699
  args: [{
@@ -3051,6 +3071,7 @@ var CubeContext = class CubeContext {
3051
3071
  "tiles",
3052
3072
  "view",
3053
3073
  "maxSide",
3074
+ "align",
3054
3075
  "listRow",
3055
3076
  "dashed",
3056
3077
  "least",
@@ -3395,6 +3416,7 @@ var CubeLoading = class CubeLoading {
3395
3416
  "tiles",
3396
3417
  "view",
3397
3418
  "maxSide",
3419
+ "align",
3398
3420
  "listRow",
3399
3421
  "dashed",
3400
3422
  "least",