generaltranslation 8.2.8 → 8.2.10

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{ApiError-4zIP-twr.cjs → ApiError-CZ45tkW6.cjs} +1 -1
  3. package/dist/{ApiError-4zIP-twr.cjs.map → ApiError-CZ45tkW6.cjs.map} +1 -1
  4. package/dist/{ApiError-Bv7vlzyQ.mjs → ApiError-IYfaOR30.mjs} +1 -1
  5. package/dist/{ApiError-Bv7vlzyQ.mjs.map → ApiError-IYfaOR30.mjs.map} +1 -1
  6. package/dist/IntlCache-Ccg_cQPR.mjs +195 -0
  7. package/dist/IntlCache-Ccg_cQPR.mjs.map +1 -0
  8. package/dist/IntlCache-k2qfrDqB.cjs +212 -0
  9. package/dist/IntlCache-k2qfrDqB.cjs.map +1 -0
  10. package/dist/base64-C1sogiix.mjs +70 -0
  11. package/dist/base64-C1sogiix.mjs.map +1 -0
  12. package/dist/base64-CUcEPEC5.cjs +111 -0
  13. package/dist/base64-CUcEPEC5.cjs.map +1 -0
  14. package/dist/core-3SOQ5ND6.cjs +1679 -0
  15. package/dist/core-3SOQ5ND6.cjs.map +1 -0
  16. package/dist/core-Bx0m6GOp.mjs +1500 -0
  17. package/dist/core-Bx0m6GOp.mjs.map +1 -0
  18. package/dist/core-CJMv4fMa.d.cts +209 -0
  19. package/dist/core-DtPj_ruw.d.mts +209 -0
  20. package/dist/core.cjs +8 -0
  21. package/dist/core.d.cts +2 -0
  22. package/dist/core.d.mts +2 -0
  23. package/dist/core.mjs +2 -0
  24. package/dist/errors.cjs +1 -1
  25. package/dist/errors.mjs +1 -1
  26. package/dist/{id-CPbVYREY.mjs → id-BmOyfaug.mjs} +2 -2
  27. package/dist/{id-CPbVYREY.mjs.map → id-BmOyfaug.mjs.map} +1 -1
  28. package/dist/{id-VXBgyXu2.cjs → id-COlX5v3V.cjs} +6 -6
  29. package/dist/{id-VXBgyXu2.cjs.map → id-COlX5v3V.cjs.map} +1 -1
  30. package/dist/id.cjs +1 -1
  31. package/dist/id.d.cts +1 -1
  32. package/dist/id.d.mts +1 -1
  33. package/dist/id.mjs +1 -1
  34. package/dist/index.cjs +60 -1519
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +4 -162
  37. package/dist/index.d.mts +4 -162
  38. package/dist/index.mjs +8 -1443
  39. package/dist/index.mjs.map +1 -1
  40. package/dist/internal.cjs +602 -44
  41. package/dist/internal.cjs.map +1 -0
  42. package/dist/internal.d.cts +1 -1
  43. package/dist/internal.d.mts +1 -1
  44. package/dist/internal.mjs +562 -2
  45. package/dist/internal.mjs.map +1 -0
  46. package/dist/{sha2-DKowBr6H.cjs → isVariable-B08mggBy.cjs} +18 -18
  47. package/dist/isVariable-B08mggBy.cjs.map +1 -0
  48. package/dist/{stableStringify-DgDlE_pD.mjs → isVariable-CYsKFHvR.mjs} +19 -19
  49. package/dist/isVariable-CYsKFHvR.mjs.map +1 -0
  50. package/dist/{types-DazaDJbs.d.mts → types-Dfy_sRLD.d.mts} +1 -1
  51. package/dist/{types-BJdoI1d1.d.cts → types-mZeu4HS3.d.cts} +1 -1
  52. package/dist/types.d.cts +1 -1
  53. package/dist/types.d.mts +1 -1
  54. package/package.json +17 -1
  55. package/dist/internal-B3QbyI_5.mjs +0 -820
  56. package/dist/internal-B3QbyI_5.mjs.map +0 -1
  57. package/dist/internal-DIHQF9gs.cjs +0 -1070
  58. package/dist/internal-DIHQF9gs.cjs.map +0 -1
  59. package/dist/sha2-DKowBr6H.cjs.map +0 -1
  60. package/dist/stableStringify-DgDlE_pD.mjs.map +0 -1
