@intlayer/core 5.1.0 → 5.1.1

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.
@@ -21,8 +21,7 @@ __export(isValidReactElement_exports, {
21
21
  isValidElement: () => isValidElement
22
22
  });
23
23
  module.exports = __toCommonJS(isValidReactElement_exports);
24
- const REACT_ELEMENT_TYPE = Symbol.for("react.element");
25
- const isValidElement = (object) => typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
24
+ const isValidElement = (object) => typeof object === "object" && typeof object?.key !== "undefined" && typeof object?.props !== "undefined";
26
25
  // Annotate the CommonJS export names for ESM import in node:
27
26
  0 && (module.exports = {
28
27
  isValidElement
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/isValidReactElement.ts"],"sourcesContent":["const REACT_ELEMENT_TYPE = Symbol.for('react.element');\n\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param object\n * @return True if `object` is a ReactElement.\n * @final\n */\n\nexport const isValidElement = (object: any): boolean =>\n typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAAM,qBAAqB,OAAO,IAAI,eAAe;AAU9C,MAAM,iBAAiB,CAAC,WAC7B,OAAO,WAAW,YAClB,WAAW,QACX,OAAO,aAAa;","names":[]}
1
+ {"version":3,"sources":["../../../src/utils/isValidReactElement.ts"],"sourcesContent":["/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param object\n * @return True if `object` is a ReactElement.\n * @final\n */\n\nexport const isValidElement = (object: any): boolean =>\n typeof object === 'object' &&\n typeof object?.key !== 'undefined' &&\n typeof object?.props !== 'undefined';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,MAAM,iBAAiB,CAAC,WAC7B,OAAO,WAAW,YAClB,OAAO,QAAQ,QAAQ,eACvB,OAAO,QAAQ,UAAU;","names":[]}
@@ -1,5 +1,4 @@
1
- const REACT_ELEMENT_TYPE = Symbol.for("react.element");
2
- const isValidElement = (object) => typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1
+ const isValidElement = (object) => typeof object === "object" && typeof object?.key !== "undefined" && typeof object?.props !== "undefined";
3
2
  export {
4
3
  isValidElement
5
4
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/isValidReactElement.ts"],"sourcesContent":["const REACT_ELEMENT_TYPE = Symbol.for('react.element');\n\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param object\n * @return True if `object` is a ReactElement.\n * @final\n */\n\nexport const isValidElement = (object: any): boolean =>\n typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n"],"mappings":"AAAA,MAAM,qBAAqB,OAAO,IAAI,eAAe;AAU9C,MAAM,iBAAiB,CAAC,WAC7B,OAAO,WAAW,YAClB,WAAW,QACX,OAAO,aAAa;","names":[]}
1
+ {"version":3,"sources":["../../../src/utils/isValidReactElement.ts"],"sourcesContent":["/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param object\n * @return True if `object` is a ReactElement.\n * @final\n */\n\nexport const isValidElement = (object: any): boolean =>\n typeof object === 'object' &&\n typeof object?.key !== 'undefined' &&\n typeof object?.props !== 'undefined';\n"],"mappings":"AAQO,MAAM,iBAAiB,CAAC,WAC7B,OAAO,WAAW,YAClB,OAAO,QAAQ,QAAQ,eACvB,OAAO,QAAQ,UAAU;","names":[]}
@@ -1,5 +1,5 @@
1
1
  import type { LocalesValues } from '@intlayer/config/client';
2
2
  import type { TranslationContent, EnumerationContent, ConditionContent, NestedContent, MarkdownContent } from '../transpiler';
3
3
  import { type ContentNode, NodeType } from '../types';
4
- export declare const getDefaultNode: (nodeType: NodeType, locales: LocalesValues[], content?: ContentNode) => string | number | boolean | TranslationContent<NodeType> | MarkdownContent | NestedContent<import("..").DictionaryKeys> | ((args?: any) => ContentNode<string | number | boolean, false, string | number | boolean>) | EnumerationContent<ContentNode> | ConditionContent<ContentNode> | Record<number, ContentNode>;
4
+ export declare const getDefaultNode: (nodeType: NodeType, locales: LocalesValues[], content?: ContentNode) => string | number | boolean | MarkdownContent | NestedContent<never> | ((args?: any) => ContentNode<string | number | boolean, false, string | number | boolean>) | TranslationContent<ContentNode> | EnumerationContent<ContentNode> | ConditionContent<ContentNode> | Record<number, ContentNode>;
5
5
  //# sourceMappingURL=getDefaultNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultNode.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/getDefaultNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,cAAc,aACf,QAAQ,WACT,aAAa,EAAE,YACd,WAAW,yTAiEtB,CAAC"}
1
+ {"version":3,"file":"getDefaultNode.d.ts","sourceRoot":"","sources":["../../../src/dictionaryManipulator/getDefaultNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,cAAc,aACf,QAAQ,WACT,aAAa,EAAE,YACd,WAAW,sSAiEtB,CAAC"}
@@ -20,6 +20,6 @@ import type { LanguageContent } from './types';
20
20
  * - this function require each locale to be defined if defined in the project configuration.
21
21
  * - If a locale is missing, it will make each existing locale optional and raise an error if the locale is not found.
22
22
  */
23
- declare const translation: <Content = unknown, ContentRecord extends LanguageContent<Content> = IConfigLocales<Content_1>>(content: ContentRecord) => import("../..").TypedNodeModel<NodeType.Translation, ContentRecord>;
23
+ declare const translation: <Content = unknown, ContentRecord extends LanguageContent<Content> = import("intlayer").IConfigLocales<Content>>(content: ContentRecord) => import("../..").TypedNodeModel<NodeType.Translation, ContentRecord>;
24
24
  export { translation as t };
25
25
  //# sourceMappingURL=translation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/translation/translation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,SAAS,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,WAAW,GACf,OAAO,YACP,aAAa,SAAS,eAAe,CAAC,OAAO,CAAC,uCAErC,aAAa,wEAKrB,CAAC;AAEJ,OAAO,EAAE,WAAW,IAAI,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../../../src/transpiler/translation/translation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,SAAS,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,WAAW,GACf,OAAO,YACP,aAAa,SAAS,eAAe,CAAC,OAAO,CAAC,wDAErC,aAAa,wEAKrB,CAAC;AAEJ,OAAO,EAAE,WAAW,IAAI,CAAC,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"isValidReactElement.d.ts","sourceRoot":"","sources":["../../../src/utils/isValidReactElement.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,eAAO,MAAM,cAAc,WAAY,GAAG,KAAG,OAGL,CAAC"}
1
+ {"version":3,"file":"isValidReactElement.d.ts","sourceRoot":"","sources":["../../../src/utils/isValidReactElement.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,cAAc,WAAY,GAAG,KAAG,OAGP,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/core",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "private": false,
5
5
  "description": "Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.",
6
6
  "keywords": [
@@ -60,9 +60,9 @@
60
60
  "dependencies": {
61
61
  "@formatjs/intl-localematcher": "^0.5.10",
62
62
  "negotiator": "^1.0.0",
63
- "@intlayer/api": "5.1.0",
64
- "@intlayer/dictionaries-entry": "5.1.0",
65
- "@intlayer/config": "5.1.0"
63
+ "@intlayer/api": "5.1.1",
64
+ "@intlayer/config": "5.1.1",
65
+ "@intlayer/dictionaries-entry": "5.1.1"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/negotiator": "^0.6.3",
@@ -77,14 +77,14 @@
77
77
  "typescript": "^5.7.3",
78
78
  "@utils/eslint-config": "1.0.4",
79
79
  "@utils/ts-config": "1.0.4",
80
- "@utils/tsup-config": "1.0.4",
81
- "@utils/ts-config-types": "1.0.4"
80
+ "@utils/ts-config-types": "1.0.4",
81
+ "@utils/tsup-config": "1.0.4"
82
82
  },
83
83
  "peerDependencies": {
84
- "@intlayer/api": "5.1.0",
85
- "@intlayer/config": "5.1.0",
86
- "@intlayer/dictionaries-entry": "5.1.0",
87
- "intlayer": "5.1.0"
84
+ "@intlayer/api": "5.1.1",
85
+ "@intlayer/config": "5.1.1",
86
+ "@intlayer/dictionaries-entry": "5.1.1",
87
+ "intlayer": "5.1.1"
88
88
  },
89
89
  "engines": {
90
90
  "node": ">=14.18"