@fluenti/solid 0.4.0-rc.4 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +5 -5
  2. package/dist/components-entry-5CGlUlc5.cjs +2 -0
  3. package/dist/components-entry-5CGlUlc5.cjs.map +1 -0
  4. package/dist/components-entry-C-Df62O-.js +632 -0
  5. package/dist/components-entry-C-Df62O-.js.map +1 -0
  6. package/dist/components-entry.cjs +1 -2
  7. package/dist/components-entry.js +2 -293
  8. package/dist/index.cjs +1 -1
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.js +4 -4
  11. package/dist/solid/src/compile-time-t.d.ts +3 -0
  12. package/dist/solid/src/compile-time-t.d.ts.map +1 -0
  13. package/dist/solid/src/compiled.d.ts +43 -0
  14. package/dist/solid/src/compiled.d.ts.map +1 -0
  15. package/dist/solid/src/components/DateTime.d.ts.map +1 -0
  16. package/dist/solid/src/components/NumberFormat.d.ts.map +1 -0
  17. package/dist/{components-entry.d.ts → solid/src/components-entry.d.ts} +1 -1
  18. package/dist/solid/src/components-entry.d.ts.map +1 -0
  19. package/dist/{context.d.ts → solid/src/context.d.ts} +5 -4
  20. package/dist/solid/src/context.d.ts.map +1 -0
  21. package/dist/solid/src/hooks/__useI18n.d.ts.map +1 -0
  22. package/dist/solid/src/index.d.ts +9 -0
  23. package/dist/solid/src/index.d.ts.map +1 -0
  24. package/dist/solid/src/msg.d.ts +2 -0
  25. package/dist/solid/src/msg.d.ts.map +1 -0
  26. package/dist/solid/src/plain-runtime.d.ts +9 -0
  27. package/dist/solid/src/plain-runtime.d.ts.map +1 -0
  28. package/dist/{plural.d.ts → solid/src/plural.d.ts} +1 -1
  29. package/dist/solid/src/plural.d.ts.map +1 -0
  30. package/dist/solid/src/provider.d.ts.map +1 -0
  31. package/dist/solid/src/rich-dom.d.ts.map +1 -0
  32. package/dist/{select.d.ts → solid/src/select.d.ts} +1 -1
  33. package/dist/solid/src/select.d.ts.map +1 -0
  34. package/dist/{server.d.ts → solid/src/server.d.ts} +3 -3
  35. package/dist/solid/src/server.d.ts.map +1 -0
  36. package/dist/solid/src/solid-runtime.d.ts +3 -0
  37. package/dist/solid/src/solid-runtime.d.ts.map +1 -0
  38. package/dist/solid/src/trans.d.ts.map +1 -0
  39. package/dist/{types.d.ts → solid/src/types.d.ts} +1 -1
  40. package/dist/solid/src/types.d.ts.map +1 -0
  41. package/dist/solid/src/use-i18n.d.ts.map +1 -0
  42. package/dist/{vite-plugin.d.ts → solid/src/vite-plugin.d.ts} +2 -2
  43. package/dist/solid/src/vite-plugin.d.ts.map +1 -0
  44. package/dist/vite-plugin.cjs +1 -1
  45. package/dist/vite-plugin.cjs.map +1 -1
  46. package/dist/vite-plugin.js +1 -1
  47. package/dist/vite-plugin.js.map +1 -1
  48. package/package.json +14 -14
  49. package/src/compiled.tsx +158 -0
  50. package/src/components-entry.ts +7 -3
  51. package/src/context.ts +5 -3
  52. package/src/index.ts +11 -10
  53. package/src/plain-runtime.ts +65 -0
  54. package/src/plural.tsx +23 -11
  55. package/src/rich-dom.tsx +1 -2
  56. package/src/select.tsx +16 -5
  57. package/src/solid-runtime.ts +1 -1
  58. package/dist/compile-time-t.d.ts +0 -3
  59. package/dist/compile-time-t.d.ts.map +0 -1
  60. package/dist/components/DateTime.d.ts.map +0 -1
  61. package/dist/components/NumberFormat.d.ts.map +0 -1
  62. package/dist/components-entry.cjs.map +0 -1
  63. package/dist/components-entry.d.ts.map +0 -1
  64. package/dist/components-entry.js.map +0 -1
  65. package/dist/context.d.ts.map +0 -1
  66. package/dist/hooks/__useI18n.d.ts.map +0 -1
  67. package/dist/index.d.ts +0 -12
  68. package/dist/index.d.ts.map +0 -1
  69. package/dist/msg.d.ts +0 -2
  70. package/dist/msg.d.ts.map +0 -1
  71. package/dist/plural.d.ts.map +0 -1
  72. package/dist/provider.d.ts.map +0 -1
  73. package/dist/rich-dom.d.ts.map +0 -1
  74. package/dist/select.d.ts.map +0 -1
  75. package/dist/server.d.ts.map +0 -1
  76. package/dist/solid-runtime.d.ts +0 -3
  77. package/dist/solid-runtime.d.ts.map +0 -1
  78. package/dist/trans.d.ts.map +0 -1
  79. package/dist/types.d.ts.map +0 -1
  80. package/dist/use-i18n-5u9iEPWp.js +0 -204
  81. package/dist/use-i18n-5u9iEPWp.js.map +0 -1
  82. package/dist/use-i18n-B8NgKzjN.cjs +0 -2
  83. package/dist/use-i18n-B8NgKzjN.cjs.map +0 -1
  84. package/dist/use-i18n.d.ts.map +0 -1
  85. package/dist/vite-plugin.d.ts.map +0 -1
  86. /package/dist/{components → solid/src/components}/DateTime.d.ts +0 -0
  87. /package/dist/{components → solid/src/components}/NumberFormat.d.ts +0 -0
  88. /package/dist/{hooks → solid/src/hooks}/__useI18n.d.ts +0 -0
  89. /package/dist/{provider.d.ts → solid/src/provider.d.ts} +0 -0
  90. /package/dist/{rich-dom.d.ts → solid/src/rich-dom.d.ts} +0 -0
  91. /package/dist/{trans.d.ts → solid/src/trans.d.ts} +0 -0
  92. /package/dist/{use-i18n.d.ts → solid/src/use-i18n.d.ts} +0 -0
package/src/plural.tsx CHANGED
@@ -1,8 +1,9 @@
1
1
  import { Dynamic } from 'solid-js/web'
2
2
  import type { Component, JSX } from 'solid-js'
3
- import { hashMessage, buildICUPluralMessage, PLURAL_CATEGORIES, type PluralCategory } from '@fluenti/core/internal'
3
+ import { buildICUPluralMessage, PLURAL_CATEGORIES, type PluralCategory } from '@fluenti/core/runtime'
4
4
  import { useI18n } from './use-i18n'
5
5
  import { reconstruct, serializeRichForms } from './rich-dom'
6
+ import { buildPlainPluralMessage, resolveCompiledMessageId, resolvePropValue } from './plain-runtime'
6
7
 
7
8
  /** Props for the `<Plural>` component */