@@ -0,0 +1,209 @@
1
+ import { Dt as StringFormat, Mt as CustomMapping, jt as LocaleProperties, n as FormatVariables } from "./types-Dfy_sRLD.mjs";
2
+
3
+ //#region src/formatting/custom-formats/CutoffFormat/types.d.ts
4
+ /** Type of terminator */
5
+ type CutoffFormatStyle = 'none' | 'ellipsis';
6
+ /** Terminator options */
7
+ interface TerminatorOptions {
8
+ /** The terminator to use */
9
+ terminator?: string;
10
+ /** An optional separator between the terminator and the value */
11
+ separator?: string;
12
+ }
13
+ /** Input formatting options (for constructor) */
14
+ interface CutoffFormatOptions extends TerminatorOptions {
15
+ /** Cutoff length */
16
+ maxChars?: number;
17
+ /** Type of terminator */
18
+ style?: CutoffFormatStyle;
19
+ }
20
+ //#endregion
21
+ //#region src/LocaleConfig.d.ts
22
+ type LocaleConfigConstructorParams = {
23
+ defaultLocale?: string;
24
+ locales?: string[];
25
+ customMapping?: CustomMapping;
26
+ };
27
+ type LocalesOption = {
28
+ locales?: string | string[];
29
+ };
30
+ type WithLocales<T = object> = T & LocalesOption;
31
+ /**
32
+ * LocaleConfig contains the locale and formatting primitives exposed through
33
+ * the core entrypoint.
34
+ *
35
+ * It intentionally does not store project IDs, API keys, runtime URLs, or any
36
+ * translation credentials. It only stores locale metadata needed to resolve
37
+ * aliases, choose formatting fallbacks, and format values with Intl.
38
+ */
39
+ declare class LocaleConfig {
40
+ readonly defaultLocale: string;
41
+ readonly locales: string[];
42
+ readonly customMapping?: CustomMapping;
43
+ constructor({
44
+ defaultLocale,
45
+ locales,
46
+ customMapping
47
+ }?: LocaleConfigConstructorParams);
48
+ private get translationLocales();
49
+ private resolveCanonicalLocaleList;
50
+ private resolveCanonicalLocaleArgs;
51
+ private toLocaleList;
52
+ private getFormattingLocales;
53
+ formatNum(value: number, targetLocale?: string, options?: WithLocales<Intl.NumberFormatOptions>): string;
54
+ formatDateTime(value: Date, targetLocale?: string, options?: WithLocales<Intl.DateTimeFormatOptions>): string;
55
+ formatCurrency(value: number, currency: string, targetLocale?: string, options?: WithLocales<Intl.NumberFormatOptions>): string;
56
+ formatRelativeTime(value: number, unit: Intl.RelativeTimeFormatUnit, targetLocale?: string, options?: WithLocales<Intl.RelativeTimeFormatOptions>): string;
57
+ formatRelativeTimeFromDate(date: Date, targetLocale?: string, options?: WithLocales<Intl.RelativeTimeFormatOptions & {
58
+ baseDate?: Date;
59
+ }>): string;
60
+ formatCutoff(value: string, targetLocale?: string, options?: WithLocales<CutoffFormatOptions>): string;
61
+ formatMessage(message: string, targetLocale?: string, options?: WithLocales<{
62
+ variables?: FormatVariables;
63
+ dataFormat?: StringFormat;
64
+ }>): string;
65
+ formatList(array: Array<string | number>, targetLocale?: string, options?: WithLocales<Intl.ListFormatOptions>): string;
66
+ formatListToParts<T>(array: Array<T>, targetLocale?: string, options?: WithLocales<Intl.ListFormatOptions>): (string | T)[];
67
+ getLocaleName(locale: string): string;
68
+ getLocaleEmoji(locale: string): string;
69
+ getLocaleProperties(locale: string): LocaleProperties;
70
+ requiresTranslation(targetLocale: string, sourceLocale?: string, approvedLocales?: string[] | undefined): boolean;
71
+ determineLocale(locales: string | string[], approvedLocales?: string[]): string | undefined;
72
+ getLocaleDirection(locale: string): "ltr" | "rtl";
73
+ isValidLocale(locale: string): boolean;
74
+ resolveCanonicalLocale(locale: string): string;
75
+ resolveAliasLocale(locale: string): string;
76
+ standardizeLocale(locale: string): string;
77
+ isSameDialect(...locales: (string | string[])[]): boolean;
78
+ isSameLanguage(...locales: (string | string[])[]): boolean;
79
+ isSupersetLocale(superLocale: string, subLocale: string): boolean;
80
+ }
81
+ //#endregion
82
+ //#region src/core.d.ts
83
+ /**
84
+ * Core formatting and locale helpers.
85
+ *
86
+ * This entry point exposes deterministic locale and formatting primitives. It
87
+ * does not export the GT service client, project credentials, network
88
+ * translation methods, file APIs, or other server/service concerns from the
89
+ * root `generaltranslation` facade.
90
+ *
91
+ * This entry point is intended for framework and shared packages that need
92
+ * locale metadata or formatting behavior without pulling in the full
93
+ * translation API surface.
94
+ */
95
+ /**
96
+ * Formats a string with cutoff behavior, applying a terminator when the string exceeds the maximum character limit.
97
+ *
98
+ * This standalone function provides cutoff formatting functionality without requiring a GT instance.
99
+ * The locales parameter is required for proper terminator selection based on the target language.
100
+ *
101
+ * @param {string} value - The string value to format with cutoff behavior.
102
+ * @param {Object} [options] - Configuration options for cutoff formatting.
103
+ * @param {string | string[]} [options.locales] - The locales to use for terminator selection.
104
+ * @param {number} [options.maxChars] - The maximum number of characters to display.
105
+ * - Undefined values are treated as no cutoff.
106
+ * - Negative values follow .slice() behavior and terminator will be added before the value.
107
+ * - 0 will result in an empty string.
108
+ * - If cutoff results in an empty string, no terminator is added.
109
+ * @param {CutoffFormatStyle} [options.style='ellipsis'] - The style of the terminator.
110
+ * @param {string} [options.terminator] - Optional override the terminator to use.
111
+ * @param {string} [options.separator] - Optional override the separator to use between the terminator and the value.
112
+ * - If no terminator is provided, then separator is ignored.
113
+ * @returns {string} The formatted string with terminator applied if cutoff occurs.
114
+ *
115
+ * @example
116
+ * formatCutoff('Hello, world!', { locales: 'en-US', maxChars: 8 });
117
+ * // Returns: 'Hello, …'
118
+ *
119
+ * @example
120
+ * formatCutoff('Hello, world!', { locales: 'en-US', maxChars: -3 });
121
+ * // Returns: '…d!'
122
+ *
123
+ * @example
124
+ * formatCutoff('Very long text that needs cutting', {
125
+ * locales: 'en-US',
126
+ * maxChars: 15,
127
+ * style: 'ellipsis',
128
+ * separator: ' '
129
+ * });
130
+ * // Returns: 'Very long tex …'
131
+ */
132
+ declare function formatCutoff(value: string, options?: {
133
+ locales?: string | string[];
134
+ } & CutoffFormatOptions): string;
135
+ /**
136
+ * Formats a message according to the specified locales and options.
137
+ *
138
+ * @param {string} message - The message to format.
139
+ * @param {Object} [options] - Configuration options for message formatting.
140
+ * @param {string | string[]} [options.locales] - The locales to use for formatting.
141
+ * @param {FormatVariables} [options.variables] - The variables to use for formatting.
142
+ * @param {StringFormat} [options.dataFormat='ICU'] - The format of the message. When STRING, the message is returned as is.
143
+ * @returns {string} The formatted message.
144
+ *
145
+ * @example
146
+ * formatMessage('Hello {name}', { variables: { name: 'John' } });
147
+ * // Returns: "Hello John"
148
+ *
149
+ * @example
150
+ * formatMessage('Hello {name}', {
151
+ * locales: ['fr'],
152
+ * variables: { name: 'John' }
153
+ * });
154
+ */
155
+ declare function formatMessage(message: string, options?: {
156
+ locales?: string | string[];
157
+ variables?: FormatVariables;
158
+ dataFormat?: StringFormat;
159
+ }): string;
160
+ /**
161
+ * Checks if a given BCP 47 locale code is valid.
162
+ *
163
+ * @param {string} locale - The BCP 47 locale code to validate.
164
+ * @param {CustomMapping} [customMapping] - The custom mapping to use for validation.
165
+ * @returns {boolean} True if the BCP 47 code is valid, false otherwise.
166
+ *
167
+ * @example
168
+ * isValidLocale('en-US');
169
+ * // Returns: true
170
+ *
171
+ * @example
172
+ * isValidLocale('en_US');
173
+ * // Returns: false
174
+ */
175
+ declare function isValidLocale(locale: string, customMapping?: CustomMapping): boolean;
176
+ /**
177
+ * Resolves the canonical locale for a given locale.
178
+ *
179
+ * @param {string} locale - The locale to resolve the canonical locale for.
180
+ * @param {CustomMapping} [customMapping] - The custom mapping to use for resolving the canonical locale.
181
+ * @returns {string} The canonical locale.
182
+ *
183
+ * @example
184
+ * resolveCanonicalLocale('en-US');
185
+ * // Returns: 'en-US'
186
+ *
187
+ * @example
188
+ * resolveCanonicalLocale('en', { en: 'en-US' });
189
+ * // Returns: 'en-US'
190
+ */
191
+ declare function resolveCanonicalLocale(locale: string, customMapping?: CustomMapping): string;
192
+ /**
193
+ * Standardizes a BCP 47 locale code to ensure correct formatting.
194
+ *
195
+ * @param {string} locale - The BCP 47 locale code to standardize.
196
+ * @returns {string} The standardized BCP 47 locale code or an empty string if it is an invalid code.
197
+ *
198
+ * @example
199
+ * standardizeLocale('en-us');
200
+ * // Returns: 'en-US'
201
+ *
202
+ * @example
203
+ * standardizeLocale('not a locale');
204
+ * // Returns: ''
205
+ */
206
+ declare function standardizeLocale(locale: string): string;
207
+ //#endregion
208
+ export { standardizeLocale as a, CutoffFormatOptions as c, resolveCanonicalLocale as i, formatMessage as n, LocaleConfig as o, isValidLocale as r, LocaleConfigConstructorParams as s, formatCutoff as t };
209
+ //# sourceMappingURL=core-DtPj_ruw.d.mts.map
package/dist/core.cjs ADDED
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_core = require("./core-3SOQ5ND6.cjs");
3
+ exports.LocaleConfig = require_core.LocaleConfig;
4
+ exports.formatCutoff = require_core.formatCutoff;
5
+ exports.formatMessage = require_core.formatMessage;
6
+ exports.isValidLocale = require_core.isValidLocale;
7
+ exports.resolveCanonicalLocale = require_core.resolveCanonicalLocale;
8
+ exports.standardizeLocale = require_core.standardizeLocale;
@@ -0,0 +1,2 @@
1
+ import { a as standardizeLocale, i as resolveCanonicalLocale, n as formatMessage, o as LocaleConfig, r as isValidLocale, s as LocaleConfigConstructorParams, t as formatCutoff } from "./core-CJMv4fMa.cjs";
2
+ export { LocaleConfig, LocaleConfigConstructorParams, formatCutoff, formatMessage, isValidLocale, resolveCanonicalLocale, standardizeLocale };
@@ -0,0 +1,2 @@
1
+ import { a as standardizeLocale, i as resolveCanonicalLocale, n as formatMessage, o as LocaleConfig, r as isValidLocale, s as LocaleConfigConstructorParams, t as formatCutoff } from "./core-DtPj_ruw.mjs";
2
+ export { LocaleConfig, LocaleConfigConstructorParams, formatCutoff, formatMessage, isValidLocale, resolveCanonicalLocale, standardizeLocale };
package/dist/core.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { a as standardizeLocale, i as resolveCanonicalLocale, n as formatMessage, o as LocaleConfig, r as isValidLocale, t as formatCutoff } from "./core-Bx0m6GOp.mjs";
2
+ export { LocaleConfig, formatCutoff, formatMessage, isValidLocale, resolveCanonicalLocale, standardizeLocale };
package/dist/errors.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_ApiError = require("./ApiError-4zIP-twr.cjs");
2
+ const require_ApiError = require("./ApiError-CZ45tkW6.cjs");
3
3
  exports.ApiError = require_ApiError.ApiError;
