@becklyn/next 4.2.0 → 4.2.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.
@@ -35,5 +35,5 @@ export declare const getInspectorProps: <T extends InspectorProps>(data: T) => {
35
35
  locale: string | undefined;
36
36
  };
37
37
  export declare const removeInspectorProps: <T extends InspectorProps>(data: T) => {};
38
- export declare const inspector: (data: InspectableField) => Record<string, string | undefined>;
38
+ export declare const inspector: <T extends InspectableField>(data: T) => Record<string, string | undefined>;
39
39
  //# sourceMappingURL=inspector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../../contentful/inspector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;iBAKK,CAAC;AAEzC,eAAO,MAAM,oBAAoB;;;;;;iBAM/B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,cAAc,EAAE,MAAM,CAAC;;;;;;;;;;;;CAOlE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,cAAc,EAAE,MAAM,CAAC,OAQrE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,gBAAgB,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAkBnF,CAAC"}
1
+ {"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../../contentful/inspector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;iBAKK,CAAC;AAEzC,eAAO,MAAM,oBAAoB;;;;;;iBAM/B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,cAAc,EAAE,MAAM,CAAC;;;;;;;;;;;;CAOlE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,cAAc,EAAE,MAAM,CAAC,OAQrE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,gBAAgB,EAChD,MAAM,CAAC,KACR,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAkBnC,CAAC"}
@@ -5,6 +5,6 @@ const formatPhone = (phone) => {
5
5
  if (typeof phone === "number") {
6
6
  return phone;
7
7
  }
8
- return phone.replace(/[ -/)(]/g, "").replace("+49", "0049");
8
+ return phone.replace(/[-/)( ]/g, "").replace("+49", "0049");
9
9
  };
10
10
  exports.formatPhone = formatPhone;
@@ -1,2 +1,3 @@
1
1
  export declare const useIsMounted: () => boolean;
2
+ export declare const useIsLayoutMounted: () => boolean;
2
3
  //# sourceMappingURL=isMounted.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMounted.d.ts","sourceRoot":"","sources":["../../../lib/isMounted.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,eAQxB,CAAC"}
1
+ {"version":3,"file":"isMounted.d.ts","sourceRoot":"","sources":["../../../lib/isMounted.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,eAQxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,eAQ9B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useIsMounted = void 0;
3
+ exports.useIsLayoutMounted = exports.useIsMounted = void 0;
4
4
  const react_1 = require("react");
5
5
  const useIsMounted = () => {
6
6
  const [isMounted, setIsMounted] = (0, react_1.useState)(false);
@@ -10,3 +10,11 @@ const useIsMounted = () => {
10
10
  return isMounted;
11
11
  };
12
12
  exports.useIsMounted = useIsMounted;
13
+ const useIsLayoutMounted = () => {
14
+ const [isLayoutMounted, setIsLayoutMounted] = (0, react_1.useState)(false);
15
+ (0, react_1.useLayoutEffect)(() => {
16
+ setIsLayoutMounted(true);
17
+ }, []);
18
+ return isLayoutMounted;
19
+ };
20
+ exports.useIsLayoutMounted = useIsLayoutMounted;
@@ -35,5 +35,5 @@ export declare const getInspectorProps: <T extends InspectorProps>(data: T) => {
35
35
  locale: string | undefined;
36
36
  };
37
37
  export declare const removeInspectorProps: <T extends InspectorProps>(data: T) => {};
38
- export declare const inspector: (data: InspectableField) => Record<string, string | undefined>;
38
+ export declare const inspector: <T extends InspectableField>(data: T) => Record<string, string | undefined>;
39
39
  //# sourceMappingURL=inspector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../../contentful/inspector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;iBAKK,CAAC;AAEzC,eAAO,MAAM,oBAAoB;;;;;;iBAM/B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,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AC"}
@@ -5,6 +5,6 @@ const formatPhone = (phone) => {
5
5
  if (typeof phone === "number") {
6
6
  return phone;
7
7
  }
8
- return phone.replace(/[ -/)(]/g, "").replace("+49", "0049");
8
+ return phone.replace(/[-/)( ]/g, "").replace("+49", "0049");
9
9
  };
10
10
  exports.formatPhone = formatPhone;
@@ -1,2 +1,3 @@
1
1
  export declare const useIsMounted: () => boolean;
2
+ export declare const useIsLayoutMounted: () => boolean;
2
3
  //# sourceMappingURL=isMounted.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isMounted.d.ts","sourceRoot":"","sources":["../../../lib/isMounted.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,eAQxB,CAAC"}
1
+ {"version":3,"file":"isMounted.d.ts","sourceRoot":"","sources":["../../../lib/isMounted.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,eAQxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,eAQ9B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useIsMounted = void 0;
3
+ exports.useIsLayoutMounted = exports.useIsMounted = void 0;
4
4
  const react_1 = require("react");
5
5
  const useIsMounted = () => {
6
6
  const [isMounted, setIsMounted] = (0, react_1.useState)(false);
@@ -10,3 +10,11 @@ const useIsMounted = () => {
10
10
  return isMounted;
11
11
  };
12
12
  exports.useIsMounted = useIsMounted;
13
+ const useIsLayoutMounted = () => {
14
+ const [isLayoutMounted, setIsLayoutMounted] = (0, react_1.useState)(false);
15
+ (0, react_1.useLayoutEffect)(() => {
16
+ setIsLayoutMounted(true);
17
+ }, []);
18
+ return isLayoutMounted;
19
+ };
20
+ exports.useIsLayoutMounted = useIsLayoutMounted;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@becklyn/next",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/Becklyn-Studios/ts-libs/tree/main/packages/next",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  "typescript": "^5.9.3"
32
32
  },
33
33
  "peerDependencies": {
34
- "next": "^14.0.0 || ^15.0.0",
34
+ "next": "^14.0.0 || ^15.0.0 || ^16.0.0",
35
35
  "react": "^18.3.1 || ^19.0.0"
36
36
  },
37
37
  "files": [