@homebound/beam 2.309.2 → 2.310.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/dist/Css.d.ts +24 -0
- package/dist/Css.js +24 -0
- package/dist/hooks/useComputed.js +9 -7
- package/package.json +2 -2
package/dist/Css.d.ts
CHANGED
|
@@ -3952,6 +3952,18 @@ declare class CssBuilder<T extends Properties> {
|
|
|
3952
3952
|
get mw100(): CssBuilder<T & {
|
|
3953
3953
|
minWidth: import("csstype").Property.MinWidth<string | 0> | undefined;
|
|
3954
3954
|
}>;
|
|
3955
|
+
/** Sets `minWidth: "fit-content"`. */
|
|
3956
|
+
get mwfc(): CssBuilder<T & {
|
|
3957
|
+
minWidth: import("csstype").Property.MinWidth<string | 0> | undefined;
|
|
3958
|
+
}>;
|
|
3959
|
+
/** Sets `minWidth: "min-content"`. */
|
|
3960
|
+
get mwminc(): CssBuilder<T & {
|
|
3961
|
+
minWidth: import("csstype").Property.MinWidth<string | 0> | undefined;
|
|
3962
|
+
}>;
|
|
3963
|
+
/** Sets `minWidth: "max-content"`. */
|
|
3964
|
+
get mwmaxc(): CssBuilder<T & {
|
|
3965
|
+
minWidth: import("csstype").Property.MinWidth<string | 0> | undefined;
|
|
3966
|
+
}>;
|
|
3955
3967
|
/** Sets `minWidth: value`. */
|
|
3956
3968
|
mw(value: Properties["minWidth"]): CssBuilder<T & {
|
|
3957
3969
|
minWidth: import("csstype").Property.MinWidth<string | 0> | undefined;
|
|
@@ -3980,6 +3992,18 @@ declare class CssBuilder<T extends Properties> {
|
|
|
3980
3992
|
get maxw100(): CssBuilder<T & {
|
|
3981
3993
|
maxWidth: import("csstype").Property.MaxWidth<string | 0> | undefined;
|
|
3982
3994
|
}>;
|
|
3995
|
+
/** Sets `maxWidth: "fit-content"`. */
|
|
3996
|
+
get maxwfc(): CssBuilder<T & {
|
|
3997
|
+
maxWidth: import("csstype").Property.MaxWidth<string | 0> | undefined;
|
|
3998
|
+
}>;
|
|
3999
|
+
/** Sets `maxWidth: "min-content"`. */
|
|
4000
|
+
get maxwminc(): CssBuilder<T & {
|
|
4001
|
+
maxWidth: import("csstype").Property.MaxWidth<string | 0> | undefined;
|
|
4002
|
+
}>;
|
|
4003
|
+
/** Sets `maxWidth: "max-content"`. */
|
|
4004
|
+
get maxwmaxc(): CssBuilder<T & {
|
|
4005
|
+
maxWidth: import("csstype").Property.MaxWidth<string | 0> | undefined;
|
|
4006
|
+
}>;
|
|
3983
4007
|
/** Sets `maxWidth: value`. */
|
|
3984
4008
|
maxw(value: Properties["maxWidth"]): CssBuilder<T & {
|
|
3985
4009
|
maxWidth: import("csstype").Property.MaxWidth<string | 0> | undefined;
|
package/dist/Css.js
CHANGED
|
@@ -3521,6 +3521,18 @@ class CssBuilder {
|
|
|
3521
3521
|
get mw100() {
|
|
3522
3522
|
return this.add("minWidth", "100%");
|
|
3523
3523
|
}
|
|
3524
|
+
/** Sets `minWidth: "fit-content"`. */
|
|
3525
|
+
get mwfc() {
|
|
3526
|
+
return this.add("minWidth", "fit-content");
|
|
3527
|
+
}
|
|
3528
|
+
/** Sets `minWidth: "min-content"`. */
|
|
3529
|
+
get mwminc() {
|
|
3530
|
+
return this.add("minWidth", "min-content");
|
|
3531
|
+
}
|
|
3532
|
+
/** Sets `minWidth: "max-content"`. */
|
|
3533
|
+
get mwmaxc() {
|
|
3534
|
+
return this.add("minWidth", "max-content");
|
|
3535
|
+
}
|
|
3524
3536
|
/** Sets `minWidth: value`. */
|
|
3525
3537
|
mw(value) {
|
|
3526
3538
|
return this.add("minWidth", value);
|
|
@@ -3549,6 +3561,18 @@ class CssBuilder {
|
|
|
3549
3561
|
get maxw100() {
|
|
3550
3562
|
return this.add("maxWidth", "100%");
|
|
3551
3563
|
}
|
|
3564
|
+
/** Sets `maxWidth: "fit-content"`. */
|
|
3565
|
+
get maxwfc() {
|
|
3566
|
+
return this.add("maxWidth", "fit-content");
|
|
3567
|
+
}
|
|
3568
|
+
/** Sets `maxWidth: "min-content"`. */
|
|
3569
|
+
get maxwminc() {
|
|
3570
|
+
return this.add("maxWidth", "min-content");
|
|
3571
|
+
}
|
|
3572
|
+
/** Sets `maxWidth: "max-content"`. */
|
|
3573
|
+
get maxwmaxc() {
|
|
3574
|
+
return this.add("maxWidth", "max-content");
|
|
3575
|
+
}
|
|
3552
3576
|
/** Sets `maxWidth: value`. */
|
|
3553
3577
|
maxw(value) {
|
|
3554
3578
|
return this.add("maxWidth", value);
|
|
@@ -26,21 +26,23 @@ function useComputed(fn, deps) {
|
|
|
26
26
|
// If deps has changed, we're already re-running, so don't trigger a 2nd one
|
|
27
27
|
current.hasRan = false;
|
|
28
28
|
current.runner = (0, mobx_1.autorun)(() => {
|
|
29
|
-
const { value: oldValue, hasRan
|
|
29
|
+
const { value: oldValue, hasRan } = current;
|
|
30
30
|
// Always eval fn() (even on 1st render) to register our observable.
|
|
31
31
|
const newValue = fn(oldValue);
|
|
32
|
+
// If we've already run and the value hasn't changed, don't trigger a re-render
|
|
33
|
+
//
|
|
34
|
+
// Also, we avoid a deep equality, b/c if a `useComputed` is returning something complicated/cyclic,
|
|
35
|
+
// like ReactElement, deep equality will crawl into the guts of React/ReactFiber and cycle/infinite loop.
|
|
36
|
+
if (hasRan && (0, shallowEqual_1.shallowEqual)(newValue, oldValue))
|
|
37
|
+
return;
|
|
38
|
+
// Only change the identity of `current.value` after we've checked that it's not shallow equal
|
|
32
39
|
current.value = newValue;
|
|
33
40
|
current.hasRan = true;
|
|
34
41
|
// Only trigger a re-render if this is not the 1st autorun. Note
|
|
35
42
|
// that if deps has changed, we're inherently in a re-render so also
|
|
36
43
|
// don't need to trigger an additional re-render.
|
|
37
|
-
|
|
38
|
-
// Also, we avoid a deep equality, b/c if a `useComputed` is returning something
|
|
39
|
-
// complicated/cyclic, like ReactElement, deep equality will crawl into the guts
|
|
40
|
-
// of React/ReactFiber and cycle/infinite loop.
|
|
41
|
-
if (oldHasRun && !(0, shallowEqual_1.shallowEqual)(newValue, oldValue)) {
|
|
44
|
+
if (hasRan)
|
|
42
45
|
setTick((tick) => tick + 1);
|
|
43
|
-
}
|
|
44
46
|
});
|
|
45
47
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
48
|
}, deps);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homebound/beam",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.310.0",
|
|
4
4
|
"author": "Homebound",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@homebound/eslint-config": "1.6.1",
|
|
78
78
|
"@homebound/rtl-react-router-utils": "1.0.3",
|
|
79
79
|
"@homebound/rtl-utils": "^2.63.1",
|
|
80
|
-
"@homebound/truss": "^1.
|
|
80
|
+
"@homebound/truss": "^1.131.0",
|
|
81
81
|
"@homebound/tsconfig": "^1.0.3",
|
|
82
82
|
"@semantic-release/exec": "^6.0.3",
|
|
83
83
|
"@semantic-release/git": "^10.0.1",
|