package/dist/errors.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as ApiError } from "./ApiError-Bv7vlzyQ.mjs";
1
+ import { t as ApiError } from "./ApiError-IYfaOR30.mjs";
2
2
  export { ApiError };
@@ -1,4 +1,4 @@
1
- import { n as isVariable, t as stableStringify } from "./stableStringify-DgDlE_pD.mjs";
1
+ import { n as stableStringify, t as isVariable } from "./isVariable-CYsKFHvR.mjs";
2
2
  import { sha256 } from "@noble/hashes/sha2.js";
3
3
  import { bytesToHex, utf8ToBytes } from "@noble/hashes/utils.js";
4
4
  //#region src/id/hashSource.ts
@@ -71,4 +71,4 @@ function hashTemplate(template, hashFunction = hashString) {
71
71
  //#endregion
72
72
  export { hashSource as n, hashString as r, hashTemplate as t };
73
73
 
74
- //# sourceMappingURL=id-CPbVYREY.mjs.map
74
+ //# sourceMappingURL=id-BmOyfaug.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"id-CPbVYREY.mjs","names":["stringify","stringify"],"sources":["../src/id/hashSource.ts","../src/id/hashTemplate.ts"],"sourcesContent":["// Functions provided to other GT libraries\n\nimport { JsxChild, JsxChildren, Variable } from '../types';\nimport { stableStringify as stringify } from '../utils/stableStringify';\nimport { sha256 } from '@noble/hashes/sha2.js';\nimport { bytesToHex, utf8ToBytes } from '@noble/hashes/utils.js';\nimport isVariable from '../utils/isVariable';\nimport { HashMetadata } from './types';\n\n// ----- FUNCTIONS ----- //\n/**\n * Calculates a unique hash for a given string using sha256.\n *\n * First 16 characters of hash, hex encoded.\n *\n * @param {string} string - The string to be hashed.\n * @returns {string} - The resulting hash as a hexadecimal string.\n */\nexport function hashString(string: string): string {\n return bytesToHex(sha256(utf8ToBytes(string))).slice(0, 16);\n}\n\n/**\n * Calculates a unique ID for the given children objects by hashing their sanitized JSON string representation.\n *\n * @param {any} childrenAsObjects - The children objects to be hashed.\n * @param {string} [context] - The context for the children\n * @param {string} [id] - The id for the JSX Children object\n * @param {number} [maxChars] - The maxChars for the JSX Children object\n * @param {string} [dataFormat] - The data format of the sources\n * @param {function} [hashFunction] custom hash function\n * @returns {string} - The unique has of the children.\n */\nexport function hashSource(\n {\n source,\n context,\n id,\n maxChars,\n dataFormat,\n }: {\n source: JsxChildren | string;\n } & HashMetadata,\n hashFunction: (string: string) => string = hashString\n): string {\n let sanitizedSource: SanitizedChildren | string;\n if (dataFormat === 'JSX') {\n sanitizedSource = sanitizeJsxChildren(source);\n } else {\n sanitizedSource = source as string;\n }\n const sanitizedData: {\n source?: SanitizedChildren;\n } & HashMetadata = {\n source: sanitizedSource,\n ...(id && { id }),\n ...(context && { context }),\n ...(maxChars != null && { maxChars: Math.abs(maxChars) }),\n ...(dataFormat && { dataFormat }),\n };\n const stringifiedData = stringify(sanitizedData);\n return hashFunction(stringifiedData);\n}\n\ntype SanitizedVariable = Omit<Variable, 'i'>;\n\ntype SanitizedElement = {\n b?: {\n [k: string]: SanitizedChildren; // Branches\n };\n c?: SanitizedChildren; // Children\n t?: string; // Branch Transformation\n};\ntype SanitizedChild = SanitizedElement | SanitizedVariable | string;\ntype SanitizedChildren = SanitizedChild | SanitizedChild[];\n\n/**\n * Sanitizes a child object by removing the data-_gt attribute and its branches.\n *\n * @param child - The child object to sanitize.\n * @returns The sanitized child object.\n *\n */\nconst sanitizeChild = (child: JsxChild): SanitizedChild => {\n if (child && typeof child === 'object') {\n const newChild: SanitizedChild = {};\n if ('c' in child && child.c) {\n newChild.c = sanitizeJsxChildren(child.c);\n }\n if ('d' in child) {\n const generaltranslation = child?.d;\n if (generaltranslation?.b) {\n // The only thing that prevents sanitizeJsx from being stable is\n // the order of the keys in the branches object.\n // We don't sort them because stable-stringify sorts them anyways\n newChild.b = Object.fromEntries(\n Object.entries(generaltranslation.b).map(([key, value]) => [\n key,\n sanitizeJsxChildren(value as JsxChildren),\n ])\n );\n }\n if (generaltranslation?.t) {\n newChild.t = generaltranslation.t;\n }\n }\n if (isVariable(child)) {\n return {\n k: child.k,\n ...(child.v && {\n v: child.v,\n }),\n };\n }\n return newChild;\n }\n return child;\n};\n\nfunction sanitizeJsxChildren(\n childrenAsObjects: JsxChildren\n): SanitizedChildren {\n return Array.isArray(childrenAsObjects)\n ? childrenAsObjects.map(sanitizeChild)\n : sanitizeChild(childrenAsObjects);\n}\n","import { hashString } from './hashSource';\nimport { stableStringify as stringify } from '../utils/stableStringify';\n\nexport default function hashTemplate(\n template: {\n [key: string]: string;\n },\n hashFunction = hashString\n): string {\n return hashFunction(stringify(template));\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,SAAgB,WAAW,QAAwB;AACjD,QAAO,WAAW,OAAO,YAAY,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG;;;;;;;;;;;;;AAc7D,SAAgB,WACd,EACE,QACA,SACA,IACA,UACA,cAIF,eAA2C,YACnC;CACR,IAAI;AACJ,KAAI,eAAe,MACjB,mBAAkB,oBAAoB,OAAO;KAE7C,mBAAkB;AAYpB,QAAO,aADiBA,gBAAU;EANhC,QAAQ;EACR,GAAI,MAAM,EAAE,IAAI;EAChB,GAAI,WAAW,EAAE,SAAS;EAC1B,GAAI,YAAY,QAAQ,EAAE,UAAU,KAAK,IAAI,SAAS,EAAE;EACxD,GAAI,cAAc,EAAE,YAAY;EAEa,CACZ,CAAC;;;;;;;;;AAsBtC,MAAM,iBAAiB,UAAoC;AACzD,KAAI,SAAS,OAAO,UAAU,UAAU;EACtC,MAAM,WAA2B,EAAE;AACnC,MAAI,OAAO,SAAS,MAAM,EACxB,UAAS,IAAI,oBAAoB,MAAM,EAAE;AAE3C,MAAI,OAAO,OAAO;GAChB,MAAM,qBAAqB,OAAO;AAClC,OAAI,oBAAoB,EAItB,UAAS,IAAI,OAAO,YAClB,OAAO,QAAQ,mBAAmB,EAAE,CAAC,KAAK,CAAC,KAAK,WAAW,CACzD,KACA,oBAAoB,MAAqB,CAC1C,CAAC,CACH;AAEH,OAAI,oBAAoB,EACtB,UAAS,IAAI,mBAAmB;;AAGpC,MAAI,WAAW,MAAM,CACnB,QAAO;GACL,GAAG,MAAM;GACT,GAAI,MAAM,KAAK,EACb,GAAG,MAAM,GACV;GACF;AAEH,SAAO;;AAET,QAAO;;AAGT,SAAS,oBACP,mBACmB;AACnB,QAAO,MAAM,QAAQ,kBAAkB,GACnC,kBAAkB,IAAI,cAAc,GACpC,cAAc,kBAAkB;;;;ACzHtC,SAAwB,aACtB,UAGA,eAAe,YACP;AACR,QAAO,aAAaC,gBAAU,SAAS,CAAC"}
1
+ {"version":3,"file":"id-BmOyfaug.mjs","names":["stringify","stringify"],"sources":["../src/id/hashSource.ts","../src/id/hashTemplate.ts"],"sourcesContent":["// Functions provided to other GT libraries\n\nimport { JsxChild, JsxChildren, Variable } from '../types';\nimport { stableStringify as stringify } from '../utils/stableStringify';\nimport { sha256 } from '@noble/hashes/sha2.js';\nimport { bytesToHex, utf8ToBytes } from '@noble/hashes/utils.js';\nimport isVariable from '../utils/isVariable';\nimport { HashMetadata } from './types';\n\n// ----- FUNCTIONS ----- //\n/**\n * Calculates a unique hash for a given string using sha256.\n *\n * First 16 characters of hash, hex encoded.\n *\n * @param {string} string - The string to be hashed.\n * @returns {string} - The resulting hash as a hexadecimal string.\n */\nexport function hashString(string: string): string {\n return bytesToHex(sha256(utf8ToBytes(string))).slice(0, 16);\n}\n\n/**\n * Calculates a unique ID for the given children objects by hashing their sanitized JSON string representation.\n *\n * @param {any} childrenAsObjects - The children objects to be hashed.\n * @param {string} [context] - The context for the children\n * @param {string} [id] - The id for the JSX Children object\n * @param {number} [maxChars] - The maxChars for the JSX Children object\n * @param {string} [dataFormat] - The data format of the sources\n * @param {function} [hashFunction] custom hash function\n * @returns {string} - The unique has of the children.\n */\nexport function hashSource(\n {\n source,\n context,\n id,\n maxChars,\n dataFormat,\n }: {\n source: JsxChildren | string;\n } & HashMetadata,\n hashFunction: (string: string) => string = hashString\n): string {\n let sanitizedSource: SanitizedChildren | string;\n if (dataFormat === 'JSX') {\n sanitizedSource = sanitizeJsxChildren(source);\n } else {\n sanitizedSource = source as string;\n }\n const sanitizedData: {\n source?: SanitizedChildren;\n } & HashMetadata = {\n source: sanitizedSource,\n ...(id && { id }),\n ...(context && { context }),\n ...(maxChars != null && { maxChars: Math.abs(maxChars) }),\n ...(dataFormat && { dataFormat }),\n };\n const stringifiedData = stringify(sanitizedData);\n return hashFunction(stringifiedData);\n}\n\ntype SanitizedVariable = Omit<Variable, 'i'>;\n\ntype SanitizedElement = {\n b?: {\n [k: string]: SanitizedChildren; // Branches\n };\n c?: SanitizedChildren; // Children\n t?: string; // Branch Transformation\n};\ntype SanitizedChild = SanitizedElement | SanitizedVariable | string;\ntype SanitizedChildren = SanitizedChild | SanitizedChild[];\n\n/**\n * Sanitizes a child object by removing the data-_gt attribute and its branches.\n *\n * @param child - The child object to sanitize.\n * @returns The sanitized child object.\n *\n */\nconst sanitizeChild = (child: JsxChild): SanitizedChild => {\n if (child && typeof child === 'object') {\n const newChild: SanitizedChild = {};\n if ('c' in child && child.c) {\n newChild.c = sanitizeJsxChildren(child.c);\n }\n if ('d' in child) {\n const generaltranslation = child?.d;\n if (generaltranslation?.b) {\n // The only thing that prevents sanitizeJsx from being stable is\n // the order of the keys in the branches object.\n // We don't sort them because stable-stringify sorts them anyways\n newChild.b = Object.fromEntries(\n Object.entries(generaltranslation.b).map(([key, value]) => [\n key,\n sanitizeJsxChildren(value as JsxChildren),\n ])\n );\n }\n if (generaltranslation?.t) {\n newChild.t = generaltranslation.t;\n }\n }\n if (isVariable(child)) {\n return {\n k: child.k,\n ...(child.v && {\n v: child.v,\n }),\n };\n }\n return newChild;\n }\n return child;\n};\n\nfunction sanitizeJsxChildren(\n childrenAsObjects: JsxChildren\n): SanitizedChildren {\n return Array.isArray(childrenAsObjects)\n ? childrenAsObjects.map(sanitizeChild)\n : sanitizeChild(childrenAsObjects);\n}\n","import { hashString } from './hashSource';\nimport { stableStringify as stringify } from '../utils/stableStringify';\n\nexport default function hashTemplate(\n template: {\n [key: string]: string;\n },\n hashFunction = hashString\n): string {\n return hashFunction(stringify(template));\n}\n"],"mappings":";;;;;;;;;;;;AAkBA,SAAgB,WAAW,QAAwB;AACjD,QAAO,WAAW,OAAO,YAAY,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG;;;;;;;;;;;;;AAc7D,SAAgB,WACd,EACE,QACA,SACA,IACA,UACA,cAIF,eAA2C,YACnC;CACR,IAAI;AACJ,KAAI,eAAe,MACjB,mBAAkB,oBAAoB,OAAO;KAE7C,mBAAkB;AAYpB,QAAO,aADiBA,gBAAU;EANhC,QAAQ;EACR,GAAI,MAAM,EAAE,IAAI;EAChB,GAAI,WAAW,EAAE,SAAS;EAC1B,GAAI,YAAY,QAAQ,EAAE,UAAU,KAAK,IAAI,SAAS,EAAE;EACxD,GAAI,cAAc,EAAE,YAAY;EAEa,CACZ,CAAC;;;;;;;;;AAsBtC,MAAM,iBAAiB,UAAoC;AACzD,KAAI,SAAS,OAAO,UAAU,UAAU;EACtC,MAAM,WAA2B,EAAE;AACnC,MAAI,OAAO,SAAS,MAAM,EACxB,UAAS,IAAI,oBAAoB,MAAM,EAAE;AAE3C,MAAI,OAAO,OAAO;GAChB,MAAM,qBAAqB,OAAO;AAClC,OAAI,oBAAoB,EAItB,UAAS,IAAI,OAAO,YAClB,OAAO,QAAQ,mBAAmB,EAAE,CAAC,KAAK,CAAC,KAAK,WAAW,CACzD,KACA,oBAAoB,MAAqB,CAC1C,CAAC,CACH;AAEH,OAAI,oBAAoB,EACtB,UAAS,IAAI,mBAAmB;;AAGpC,MAAI,WAAW,MAAM,CACnB,QAAO;GACL,GAAG,MAAM;GACT,GAAI,MAAM,KAAK,EACb,GAAG,MAAM,GACV;GACF;AAEH,SAAO;;AAET,QAAO;;AAGT,SAAS,oBACP,mBACmB;AACnB,QAAO,MAAM,QAAQ,kBAAkB,GACnC,kBAAkB,IAAI,cAAc,GACpC,cAAc,kBAAkB;;;;ACzHtC,SAAwB,aACtB,UAGA,eAAe,YACP;AACR,QAAO,aAAaC,gBAAU,SAAS,CAAC"}
@@ -1,4 +1,4 @@
1
- const require_sha2 = require("./sha2-DKowBr6H.cjs");
1
+ const require_isVariable = require("./isVariable-B08mggBy.cjs");
2
2
  //#region src/id/hashSource.ts
3
3
  /**
4
4
  * Calculates a unique hash for a given string using sha256.
@@ -9,7 +9,7 @@ const require_sha2 = require("./sha2-DKowBr6H.cjs");
9
9
  * @returns {string} - The resulting hash as a hexadecimal string.
10
10
  */
11
11
  function hashString(string) {
12
- return require_sha2.bytesToHex(require_sha2.sha256(require_sha2.utf8ToBytes(string))).slice(0, 16);
12
+ return require_isVariable.bytesToHex(require_isVariable.sha256(require_isVariable.utf8ToBytes(string))).slice(0, 16);
13
13
  }
14
14
  /**
15
15
  * Calculates a unique ID for the given children objects by hashing their sanitized JSON string representation.
@@ -26,7 +26,7 @@ function hashSource({ source, context, id, maxChars, dataFormat }, hashFunction
26
26
  let sanitizedSource;
27
27
  if (dataFormat === "JSX") sanitizedSource = sanitizeJsxChildren(source);
28
28
  else sanitizedSource = source;
29
- return hashFunction(require_sha2.stableStringify({
29
+ return hashFunction(require_isVariable.stableStringify({
30
30
  source: sanitizedSource,
31
31
  ...id && { id },
32
32
  ...context && { context },
@@ -50,7 +50,7 @@ const sanitizeChild = (child) => {
50
50
  if (generaltranslation?.b) newChild.b = Object.fromEntries(Object.entries(generaltranslation.b).map(([key, value]) => [key, sanitizeJsxChildren(value)]));
51
51
  if (generaltranslation?.t) newChild.t = generaltranslation.t;
52
52
  }
53
- if (require_sha2.isVariable(child)) return {
53
+ if (require_isVariable.isVariable(child)) return {
54
54
  k: child.k,
55
55
  ...child.v && { v: child.v }
56
56
  };
@@ -64,7 +64,7 @@ function sanitizeJsxChildren(childrenAsObjects) {
64
64
  //#endregion
65
65
  //#region src/id/hashTemplate.ts
66
66
  function hashTemplate(template, hashFunction = hashString) {
67
- return hashFunction(require_sha2.stableStringify(template));
67
+ return hashFunction(require_isVariable.stableStringify(template));
68
68
  }
69
69
  //#endregion
70
70
  Object.defineProperty(exports, "hashSource", {
@@ -86,4 +86,4 @@ Object.defineProperty(exports, "hashTemplate", {
86
86
  }
87
87
  });
88
88
 
89
- //# sourceMappingURL=id-VXBgyXu2.cjs.map
89
+ //# sourceMappingURL=id-COlX5v3V.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"id-VXBgyXu2.cjs","names":["bytesToHex","sha256","utf8ToBytes","stringify","isVariable","stringify"],"sources":["../src/id/hashSource.ts","../src/id/hashTemplate.ts"],"sourcesContent":["// Functions provided to other GT libraries\n\nimport { JsxChild, JsxChildren, Variable } from '../types';\nimport { stableStringify as stringify } from '../utils/stableStringify';\nimport { sha256 } from '@noble/hashes/sha2.js';\nimport { bytesToHex, utf8ToBytes } from '@noble/hashes/utils.js';\nimport isVariable from '../utils/isVariable';\nimport { HashMetadata } from './types';\n\n// ----- FUNCTIONS ----- //\n/**\n * Calculates a unique hash for a given string using sha256.\n *\n * First 16 characters of hash, hex encoded.\n *\n * @param {string} string - The string to be hashed.\n * @returns {string} - The resulting hash as a hexadecimal string.\n */\nexport function hashString(string: string): string {\n return bytesToHex(sha256(utf8ToBytes(string))).slice(0, 16);\n}\n\n/**\n * Calculates a unique ID for the given children objects by hashing their sanitized JSON string representation.\n *\n * @param {any} childrenAsObjects - The children objects to be hashed.\n * @param {string} [context] - The context for the children\n * @param {string} [id] - The id for the JSX Children object\n * @param {number} [maxChars] - The maxChars for the JSX Children object\n * @param {string} [dataFormat] - The data format of the sources\n * @param {function} [hashFunction] custom hash function\n * @returns {string} - The unique has of the children.\n */\nexport function hashSource(\n {\n source,\n context,\n id,\n maxChars,\n dataFormat,\n }: {\n source: JsxChildren | string;\n } & HashMetadata,\n hashFunction: (string: string) => string = hashString\n): string {\n let sanitizedSource: SanitizedChildren | string;\n if (dataFormat === 'JSX') {\n sanitizedSource = sanitizeJsxChildren(source);\n } else {\n sanitizedSource = source as string;\n }\n const sanitizedData: {\n source?: SanitizedChildren;\n } & HashMetadata = {\n source: sanitizedSource,\n ...(id && { id }),\n ...(context && { context }),\n ...(maxChars != null && { maxChars: Math.abs(maxChars) }),\n ...(dataFormat && { dataFormat }),\n };\n const stringifiedData = stringify(sanitizedData);\n return hashFunction(stringifiedData);\n}\n\ntype SanitizedVariable = Omit<Variable, 'i'>;\n\ntype SanitizedElement = {\n b?: {\n [k: string]: SanitizedChildren; // Branches\n };\n c?: SanitizedChildren; // Children\n t?: string; // Branch Transformation\n};\ntype SanitizedChild = SanitizedElement | SanitizedVariable | string;\ntype SanitizedChildren = SanitizedChild | SanitizedChild[];\n\n/**\n * Sanitizes a child object by removing the data-_gt attribute and its branches.\n *\n * @param child - The child object to sanitize.\n * @returns The sanitized child object.\n *\n */\nconst sanitizeChild = (child: JsxChild): SanitizedChild => {\n if (child && typeof child === 'object') {\n const newChild: SanitizedChild = {};\n if ('c' in child && child.c) {\n newChild.c = sanitizeJsxChildren(child.c);\n }\n if ('d' in child) {\n const generaltranslation = child?.d;\n if (generaltranslation?.b) {\n // The only thing that prevents sanitizeJsx from being stable is\n // the order of the keys in the branches object.\n // We don't sort them because stable-stringify sorts them anyways\n newChild.b = Object.fromEntries(\n Object.entries(generaltranslation.b).map(([key, value]) => [\n key,\n sanitizeJsxChildren(value as JsxChildren),\n ])\n );\n }\n if (generaltranslation?.t) {\n newChild.t = generaltranslation.t;\n }\n }\n if (isVariable(child)) {\n return {\n k: child.k,\n ...(child.v && {\n v: child.v,\n }),\n };\n }\n return newChild;\n }\n return child;\n};\n\nfunction sanitizeJsxChildren(\n childrenAsObjects: JsxChildren\n): SanitizedChildren {\n return Array.isArray(childrenAsObjects)\n ? childrenAsObjects.map(sanitizeChild)\n : sanitizeChild(childrenAsObjects);\n}\n","import { hashString } from './hashSource';\nimport { stableStringify as stringify } from '../utils/stableStringify';\n\nexport default function hashTemplate(\n template: {\n [key: string]: string;\n },\n hashFunction = hashString\n): string {\n return hashFunction(stringify(template));\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAgB,WAAW,QAAwB;AACjD,QAAOA,aAAAA,WAAWC,aAAAA,OAAOC,aAAAA,YAAY,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG;;;;;;;;;;;;;AAc7D,SAAgB,WACd,EACE,QACA,SACA,IACA,UACA,cAIF,eAA2C,YACnC;CACR,IAAI;AACJ,KAAI,eAAe,MACjB,mBAAkB,oBAAoB,OAAO;KAE7C,mBAAkB;AAYpB,QAAO,aADiBC,aAAAA,gBAAU;EANhC,QAAQ;EACR,GAAI,MAAM,EAAE,IAAI;EAChB,GAAI,WAAW,EAAE,SAAS;EAC1B,GAAI,YAAY,QAAQ,EAAE,UAAU,KAAK,IAAI,SAAS,EAAE;EACxD,GAAI,cAAc,EAAE,YAAY;EAEa,CACZ,CAAC;;;;;;;;;AAsBtC,MAAM,iBAAiB,UAAoC;AACzD,KAAI,SAAS,OAAO,UAAU,UAAU;EACtC,MAAM,WAA2B,EAAE;AACnC,MAAI,OAAO,SAAS,MAAM,EACxB,UAAS,IAAI,oBAAoB,MAAM,EAAE;AAE3C,MAAI,OAAO,OAAO;GAChB,MAAM,qBAAqB,OAAO;AAClC,OAAI,oBAAoB,EAItB,UAAS,IAAI,OAAO,YAClB,OAAO,QAAQ,mBAAmB,EAAE,CAAC,KAAK,CAAC,KAAK,WAAW,CACzD,KACA,oBAAoB,MAAqB,CAC1C,CAAC,CACH;AAEH,OAAI,oBAAoB,EACtB,UAAS,IAAI,mBAAmB;;AAGpC,MAAIC,aAAAA,WAAW,MAAM,CACnB,QAAO;GACL,GAAG,MAAM;GACT,GAAI,MAAM,KAAK,EACb,GAAG,MAAM,GACV;GACF;AAEH,SAAO;;AAET,QAAO;;AAGT,SAAS,oBACP,mBACmB;AACnB,QAAO,MAAM,QAAQ,kBAAkB,GACnC,kBAAkB,IAAI,cAAc,GACpC,cAAc,kBAAkB;;;;ACzHtC,SAAwB,aACtB,UAGA,eAAe,YACP;AACR,QAAO,aAAaC,aAAAA,gBAAU,SAAS,CAAC"}
1
+ {"version":3,"file":"id-COlX5v3V.cjs","names":["bytesToHex","sha256","utf8ToBytes","stringify","isVariable","stringify"],"sources":["../src/id/hashSource.ts","../src/id/hashTemplate.ts"],"sourcesContent":["// Functions provided to other GT libraries\n\nimport { JsxChild, JsxChildren, Variable } from '../types';\nimport { stableStringify as stringify } from '../utils/stableStringify';\nimport { sha256 } from '@noble/hashes/sha2.js';\nimport { bytesToHex, utf8ToBytes } from '@noble/hashes/utils.js';\nimport isVariable from '../utils/isVariable';\nimport { HashMetadata } from './types';\n\n// ----- FUNCTIONS ----- //\n/**\n * Calculates a unique hash for a given string using sha256.\n *\n * First 16 characters of hash, hex encoded.\n *\n * @param {string} string - The string to be hashed.\n * @returns {string} - The resulting hash as a hexadecimal string.\n */\nexport function hashString(string: string): string {\n return bytesToHex(sha256(utf8ToBytes(string))).slice(0, 16);\n}\n\n/**\n * Calculates a unique ID for the given children objects by hashing their sanitized JSON string representation.\n *\n * @param {any} childrenAsObjects - The children objects to be hashed.\n * @param {string} [context] - The context for the children\n * @param {string} [id] - The id for the JSX Children object\n * @param {number} [maxChars] - The maxChars for the JSX Children object\n * @param {string} [dataFormat] - The data format of the sources\n * @param {function} [hashFunction] custom hash function\n * @returns {string} - The unique has of the children.\n */\nexport function hashSource(\n {\n source,\n context,\n id,\n maxChars,\n dataFormat,\n }: {\n source: JsxChildren | string;\n } & HashMetadata,\n hashFunction: (string: string) => string = hashString\n): string {\n let sanitizedSource: SanitizedChildren | string;\n if (dataFormat === 'JSX') {\n sanitizedSource = sanitizeJsxChildren(source);\n } else {\n sanitizedSource = source as string;\n }\n const sanitizedData: {\n source?: SanitizedChildren;\n } & HashMetadata = {\n source: sanitizedSource,\n ...(id && { id }),\n ...(context && { context }),\n ...(maxChars != null && { maxChars: Math.abs(maxChars) }),\n ...(dataFormat && { dataFormat }),\n };\n const stringifiedData = stringify(sanitizedData);\n return hashFunction(stringifiedData);\n}\n\ntype SanitizedVariable = Omit<Variable, 'i'>;\n\ntype SanitizedElement = {\n b?: {\n [k: string]: SanitizedChildren; // Branches\n };\n c?: SanitizedChildren; // Children\n t?: string; // Branch Transformation\n};\ntype SanitizedChild = SanitizedElement | SanitizedVariable | string;\ntype SanitizedChildren = SanitizedChild | SanitizedChild[];\n\n/**\n * Sanitizes a child object by removing the data-_gt attribute and its branches.\n *\n * @param child - The child object to sanitize.\n * @returns The sanitized child object.\n *\n */\nconst sanitizeChild = (child: JsxChild): SanitizedChild => {\n if (child && typeof child === 'object') {\n const newChild: SanitizedChild = {};\n if ('c' in child && child.c) {\n newChild.c = sanitizeJsxChildren(child.c);\n }\n if ('d' in child) {\n const generaltranslation = child?.d;\n if (generaltranslation?.b) {\n // The only thing that prevents sanitizeJsx from being stable is\n // the order of the keys in the branches object.\n // We don't sort them because stable-stringify sorts them anyways\n newChild.b = Object.fromEntries(\n Object.entries(generaltranslation.b).map(([key, value]) => [\n key,\n sanitizeJsxChildren(value as JsxChildren),\n ])\n );\n }\n if (generaltranslation?.t) {\n newChild.t = generaltranslation.t;\n }\n }\n if (isVariable(child)) {\n return {\n k: child.k,\n ...(child.v && {\n v: child.v,\n }),\n };\n }\n return newChild;\n }\n return child;\n};\n\nfunction sanitizeJsxChildren(\n childrenAsObjects: JsxChildren\n): SanitizedChildren {\n return Array.isArray(childrenAsObjects)\n ? childrenAsObjects.map(sanitizeChild)\n : sanitizeChild(childrenAsObjects);\n}\n","import { hashString } from './hashSource';\nimport { stableStringify as stringify } from '../utils/stableStringify';\n\nexport default function hashTemplate(\n template: {\n [key: string]: string;\n },\n hashFunction = hashString\n): string {\n return hashFunction(stringify(template));\n}\n"],"mappings":";;;;;;;;;;AAkBA,SAAgB,WAAW,QAAwB;AACjD,QAAOA,mBAAAA,WAAWC,mBAAAA,OAAOC,mBAAAA,YAAY,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG;;;;;;;;;;;;;AAc7D,SAAgB,WACd,EACE,QACA,SACA,IACA,UACA,cAIF,eAA2C,YACnC;CACR,IAAI;AACJ,KAAI,eAAe,MACjB,mBAAkB,oBAAoB,OAAO;KAE7C,mBAAkB;AAYpB,QAAO,aADiBC,mBAAAA,gBAAU;EANhC,QAAQ;EACR,GAAI,MAAM,EAAE,IAAI;EAChB,GAAI,WAAW,EAAE,SAAS;EAC1B,GAAI,YAAY,QAAQ,EAAE,UAAU,KAAK,IAAI,SAAS,EAAE;EACxD,GAAI,cAAc,EAAE,YAAY;EAEa,CACZ,CAAC;;;;;;;;;AAsBtC,MAAM,iBAAiB,UAAoC;AACzD,KAAI,SAAS,OAAO,UAAU,UAAU;EACtC,MAAM,WAA2B,EAAE;AACnC,MAAI,OAAO,SAAS,MAAM,EACxB,UAAS,IAAI,oBAAoB,MAAM,EAAE;AAE3C,MAAI,OAAO,OAAO;GAChB,MAAM,qBAAqB,OAAO;AAClC,OAAI,oBAAoB,EAItB,UAAS,IAAI,OAAO,YAClB,OAAO,QAAQ,mBAAmB,EAAE,CAAC,KAAK,CAAC,KAAK,WAAW,CACzD,KACA,oBAAoB,MAAqB,CAC1C,CAAC,CACH;AAEH,OAAI,oBAAoB,EACtB,UAAS,IAAI,mBAAmB;;AAGpC,MAAIC,mBAAAA,WAAW,MAAM,CACnB,QAAO;GACL,GAAG,MAAM;GACT,GAAI,MAAM,KAAK,EACb,GAAG,MAAM,GACV;GACF;AAEH,SAAO;;AAET,QAAO;;AAGT,SAAS,oBACP,mBACmB;AACnB,QAAO,MAAM,QAAQ,kBAAkB,GACnC,kBAAkB,IAAI,cAAc,GACpC,cAAc,kBAAkB;;;;ACzHtC,SAAwB,aACtB,UAGA,eAAe,YACP;AACR,QAAO,aAAaC,mBAAAA,gBAAU,SAAS,CAAC"}
package/dist/id.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_id = require("./id-VXBgyXu2.cjs");
2
+ const require_id = require("./id-COlX5v3V.cjs");
3
3
  exports.hashSource = require_id.hashSource;
4
4
  exports.hashString = require_id.hashString;
5
5
  exports.hashTemplate = require_id.hashTemplate;
package/dist/id.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { ut as HashMetadata, wt as JsxChildren } from "./types-BJdoI1d1.cjs";
1
+ import { ut as HashMetadata, wt as JsxChildren } from "./types-mZeu4HS3.cjs";
2
2
 
3
3
  //#region src/id/hashSource.d.ts
4
4
  /**
package/dist/id.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ut as HashMetadata, wt as JsxChildren } from "./types-DazaDJbs.mjs";
1
+ import { ut as HashMetadata, wt as JsxChildren } from "./types-Dfy_sRLD.mjs";
2
2
 
3
3
  //#region src/id/hashSource.d.ts
4
4
  /**
package/dist/id.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as hashSource, r as hashString, t as hashTemplate } from "./id-CPbVYREY.mjs";
1
+ import { n as hashSource, r as hashString, t as hashTemplate } from "./id-BmOyfaug.mjs";
2
2
  export { hashSource, hashString, hashTemplate };