8
9
  export interface FluentiPluralProps {
@@ -59,7 +60,7 @@ export interface FluentiPluralProps {
59
60
  *
60
61
  * @example
61
62
  * ```tsx
62
- * import { Plural } from '@fluenti/solid'
63
+ * import { Plural } from '@fluenti/solid/components'
63
64
  *
64
65
  * function ItemCount(props: { count: number }) {
65
66
  * return <Plural value={props.count} one="# item" other="# items" />
@@ -69,21 +70,32 @@ export interface FluentiPluralProps {
69
70
  export const Plural: Component<FluentiPluralProps> = (props) => {
70
71
  const { t } = useI18n()
71
72
 
72
- /** Resolve a category prop value — handles string, accessor function, and JSX */
73
- function resolveProp(val: string | JSX.Element | undefined): string | JSX.Element | undefined {
74
- if (typeof val === 'function') return (val as () => string | JSX.Element)()
75
- return val
76
- }
77
-
78
73
  return (() => {
79
- // Resolve all category values (handles Solid accessors from createMemo)
80
74
  const resolvedValues: Partial<Record<PluralCategory, string | JSX.Element>> = {}
81
75
  for (const cat of PLURAL_CATEGORIES) {
82
- const resolved = resolveProp(props[cat])
76
+ const resolved = resolvePropValue(props[cat]) as string | JSX.Element | undefined
83
77
  if (resolved !== undefined) {
84
78
  resolvedValues[cat] = resolved
85
79
  }
86
80
  }
81
+ const plainMessage = buildPlainPluralMessage(resolvedValues, props.offset)
82
+ if (plainMessage !== undefined) {
83
+ const translated = t(
84
+ {
85
+ id: resolveCompiledMessageId(props.id, plainMessage, props.context),
86
+ message: plainMessage,
87
+ ...(props.context !== undefined ? { context: props.context } : {}),
88
+ ...(props.comment !== undefined ? { comment: props.comment } : {}),
89
+ },
90
+ { count: props.value },
91
+ )
92
+
93
+ if (props.tag) {
94
+ return (<Dynamic component={props.tag}>{translated}</Dynamic>) as JSX.Element
95
+ }
96
+ return (<>{translated}</>) as JSX.Element
97
+ }
98
+
87
99
  const { messages, components } = serializeRichForms(PLURAL_CATEGORIES, resolvedValues)
88
100
  const icuMessage = buildICUPluralMessage(
89
101
  {
@@ -99,7 +111,7 @@ export const Plural: Component<FluentiPluralProps> = (props) => {
99
111
 
100
112
  const translated = t(
101
113
  {
102
- id: props.id ?? (props.context === undefined ? icuMessage : hashMessage(icuMessage, props.context)),
114
+ id: resolveCompiledMessageId(props.id, icuMessage, props.context),
103
115
  message: icuMessage,
104
116
  ...(props.context !== undefined ? { context: props.context } : {}),
105
117
  ...(props.comment !== undefined ? { comment: props.comment } : {}),
package/src/rich-dom.tsx CHANGED
@@ -11,7 +11,7 @@ function resolveValue(value: unknown): unknown {
11
11
  return value
12
12
  }
13
13
 
14
- import { offsetIndices } from '@fluenti/core/internal'
14
+ import { offsetIndices } from '@fluenti/core/runtime'
15
15
 
16
16
  export function extractMessage(value: unknown): {
17
17
  message: string
@@ -155,4 +155,3 @@ export function serializeRichForms<T extends string>(
155
155
 
156
156
  return { messages, components }
157
157
  }
158
-
package/src/select.tsx CHANGED
@@ -1,8 +1,9 @@
1
1
  import type { Component, JSX } from 'solid-js'
2
2
  import { Dynamic } from 'solid-js/web'
3
- import { hashMessage, buildICUSelectMessage, normalizeSelectForms } from '@fluenti/core/internal'
3
+ import { buildICUSelectMessage, normalizeSelectForms } from '@fluenti/core/runtime'
4
4
  import { useI18n } from './use-i18n'
5
5
  import { reconstruct, serializeRichForms } from './rich-dom'
6
+ import { buildPlainSelectMessage, resolveCompiledMessageId } from './plain-runtime'
6
7
 
7
8
  /** Props for the `<Select>` component */
8
9
  export interface FluentiSelectProps {
@@ -53,7 +54,7 @@ export interface FluentiSelectProps {
53
54
  *
54
55
  * @example
55
56
  * ```tsx
56
- * import { Select } from '@fluenti/solid'
57
+ * import { Select } from '@fluenti/solid/components'
57
58
  *
58
59
  * function Greeting(props: { gender: string }) {
59
60
  * return (
@@ -84,6 +85,18 @@ export const SelectComp: Component<FluentiSelectProps> = (props) => {
84
85
  ),
85
86
  other: props.other,
86
87
  }
88
+ const plain = buildPlainSelectMessage(forms)
89
+ if (plain !== undefined) {
90
+ return t(
91
+ {
92
+ id: resolveCompiledMessageId(props.id, plain.message, props.context),
93
+ message: plain.message,
94
+ ...(props.context !== undefined ? { context: props.context } : {}),
95
+ ...(props.comment !== undefined ? { comment: props.comment } : {}),
96
+ },
97
+ { value: plain.valueMap[props.value] ?? 'other' },
98
+ )
99
+ }
87
100
 
88
101
  const orderedKeys = [...Object.keys(forms).filter(key => key !== 'other'), 'other'] as const
89
102
  const { messages, components } = serializeRichForms(orderedKeys, forms)
@@ -92,9 +105,7 @@ export const SelectComp: Component<FluentiSelectProps> = (props) => {
92
105
  )
93
106
  const translated = t(
94
107
  {
95
- id: props.id ?? (props.context === undefined
96
- ? buildICUSelectMessage(normalized.forms)
97
- : hashMessage(buildICUSelectMessage(normalized.forms), props.context)),
108
+ id: resolveCompiledMessageId(props.id, buildICUSelectMessage(normalized.forms), props.context),
98
109
  message: buildICUSelectMessage(normalized.forms),
99
110
  ...(props.context !== undefined ? { context: props.context } : {}),
100
111
  ...(props.comment !== undefined ? { comment: props.comment } : {}),
@@ -4,7 +4,7 @@ import type { RuntimeGenerator } from '@fluenti/vite-plugin'
4
4
  export const solidRuntimeGenerator: RuntimeGenerator = createRuntimeGenerator({
5
5
  imports: `import { createSignal } from 'solid-js'\nimport { createStore, reconcile } from 'solid-js/store'`,
6
6
  catalogInit: 'const [__catalog, __setCatalog] = createStore({ ...__defaultMsgs })',
7
- localeInit: (defaultLocale) => `const [__currentLocale, __setCurrentLocale] = createSignal('${defaultLocale}')`,
7
+ localeInit: (defaultLocale) => `const [__currentLocale, __setCurrentLocale] = createSignal(${JSON.stringify(defaultLocale)})`,
8
8
  loadingInit: 'const [__loading, __setLoading] = createSignal(false)',
9
9
  catalogUpdate: (msgs) => `__setCatalog(reconcile(${msgs}))`,
10
10
  localeUpdate: (locale) => `__setCurrentLocale(${locale})`,
@@ -1,3 +0,0 @@
1
- import { CompileTimeT } from '@fluenti/core';
2
- export declare const t: CompileTimeT;
3
- //# sourceMappingURL=compile-time-t.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compile-time-t.d.ts","sourceRoot":"","sources":["../src/compile-time-t.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,eAAO,MAAM,CAAC,EAAE,YAME,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../src/components/DateTime.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,2BAA2B;IAC3B,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;IACpB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,2BAA2B;AAC3B,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAA;AAEhD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCAG5C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberFormat.d.ts","sourceRoot":"","sources":["../../src/components/NumberFormat.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,yBAAyB;AACzB,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAAA;AAElD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,kCAG9C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"components-entry.cjs","names":["JSX","isNodeLike","value","Node","resolveValue","length","offsetIndices","extractMessage","message","components","visit","node","resolved","undefined","Array","isArray","child","String","nodeType","TEXT_NODE","textContent","DOCUMENT_FRAGMENT_NODE","from","childNodes","idx","inner","push","Element","cloneNode","appendChild","parent","entry","document","createTextNode","reconstruct","translated","combinedRe","result","lastIndex","match","RegExpExecArray","exec","index","slice","Number","isSelfClosing","isInteger","template","clone","serializeRichForms","keys","T","forms","Partial","Record","messages","key","extracted","Object","entries","includes","Dynamic","children","resolveChildren","createMemo","Component","JSX","useI18n","extractMessage","extractDomMessage","reconstruct","reconstructDomMessage","RichComponent","Element","FluentiTransProps","id","context","comment","tag","message","components","Record","__message","__components","TextToken","type","value","TagToken","name","Token","MAX_TOKEN_DEPTH","parseTokens","input","depth","tokens","pos","length","openIdx","indexOf","push","slice","selfCloseMatch","match","openMatch","tagName","contentStart","innerEnd","findClosingTag","innerContent","closingTag","startPos","openTag","closeTag","nextOpen","nextClose","renderTokens","elements","map","token","Comp","undefined","_$createComponent","component","Trans","props","t","resolvedChildren","raw","msg","comps","translated","toArray","extracted","result","Array","isArray","Dynamic","Component","JSX","hashMessage","buildICUPluralMessage","PLURAL_CATEGORIES","PluralCategory","useI18n","reconstruct","serializeRichForms","FluentiPluralProps","value","id","context","comment","offset","zero","Element","one","two","few","many","other","tag","Plural","props","t","resolveProp","val","resolvedValues","Partial","Record","cat","resolved","undefined","messages","components","icuMessage","translated","message","count","result","length","_$createComponent","component","children","Component","JSX","Dynamic","hashMessage","buildICUSelectMessage","normalizeSelectForms","useI18n","reconstruct","serializeRichForms","FluentiSelectProps","value","id","context","comment","other","Element","options","Record","tag","key","SelectComp","props","t","content","RESERVED_KEYS","Set","forms","undefined","Object","fromEntries","entries","filter","has","startsWith","orderedKeys","keys","const","messages","components","normalized","map","translated","message","valueMap","length","_$createComponent","component","children","_$memo","useI18n","DateTimeProps","value","Date","format","FluentiDateTimeProps","DateTime","props","d","_$memo","useI18n","NumberProps","value","format","FluentiNumberFormatProps","NumberFormat","props","n","_$memo"],"sources":["../src/rich-dom.tsx","../src/trans.tsx","../src/plural.tsx","../src/select.tsx","../src/components/DateTime.tsx","../src/components/NumberFormat.tsx"],"sourcesContent":["import type { JSX } from 'solid-js'\n\nfunction isNodeLike(value: unknown): value is Node {\n return typeof Node !== 'undefined' && value instanceof Node\n}\n\nfunction resolveValue(value: unknown): unknown {\n if (typeof value === 'function' && !(value as { length?: number }).length) {\n return (value as () => unknown)()\n }\n return value\n}\n\nimport { offsetIndices } from '@fluenti/core/internal'\n\nexport function extractMessage(value: unknown): {\n message: string\n components: Node[]\n} {\n const components: Node[] = []\n let message = ''\n\n function visit(node: unknown): void {\n const resolved = resolveValue(node)\n if (resolved === null || resolved === undefined || typeof resolved === 'boolean') return\n if (Array.isArray(resolved)) {\n for (const child of resolved) visit(child)\n return\n }\n if (typeof resolved === 'string' || typeof resolved === 'number') {\n message += String(resolved)\n return\n }\n if (!isNodeLike(resolved)) return\n if (resolved.nodeType === Node.TEXT_NODE) {\n message += resolved.textContent ?? ''\n return\n }\n if (resolved.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n visit(Array.from(resolved.childNodes))\n return\n }\n\n const idx = components.length\n const inner = extractMessage(Array.from(resolved.childNodes))\n components.push((resolved as Element).cloneNode(false))\n components.push(...inner.components)\n if (inner.message === '' && inner.components.length === 0) {\n message += `<${idx}/>`\n } else {\n message += `<${idx}>${offsetIndices(inner.message, idx + 1)}</${idx}>`\n }\n }\n\n visit(value)\n return { message, components }\n}\n\nfunction appendChild(parent: Node, child: unknown): void {\n const resolved = resolveValue(child)\n if (resolved === null || resolved === undefined || typeof resolved === 'boolean') return\n if (Array.isArray(resolved)) {\n for (const entry of resolved) appendChild(parent, entry)\n return\n }\n if (typeof resolved === 'string' || typeof resolved === 'number') {\n parent.appendChild(document.createTextNode(String(resolved)))\n return\n }\n if (isNodeLike(resolved)) {\n parent.appendChild(resolved)\n }\n}\n\nexport function reconstruct(\n translated: string,\n components: Node[],\n): JSX.Element {\n const combinedRe = /<(\\d+)(?:\\/>|(>)([\\s\\S]*?)<\\/\\1>)/g\n const result: unknown[] = []\n let lastIndex = 0\n let match: RegExpExecArray | null\n\n combinedRe.lastIndex = 0\n match = combinedRe.exec(translated)\n while (match !== null) {\n if (match.index > lastIndex) {\n result.push(translated.slice(lastIndex, match.index))\n }\n\n const idx = Number(match[1])\n const isSelfClosing = match[2] === undefined\n\n if (!Number.isInteger(idx) || idx < 0 || idx >= components.length) {\n if (!isSelfClosing) {\n result.push(match[3] ?? '')\n }\n lastIndex = combinedRe.lastIndex\n match = combinedRe.exec(translated)\n continue\n }\n\n const template = components[idx]\n\n if (isSelfClosing) {\n if (template) {\n result.push(template.cloneNode(false))\n }\n } else {\n const inner = reconstruct(match[2] !== undefined ? match[3]! : '', components)\n if (template) {\n const clone = template.cloneNode(false)\n appendChild(clone, inner)\n result.push(clone)\n } else {\n result.push(match[3] ?? '')\n }\n }\n\n lastIndex = combinedRe.lastIndex\n match = combinedRe.exec(translated)\n }\n\n if (lastIndex < translated.length) {\n result.push(translated.slice(lastIndex))\n }\n\n return (result.length <= 1 ? result[0] ?? '' : result) as JSX.Element\n}\n\nexport function serializeRichForms<T extends string>(\n keys: readonly T[],\n forms: Partial<Record<T, unknown>> & Record<string, unknown>,\n): {\n messages: Record<string, string>\n components: Node[]\n} {\n const messages: Record<string, string> = {}\n const components: Node[] = []\n\n for (const key of keys) {\n const value = forms[key]\n if (value === undefined) continue\n const extracted = extractMessage(value)\n messages[key] = offsetIndices(extracted.message, components.length)\n components.push(...extracted.components)\n }\n\n for (const [key, value] of Object.entries(forms)) {\n if (keys.includes(key as T) || value === undefined) continue\n const extracted = extractMessage(value)\n messages[key] = offsetIndices(extracted.message, components.length)\n components.push(...extracted.components)\n }\n\n return { messages, components }\n}\n\n","import { Dynamic } from 'solid-js/web'\nimport { children as resolveChildren, createMemo } from 'solid-js'\nimport type { Component, JSX } from 'solid-js'\nimport { useI18n } from './use-i18n'\nimport { extractMessage as extractDomMessage, reconstruct as reconstructDomMessage } from './rich-dom'\n\n/** A Solid component that accepts children */\nexport type RichComponent = Component<{ children?: JSX.Element }>\n\n/** Props for the `<Trans>` component */\nexport interface FluentiTransProps {\n /** Override auto-generated hash ID */\n id?: string\n /** Message context used for identity and translator disambiguation */\n context?: string\n /** Translator-facing note preserved in extraction catalogs */\n comment?: string\n /** Wrapper element tag name. Defaults to no wrapper (Fragment). */\n tag?: string\n /** Children — the content to translate (legacy API) */\n children?: JSX.Element\n /** Translated message string with XML-like tags (e.g. `<bold>text</bold>`) */\n message?: string\n /** Map of tag names to Solid components */\n components?: Record<string, RichComponent>\n /** @internal Pre-computed message from build plugin */\n __message?: string\n /** @internal Pre-computed component map from build plugin */\n __components?: Record<string, RichComponent>\n}\n\n/**\n * A token from parsing the message string.\n * Either a plain text segment or a tag with inner content.\n */\ninterface TextToken {\n readonly type: 'text'\n readonly value: string\n}\n\ninterface TagToken {\n readonly type: 'tag'\n readonly name: string\n readonly children: readonly Token[]\n}\n\ntype Token = TextToken | TagToken\n\nconst MAX_TOKEN_DEPTH = 100\n\n/**\n * Parse a message string containing XML-like tags into a token tree.\n *\n * Supports:\n * - Named tags: `<bold>content</bold>`\n * - Self-closing tags: `<br/>`\n * - Nested tags: `<bold>hello <italic>world</italic></bold>`\n */\nfunction parseTokens(input: string, depth: number = 0): readonly Token[] {\n if (depth > MAX_TOKEN_DEPTH) {\n // Bail out as plain text to prevent stack overflow\n return [{ type: 'text', value: input }]\n }\n const tokens: Token[] = []\n let pos = 0\n\n while (pos < input.length) {\n const openIdx = input.indexOf('<', pos)\n\n if (openIdx === -1) {\n // No more tags — rest is plain text\n tokens.push({ type: 'text', value: input.slice(pos) })\n break\n }\n\n // Push any text before this tag\n if (openIdx > pos) {\n tokens.push({ type: 'text', value: input.slice(pos, openIdx) })\n }\n\n // Check for self-closing tag: <tagName/>\n const selfCloseMatch = input.slice(openIdx).match(/^<(\\w+)\\s*\\/>/)\n if (selfCloseMatch) {\n tokens.push({ type: 'tag', name: selfCloseMatch[1]!, children: [] })\n pos = openIdx + selfCloseMatch[0].length\n continue\n }\n\n // Check for opening tag: <tagName>\n const openMatch = input.slice(openIdx).match(/^<(\\w+)>/)\n if (!openMatch) {\n // Not a valid tag — treat '<' as text\n tokens.push({ type: 'text', value: '<' })\n pos = openIdx + 1\n continue\n }\n\n const tagName = openMatch[1]!\n const contentStart = openIdx + openMatch[0].length\n\n // Find the matching closing tag, respecting nesting\n const innerEnd = findClosingTag(input, tagName, contentStart)\n if (innerEnd === -1) {\n // No closing tag found — treat as plain text\n tokens.push({ type: 'text', value: input.slice(openIdx, contentStart) })\n pos = contentStart\n continue\n }\n\n const innerContent = input.slice(contentStart, innerEnd)\n const closingTag = `</${tagName}>`\n tokens.push({\n type: 'tag',\n name: tagName,\n children: parseTokens(innerContent, depth + 1),\n })\n pos = innerEnd + closingTag.length\n }\n\n return tokens\n}\n\n/**\n * Find the position of the matching closing tag, accounting for nesting\n * of the same tag name.\n *\n * Returns the index of the start of the closing tag, or -1 if not found.\n */\nfunction findClosingTag(input: string, tagName: string, startPos: number): number {\n const openTag = `<${tagName}>`\n const closeTag = `</${tagName}>`\n let depth = 1\n let pos = startPos\n\n while (pos < input.length && depth > 0) {\n const nextOpen = input.indexOf(openTag, pos)\n const nextClose = input.indexOf(closeTag, pos)\n\n if (nextClose === -1) return -1\n\n if (nextOpen !== -1 && nextOpen < nextClose) {\n depth++\n pos = nextOpen + openTag.length\n } else {\n depth--\n if (depth === 0) return nextClose\n pos = nextClose + closeTag.length\n }\n }\n\n return -1\n}\n\n/**\n * Render a token tree into Solid JSX elements using the components map.\n */\nfunction renderTokens(\n tokens: readonly Token[],\n components: Record<string, RichComponent>,\n): JSX.Element {\n const elements = tokens.map((token): JSX.Element => {\n if (token.type === 'text') {\n return token.value as unknown as JSX.Element\n }\n\n const Comp = components[token.name]\n if (!Comp) {\n // Unknown component — render inner content as plain text\n return renderTokens(token.children, components)\n }\n\n const innerContent = token.children.length > 0\n ? renderTokens(token.children, components)\n : undefined\n\n return (<Dynamic component={Comp}>{innerContent}</Dynamic>) as JSX.Element\n })\n\n if (elements.length === 1) return elements[0]!\n return (<>{elements}</>) as JSX.Element\n}\n\n/**\n * Render translated content with inline components.\n *\n * Supports two APIs:\n *\n * 1. **message + components** (recommended for rich text):\n * ```tsx\n * <Trans\n * message={t`Welcome to <bold>Fluenti</bold>!`}\n * components={{ bold: (props) => <strong>{props.children}</strong> }}\n * />\n * ```\n *\n * 2. **children** (legacy / simple passthrough):\n * ```tsx\n * <Trans>Click <a href=\"/next\">here</a> to continue</Trans>\n * ```\n */\nexport const Trans: Component<FluentiTransProps> = (props) => {\n const { t } = useI18n()\n const resolvedChildren = resolveChildren(() => props.children)\n // message + components API (including build-time __message/__components)\n // Note: the vite-plugin tagged-template transform wraps Solid expressions in\n // createMemo(), so props.message may be a memo accessor (function) instead of\n // a string. We unwrap it here to handle both cases.\n const message = createMemo(() => {\n const raw = props.__message ?? props.message\n return typeof raw === 'function' ? (raw as () => string)() : raw\n })\n const components = createMemo(() => props.__components ?? props.components)\n\n return (() => {\n const msg = message()\n const comps = components()\n\n if (msg !== undefined && comps) {\n const translated = t({\n ...(props.id !== undefined ? { id: props.id } : {}),\n message: msg,\n ...(props.context !== undefined ? { context: props.context } : {}),\n ...(props.comment !== undefined ? { comment: props.comment } : {}),\n })\n const tokens = parseTokens(translated)\n return renderTokens(tokens, comps)\n }\n\n // Fallback: children-only API with runtime extraction/reconstruction\n const children = resolvedChildren.toArray()\n if (children.length === 0) return null\n const extracted = extractDomMessage(children)\n const translated = t({\n ...(props.id !== undefined ? { id: props.id } : {}),\n message: extracted.message,\n ...(props.context !== undefined ? { context: props.context } : {}),\n ...(props.comment !== undefined ? { comment: props.comment } : {}),\n })\n const result = extracted.components.length > 0\n ? reconstructDomMessage(translated, extracted.components)\n : translated\n\n if (Array.isArray(result) && result.length > 1) {\n if (props.tag) {\n return (<Dynamic component={props.tag}>{result}</Dynamic>) as JSX.Element\n }\n return (<>{result}</>) as JSX.Element\n }\n\n return result as JSX.Element\n }) as unknown as JSX.Element\n}\n","import { Dynamic } from 'solid-js/web'\nimport type { Component, JSX } from 'solid-js'\nimport { hashMessage, buildICUPluralMessage, PLURAL_CATEGORIES, type PluralCategory } from '@fluenti/core/internal'\nimport { useI18n } from './use-i18n'\nimport { reconstruct, serializeRichForms } from './rich-dom'\n\n/** Props for the `<Plural>` component */\nexport interface FluentiPluralProps {\n /** The numeric value to pluralise */\n value: number\n /** Override the auto-generated synthetic ICU message id */\n id?: string\n /** Message context used for identity and translator disambiguation */\n context?: string\n /** Translator-facing note preserved in extraction catalogs */\n comment?: string\n /** Offset from value before selecting form */\n offset?: number\n /** Message for the \"zero\" plural category */\n zero?: string | JSX.Element\n /** Message for the \"one\" plural category */\n one?: string | JSX.Element\n /** Message for the \"two\" plural category */\n two?: string | JSX.Element\n /** Message for the \"few\" plural category */\n few?: string | JSX.Element\n /** Message for the \"many\" plural category */\n many?: string | JSX.Element\n /** Fallback message when no category-specific prop matches */\n other: string | JSX.Element\n /** Wrapper element tag name. Defaults to no wrapper (Fragment). */\n tag?: string\n}\n\n/**\n * `<Plural>` component — shorthand for ICU plural patterns.\n *\n * Plural form props (`zero`, `one`, `two`, `few`, `many`, `other`) are treated\n * as source-language messages. The component builds an ICU plural message,\n * looks it up via `t()` in the catalog, and interpolates the translated result.\n *\n * When no catalog translation exists, the component falls back to interpolating\n * the source-language ICU message directly via core's `interpolate`.\n *\n * Rich text is supported via JSX element props:\n * ```tsx\n * <Plural\n * value={count()}\n * zero={<>No <strong>items</strong> left</>}\n * one={<><em>1</em> item remaining</>}\n * other={<><strong>{count()}</strong> items remaining</>}\n * />\n * ```\n *\n * String props still work (backward compatible):\n * ```tsx\n * <Plural value={count()} zero=\"No items\" one=\"# item\" other=\"# items\" />\n * ```\n *\n * @example\n * ```tsx\n * import { Plural } from '@fluenti/solid'\n *\n * function ItemCount(props: { count: number }) {\n * return <Plural value={props.count} one=\"# item\" other=\"# items\" />\n * }\n * ```\n */\nexport const Plural: Component<FluentiPluralProps> = (props) => {\n const { t } = useI18n()\n\n /** Resolve a category prop value — handles string, accessor function, and JSX */\n function resolveProp(val: string | JSX.Element | undefined): string | JSX.Element | undefined {\n if (typeof val === 'function') return (val as () => string | JSX.Element)()\n return val\n }\n\n return (() => {\n // Resolve all category values (handles Solid accessors from createMemo)\n const resolvedValues: Partial<Record<PluralCategory, string | JSX.Element>> = {}\n for (const cat of PLURAL_CATEGORIES) {\n const resolved = resolveProp(props[cat])\n if (resolved !== undefined) {\n resolvedValues[cat] = resolved\n }\n }\n const { messages, components } = serializeRichForms(PLURAL_CATEGORIES, resolvedValues)\n const icuMessage = buildICUPluralMessage(\n {\n ...(messages['zero'] !== undefined && { zero: messages['zero'] }),\n ...(messages['one'] !== undefined && { one: messages['one'] }),\n ...(messages['two'] !== undefined && { two: messages['two'] }),\n ...(messages['few'] !== undefined && { few: messages['few'] }),\n ...(messages['many'] !== undefined && { many: messages['many'] }),\n other: messages['other'] ?? '',\n },\n props.offset,\n )\n\n const translated = t(\n {\n id: props.id ?? (props.context === undefined ? icuMessage : hashMessage(icuMessage, props.context)),\n message: icuMessage,\n ...(props.context !== undefined ? { context: props.context } : {}),\n ...(props.comment !== undefined ? { comment: props.comment } : {}),\n },\n { count: props.value },\n )\n\n const result = components.length > 0 ? reconstruct(translated, components) : translated\n if (props.tag) {\n return (<Dynamic component={props.tag}>{result}</Dynamic>) as JSX.Element\n }\n return (<>{result}</>) as JSX.Element\n }) as unknown as JSX.Element\n}\n","import type { Component, JSX } from 'solid-js'\nimport { Dynamic } from 'solid-js/web'\nimport { hashMessage, buildICUSelectMessage, normalizeSelectForms } from '@fluenti/core/internal'\nimport { useI18n } from './use-i18n'\nimport { reconstruct, serializeRichForms } from './rich-dom'\n\n/** Props for the `<Select>` component */\nexport interface FluentiSelectProps {\n /** The value to match against prop keys */\n value: string\n /** Override the auto-generated synthetic ICU message id */\n id?: string\n /** Message context used for identity and translator disambiguation */\n context?: string\n /** Translator-facing note preserved in extraction catalogs */\n comment?: string\n /** Fallback message when no key matches */\n other: string | JSX.Element\n /**\n * Named options map. Keys are match values, values are display strings or JSX.\n * Takes precedence over dynamic attrs when both are provided.\n *\n * @example `{ male: 'He', female: 'She' }`\n */\n options?: Record<string, string | JSX.Element>\n /** Wrapper element tag name. Defaults to no wrapper (Fragment). */\n tag?: string\n /** Additional key/message pairs for matching (attrs fallback) */\n [key: string]: unknown\n}\n\n/**\n * Render a message selected by matching `value` against prop keys.\n *\n * Options can be provided via the type-safe `options` prop (recommended)\n * or as direct attrs (convenience). When both are present, `options` takes\n * precedence.\n *\n * Rich text is supported via JSX element values in the `options` prop or\n * as direct JSX element props:\n * ```tsx\n * <Select\n * value={gender()}\n * options={{\n * male: <><strong>He</strong> liked this</>,\n * female: <><strong>She</strong> liked this</>,\n * }}\n * other={<><em>They</em> liked this</>}\n * />\n * ```\n *\n * Falls back to the `other` prop when no key matches.\n *\n * @example\n * ```tsx\n * import { Select } from '@fluenti/solid'\n *\n * function Greeting(props: { gender: string }) {\n * return (\n * <Select value={props.gender}\n * male=\"He liked your post\"\n * female=\"She liked your post\"\n * other=\"They liked your post\"\n * />\n * )\n * }\n * ```\n */\nexport const SelectComp: Component<FluentiSelectProps> = (props) => {\n const { t } = useI18n()\n\n const content = () => {\n const RESERVED_KEYS = new Set(['value', 'id', 'context', 'comment', 'options', 'other', 'tag', 'children', 'ref', 'class', 'className', 'style', 'classList', 'on', 'oncapture', 'use', 'prop'])\n const forms: Record<string, unknown> = props.options !== undefined\n ? { ...props.options, other: props.other }\n : {\n ...Object.fromEntries(\n Object.entries(props).filter(([key]) =>\n !RESERVED_KEYS.has(key)\n && !key.startsWith('data-')\n && !key.startsWith('aria-')\n && !key.startsWith('on'),\n ),\n ),\n other: props.other,\n }\n\n const orderedKeys = [...Object.keys(forms).filter(key => key !== 'other'), 'other'] as const\n const { messages, components } = serializeRichForms(orderedKeys, forms)\n const normalized = normalizeSelectForms(\n Object.fromEntries([...orderedKeys].map((key) => [key, messages[key] ?? ''])),\n )\n const translated = t(\n {\n id: props.id ?? (props.context === undefined\n ? buildICUSelectMessage(normalized.forms)\n : hashMessage(buildICUSelectMessage(normalized.forms), props.context)),\n message: buildICUSelectMessage(normalized.forms),\n ...(props.context !== undefined ? { context: props.context } : {}),\n ...(props.comment !== undefined ? { comment: props.comment } : {}),\n },\n { value: normalized.valueMap[props.value] ?? 'other' },\n )\n\n return components.length > 0 ? reconstruct(translated, components) : translated\n }\n\n return (() => {\n if (props.tag) {\n return (<Dynamic component={props.tag}>{content()}</Dynamic>) as JSX.Element\n }\n return (<>{content()}</>) as JSX.Element\n }) as unknown as JSX.Element\n}\n","import { useI18n } from '../use-i18n'\n\nexport interface DateTimeProps {\n /** Date value to format */\n value: Date | number\n /** Named format key defined in dateFormats config */\n format?: string\n}\n\n/** @alias DateTimeProps */\nexport type FluentiDateTimeProps = DateTimeProps\n\n/**\n * `<DateTime>` — date formatting component using Intl APIs.\n *\n * @example\n * ```tsx\n * <DateTime value={new Date()} format=\"long\" />\n * ```\n */\nexport function DateTime(props: DateTimeProps) {\n const { d } = useI18n()\n return <>{d(props.value, props.format)}</>\n}\n","import { useI18n } from '../use-i18n'\n\nexport interface NumberProps {\n /** Number value to format */\n value: number\n /** Named format key defined in numberFormats config */\n format?: string\n}\n\n/** @alias NumberProps */\nexport type FluentiNumberFormatProps = NumberProps\n\n/**\n * `<NumberFormat>` — number formatting component using Intl APIs.\n *\n * @example\n * ```tsx\n * <NumberFormat value={1234.56} format=\"currency\" />\n * ```\n */\nexport function NumberFormat(props: NumberProps) {\n const { n } = useI18n()\n return <>{n(props.value, props.format)}</>\n}\n"],"mappings":"sMAEA,SAASC,EAAWC,EAA+B,CACjD,OAAO,OAAOC,KAAS,KAAeD,aAAiBC,KAGzD,SAASC,EAAaF,EAAyB,CAI7C,OAHI,OAAOA,GAAU,YAAc,CAAEA,EAA8BG,OACzDH,GAAyB,CAE5BA,EAKT,SAAgBK,EAAeL,EAG7B,CACA,IAAMO,EAAqB,EAAE,CACzBD,EAAU,GAEd,SAASE,EAAMC,EAAqB,CAClC,IAAMC,EAAWR,EAAaO,EAAK,CACnC,GAAIC,GAAa,MAAkC,OAAOA,GAAa,UAAW,OAClF,GAAIE,MAAMC,QAAQH,EAAS,CAAE,CAC3B,IAAK,IAAMI,KAASJ,EAAUF,EAAMM,EAAM,CAC1C,OAEF,GAAI,OAAOJ,GAAa,UAAY,OAAOA,GAAa,SAAU,CAChEJ,GAAWS,OAAOL,EAAS,CAC3B,OAEF,GAAI,CAACX,EAAWW,EAAS,CAAE,OAC3B,GAAIA,EAASM,WAAaf,KAAKgB,UAAW,CACxCX,GAAWI,EAASQ,aAAe,GACnC,OAEF,GAAIR,EAASM,WAAaf,KAAKk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AM,UAAU,CAAA;AAClD,OAAO,EAAE,UAAU,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAChD,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,YAAY,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAGtF,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"components-entry.js","names":["JSX","isNodeLike","value","Node","resolveValue","length","offsetIndices","extractMessage","message","components","visit","node","resolved","undefined","Array","isArray","child","String","nodeType","TEXT_NODE","textContent","DOCUMENT_FRAGMENT_NODE","from","childNodes","idx","inner","push","Element","cloneNode","appendChild","parent","entry","document","createTextNode","reconstruct","translated","combinedRe","result","lastIndex","match","RegExpExecArray","exec","index","slice","Number","isSelfClosing","isInteger","template","clone","serializeRichForms","keys","T","forms","Partial","Record","messages","key","extracted","Object","entries","includes","Dynamic","children","resolveChildren","createMemo","Component","JSX","useI18n","extractMessage","extractDomMessage","reconstruct","reconstructDomMessage","RichComponent","Element","FluentiTransProps","id","context","comment","tag","message","components","Record","__message","__components","TextToken","type","value","TagToken","name","Token","MAX_TOKEN_DEPTH","parseTokens","input","depth","tokens","pos","length","openIdx","indexOf","push","slice","selfCloseMatch","match","openMatch","tagName","contentStart","innerEnd","findClosingTag","innerContent","closingTag","startPos","openTag","closeTag","nextOpen","nextClose","renderTokens","elements","map","token","Comp","undefined","_$createComponent","component","Trans","props","t","resolvedChildren","raw","msg","comps","translated","toArray","extracted","result","Array","isArray","Dynamic","Component","JSX","hashMessage","buildICUPluralMessage","PLURAL_CATEGORIES","PluralCategory","useI18n","reconstruct","serializeRichForms","FluentiPluralProps","value","id","context","comment","offset","zero","Element","one","two","few","many","other","tag","Plural","props","t","resolveProp","val","resolvedValues","Partial","Record","cat","resolved","undefined","messages","components","icuMessage","translated","message","count","result","length","_$createComponent","component","children","Component","JSX","Dynamic","hashMessage","buildICUSelectMessage","normalizeSelectForms","useI18n","reconstruct","serializeRichForms","FluentiSelectProps","value","id","context","comment","other","Element","options","Record","tag","key","SelectComp","props","t","content","RESERVED_KEYS","Set","forms","undefined","Object","fromEntries","entries","filter","has","startsWith","orderedKeys","keys","const","messages","components","normalized","map","translated","message","valueMap","length","_$createComponent","component","children","_$memo","useI18n","DateTimeProps","value","Date","format","FluentiDateTimeProps","DateTime","props","d","_$memo","useI18n","NumberProps","value","format","FluentiNumberFormatProps","NumberFormat","props","n","_$memo"],"sources":["../src/rich-dom.tsx","../src/trans.tsx","../src/plural.tsx","../src/select.tsx","../src/components/DateTime.tsx","../src/components/NumberFormat.tsx"],"sourcesContent":["import type { JSX } from 'solid-js'\n\nfunction isNodeLike(value: unknown): value is Node {\n return typeof Node !== 'undefined' && value instanceof Node\n}\n\nfunction resolveValue(value: unknown): unknown {\n if (typeof value === 'function' && !(value as { length?: number }).length) {\n return (value as () => unknown)()\n }\n return value\n}\n\nimport { offsetIndices } from '@fluenti/core/internal'\n\nexport function extractMessage(value: unknown): {\n message: string\n components: Node[]\n} {\n const components: Node[] = []\n let message = ''\n\n function visit(node: unknown): void {\n const resolved = resolveValue(node)\n if (resolved === null || resolved === undefined || typeof resolved === 'boolean') return\n if (Array.isArray(resolved)) {\n for (const child of resolved) visit(child)\n return\n }\n if (typeof resolved === 'string' || typeof resolved === 'number') {\n message += String(resolved)\n return\n }\n if (!isNodeLike(resolved)) return\n if (resolved.nodeType === Node.TEXT_NODE) {\n message += resolved.textContent ?? ''\n return\n }\n if (resolved.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n visit(Array.from(resolved.childNodes))\n return\n }\n\n const idx = components.length\n const inner = extractMessage(Array.from(resolved.childNodes))\n components.push((resolved as Element).cloneNode(false))\n components.push(...inner.components)\n if (inner.message === '' && inner.components.length === 0) {\n message += `<${idx}/>`\n } else {\n message += `<${idx}>${offsetIndices(inner.message, idx + 1)}</${idx}>`\n }\n }\n\n visit(value)\n return { message, components }\n}\n\nfunction appendChild(parent: Node, child: unknown): void {\n const resolved = resolveValue(child)\n if (resolved === null || resolved === undefined || typeof resolved === 'boolean') return\n if (Array.isArray(resolved)) {\n for (const entry of resolved) appendChild(parent, entry)\n return\n }\n if (typeof resolved === 'string' || typeof resolved === 'number') {\n parent.appendChild(document.createTextNode(String(resolved)))\n return\n }\n if (isNodeLike(resolved)) {\n parent.appendChild(resolved)\n }\n}\n\nexport function reconstruct(\n translated: string,\n components: Node[],\n): JSX.Element {\n const combinedRe = /<(\\d+)(?:\\/>|(>)([\\s\\S]*?)<\\/\\1>)/g\n const result: unknown[] = []\n let lastIndex = 0\n let match: RegExpExecArray | null\n\n combinedRe.lastIndex = 0\n match = combinedRe.exec(translated)\n while (match !== null) {\n if (match.index > lastIndex) {\n result.push(translated.slice(lastIndex, match.index))\n }\n\n const idx = Number(match[1])\n const isSelfClosing = match[2] === undefined\n\n if (!Number.isInteger(idx) || idx < 0 || idx >= components.length) {\n if (!isSelfClosing) {\n result.push(match[3] ?? '')\n }\n lastIndex = combinedRe.lastIndex\n match = combinedRe.exec(translated)\n continue\n }\n\n const template = components[idx]\n\n if (isSelfClosing) {\n if (template) {\n result.push(template.cloneNode(false))\n }\n } else {\n const inner = reconstruct(match[2] !== undefined ? match[3]! : '', components)\n if (template) {\n const clone = template.cloneNode(false)\n appendChild(clone, inner)\n result.push(clone)\n } else {\n result.push(match[3] ?? '')\n }\n }\n\n lastIndex = combinedRe.lastIndex\n match = combinedRe.exec(translated)\n }\n\n if (lastIndex < translated.length) {\n result.push(translated.slice(lastIndex))\n }\n\n return (result.length <= 1 ? result[0] ?? '' : result) as JSX.Element\n}\n\nexport function serializeRichForms<T extends string>(\n keys: readonly T[],\n forms: Partial<Record<T, unknown>> & Record<string, unknown>,\n): {\n messages: Record<string, string>\n components: Node[]\n} {\n const messages: Record<string, string> = {}\n const components: Node[] = []\n\n for (const key of keys) {\n const value = forms[key]\n if (value === undefined) continue\n const extracted = extractMessage(value)\n messages[key] = offsetIndices(extracted.message, components.length)\n components.push(...extracted.components)\n }\n\n for (const [key, value] of Object.entries(forms)) {\n if (keys.includes(key as T) || value === undefined) continue\n const extracted = extractMessage(value)\n messages[key] = offsetIndices(extracted.message, components.length)\n components.push(...extracted.components)\n }\n\n return { messages, components }\n}\n\n","import { Dynamic } from 'solid-js/web'\nimport { children as resolveChildren, createMemo } from 'solid-js'\nimport type { Component, JSX } from 'solid-js'\nimport { useI18n } from './use-i18n'\nimport { extractMessage as extractDomMessage, reconstruct as reconstructDomMessage } from './rich-dom'\n\n/** A Solid component that accepts children */\nexport type RichComponent = Component<{ children?: JSX.Element }>\n\n/** Props for the `<Trans>` component */\nexport interface FluentiTransProps {\n /** Override auto-generated hash ID */\n id?: string\n /** Message context used for identity and translator disambiguation */\n context?: string\n /** Translator-facing note preserved in extraction catalogs */\n comment?: string\n /** Wrapper element tag name. Defaults to no wrapper (Fragment). */\n tag?: string\n /** Children — the content to translate (legacy API) */\n children?: JSX.Element\n /** Translated message string with XML-like tags (e.g. `<bold>text</bold>`) */\n message?: string\n /** Map of tag names to Solid components */\n components?: Record<string, RichComponent>\n /** @internal Pre-computed message from build plugin */\n __message?: string\n /** @internal Pre-computed component map from build plugin */\n __components?: Record<string, RichComponent>\n}\n\n/**\n * A token from parsing the message string.\n * Either a plain text segment or a tag with inner content.\n */\ninterface TextToken {\n readonly type: 'text'\n readonly value: string\n}\n\ninterface TagToken {\n readonly type: 'tag'\n readonly name: string\n readonly children: readonly Token[]\n}\n\ntype Token = TextToken | TagToken\n\nconst MAX_TOKEN_DEPTH = 100\n\n/**\n * Parse a message string containing XML-like tags into a token tree.\n *\n * Supports:\n * - Named tags: `<bold>content</bold>`\n * - Self-closing tags: `<br/>`\n * - Nested tags: `<bold>hello <italic>world</italic></bold>`\n */\nfunction parseTokens(input: string, depth: number = 0): readonly Token[] {\n if (depth > MAX_TOKEN_DEPTH) {\n // Bail out as plain text to prevent stack overflow\n return [{ type: 'text', value: input }]\n }\n const tokens: Token[] = []\n let pos = 0\n\n while (pos < input.length) {\n const openIdx = input.indexOf('<', pos)\n\n if (openIdx === -1) {\n // No more tags — rest is plain text\n tokens.push({ type: 'text', value: input.slice(pos) })\n break\n }\n\n // Push any text before this tag\n if (openIdx > pos) {\n tokens.push({ type: 'text', value: input.slice(pos, openIdx) })\n }\n\n // Check for self-closing tag: <tagName/>\n const selfCloseMatch = input.slice(openIdx).match(/^<(\\w+)\\s*\\/>/)\n if (selfCloseMatch) {\n tokens.push({ type: 'tag', name: selfCloseMatch[1]!, children: [] })\n pos = openIdx + selfCloseMatch[0].length\n continue\n }\n\n // Check for opening tag: <tagName>\n const openMatch = input.slice(openIdx).match(/^<(\\w+)>/)\n if (!openMatch) {\n // Not a valid tag — treat '<' as text\n tokens.push({ type: 'text', value: '<' })\n pos = openIdx + 1\n continue\n }\n\n const tagName = openMatch[1]!\n const contentStart = openIdx + openMatch[0].length\n\n // Find the matching closing tag, respecting nesting\n const innerEnd = findClosingTag(input, tagName, contentStart)\n if (innerEnd === -1) {\n // No closing tag found — treat as plain text\n tokens.push({ type: 'text', value: input.slice(openIdx, contentStart) })\n pos = contentStart\n continue\n }\n\n const innerContent = input.slice(contentStart, innerEnd)\n const closingTag = `</${tagName}>`\n tokens.push({\n type: 'tag',\n name: tagName,\n children: parseTokens(innerContent, depth + 1),\n })\n pos = innerEnd + closingTag.length\n }\n\n return tokens\n}\n\n/**\n * Find the position of the matching closing tag, accounting for nesting\n * of the same tag name.\n *\n * Returns the index of the start of the closing tag, or -1 if not found.\n */\nfunction findClosingTag(input: string, tagName: string, startPos: number): number {\n const openTag = `<${tagName}>`\n const closeTag = `</${tagName}>`\n let depth = 1\n let pos = startPos\n\n while (pos < input.length && depth > 0) {\n const nextOpen = input.indexOf(openTag, pos)\n const nextClose = input.indexOf(closeTag, pos)\n\n if (nextClose === -1) return -1\n\n if (nextOpen !== -1 && nextOpen < nextClose) {\n depth++\n pos = nextOpen + openTag.length\n } else {\n depth--\n if (depth === 0) return nextClose\n pos = nextClose + closeTag.length\n }\n }\n\n return -1\n}\n\n/**\n * Render a token tree into Solid JSX elements using the components map.\n */\nfunction renderTokens(\n tokens: readonly Token[],\n components: Record<string, RichComponent>,\n): JSX.Element {\n const elements = tokens.map((token): JSX.Element => {\n if (token.type === 'text') {\n return token.value as unknown as JSX.Element\n }\n\n const Comp = components[token.name]\n if (!Comp) {\n // Unknown component — render inner content as plain text\n return renderTokens(token.children, components)\n }\n\n const innerContent = token.children.length > 0\n ? renderTokens(token.children, components)\n : undefined\n\n return (<Dynamic component={Comp}>{innerContent}</Dynamic>) as JSX.Element\n })\n\n if (elements.length === 1) return elements[0]!\n return (<>{elements}</>) as JSX.Element\n}\n\n/**\n * Render translated content with inline components.\n *\n * Supports two APIs:\n *\n * 1. **message + components** (recommended for rich text):\n * ```tsx\n * <Trans\n * message={t`Welcome to <bold>Fluenti</bold>!`}\n * components={{ bold: (props) => <strong>{props.children}</strong> }}\n * />\n * ```\n *\n * 2. **children** (legacy / simple passthrough):\n * ```tsx\n * <Trans>Click <a href=\"/next\">here</a> to continue</Trans>\n * ```\n */\nexport const Trans: Component<FluentiTransProps> = (props) => {\n const { t } = useI18n()\n const resolvedChildren = resolveChildren(() => props.children)\n // message + components API (including build-time __message/__components)\n // Note: the vite-plugin tagged-template transform wraps Solid expressions in\n // createMemo(), so props.message may be a memo accessor (function) instead of\n // a string. We unwrap it here to handle both cases.\n const message = createMemo(() => {\n const raw = props.__message ?? props.message\n return typeof raw === 'function' ? (raw as () => string)() : raw\n })\n const components = createMemo(() => props.__components ?? props.components)\n\n return (() => {\n const msg = message()\n const comps = components()\n\n if (msg !== undefined && comps) {\n const translated = t({\n ...(props.id !== undefined ? { id: props.id } : {}),\n message: msg,\n ...(props.context !== undefined ? { context: props.context } : {}),\n ...(props.comment !== undefined ? { comment: props.comment } : {}),\n })\n const tokens = parseTokens(translated)\n return renderTokens(tokens, comps)\n }\n\n // Fallback: children-only API with runtime extraction/reconstruction\n const children = resolvedChildren.toArray()\n if (children.length === 0) return null\n const extracted = extractDomMessage(children)\n const translated = t({\n ...(props.id !== undefined ? { id: props.id } : {}),\n message: extracted.message,\n ...(props.context !== undefined ? { context: props.context } : {}),\n ...(props.comment !== undefined ? { comment: props.comment } : {}),\n })\n const result = extracted.components.length > 0\n ? reconstructDomMessage(translated, extracted.components)\n : translated\n\n if (Array.isArray(result) && result.length > 1) {\n if (props.tag) {\n return (<Dynamic component={props.tag}>{result}</Dynamic>) as JSX.Element\n }\n return (<>{result}</>) as JSX.Element\n }\n\n return result as JSX.Element\n }) as unknown as JSX.Element\n}\n","import { Dynamic } from 'solid-js/web'\nimport type { Component, JSX } from 'solid-js'\nimport { hashMessage, buildICUPluralMessage, PLURAL_CATEGORIES, type PluralCategory } from '@fluenti/core/internal'\nimport { useI18n } from './use-i18n'\nimport { reconstruct, serializeRichForms } from './rich-dom'\n\n/** Props for the `<Plural>` component */\nexport interface FluentiPluralProps {\n /** The numeric value to pluralise */\n value: number\n /** Override the auto-generated synthetic ICU message id */\n id?: string\n /** Message context used for identity and translator disambiguation */\n context?: string\n /** Translator-facing note preserved in extraction catalogs */\n comment?: string\n /** Offset from value before selecting form */\n offset?: number\n /** Message for the \"zero\" plural category */\n zero?: string | JSX.Element\n /** Message for the \"one\" plural category */\n one?: string | JSX.Element\n /** Message for the \"two\" plural category */\n two?: string | JSX.Element\n /** Message for the \"few\" plural category */\n few?: string | JSX.Element\n /** Message for the \"many\" plural category */\n many?: string | JSX.Element\n /** Fallback message when no category-specific prop matches */\n other: string | JSX.Element\n /** Wrapper element tag name. Defaults to no wrapper (Fragment). */\n tag?: string\n}\n\n/**\n * `<Plural>` component — shorthand for ICU plural patterns.\n *\n * Plural form props (`zero`, `one`, `two`, `few`, `many`, `other`) are treated\n * as source-language messages. The component builds an ICU plural message,\n * looks it up via `t()` in the catalog, and interpolates the translated result.\n *\n * When no catalog translation exists, the component falls back to interpolating\n * the source-language ICU message directly via core's `interpolate`.\n *\n * Rich text is supported via JSX element props:\n * ```tsx\n * <Plural\n * value={count()}\n * zero={<>No <strong>items</strong> left</>}\n * one={<><em>1</em> item remaining</>}\n * other={<><strong>{count()}</strong> items remaining</>}\n * />\n * ```\n *\n * String props still work (backward compatible):\n * ```tsx\n * <Plural value={count()} zero=\"No items\" one=\"# item\" other=\"# items\" />\n * ```\n *\n * @example\n * ```tsx\n * import { Plural } from '@fluenti/solid'\n *\n * function ItemCount(props: { count: number }) {\n * return <Plural value={props.count} one=\"# item\" other=\"# items\" />\n * }\n * ```\n */\nexport const Plural: Component<FluentiPluralProps> = (props) => {\n const { t } = useI18n()\n\n /** Resolve a category prop value — handles string, accessor function, and JSX */\n function resolveProp(val: string | JSX.Element | undefined): string | JSX.Element | undefined {\n if (typeof val === 'function') return (val as () => string | JSX.Element)()\n return val\n }\n\n return (() => {\n // Resolve all category values (handles Solid accessors from createMemo)\n const resolvedValues: Partial<Record<PluralCategory, string | JSX.Element>> = {}\n for (const cat of PLURAL_CATEGORIES) {\n const resolved = resolveProp(props[cat])\n if (resolved !== undefined) {\n resolvedValues[cat] = resolved\n }\n }\n const { messages, components } = serializeRichForms(PLURAL_CATEGORIES, resolvedValues)\n const icuMessage = buildICUPluralMessage(\n {\n ...(messages['zero'] !== undefined && { zero: messages['zero'] }),\n ...(messages['one'] !== undefined && { one: messages['one'] }),\n ...(messages['two'] !== undefined && { two: messages['two'] }),\n ...(messages['few'] !== undefined && { few: messages['few'] }),\n ...(messages['many'] !== undefined && { many: messages['many'] }),\n other: messages['other'] ?? '',\n },\n props.offset,\n )\n\n const translated = t(\n {\n id: props.id ?? (props.context === undefined ? icuMessage : hashMessage(icuMessage, props.context)),\n message: icuMessage,\n ...(props.context !== undefined ? { context: props.context } : {}),\n ...(props.comment !== undefined ? { comment: props.comment } : {}),\n },\n { count: props.value },\n )\n\n const result = components.length > 0 ? reconstruct(translated, components) : translated\n if (props.tag) {\n return (<Dynamic component={props.tag}>{result}</Dynamic>) as JSX.Element\n }\n return (<>{result}</>) as JSX.Element\n }) as unknown as JSX.Element\n}\n","import type { Component, JSX } from 'solid-js'\nimport { Dynamic } from 'solid-js/web'\nimport { hashMessage, buildICUSelectMessage, normalizeSelectForms } from '@fluenti/core/internal'\nimport { useI18n } from './use-i18n'\nimport { reconstruct, serializeRichForms } from './rich-dom'\n\n/** Props for the `<Select>` component */\nexport interface FluentiSelectProps {\n /** The value to match against prop keys */\n value: string\n /** Override the auto-generated synthetic ICU message id */\n id?: string\n /** Message context used for identity and translator disambiguation */\n context?: string\n /** Translator-facing note preserved in extraction catalogs */\n comment?: string\n /** Fallback message when no key matches */\n other: string | JSX.Element\n /**\n * Named options map. Keys are match values, values are display strings or JSX.\n * Takes precedence over dynamic attrs when both are provided.\n *\n * @example `{ male: 'He', female: 'She' }`\n */\n options?: Record<string, string | JSX.Element>\n /** Wrapper element tag name. Defaults to no wrapper (Fragment). */\n tag?: string\n /** Additional key/message pairs for matching (attrs fallback) */\n [key: string]: unknown\n}\n\n/**\n * Render a message selected by matching `value` against prop keys.\n *\n * Options can be provided via the type-safe `options` prop (recommended)\n * or as direct attrs (convenience). When both are present, `options` takes\n * precedence.\n *\n * Rich text is supported via JSX element values in the `options` prop or\n * as direct JSX element props:\n * ```tsx\n * <Select\n * value={gender()}\n * options={{\n * male: <><strong>He</strong> liked this</>,\n * female: <><strong>She</strong> liked this</>,\n * }}\n * other={<><em>They</em> liked this</>}\n * />\n * ```\n *\n * Falls back to the `other` prop when no key matches.\n *\n * @example\n * ```tsx\n * import { Select } from '@fluenti/solid'\n *\n * function Greeting(props: { gender: string }) {\n * return (\n * <Select value={props.gender}\n * male=\"He liked your post\"\n * female=\"She liked your post\"\n * other=\"They liked your post\"\n * />\n * )\n * }\n * ```\n */\nexport const SelectComp: Component<FluentiSelectProps> = (props) => {\n const { t } = useI18n()\n\n const content = () => {\n const RESERVED_KEYS = new Set(['value', 'id', 'context', 'comment', 'options', 'other', 'tag', 'children', 'ref', 'class', 'className', 'style', 'classList', 'on', 'oncapture', 'use', 'prop'])\n const forms: Record<string, unknown> = props.options !== undefined\n ? { ...props.options, other: props.other }\n : {\n ...Object.fromEntries(\n Object.entries(props).filter(([key]) =>\n !RESERVED_KEYS.has(key)\n && !key.startsWith('data-')\n && !key.startsWith('aria-')\n && !key.startsWith('on'),\n ),\n ),\n other: props.other,\n }\n\n const orderedKeys = [...Object.keys(forms).filter(key => key !== 'other'), 'other'] as const\n const { messages, components } = serializeRichForms(orderedKeys, forms)\n const normalized = normalizeSelectForms(\n Object.fromEntries([...orderedKeys].map((key) => [key, messages[key] ?? ''])),\n )\n const translated = t(\n {\n id: props.id ?? (props.context === undefined\n ? buildICUSelectMessage(normalized.forms)\n : hashMessage(buildICUSelectMessage(normalized.forms), props.context)),\n message: buildICUSelectMessage(normalized.forms),\n ...(props.context !== undefined ? { context: props.context } : {}),\n ...(props.comment !== undefined ? { comment: props.comment } : {}),\n },\n { value: normalized.valueMap[props.value] ?? 'other' },\n )\n\n return components.length > 0 ? reconstruct(translated, components) : translated\n }\n\n return (() => {\n if (props.tag) {\n return (<Dynamic component={props.tag}>{content()}</Dynamic>) as JSX.Element\n }\n return (<>{content()}</>) as JSX.Element\n }) as unknown as JSX.Element\n}\n","import { useI18n } from '../use-i18n'\n\nexport interface DateTimeProps {\n /** Date value to format */\n value: Date | number\n /** Named format key defined in dateFormats config */\n format?: string\n}\n\n/** @alias DateTimeProps */\nexport type FluentiDateTimeProps = DateTimeProps\n\n/**\n * `<DateTime>` — date formatting component using Intl APIs.\n *\n * @example\n * ```tsx\n * <DateTime value={new Date()} format=\"long\" />\n * ```\n */\nexport function DateTime(props: DateTimeProps) {\n const { d } = useI18n()\n return <>{d(props.value, props.format)}</>\n}\n","import { useI18n } from '../use-i18n'\n\nexport interface NumberProps {\n /** Number value to format */\n value: number\n /** Named format key defined in numberFormats config */\n format?: string\n}\n\n/** @alias NumberProps */\nexport type FluentiNumberFormatProps = NumberProps\n\n/**\n * `<NumberFormat>` — number formatting component using Intl APIs.\n *\n * @example\n * ```tsx\n * <NumberFormat value={1234.56} format=\"currency\" />\n * ```\n */\nexport function NumberFormat(props: NumberProps) {\n const { n } = useI18n()\n return <>{n(props.value, props.format)}</>\n}\n"],"mappings":";;;;;AAEA,SAASC,EAAWC,GAA+B;AACjD,QAAO,OAAOC,OAAS,OAAeD,aAAiBC;;AAGzD,SAASC,EAAaF,GAAyB;AAI7C,QAHI,OAAOA,KAAU,cAAc,CAAEA,EAA8BG,SACzDH,GAAyB,GAE5BA;;AAKT,SAAgBK,EAAeL,GAG7B;CACA,IAAMO,IAAqB,EAAE,EACzBD,IAAU;CAEd,SAASE,EAAMC,GAAqB;EAClC,IAAMC,IAAWR,EAAaO,EAAK;AACnC,MAAIC,KAAa,QAAkC,OAAOA,KAAa,UAAW;AAClF,MAAIE,MAAMC,QAAQH,EAAS,EAAE;AAC3B,QAAK,IAAMI,KAASJ,EAAUF,GAAMM,EAAM;AAC1C;;AAEF,MAAI,OAAOJ,KAAa,YAAY,OAAOA,KAAa,UAAU;AAChEJ,QAAWS,OAAOL,EAAS;AAC3B;;AAEF,MAAI,CAACX,EAAWW,EAAS,CAAE;AAC3B,MAAIA,EAASM,aAAaf,KAAKgB,WAAW;AACxCX,QAAWI,EAASQ,eAAe;AACnC;;AAEF,MAAIR,EAASM,aAAaf,KAAKkB,wBAAwB;AACrDX,KAAMI,MAAMQ,KAAKV,EAASW,WAAW,CAAC;AACtC;;EAGF,IAAMC,IAAMf,EAAWJ,QACjBoB,IAAQlB,EAAeO,MAAMQ,KAAKV,EAASW,WAAW,CAAC;AAG7D,EAFAd,EAAWiB,KAAMd,EAAqBgB,UAAU,GAAM,CAAC,EACvDnB,EAAWiB,KAAK,GAAGD,EAAMhB,WAAW,EAChCgB,E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G,eAAe,CAAA;IACjD,gEAAgE;IAChE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,CAAA;IAC1E,uDAAuD;IACvD,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC5B,qDAAqD;IACrD,aAAa,EAAE,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IACpC,iEAAiE;IACjE,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,wEAAwE;IACxE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACtC,mEAAmE;IACnE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAA;CAC3D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,aAAa,GAAG,cAAc,CA4J9F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"__useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/__useI18n.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C;;;;;;;;GAQG;AACH,wBAAgB,SAAS,IAAI,cAAc,CAE1C"}
package/dist/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export { createFluentiContext } from './context';
2
- export type { FluentiContext, FluentiConfig } from './context';
3
- export { I18nProvider } from './provider';
4
- export { useI18n, useLocale } from './use-i18n';
5
- export { t } from './compile-time-t';
6
- export { msg } from './msg';
7
- export type { FluentiTransProps } from './trans';
8
- export type { FluentiPluralProps } from './plural';
9
- export type { FluentiSelectProps } from './select';
10
- export type { DateTimeProps, FluentiDateTimeProps } from './components/DateTime';
11
- export type { NumberProps, FluentiNumberFormatProps } from './components/NumberFormat';
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAChD,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,kBAAkB,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAI3B,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAChF,YAAY,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA"}
package/dist/msg.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { msg } from '@fluenti/core';
2
- //# sourceMappingURL=msg.d.ts.map
package/dist/msg.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"msg.d.ts","sourceRoot":"","sources":["../src/msg.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plural.d.ts","sourceRoot":"","sources":["../src/plural.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAK9C,yCAAyC;AACzC,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,2DAA2D;IAC3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;IACzB;;;OAGG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC;;;OAGG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,uBAAuB,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAEpE;;;;;;;;;;;;;;OAcG;IACH,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;CACxE;AAQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CA6FrE"}
@@ -1,3 +0,0 @@
1
- import { RuntimeGenerator } from '@fluenti/vite-plugin';
2
- export declare const solidRuntimeGenerator: RuntimeGenerator;
3
- //# sourceMappingURL=solid-runtime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solid-runtime.d.ts","sourceRoot":"","sources":["../src/solid-runtime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,eAAO,MAAM,qBAAqB,EAAE,gBAUlC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"trans.d.ts","sourceRoot":"","sources":["../src/trans.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAI9C,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CAAE,CAAC,CAAA;AAEjE,wCAAwC;AACxC,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAA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