@next-box/i18n 0.1.0 → 0.1.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.
Files changed (70) hide show
  1. package/README.md +47 -30
  2. package/dist/cjs/client/client.cjs +3 -0
  3. package/dist/cjs/client/client.cjs.map +1 -0
  4. package/dist/cjs/client/components/I18nProvider.cjs +3 -0
  5. package/dist/cjs/client/components/I18nProvider.cjs.map +1 -0
  6. package/dist/cjs/client/components/Md.cjs +3 -0
  7. package/dist/cjs/client/components/Md.cjs.map +1 -0
  8. package/dist/cjs/client/helpers/injectVariables.cjs +2 -0
  9. package/dist/cjs/client/helpers/injectVariables.cjs.map +1 -0
  10. package/dist/cjs/index.cjs +1 -1
  11. package/dist/cjs/index.cjs.map +1 -1
  12. package/dist/cjs/macros/constants.cjs +2 -0
  13. package/dist/cjs/macros/constants.cjs.map +1 -0
  14. package/dist/cjs/macros/helpers/loadConfig.cjs +2 -0
  15. package/dist/cjs/macros/helpers/loadConfig.cjs.map +1 -0
  16. package/dist/cjs/macros/macros.cjs +2 -0
  17. package/dist/cjs/macros/macros.cjs.map +1 -0
  18. package/dist/cjs/main.cjs +2 -0
  19. package/dist/cjs/main.cjs.map +1 -0
  20. package/dist/esm/client/client.mjs +3 -0
  21. package/dist/esm/client/client.mjs.map +1 -0
  22. package/dist/esm/client/components/I18nProvider.mjs +3 -0
  23. package/dist/esm/client/components/I18nProvider.mjs.map +1 -0
  24. package/dist/esm/client/components/Md.mjs +3 -0
  25. package/dist/esm/client/components/Md.mjs.map +1 -0
  26. package/dist/esm/client/helpers/injectVariables.mjs +2 -0
  27. package/dist/esm/client/helpers/injectVariables.mjs.map +1 -0
  28. package/dist/esm/index.mjs +1 -1
  29. package/dist/esm/index.mjs.map +1 -1
  30. package/dist/esm/macros/constants.mjs +2 -0
  31. package/dist/esm/macros/constants.mjs.map +1 -0
  32. package/dist/esm/macros/helpers/loadConfig.mjs +2 -0
  33. package/dist/esm/macros/helpers/loadConfig.mjs.map +1 -0
  34. package/dist/esm/macros/macros.mjs +2 -0
  35. package/dist/esm/macros/macros.mjs.map +1 -0
  36. package/dist/esm/main.mjs +2 -0
  37. package/dist/esm/main.mjs.map +1 -0
  38. package/dist/production.analysis.txt +10 -10
  39. package/dist/types/cjs/client.d.cts.map +1 -1
  40. package/dist/types/cjs/components/I18nProvider.d.cts.map +1 -1
  41. package/dist/types/cjs/components/Md.d.cts.map +1 -1
  42. package/dist/types/cjs/helpers/injectVariables.d.cts.map +1 -1
  43. package/dist/types/cjs/main.d.cts.map +1 -1
  44. package/dist/types/esm/client.d.ts.map +1 -1
  45. package/dist/types/esm/components/I18nProvider.d.ts.map +1 -1
  46. package/dist/types/esm/components/Md.d.ts.map +1 -1
  47. package/dist/types/esm/helpers/injectVariables.d.ts.map +1 -1
  48. package/dist/types/esm/main.d.ts.map +1 -1
  49. package/dist/types/tsconfig.build.tsbuildinfo +1 -1
  50. package/package.json +13 -12
  51. package/rollup.config.mjs +2 -2
  52. package/src/client.ts +2 -0
  53. package/src/components/I18nProvider.tsx +2 -0
  54. package/src/components/Md.test.tsx +34 -32
  55. package/src/components/Md.tsx +2 -0
  56. package/src/helpers/injectVariables.test.ts +37 -0
  57. package/src/helpers/injectVariables.ts +3 -4
  58. package/src/macros.test.ts +34 -21
  59. package/src/main.test.ts +98 -62
  60. package/src/main.ts +0 -2
  61. package/src/types.ts +1 -1
  62. package/tsconfig.json +3 -0
  63. package/dist/cjs/client.cjs +0 -2
  64. package/dist/cjs/client.cjs.map +0 -1
  65. package/dist/cjs/macros.cjs +0 -2
  66. package/dist/cjs/macros.cjs.map +0 -1
  67. package/dist/esm/client.mjs +0 -2
  68. package/dist/esm/client.mjs.map +0 -1
  69. package/dist/esm/macros.mjs +0 -2
  70. package/dist/esm/macros.mjs.map +0 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@ A type-safe content resolver with content path auto-complete, value preview, and
