@turnipxenon/pineapple 5.3.15 → 5.3.16

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 (29) hide show
  1. package/dist/external/paraglide/README.md +162 -0
  2. package/dist/modules/parsnip/external-images/externalImages.remote.d.ts +2 -2
  3. package/dist/modules/parsnip/external-images/externalImages.remote.d.ts.map +1 -1
  4. package/package.json +25 -25
  5. package/dist/external/paraglide/.prettierignore +0 -3
  6. package/dist/external/paraglide/messages/_index.d.ts +0 -9
  7. package/dist/external/paraglide/messages/_index.d.ts.map +0 -1
  8. package/dist/external/paraglide/messages/_index.js +0 -51
  9. package/dist/external/paraglide/messages/en.d.ts +0 -5
  10. package/dist/external/paraglide/messages/en.d.ts.map +0 -1
  11. package/dist/external/paraglide/messages/en.js +0 -10
  12. package/dist/external/paraglide/messages/fr.d.ts +0 -5
  13. package/dist/external/paraglide/messages/fr.d.ts.map +0 -1
  14. package/dist/external/paraglide/messages/fr.js +0 -10
  15. package/dist/external/paraglide/messages/tl.d.ts +0 -5
  16. package/dist/external/paraglide/messages/tl.d.ts.map +0 -1
  17. package/dist/external/paraglide/messages/tl.js +0 -7
  18. package/dist/external/paraglide/messages.d.ts +0 -3
  19. package/dist/external/paraglide/messages.d.ts.map +0 -1
  20. package/dist/external/paraglide/messages.js +0 -4
  21. package/dist/external/paraglide/registry.d.ts +0 -22
  22. package/dist/external/paraglide/registry.d.ts.map +0 -1
  23. package/dist/external/paraglide/registry.js +0 -31
  24. package/dist/external/paraglide/runtime.d.ts +0 -584
  25. package/dist/external/paraglide/runtime.d.ts.map +0 -1
  26. package/dist/external/paraglide/runtime.js +0 -1406
  27. package/dist/external/paraglide/server.d.ts +0 -68
  28. package/dist/external/paraglide/server.d.ts.map +0 -1
  29. package/dist/external/paraglide/server.js +0 -175