5
5
  [![npm version](https://badge.fury.io/js/%40next-box%2Fi18n.svg)](https://badge.fury.io/js/%40next-box%2Fi18n)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
7
 
8
- > To use this library you must be able/willing to define your content in typescript and markdown files.
8
+ > To use this library, you must be able and willing to define your content in TypeScript and markdown files.
9
9
 
10
10
  ## Installation
11
11
 
@@ -18,9 +18,9 @@ npm add @next-box/i18n
18
18
 
19
19
  ### Create content files
20
20
 
21
- Content needs to be fed into the library's `createI18n` init function in the form of a serializable object. Each language for which you have content should live in its own file and be structured the same way and have a `content` named export.
21
+ Content needs to be provided to the library's `createI18n` init function in the form of a serializable object. Each language for which you have content should live in its own file, be structured the same way, and have a `content` named export.
22
22
 
23
- Below is a simplistic example of how to define a content file that would be compatible with `createI18n`.
23
+ Below is a simplistic example of how to define a content file that is compatible with `createI18n`.
24
24
 
25
25
  ```ts
26
26
  // ./content.ts
@@ -30,17 +30,17 @@ export const content = {
30
30
  documentTitle: 'This is the homepage',
31
31
  },
32
32
  },
33
- } as const; // This is important!
33
+ } as const; // Important for preserving the literal types used by the typed resolver.
34
34
  ```
35
35
 
36
- If you were to support multiple languages, your content files might look like the examples below.
36
+ If you support multiple languages, your content files might look like the examples below.
37
37
 
38
38
  ```ts
39
39
  // ./content/fr/index.ts
40
40
  export const content = {
41
41
  pages: {
42
42
  homepage: {
43
- documentTitle: 'Voici la page d’accueil'
43
+ documentTitle: 'Voici la page d’accueil',
44
44
  },
45
45
  },
46
46
  } as const; // This is important!
@@ -51,7 +51,7 @@ export const content = {
51
51
  export const content = {
52
52
  pages: {
53
53
  homepage: {
54
- documentTitle: 'This is the homepage'
54
+ documentTitle: 'This is the homepage',
55
55
  },
56
56
  },
57
57
  } as const; // This is important!
@@ -73,49 +73,60 @@ let language: typeof import('./en/index.ts') | typeof import('./fr/index.ts');
73
73
 
74
74
  switch (NEXT_PUBLIC_LANGUAGE_CODE) {
75
75
  case 'en': {
76
- language = await import('./en/index.ts');
76
+ language = await import('./en/index');
77
77
  break;
78
78
  }
79
79
 
80
80
  case 'fr': {
81
- language = await import('./fr/index.ts');
81
+ language = await import('./fr/index');
82
82
  break;
83
83
  }
84
+
85
+ default: {
86
+ throw new Error(`Unsupported language: ${NEXT_PUBLIC_LANGUAGE_CODE}`);
87
+ }
84
88
  }
85
89
 
86
90
  export const { content } = language;
87
91
  ```
88
92
 
89
- Read the [typescript docs]((https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions)) on it for more details on `as const`.
93
+ Read the [TypeScript documentation on `const` assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) for more details on `as const`.
90
94
 
91
- ### Create an instance of the i18n
95
+ ### Create an instance of i18n
92
96
 
93
97
  `createI18n` takes the `content` object as an argument and returns an object with the `t` and `tt` content resolver functions as properties. You can then use those functions to look up content by its path from the root of the object.
94
98
 
95
- If you pass the above content into `createI18n`, you can use the `t` and `tt` functions to retrieve the `documentTitle` like in the example below.
99
+ If you pass the above content into `createI18n`, you can use the `t` and `tt` functions to retrieve the `documentTitle` as shown below.
96
100
 
97
101
  ```ts
98
102
  import { createI18n } from '@next-box/i18n';
99
103
  import { content } from './content.ts';
100
104
 
101
105
  const { tt } = createI18n(content);
102
- // Path passed into `tt` is type-checked against the object passed into `createI18n`
103
- // Hover over `documentTitle` or `tt` and get value preview.
104
- // This would be "This is the homepage" for the single language example.
105
- // This would be "Films populaires" | "Popular Movies" for the multi-language example.
106
+
107
+ // The path passed to `tt` is type-checked against the object
108
+ // passed to `createI18n`.
109
+ //
110
+ // Hover over `documentTitle` or `tt` to see the inferred type
111
+ // and value preview in your IDE.
112
+ //
113
+ // This would be "This is the homepage" for the single-language example.
114
+ // For a multi-language content object, this can be a union of the
115
+ // corresponding values.
106
116
  const documentTitle = tt('pages.homepage.documentTitle');
117
+
107
118
  // Do something with `documentTitle`
108
119
  ```
109
120
 
110
- The `t` function is an untyped content lookup. The function takes a string and returns the value that path resolves to in the i18n object passed into `createI18n`. If the function resolves no value, then it returns undefined.
121
+ The `t` function is an untyped content lookup. It takes a string and returns the value that the path resolves to in the i18n object passed into `createI18n`. If the function resolves no value, it returns `undefined`.
111
122
 
112
- The `tt` function, on the other hand, is a typed content lookup. The function takes a string that is type-checked against all the possible paths in the i18n object passed into `createI18n`. The value that path resolves to can be previewed through IDE's inbuilt Typescript type preview. If the function resolves no value, then it throws an error.
123
+ The `tt` function, on the other hand, is a typed content lookup. It takes a string that is type-checked against the possible paths in the i18n object passed into `createI18n`. The value that the path resolves to can be previewed through your IDE's built-in TypeScript type preview. If the function resolves no value, it throws an error.
113
124
 
114
125
  #### Templating
115
126
 
116
- The `t` and `tt` functions support content with template variables. You can define template variables in content with double curley braces either side of a camelcase variable name, i.e. `Welcome back, {{fullName}}!`.
127
+ The `t` and `tt` functions support content with template variables. You can define template variables in content with double curly braces around a camelCase variable name, for example `Welcome back, {{fullName}}!`.
117
128
 
118
- Then, when you want to retrieve that piece of content, you do so along with a second argument of key/value pairs used to populate the template variables like in the example below.
129
+ When you want to retrieve that piece of content, provide a second argument containing the key/value pairs used to populate the template variables, as shown below.
119
130
 
120
131
  ```ts
121
132
  import { createI18n } from '@next-box/i18n';
@@ -127,21 +138,23 @@ const content = {
127
138
  } as const;
128
139
 
129
140
  const { tt } = createI18n(content);
141
+
130
142
  const greeting = tt('en.greeting', { fullName: 'Joe Bloggs' });
143
+
131
144
  console.log(greeting); // Will log 'Welcome back, Joe Bloggs!'
132
145
  ```
133
146
 
134
147
  #### Error handling
135
148
 
136
- There are two types of errors to help guard against mistakes in retrieving content, build-time typescript errors and runtime javascript exceptions. The former prevents a developer from entering an invalid path into the `tt` function, while the latter provides a backstop in case the initial type errors were ignored.
149
+ The typed `tt` resolver provides compile-time type checking and runtime validation. TypeScript can prevent invalid paths from being passed to `tt`, while the runtime check provides a backstop if an invalid path is nevertheless supplied at runtime.
137
150
 
138
- > There is no error handling with the `t` function. It is indented to be much looser in terms of what a developer can enter and what happens when the function cannot resolve the path; it just returns `undefined`.
151
+ > The `t` function does not perform this type checking or throw when a path cannot be resolved. It is intentionally looser in terms of what a developer can enter and returns `undefined` when the requested value cannot be resolved.
139
152
 
140
153
  ### Using markdown files
141
154
 
142
155
  For blocks of content that consist of multiple paragraphs or different types of content, it can be easier to define these in markdown files. The library supports markdown files through the `md` macro.
143
156
 
144
- Macros are a mechanism for running JavaScript functions at bundle-time. The value returned from these functions are directly inlined into your bundle.
157
+ The `md` macro processes a markdown file at build time and produces a value that can be included in your content object.
145
158
 
146
159
  Below is an example of a content object that includes markdown.
147
160
 
@@ -155,7 +168,7 @@ const content = {
155
168
  } as const;
156
169
  ```
157
170
 
158
- > All the functions exported from the `'/macros'` sub-path are intended to be imported with the `with { type: 'macro' }` import attribute in conjunction with the use of the `unplugin-macros` [plugin](https://github.com/unplugin/unplugin-macros) or a compiler/bundler that supports the macros import attribute such as [Bun](https://bun.sh/) or [Parcel](https://parceljs.org/).
171
+ > The functions exported from the `'/macros'` sub-path are intended to be imported with the `with { type: 'macro' }` import attribute when using `unplugin-macros` or a compiler/bundler that supports this macro import mechanism, such as [Bun](https://bun.sh/) or [Parcel](https://parceljs.org/).
159
172
 
160
173
  By default, the path you pass into the `md` macro is relative to the current working directory. You can change this via the `.i18n-macro.config.json` config file. Create one in your project root and add a `markdownDir` property with a relative path from the current working directory to the directory where your markdown files live.
161
174
 
@@ -165,7 +178,9 @@ By default, the path you pass into the `md` macro is relative to the current wor
165
178
  }
166
179
  ```
167
180
 
168
- The `markdownDir` path supports a template variable `NEXT_PUBLIC_LANGUAGE_CODE`, which is populated by setting an environment variable with the same name. You can use this if you support multiple languages. Please note, the multi-language content directory structure must be the same for this approach to work correctly.
181
+ The `markdownDir` path supports the `NEXT_PUBLIC_LANGUAGE_CODE` template variable. This value is read from the environment when the macro is processed. You can use this if you support multiple languages.
182
+
183
+ The multi-language content directory structure must be the same for this approach to work correctly.
169
184
 
170
185
  ```json
171
186
  {
@@ -175,21 +190,23 @@ The `markdownDir` path supports a template variable `NEXT_PUBLIC_LANGUAGE_CODE`,
175
190
 
176
191
  #### Markdown to JSX
177
192
 
178
- The `md` macro is designed to be used with the `Md` markdown render component and `I18nProvider` context provider. `Md` transforms markdown into React components, while `I18nProvider` provides a way to share a component mapper and `markdown-to-jsx` options between instances of `Md`.
193
+ The `md` macro is designed to be used with the `Md` markdown render component and `I18nProvider` context provider. `Md` transforms markdown into React components, while `I18nProvider` provides shared configuration such as a component mapper and `markdown-to-jsx` options to descendant `Md` components.
179
194
 
180
- > Under the hood, the library uses the `markdown-to-jsx` npm package to transform markdown into JSX. See [the package's documentation](https://github.com/quantizor/markdown-to-jsx) for more information on its configuration options. Our `componentMapper` prop maps to the `markdown-to-jsx` `overrides` option.
195
+ > Under the hood, the library uses the [`markdown-to-jsx`](https://github.com/quantizor/markdown-to-jsx) npm package to transform markdown into JSX. See the package's documentation for more information on its configuration options. The `componentMapper` prop maps to the `markdown-to-jsx` `overrides` option.
181
196
 
182
- The contrived example below illustrates how to use the `md` macro, `I18nProvider`, and `Md` component together.
197
+ The example below illustrates how to use the `md` macro, `I18nProvider`, and `Md` component together.
183
198
 
184
199
  ```tsx
200
+ 'use client';
201
+
185
202
  import { md } from '@next-box/i18n/macros' with { type: 'macro' };
186
- import { I18nProvider, Md } from '@next-box/i18n';
203
+ import { I18nProvider, Md } from '@next-box/i18n/client';
187
204
  import { componentMapper } from './componentMapper.ts';
188
205
 
189
206
  export const Component = () => {
190
207
  return (
191
208
  <I18nProvider componentMapper={componentMapper}>
192
- <Md>{md('content.path.to.markdown.file')}</Md>
209
+ <Md>{md('./content/markdown/contactUs.md')}</Md>
193
210
  </I18nProvider>
194
211
  );
195
212
  };
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ "use strict";var e=require("./components/I18nProvider.cjs"),r=require("./components/Md.cjs");exports.I18nContext=e.I18nContext,exports.I18nProvider=e.I18nProvider,exports.Md=r.Md;
3
+ //# sourceMappingURL=client.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ "use strict";var e=require("react/jsx-runtime");const r=require("react").createContext({componentMapper:{}});exports.I18nContext=r,exports.I18nProvider=({children:t,componentMapper:n,...o})=>e.jsx(r,{value:{componentMapper:n,...o},children:t});
3
+ //# sourceMappingURL=I18nProvider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I18nProvider.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ "use strict";var e=require("react/jsx-runtime"),r=require("markdown-to-jsx"),i=require("react"),n=require("./I18nProvider.cjs"),s=require("../helpers/injectVariables.cjs");exports.Md=({children:t,componentMapper:o,variables:a,...c})=>{const{componentMapper:p,...u}=i.use(n.I18nContext);return e.jsx(r,{options:{overrides:{...p,...o},...u,...c},children:s.injectVariables(t,a)})};
3
+ //# sourceMappingURL=Md.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Md.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ "use strict";const r=/{{[^\s{}]+}}/g,e=/{{ *([^ }]*) *}}/;exports.injectVariables=(n,t)=>t?n.replaceAll(r,r=>{const n=r.replace(e,"$1"),a=t[n];if(void 0!==a)return String(a);throw new Error(`Markdown contains un-replaced variable '${n}'`)}):n;
2
+ //# sourceMappingURL=injectVariables.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectVariables.cjs","sources":["../../../../src/helpers/injectVariables.ts"],"sourcesContent":["const extractTemplateVariables = /{{[^\\s{}]+}}/g;\nconst extractVarName = /{{ *([^ }]*) *}}/;\n\nexport const injectVariables = (markdown: string, variables?: Record<string, string | number>): string =>\n variables\n ? markdown.replaceAll(extractTemplateVariables, (match: string) => {\n const varName = match.replace(extractVarName, '$1');\n const replacementValue = variables[varName];\n\n if (replacementValue !== undefined) {\n return String(replacementValue);\n }\n\n throw new Error(`Markdown contains un-replaced variable '${varName}'`);\n })\n : markdown;\n"],"names":["extractTemplateVariables","extractVarName","markdown","variables","replaceAll","match","varName","replace","replacementValue","undefined","String","Error"],"mappings":"aAAA,MAAMA,EAA2B,gBAC3BC,EAAiB,2CAEQ,CAACC,EAAkBC,IAChDA,EACID,EAASE,WAAWJ,EAA2BK,IAC7C,MAAMC,EAAUD,EAAME,QAAQN,EAAgB,MACxCO,EAAmBL,EAAUG,GAEnC,QAAyBG,IAArBD,EACF,OAAOE,OAAOF,GAGhB,MAAM,IAAIG,MAAM,2CAA2CL,QAE7DJ"}
@@ -1,2 +1,2 @@
1
- "use strict";var r=require("zcb");exports.createI18n=e=>{const t=r.createConfigReader(e);return{t:(r,e)=>t.read(r,e),tt:(r,e)=>{const o=t.read(r,e);if(void 0===o)throw new Error(`Path "${String(r)}" did not resolve to a value`);return o}}};
1
+ "use strict";var e=require("./main.cjs");exports.createI18n=e.createI18n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/main.ts"],"sourcesContent":["import { type Get } from 'type-fest';\nimport { type AnyRecord, type Path, createConfigReader } from 'zcb';\nimport { type CreateI18nResult } from '#types.ts';\n\nexport const createI18n = <U extends object>(i18n: U): CreateI18nResult<U> => {\n const reader = createConfigReader<U>(i18n);\n\n return {\n // @ts-expect-error intentionally ignoring the type checking here as\n // function is supposed to be untyped.\n t: (key: string, variables?: AnyRecord): string | undefined => reader.read(key, variables),\n tt: <P extends Path<U>>(path: P, variables?: AnyRecord): Get<U, P> => {\n const result = reader.read(path, variables);\n\n // This can resolve to a falsy value at runtime\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (result === undefined) {\n throw new Error(`Path \"${String(path)}\" did not resolve to a value`);\n }\n\n return result;\n },\n };\n};\n"],"names":["i18n","reader","createConfigReader","t","key","variables","read","tt","path","result","undefined","Error","String"],"mappings":"qDAI6CA,IAC3C,MAAMC,EAASC,EAAAA,mBAAsBF,GAErC,MAAO,CAGLG,EAAG,CAACC,EAAaC,IAA8CJ,EAAOK,KAAKF,EAAKC,GAChFE,GAAI,CAAoBC,EAASH,KAC/B,MAAMI,EAASR,EAAOK,KAAKE,EAAMH,GAIjC,QAAeK,IAAXD,EACF,MAAM,IAAIE,MAAM,SAASC,OAAOJ,kCAGlC,OAAOC"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";exports.CONFIG_FILENAME=".i18n-macro.config.json";
2
+ //# sourceMappingURL=constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.cjs","sources":["../../../src/constants.ts"],"sourcesContent":["export const CONFIG_FILENAME = '.i18n-macro.config.json';\n"],"names":[],"mappings":"qCAA+B"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("node:fs"),r=require("node:path"),s=require("../constants.cjs");const t=process.cwd();exports.loadConfig=()=>{let c={};try{c=JSON.parse(e.readFileSync(r.resolve(t,s.CONFIG_FILENAME),{encoding:"utf8"}))}catch{}return c};
2
+ //# sourceMappingURL=loadConfig.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadConfig.cjs","sources":["../../../../src/helpers/loadConfig.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport { CONFIG_FILENAME } from '#constants.ts';\nimport { type MacrosConfig } from '#types.ts';\n\nconst cwd = process.cwd();\n\nexport const loadConfig = (): Partial<MacrosConfig> => {\n let config: Partial<MacrosConfig> = {};\n\n try {\n // JSON.parse returns an any time\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n config = JSON.parse(readFileSync(resolve(cwd, CONFIG_FILENAME), { encoding: 'utf8' })) as Partial<MacrosConfig>;\n } catch {\n // no catch\n }\n\n return config;\n};\n"],"names":["cwd","process","config","JSON","parse","readFileSync","resolve","CONFIG_FILENAME","encoding"],"mappings":"2FAKA,MAAMA,EAAMC,QAAQD,yBAEM,KACxB,IAAIE,EAAgC,CAAA,EAEpC,IAGEA,EAASC,KAAKC,MAAMC,EAAAA,aAAaC,EAAAA,QAAQN,EAAKO,EAAAA,iBAAkB,CAAEC,SAAU,SAC9E,CAAE,MAEF,CAEA,OAAON"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("node:fs"),r=require("node:path"),o=require("./helpers/loadConfig.cjs");const{NEXT_PUBLIC_LANGUAGE_CODE:n}=process.env;exports.md=s=>{if(!s)throw new Error("md expected a path, but received none");let t=process.cwd(),{markdownDir:c}=o.loadConfig();c&&(n&&(c=c.replaceAll("{{NEXT_PUBLIC_LANGUAGE_CODE}}",()=>n)),t=r.resolve(t,c));const d=r.resolve(t,s);return e.readFileSync(d,{encoding:"utf8"}).trim()};
2
+ //# sourceMappingURL=macros.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macros.cjs","sources":["../../../src/macros.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport { loadConfig } from '#helpers/loadConfig.ts';\n\nconst { NEXT_PUBLIC_LANGUAGE_CODE } = process.env;\n\nexport const md = <P extends string>(path: P): P => {\n if (!path) {\n throw new Error('md expected a path, but received none');\n }\n\n let dir = process.cwd();\n let { markdownDir } = loadConfig();\n\n if (markdownDir) {\n if (NEXT_PUBLIC_LANGUAGE_CODE) {\n markdownDir = markdownDir.replaceAll('{{NEXT_PUBLIC_LANGUAGE_CODE}}', () => NEXT_PUBLIC_LANGUAGE_CODE);\n }\n\n dir = resolve(dir, markdownDir);\n }\n\n const fullPath = resolve(dir, path);\n // @ts-expect-error `md` function runs and build time and its return value\n // replaces the `md` invocation. We are forcing the return type to be the\n // input type to aid type inference when using `createI18n` and its\n // `tt` content resolvers.\n return readFileSync(fullPath, { encoding: 'utf8' }).trim();\n};\n"],"names":["NEXT_PUBLIC_LANGUAGE_CODE","process","env","path","Error","dir","cwd","markdownDir","loadConfig","replaceAll","resolve","fullPath","readFileSync","encoding","trim"],"mappings":"mGAIA,MAAMA,0BAAEA,GAA8BC,QAAQC,eAETC,IACnC,IAAKA,EACH,MAAM,IAAIC,MAAM,yCAGlB,IAAIC,EAAMJ,QAAQK,OACdC,YAAEA,GAAgBC,eAElBD,IACEP,IACFO,EAAcA,EAAYE,WAAW,gCAAiC,IAAMT,IAG9EK,EAAMK,EAAAA,QAAQL,EAAKE,IAGrB,MAAMI,EAAWD,EAAAA,QAAQL,EAAKF,GAK9B,OAAOS,EAAAA,aAAaD,EAAU,CAAEE,SAAU,SAAUC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var r=require("zcb");exports.createI18n=e=>{const t=r.createConfigReader(e);return{t:(r,e)=>t.read(r,e),tt:(r,e)=>{const o=t.read(r,e);if(void 0===o)throw new Error(`Path "${String(r)}" did not resolve to a value`);return o}}};
2
+ //# sourceMappingURL=main.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.cjs","sources":["../../src/main.ts"],"sourcesContent":["import { type Get } from 'type-fest';\nimport { type AnyRecord, type Path, createConfigReader } from 'zcb';\nimport { type CreateI18nResult } from '#types.ts';\n\nexport const createI18n = <U extends object>(i18n: U): CreateI18nResult<U> => {\n const reader = createConfigReader<U>(i18n);\n\n return {\n // @ts-expect-error intentionally ignoring the type checking here as\n // function is supposed to be untyped.\n t: (key: string, variables?: AnyRecord): string | undefined => reader.read(key, variables),\n tt: <P extends Path<U>>(path: P, variables?: AnyRecord): Get<U, P> => {\n const result = reader.read(path, variables);\n\n if (result === undefined) {\n throw new Error(`Path \"${String(path)}\" did not resolve to a value`);\n }\n\n return result;\n },\n };\n};\n"],"names":["i18n","reader","createConfigReader","t","key","variables","read","tt","path","result","undefined","Error","String"],"mappings":"qDAI6CA,IAC3C,MAAMC,EAASC,EAAAA,mBAAsBF,GAErC,MAAO,CAGLG,EAAG,CAACC,EAAaC,IAA8CJ,EAAOK,KAAKF,EAAKC,GAChFE,GAAI,CAAoBC,EAASH,KAC/B,MAAMI,EAASR,EAAOK,KAAKE,EAAMH,GAEjC,QAAeK,IAAXD,EACF,MAAM,IAAIE,MAAM,SAASC,OAAOJ,kCAGlC,OAAOC"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ export{I18nContext,I18nProvider}from"./components/I18nProvider.mjs";export{Md}from"./components/Md.mjs";
3
+ //# sourceMappingURL=client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r}from"react";const o=r({componentMapper:{}}),p=({children:r,componentMapper:p,...n})=>e(o,{value:{componentMapper:p,...n},children:r});export{o as I18nContext,p as I18nProvider};
3
+ //# sourceMappingURL=I18nProvider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"I18nProvider.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{jsx as r}from"react/jsx-runtime";import o from"markdown-to-jsx";import{use as e}from"react";import{I18nContext as t}from"./I18nProvider.mjs";import{injectVariables as m}from"../helpers/injectVariables.mjs";const i=({children:i,componentMapper:n,variables:p,...s})=>{const{componentMapper:a,...c}=e(t);return r(o,{options:{overrides:{...a,...n},...c,...s},children:m(i,p)})};export{i as Md};
3
+ //# sourceMappingURL=Md.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Md.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ const r=/{{[^\s{}]+}}/g,e=/{{ *([^ }]*) *}}/,n=(n,o)=>o?n.replaceAll(r,r=>{const n=r.replace(e,"$1"),a=o[n];if(void 0!==a)return String(a);throw new Error(`Markdown contains un-replaced variable '${n}'`)}):n;export{n as injectVariables};
2
+ //# sourceMappingURL=injectVariables.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"injectVariables.mjs","sources":["../../../../src/helpers/injectVariables.ts"],"sourcesContent":["const extractTemplateVariables = /{{[^\\s{}]+}}/g;\nconst extractVarName = /{{ *([^ }]*) *}}/;\n\nexport const injectVariables = (markdown: string, variables?: Record<string, string | number>): string =>\n variables\n ? markdown.replaceAll(extractTemplateVariables, (match: string) => {\n const varName = match.replace(extractVarName, '$1');\n const replacementValue = variables[varName];\n\n if (replacementValue !== undefined) {\n return String(replacementValue);\n }\n\n throw new Error(`Markdown contains un-replaced variable '${varName}'`);\n })\n : markdown;\n"],"names":["extractTemplateVariables","extractVarName","injectVariables","markdown","variables","replaceAll","match","varName","replace","replacementValue","undefined","String","Error"],"mappings":"AAAA,MAAMA,EAA2B,gBAC3BC,EAAiB,mBAEVC,EAAkB,CAACC,EAAkBC,IAChDA,EACID,EAASE,WAAWL,EAA2BM,IAC7C,MAAMC,EAAUD,EAAME,QAAQP,EAAgB,MACxCQ,EAAmBL,EAAUG,GAEnC,QAAyBG,IAArBD,EACF,OAAOE,OAAOF,GAGhB,MAAM,IAAIG,MAAM,2CAA2CL,QAE7DJ"}
@@ -1,2 +1,2 @@
1
- import{createConfigReader as r}from"zcb";const t=t=>{const o=r(t);return{t:(r,t)=>o.read(r,t),tt:(r,t)=>{const e=o.read(r,t);if(void 0===e)throw new Error(`Path "${String(r)}" did not resolve to a value`);return e}}};export{t as createI18n};
1
+ export{createI18n}from"./main.mjs";
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/main.ts"],"sourcesContent":["import { type Get } from 'type-fest';\nimport { type AnyRecord, type Path, createConfigReader } from 'zcb';\nimport { type CreateI18nResult } from '#types.ts';\n\nexport const createI18n = <U extends object>(i18n: U): CreateI18nResult<U> => {\n const reader = createConfigReader<U>(i18n);\n\n return {\n // @ts-expect-error intentionally ignoring the type checking here as\n // function is supposed to be untyped.\n t: (key: string, variables?: AnyRecord): string | undefined => reader.read(key, variables),\n tt: <P extends Path<U>>(path: P, variables?: AnyRecord): Get<U, P> => {\n const result = reader.read(path, variables);\n\n // This can resolve to a falsy value at runtime\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (result === undefined) {\n throw new Error(`Path \"${String(path)}\" did not resolve to a value`);\n }\n\n return result;\n },\n };\n};\n"],"names":["createI18n","i18n","reader","createConfigReader","t","key","variables","read","tt","path","result","undefined","Error","String"],"mappings":"yCAIO,MAAMA,EAAgCC,IAC3C,MAAMC,EAASC,EAAsBF,GAErC,MAAO,CAGLG,EAAG,CAACC,EAAaC,IAA8CJ,EAAOK,KAAKF,EAAKC,GAChFE,GAAI,CAAoBC,EAASH,KAC/B,MAAMI,EAASR,EAAOK,KAAKE,EAAMH,GAIjC,QAAeK,IAAXD,EACF,MAAM,IAAIE,MAAM,SAASC,OAAOJ,kCAGlC,OAAOC"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ const o=".i18n-macro.config.json";export{o as CONFIG_FILENAME};
2
+ //# sourceMappingURL=constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.mjs","sources":["../../../src/constants.ts"],"sourcesContent":["export const CONFIG_FILENAME = '.i18n-macro.config.json';\n"],"names":["CONFIG_FILENAME"],"mappings":"AAAO,MAAMA,EAAkB"}
@@ -0,0 +1,2 @@
1
+ import{readFileSync as o}from"node:fs";import{resolve as t}from"node:path";import{CONFIG_FILENAME as r}from"../constants.mjs";const e=process.cwd(),n=()=>{let n={};try{n=JSON.parse(o(t(e,r),{encoding:"utf8"}))}catch{}return n};export{n as loadConfig};
2
+ //# sourceMappingURL=loadConfig.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadConfig.mjs","sources":["../../../../src/helpers/loadConfig.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport { CONFIG_FILENAME } from '#constants.ts';\nimport { type MacrosConfig } from '#types.ts';\n\nconst cwd = process.cwd();\n\nexport const loadConfig = (): Partial<MacrosConfig> => {\n let config: Partial<MacrosConfig> = {};\n\n try {\n // JSON.parse returns an any time\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n config = JSON.parse(readFileSync(resolve(cwd, CONFIG_FILENAME), { encoding: 'utf8' })) as Partial<MacrosConfig>;\n } catch {\n // no catch\n }\n\n return config;\n};\n"],"names":["cwd","process","loadConfig","config","JSON","parse","readFileSync","resolve","CONFIG_FILENAME","encoding"],"mappings":"8HAKA,MAAMA,EAAMC,QAAQD,MAEPE,EAAa,KACxB,IAAIC,EAAgC,CAAA,EAEpC,IAGEA,EAASC,KAAKC,MAAMC,EAAaC,EAAQP,EAAKQ,GAAkB,CAAEC,SAAU,SAC9E,CAAE,MAEF,CAEA,OAAON"}
@@ -0,0 +1,2 @@
1
+ import{readFileSync as e}from"node:fs";import{resolve as r}from"node:path";import{loadConfig as o}from"./helpers/loadConfig.mjs";const{NEXT_PUBLIC_LANGUAGE_CODE:t}=process.env,n=n=>{if(!n)throw new Error("md expected a path, but received none");let p=process.cwd(),{markdownDir:m}=o();m&&(t&&(m=m.replaceAll("{{NEXT_PUBLIC_LANGUAGE_CODE}}",()=>t)),p=r(p,m));const c=r(p,n);return e(c,{encoding:"utf8"}).trim()};export{n as md};
2
+ //# sourceMappingURL=macros.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macros.mjs","sources":["../../../src/macros.ts"],"sourcesContent":["import { readFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport { loadConfig } from '#helpers/loadConfig.ts';\n\nconst { NEXT_PUBLIC_LANGUAGE_CODE } = process.env;\n\nexport const md = <P extends string>(path: P): P => {\n if (!path) {\n throw new Error('md expected a path, but received none');\n }\n\n let dir = process.cwd();\n let { markdownDir } = loadConfig();\n\n if (markdownDir) {\n if (NEXT_PUBLIC_LANGUAGE_CODE) {\n markdownDir = markdownDir.replaceAll('{{NEXT_PUBLIC_LANGUAGE_CODE}}', () => NEXT_PUBLIC_LANGUAGE_CODE);\n }\n\n dir = resolve(dir, markdownDir);\n }\n\n const fullPath = resolve(dir, path);\n // @ts-expect-error `md` function runs and build time and its return value\n // replaces the `md` invocation. We are forcing the return type to be the\n // input type to aid type inference when using `createI18n` and its\n // `tt` content resolvers.\n return readFileSync(fullPath, { encoding: 'utf8' }).trim();\n};\n"],"names":["NEXT_PUBLIC_LANGUAGE_CODE","process","env","md","path","Error","dir","cwd","markdownDir","loadConfig","replaceAll","resolve","fullPath","readFileSync","encoding","trim"],"mappings":"iIAIA,MAAMA,0BAAEA,GAA8BC,QAAQC,IAEjCC,EAAwBC,IACnC,IAAKA,EACH,MAAM,IAAIC,MAAM,yCAGlB,IAAIC,EAAML,QAAQM,OACdC,YAAEA,GAAgBC,IAElBD,IACER,IACFQ,EAAcA,EAAYE,WAAW,gCAAiC,IAAMV,IAG9EM,EAAMK,EAAQL,EAAKE,IAGrB,MAAMI,EAAWD,EAAQL,EAAKF,GAK9B,OAAOS,EAAaD,EAAU,CAAEE,SAAU,SAAUC"}
@@ -0,0 +1,2 @@
1
+ import{createConfigReader as r}from"zcb";const t=t=>{const o=r(t);return{t:(r,t)=>o.read(r,t),tt:(r,t)=>{const e=o.read(r,t);if(void 0===e)throw new Error(`Path "${String(r)}" did not resolve to a value`);return e}}};export{t as createI18n};
2
+ //# sourceMappingURL=main.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.mjs","sources":["../../src/main.ts"],"sourcesContent":["import { type Get } from 'type-fest';\nimport { type AnyRecord, type Path, createConfigReader } from 'zcb';\nimport { type CreateI18nResult } from '#types.ts';\n\nexport const createI18n = <U extends object>(i18n: U): CreateI18nResult<U> => {\n const reader = createConfigReader<U>(i18n);\n\n return {\n // @ts-expect-error intentionally ignoring the type checking here as\n // function is supposed to be untyped.\n t: (key: string, variables?: AnyRecord): string | undefined => reader.read(key, variables),\n tt: <P extends Path<U>>(path: P, variables?: AnyRecord): Get<U, P> => {\n const result = reader.read(path, variables);\n\n if (result === undefined) {\n throw new Error(`Path \"${String(path)}\" did not resolve to a value`);\n }\n\n return result;\n },\n };\n};\n"],"names":["createI18n","i18n","reader","createConfigReader","t","key","variables","read","tt","path","result","undefined","Error","String"],"mappings":"yCAIO,MAAMA,EAAgCC,IAC3C,MAAMC,EAASC,EAAsBF,GAErC,MAAO,CAGLG,EAAG,CAACC,EAAaC,IAA8CJ,EAAOK,KAAKF,EAAKC,GAChFE,GAAI,CAAoBC,EAASH,KAC/B,MAAMI,EAASR,EAAOK,KAAKE,EAAMH,GAEjC,QAAeK,IAAXD,EACF,MAAM,IAAIE,MAAM,SAASC,OAAOJ,kCAGlC,OAAOC"}
@@ -1,31 +1,31 @@
1
1
  -----------------------------
2
2
  Rollup File Analysis
3
3
  -----------------------------
4
- bundle size: 1.321 KB
4
+ bundle size: 1.275 KB
5
5
  original size: 1.612 KB
6
- code reduction: 18.05 %
6
+ code reduction: 20.91 %
7
7
  module count: 3
8
8
 
9
9
  █████████████████████████████████░░░░░░░░░░░░░░░░░
10
10
  file: /src/macros.ts
11
- bundle space: 66.01 %
12
- rendered size: 872 Bytes
11
+ bundle space: 66.2 %
12
+ rendered size: 844 Bytes
13
13
  original size: 958 Bytes
14
- code reduction: 8.98 %
14
+ code reduction: 11.9 %
15
15
  dependents: 0
16
16
 
17
- ███████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
17
+ ██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
18
18
  file: /src/helpers/loadConfig.ts
19
- bundle space: 30.2 %
20
- rendered size: 399 Bytes
19
+ bundle space: 29.88 %
20
+ rendered size: 381 Bytes
21
21
  original size: 596 Bytes
22
- code reduction: 33.05 %
22
+ code reduction: 36.07 %
23
23
  dependents: 1
24
24
  - /src/macros.ts
25
25
 
26
26
  █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
27
27
  file: /src/constants.ts
28
- bundle space: 3.79 %
28
+ bundle space: 3.92 %
29
29
  rendered size: 50 Bytes
30
30
  original size: 58 Bytes
31
31
  code reduction: 13.79 %
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.cts","sourceRoot":"","sources":["../../../src/client.cts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"client.d.cts","sourceRoot":"","sources":["../../../src/client.cts"],"names":[],"mappings":"AAEA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"I18nProvider.d.cts","sourceRoot":"","sources":["../../../../src/components/I18nProvider.ctsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAE/D,eAAO,MAAM,WAAW;qBAEH,aAAa,CAAC,SAAS;;qHAcu4W,GAAI;;;;;;;;;;;;;;;;;;;iBAVr7W,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,aAAa,CAAC,SAAS,CAAC;CAC1C,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAE9C,CAAC"}
1
+ {"version":3,"file":"I18nProvider.d.cts","sourceRoot":"","sources":["../../../../src/components/I18nProvider.ctsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAE/D,eAAO,MAAM,WAAW;qBAEH,aAAa,CAAC,SAAS;;qHAcg5W,GAAI;;;;;;;;;;;;;;;;;;;iBAV97W,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,aAAa,CAAC,SAAS,CAAC;CAC1C,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAE9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Md.d.cts","sourceRoot":"","sources":["../../../../src/components/Md.ctsx"],"names":[],"mappings":"AAAA,OAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,EAAO,MAAM,OAAO,CAAC;AAIrC,MAAM,MAAM,OAAO,GAAG;IAEpB,QAAQ,EAAE,MAAM,CAAC;IAMjB,eAAe,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC;IAE1C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE7C,eAAO,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,CAmB1B,CAAC"}
1
+ {"version":3,"file":"Md.d.cts","sourceRoot":"","sources":["../../../../src/components/Md.ctsx"],"names":[],"mappings":"AAEA,OAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,EAAO,MAAM,OAAO,CAAC;AAIrC,MAAM,MAAM,OAAO,GAAG;IAEpB,QAAQ,EAAE,MAAM,CAAC;IAMjB,eAAe,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC;IAE1C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE7C,eAAO,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,CAmB1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"injectVariables.d.cts","sourceRoot":"","sources":["../../../../src/helpers/injectVariables.cts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAG,MAalF,CAAC"}
1
+ {"version":3,"file":"injectVariables.d.cts","sourceRoot":"","sources":["../../../../src/helpers/injectVariables.cts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAG,MAYlF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.cts","sourceRoot":"","sources":["../../../src/main.cts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,MAAM,CAAC,KAAG,gBAAgB,CAAC,CAAC,CAmBxE,CAAC"}
1
+ {"version":3,"file":"main.d.cts","sourceRoot":"","sources":["../../../src/main.cts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,MAAM,CAAC,KAAG,gBAAgB,CAAC,CAAC,CAiBxE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAEA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/I18nProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAE/D,eAAO,MAAM,WAAW;qBAEH,aAAa,CAAC,SAAS;;qHAcu4W,GAAI;;;;;;;;;;;;;;;;;;;iBAVr7W,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,aAAa,CAAC,SAAS,CAAC;CAC1C,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAE9C,CAAC"}
1
+ {"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/I18nProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAiB,MAAM,OAAO,CAAC;AAE/D,eAAO,MAAM,WAAW;qBAEH,aAAa,CAAC,SAAS;;qHAcg5W,GAAI;;;;;;;;;;;;;;;;;;;iBAV97W,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,aAAa,CAAC,SAAS,CAAC;CAC1C,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAE9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Md.d.ts","sourceRoot":"","sources":["../../../../src/components/Md.tsx"],"names":[],"mappings":"AAAA,OAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,EAAO,MAAM,OAAO,CAAC;AAIrC,MAAM,MAAM,OAAO,GAAG;IAEpB,QAAQ,EAAE,MAAM,CAAC;IAMjB,eAAe,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC;IAE1C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE7C,eAAO,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,CAmB1B,CAAC"}
1
+ {"version":3,"file":"Md.d.ts","sourceRoot":"","sources":["../../../../src/components/Md.tsx"],"names":[],"mappings":"AAEA,OAAsB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,EAAO,MAAM,OAAO,CAAC;AAIrC,MAAM,MAAM,OAAO,GAAG;IAEpB,QAAQ,EAAE,MAAM,CAAC;IAMjB,eAAe,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC;IAE1C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAE7C,eAAO,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,CAmB1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"injectVariables.d.ts","sourceRoot":"","sources":["../../../../src/helpers/injectVariables.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAG,MAalF,CAAC"}
1
+ {"version":3,"file":"injectVariables.d.ts","sourceRoot":"","sources":["../../../../src/helpers/injectVariables.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAG,MAYlF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,MAAM,CAAC,KAAG,gBAAgB,CAAC,CAAC,CAmBxE,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,MAAM,CAAC,KAAG,gBAAgB,CAAC,CAAC,CAiBxE,CAAC"}