@@ -0,0 +1,162 @@
1
+ # Paraglide JS Compiled Output
2
+
3
+ > Auto-generated i18n message functions. Import `messages.js` to use translated strings.
4
+
5
+ Compiled from: `/Users/turnip/projects/webpages/pineapple/project.inlang`
6
+
7
+
8
+ ## What is this folder?
9
+
10
+ This folder contains compiled [Paraglide JS](https://github.com/opral/paraglide-js) output. Paraglide JS compiles your translation messages into tree-shakeable JavaScript functions.
11
+
12
+ ## At a glance
13
+
14
+ Purpose:
15
+ - This folder stores compiled i18n message functions.
16
+ - Source translations live outside this folder in your inlang project.
17
+
18
+ Safe to import:
19
+ - `messages.js` — all message functions
20
+ - `runtime.js` — locale utilities
21
+ - `server.js` — server-side middleware
22
+
23
+ Do not edit:
24
+ - All files in this folder are auto-generated.
25
+ - Changes will be overwritten on next compilation.
26
+
27
+ ```
28
+ paraglide/
29
+ ├── messages.js # Message exports (import this)
30
+ ├── messages/ # Individual message functions
31
+ ├── runtime.js # Locale detection & configuration
32
+ ├── registry.js # Formatting utilities (plural, number, datetime, relativetime)
33
+ ├── server.js # Server-side middleware
34
+ └── .gitignore # Marks folder as generated
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ```js
40
+ import * as m from "./paraglide/messages.js";
41
+
42
+ // Messages are functions that return localized strings
43
+ m.hello_world(); // "Hello, World!" (in current locale)
44
+ m.greeting({ name: "Sam" }); // "Hello, Sam!"
45
+
46
+ // Override locale per-call
47
+ m.hello_world({}, { locale: "de" }); // "Hallo, Welt!"
48
+ m.greeting({ name: "Sam" }, { locale: "de" }); // "Hallo, Sam!"
49
+ ```
50
+
51
+ ## Runtime API
52
+
53
+ ```js
54
+ import { getLocale, getTextDirection, setLocale, locales, baseLocale } from "./paraglide/runtime.js";
55
+
56
+ getLocale(); // Current locale, e.g., "en"
57
+ getTextDirection(); // "ltr" | "rtl" for current locale
58
+ setLocale("de"); // Set locale
59
+ locales; // Available locales, e.g., ["en", "de", "fr"]
60
+ baseLocale; // Default locale, e.g., "en"
61
+ ```
62
+
63
+ ## Strategy
64
+
65
+ The strategy determines how the current locale is detected and persisted:
66
+
67
+ - **Cookie**: Stores locale preference in a cookie.
68
+ - **URL**: Derives locale from URL patterns (e.g., `/en/about`, `en.example.com`).
69
+ - **GlobalVariable**: Uses a global variable (client-side only).
70
+ - **BaseLocale**: Always returns the base locale.
71
+
72
+ Strategies can be combined. The order defines precedence:
73
+
74
+ ```js
75
+ await compile({
76
+ project: "./project.inlang",
77
+ outdir: "./src/paraglide",
78
+ strategy: ["url", "cookie", "baseLocale"],
79
+ });
80
+ ```
81
+
82
+ See the [strategy documentation](https://paraglidejs.com/strategy) for details.
83
+
84
+ ## Markup (Rich Text)
85
+
86
+ Messages can contain markup tags for bold, links, and other inline elements. Translators control where tags appear; developers control how they render.
87
+
88
+ Important:
89
+ - Tag names are app-defined. There is no built-in list of HTML tags.
90
+ - `{#b}...{/b}` does not automatically render as `<b>...</b>`.
91
+ - Renderers/snippets are looked up by the same tag name used in the message.
92
+
93
+ ### Message syntax
94
+
95
+ ```json
96
+ {
97
+ "cta": "{#link to=|/docs| rel=$relationship @track}Read the docs{/link}",
98
+ "welcome": "{#b}Hi {name}{/b}{#icon/}"
99
+ }
100
+ ```
101
+
102
+ - `{#tagName}` opens a tag, `{/tagName}` closes it.
103
+ - `{#tagName/}` creates a standalone tag.
104
+ - Options: `to=|/docs|` or `rel=$relationship` (accessed via `options.*`).
105
+ - Attributes: `@track` or `@variant=|hero|` (accessed via `attributes.*`).
106
+
107
+ This is the default inlang message syntax. Paraglide's message format is plugin-based — you can use [ICU MessageFormat 1](https://inlang.com/m/p7c8m1d2/plugin-inlang-icu-messageformat-1), [i18next](https://inlang.com/m/3i8bor92/plugin-inlang-i18next), or other [plugins](https://inlang.com/c/plugins) instead.
108
+
109
+ ### Rendering markup
110
+
111
+ Calling the message function still returns **plain text** (markup stripped):
112
+
113
+ ```js
114
+ m.cta({ relationship: "noopener" }); // "Read the docs"
115
+ ```
116
+
117
+ To render markup, use the framework adapter or the low-level `parts()` API:
118
+
119
+ ```js
120
+ const parts = m.cta.parts({ relationship: "noopener" });
121
+ // [
122
+ // { type: "markup-start", name: "link", options: { to: "/docs", rel: "noopener" }, attributes: { track: true } },
123
+ // { type: "text", value: "Read the docs" },
124
+ // { type: "markup-end", name: "link" }
125
+ // ]
126
+ ```
127
+
128
+ Framework adapters provide a `<ParaglideMessage>` component that accepts markup renderers:
129
+
130
+ - `@inlang/paraglide-js-react`
131
+ - `@inlang/paraglide-js-vue`
132
+ - `@inlang/paraglide-js-svelte`
133
+ - `@inlang/paraglide-js-solid`
134
+
135
+ ```jsx
136
+ import { ParaglideMessage } from "@inlang/paraglide-js-react"; // or -vue, -svelte, -solid
137
+
138
+ <ParaglideMessage
139
+ message={m.welcome}
140
+ inputs={{ name: "Ada" }}
141
+ markup={{
142
+ b: ({ children }) => <b>{children}</b>,
143
+ icon: () => <span aria-hidden="true" className="icon-wave" />,
144
+ }}
145
+ />
146
+ ```
147
+
148
+ The available renderer/snippet names come from the message itself. You can inspect them through `message.parts()`, and TypeScript uses the same names to type-check your markup renderers.
149
+
150
+ See the [markup documentation](https://paraglidejs.com/markup) for details.
151
+
152
+ ## Key concepts
153
+
154
+ - **Tree-shakeable**: Each message is a function, enabling [up to 70% smaller i18n bundle sizes](https://paraglidejs.com/benchmark) than traditional i18n libraries.
155
+ - **Typesafe**: Full TypeScript/JSDoc support with autocomplete.
156
+ - **Variants**: Messages can have variants for pluralization, gender, etc.
157
+ - **Fallbacks**: Missing translations fall back to the base locale.
158
+
159
+ ## Links
160
+
161
+ - [Paraglide JS Documentation](https://paraglidejs.com)
162
+ - [Source Repository](https://github.com/opral/paraglide-js)
@@ -3,6 +3,6 @@ export declare const getPhotoDetails: import("@sveltejs/kit").RemoteQueryFunctio
3
3
  description: any;
4
4
  tags: string[];
5
5
  createdAt: any;
6
- } | null>;
7
- export declare const getPhotoCollectionMeta: import("@sveltejs/kit").RemoteQueryFunction<string, any>;
6
+ } | null, string>;
7
+ export declare const getPhotoCollectionMeta: import("@sveltejs/kit").RemoteQueryFunction<string, any, string>;
8
8
  //# sourceMappingURL=externalImages.remote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"externalImages.remote.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/external-images/externalImages.remote.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,eAAe;;;UARG,MAAM,EAAE;;SAQ0B,CAAC;AAElE,eAAO,MAAM,sBAAsB,0DAajC,CAAC"}
1
+ {"version":3,"file":"externalImages.remote.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/external-images/externalImages.remote.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,eAAe;;;UARG,MAAM,EAAE;;iBAQ0B,CAAC;AAElE,eAAO,MAAM,sBAAsB,kEAajC,CAAC"}
package/package.json CHANGED
@@ -1,57 +1,57 @@
1
1
  {
2
2
  "name": "@turnipxenon/pineapple",
3
3
  "description": "personal package for base styling for other personal projects",
4
- "version": "5.3.15",
4
+ "version": "5.3.16",
5
5
  "devDependencies": {
6
6
  "@commitlint/cli": "^19.8.1",
7
7
  "@commitlint/config-conventional": "^19.8.1",
8
8
  "@eslint/compat": "^1.4.1",
9
- "@eslint/js": "^9.39.2",
10
- "@inlang/paraglide-js": "~2.4.0",
9
+ "@eslint/js": "^9.39.5",
10
+ "@inlang/paraglide-js": "^2.23.2",
11
11
  "@prisma/client": "^5.22.0",
12
- "@sveltejs/adapter-cloudflare": "^7.2.6",
13
- "@sveltejs/kit": "^2.53.4",
14
- "@sveltejs/package": "^2.5.7",
12
+ "@sveltejs/adapter-cloudflare": "^7.2.9",
13
+ "@sveltejs/kit": "^2.70.2",
14
+ "@sveltejs/package": "^2.5.8",
15
15
  "@sveltejs/vite-plugin-svelte": "^6.2.4",
16
16
  "@types/mdast": "^4.0.4",
17
- "@types/node": "^20.19.31",
18
- "eslint": "^9.39.2",
17
+ "@types/node": "^20.19.43",
18
+ "eslint": "^9.39.5",
19
19
  "eslint-config-prettier": "^10.1.8",
20
- "eslint-plugin-svelte": "^3.14.0",
20
+ "eslint-plugin-svelte": "^3.23.0",
21
21
  "globals": "^16.5.0",
22
- "highlight.js": "^11.11.1",
22
+ "highlight.js": "^11.12.0",
23
23
  "htmlparser2": "^9.1.0",
24
24
  "husky": "^9.1.7",
25
25
  "mdast-util-from-markdown": "^1.3.1",
26
26
  "node-html-parser": "^6.1.13",
27
- "prettier": "^3.8.1",
28
- "prettier-plugin-svelte": "^3.4.1",
27
+ "prettier": "^3.9.6",
28
+ "prettier-plugin-svelte": "^3.5.2",
29
29
  "prisma": "^5.22.0",
30
- "publint": "^0.3.17",
31
- "sass": "^1.97.3",
30
+ "publint": "^0.3.23",
31
+ "sass": "^1.102.0",
32
32
  "string-width": "^7.2.0",
33
- "svelte": "^5.53.5",
34
- "svelte-check": "^4.3.6",
35
- "svelte2tsx": "^0.7.47",
33
+ "svelte": "^5.56.9",
34
+ "svelte-check": "^4.7.6",
35
+ "svelte2tsx": "^0.7.61",
36
36
  "ts-node": "^10.9.2",
37
37
  "tslib": "^2.8.1",
38
38
  "typescript": "^5.9.3",
39
- "typescript-eslint": "^8.54.0",
40
- "vite": "^7.3.1",
41
- "vitest": "^4.0.18",
42
- "wrangler": "4.59.1"
39
+ "typescript-eslint": "^8.67.0",
40
+ "vite": "^7.3.6",
41
+ "vitest": "^4.1.10",
42
+ "wrangler": "^4.123.0"
43
43
  },
44
44
  "dependencies": {
45
- "@shikijs/transformers": "^3.22.0",
45
+ "@shikijs/transformers": "^3.23.0",
46
46
  "melt": "^0.44.0",
47
47
  "mode-watcher": "^0.5.1",
48
- "shiki": "^3.22.0",
48
+ "shiki": "^3.23.0",
49
49
  "shiki-transformer-copy-button": "0.0.3",
50
50
  "svelte-modals": "^2.0.1",
51
- "valibot": "^1.2.0"
51
+ "valibot": "^1.4.2"
52
52
  },
53
53
  "peerDependencies": {
54
- "svelte": "5.53.5",
54
+ "svelte": "^5.55.7",
55
55
  "svelte-modals": "^2.0.1"
56
56
  },
57
57
  "exports": {
@@ -1,3 +0,0 @@
1
- # ignore everything because the directory is auto-generated by inlang paraglide-js
2
- # for more info visit https://inlang.com/m/gerre34r/paraglide-js
3
- *
@@ -1,9 +0,0 @@
1
- export function example_message(inputs: {
2
- username: NonNullable<unknown>;
3
- }, options?: {
4
- locale?: "en" | "fr" | "tl";
5
- }): string;
6
- export function settings(inputs?: {}, options?: {
7
- locale?: "en" | "fr" | "tl";
8
- }): string;
9
- //# sourceMappingURL=_index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_index.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/_index.js"],"names":[],"mappings":"AAkBO,wCALG;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,YAClC;IAAE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAAE,GAC7B,MAAM,CAYjB;AAcM,kCALG,EAAE,YACF;IAAE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAAE,GAC7B,MAAM,CAYjB"}
@@ -1,51 +0,0 @@
1
- /* eslint-disable */
2
- import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from "../runtime.js"
3
- import * as en from "./en.js"
4
- import * as fr from "./fr.js"
5
- import * as tl from "./tl.js"
6
- /**
7
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
8
- *
9
- * - Changing this function will be over-written by the next build.
10
- *
11
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
12
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
13
- *
14
- * @param {{ username: NonNullable<unknown> }} inputs
15
- * @param {{ locale?: "en" | "fr" | "tl" }} options
16
- * @returns {string}
17
- */
18
- /* @__NO_SIDE_EFFECTS__ */
19
- export const example_message = (inputs, options = {}) => {
20
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
21
- return /** @type {any} */ (globalThis).__paraglide_ssr.example_message(inputs)
22
- }
23
- const locale = options.locale ?? getLocale()
24
- trackMessageCall("example_message", locale)
25
- if (locale === "en") return en.example_message(inputs)
26
- if (locale === "fr") return fr.example_message(inputs)
27
- return tl.example_message(inputs)
28
- };
29
- /**
30
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
31
- *
32
- * - Changing this function will be over-written by the next build.
33
- *
34
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
35
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
36
- *
37
- * @param {{}} inputs
38
- * @param {{ locale?: "en" | "fr" | "tl" }} options
39
- * @returns {string}
40
- */
41
- /* @__NO_SIDE_EFFECTS__ */
42
- export const settings = (inputs = {}, options = {}) => {
43
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
44
- return /** @type {any} */ (globalThis).__paraglide_ssr.settings(inputs)
45
- }
46
- const locale = options.locale ?? getLocale()
47
- trackMessageCall("settings", locale)
48
- if (locale === "en") return en.settings(inputs)
49
- if (locale === "fr") return fr.settings(inputs)
50
- return tl.settings(inputs)
51
- };
@@ -1,5 +0,0 @@
1
- export const example_message: (inputs: {
2
- username: NonNullable<unknown>;
3
- }) => string;
4
- export const settings: (inputs: {}) => string;
5
- //# sourceMappingURL=en.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/en.js"],"names":[],"mappings":"AAGA,8BAA0C,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,KAAK,MAAM,CAE9F;AAEF,uBAAmC,CAAC,MAAM,EAAE,EAAE,KAAK,MAAM,CAEvD"}
@@ -1,10 +0,0 @@
1
- /* eslint-disable */
2
-
3
-
4
- export const example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
5
- return `Hello world ${i.username}`
6
- };
7
-
8
- export const settings = /** @type {(inputs: {}) => string} */ () => {
9
- return `Settings`
10
- };
@@ -1,5 +0,0 @@
1
- export const example_message: (inputs: {
2
- username: NonNullable<unknown>;
3
- }) => string;
4
- export const settings: (inputs: {}) => string;
5
- //# sourceMappingURL=fr.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/fr.js"],"names":[],"mappings":"AAGA,8BAA0C,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,KAAK,MAAM,CAE9F;AAEF,uBAAmC,CAAC,MAAM,EAAE,EAAE,KAAK,MAAM,CAEvD"}
@@ -1,10 +0,0 @@
1
- /* eslint-disable */
2
-
3
-
4
- export const example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
5
- return `Bonjour ${i.username}`
6
- };
7
-
8
- export const settings = /** @type {(inputs: {}) => string} */ () => {
9
- return `Paramètres`
10
- };
@@ -1,5 +0,0 @@
1
- export const example_message: (inputs: {
2
- username: NonNullable<unknown>;
3
- }) => string;
4
- export { settings } from "./en.js";
5
- //# sourceMappingURL=tl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tl.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/tl.js"],"names":[],"mappings":"AAGA,8BAA0C,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,KAAK,MAAM,CAE9F"}
@@ -1,7 +0,0 @@
1
- /* eslint-disable */
2
-
3
-
4
- export const example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
5
- return `Kamusta ${i.username}`
6
- };
7
- export { settings } from "./en.js"
@@ -1,3 +0,0 @@
1
- export * from "./messages/_index.js";
2
- export * as m from "./messages/_index.js";
3
- //# sourceMappingURL=messages.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/lib/external/paraglide/messages.js"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- /* eslint-disable */
2
- export * from './messages/_index.js'
3
- // enabling auto-import by exposing all messages as m
4
- export * as m from './messages/_index.js'
@@ -1,22 +0,0 @@
1
- /**
2
- * @param {import("./runtime.js").Locale} locale
3
- * @param {unknown} input
4
- * @param {Intl.PluralRulesOptions} [options]
5
- * @returns {string}
6
- */
7
- export function plural(locale: import("./runtime.js").Locale, input: unknown, options?: Intl.PluralRulesOptions): string;
8
- /**
9
- * @param {import("./runtime.js").Locale} locale
10
- * @param {unknown} input
11
- * @param {Intl.NumberFormatOptions} [options]
12
- * @returns {string}
13
- */
14
- export function number(locale: import("./runtime.js").Locale, input: unknown, options?: Intl.NumberFormatOptions): string;
15
- /**
16
- * @param {import("./runtime.js").Locale} locale
17
- * @param {unknown} input
18
- * @param {Intl.DateTimeFormatOptions} [options]
19
- * @returns {string}
20
- */
21
- export function datetime(locale: import("./runtime.js").Locale, input: unknown, options?: Intl.DateTimeFormatOptions): string;
22
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/lib/external/paraglide/registry.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,+BALW,OAAO,cAAc,EAAE,MAAM,SAC7B,OAAO,YACP,IAAI,CAAC,kBAAkB,GACrB,MAAM,CAIlB;AAED;;;;;GAKG;AACH,+BALW,OAAO,cAAc,EAAE,MAAM,SAC7B,OAAO,YACP,IAAI,CAAC,mBAAmB,GACtB,MAAM,CAIlB;AAED;;;;;GAKG;AACH,iCALW,OAAO,cAAc,EAAE,MAAM,SAC7B,OAAO,YACP,IAAI,CAAC,qBAAqB,GACxB,MAAM,CAIlB"}
@@ -1,31 +0,0 @@
1
- /* eslint-disable */
2
-
3
- /**
4
- * @param {import("./runtime.js").Locale} locale
5
- * @param {unknown} input
6
- * @param {Intl.PluralRulesOptions} [options]
7
- * @returns {string}
8
- */
9
- export function plural(locale, input, options) {
10
- return new Intl.PluralRules(locale, options).select(Number(input))
11
- };
12
-
13
- /**
14
- * @param {import("./runtime.js").Locale} locale
15
- * @param {unknown} input
16
- * @param {Intl.NumberFormatOptions} [options]
17
- * @returns {string}
18
- */
19
- export function number(locale, input, options) {
20
- return new Intl.NumberFormat(locale, options).format(Number(input))
21
- };
22
-
23
- /**
24
- * @param {import("./runtime.js").Locale} locale
25
- * @param {unknown} input
26
- * @param {Intl.DateTimeFormatOptions} [options]
27
- * @returns {string}
28
- */
29
- export function datetime(locale, input, options) {
30
- return new Intl.DateTimeFormat(locale, options).format(new Date(/** @type {string} */ (input)))
31
- };