@zoobzio/prose 0.0.0-stage → 0.1.3

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.
@@ -0,0 +1,10 @@
1
+ {
2
+ "files": [
3
+ "index.mjs",
4
+ "index.d.mts",
5
+ "bundles.mjs",
6
+ "bundles.d.mts",
7
+ "messages/en.mjs",
8
+ "messages/en.d.mts"
9
+ ]
10
+ }
@@ -0,0 +1,6 @@
1
+ // Generated by @prosary/kit. Do not edit by hand.
2
+ import type { Bundle } from "prosary";
3
+ import type { Contract, Locale } from "./index.mjs";
4
+ export declare const bundles: {
5
+ readonly [L in Locale]: () => Promise<Bundle<Contract>>;
6
+ };
@@ -0,0 +1,4 @@
1
+ // Generated by @prosary/kit. Do not edit by hand.
2
+ export const bundles = Object.freeze({
3
+ "en": () => import("./messages/en.mjs").then((module) => module.default),
4
+ });
@@ -0,0 +1,528 @@
1
+ // Generated by @prosary/kit. Do not edit by hand.
2
+ export type Locale =
3
+ | "en";
4
+ export type Key =
5
+ | "breadcrumb.label"
6
+ | "browser.refresh"
7
+ | "browser.actions"
8
+ | "browser.empty"
9
+ | "browser.noFiles"
10
+ | "browser.clear"
11
+ | "cell.yes"
12
+ | "cell.no"
13
+ | "code.cursor"
14
+ | "command.placeholder"
15
+ | "command.empty"
16
+ | "dateFilters.trigger"
17
+ | "dateFilters.fields"
18
+ | "dateFilters.operators"
19
+ | "dateFilters.after"
20
+ | "dateFilters.before"
21
+ | "dateFilters.between"
22
+ | "dateFilters.field"
23
+ | "dateFilters.operator"
24
+ | "dateFilters.value"
25
+ | "dateFilters.apply"
26
+ | "dateFilters.searchFields"
27
+ | "dateFilters.searchOperators"
28
+ | "editor.bold"
29
+ | "editor.italic"
30
+ | "editor.underline"
31
+ | "editor.strike"
32
+ | "editor.code"
33
+ | "editor.heading"
34
+ | "editor.bulletList"
35
+ | "editor.orderedList"
36
+ | "editor.blockquote"
37
+ | "editor.codeBlock"
38
+ | "editor.rule"
39
+ | "editor.undo"
40
+ | "editor.redo"
41
+ | "error.unknown"
42
+ | "error.notFound"
43
+ | "error.home"
44
+ | "error.unexpected"
45
+ | "facets.trigger"
46
+ | "facets.placeholder"
47
+ | "form.reset"
48
+ | "form.submit"
49
+ | "form.submitting"
50
+ | "keywords.trigger"
51
+ | "keywords.include"
52
+ | "keywords.exclude"
53
+ | "keywords.includeLabel"
54
+ | "keywords.excludeLabel"
55
+ | "keywords.match"
56
+ | "keywords.and"
57
+ | "keywords.or"
58
+ | "pagination.first"
59
+ | "pagination.previous"
60
+ | "pagination.next"
61
+ | "pagination.last"
62
+ | "pagination.info"
63
+ | "pagination.size"
64
+ | "request.failed"
65
+ | "request.unknown"
66
+ | "select.placeholder"
67
+ | "select.multiple"
68
+ | "table.refresh"
69
+ | "table.columns"
70
+ | "table.actions"
71
+ | "table.empty"
72
+ | "table.clear"
73
+ | "table.searchColumns"
74
+ | "table.search"
75
+ | "tagsInput.placeholder";
76
+ export type Document = never;
77
+ export type Element = never;
78
+ export type Directive = never;
79
+ export interface Arguments {
80
+ /**
81
+ * The accessible name of the breadcrumb navigation, read by screen readers.
82
+ *
83
+ * `Breadcrumb`
84
+ */
85
+ "breadcrumb.label": Record<never, never>;
86
+ /**
87
+ * The button that fetches the current folder again.
88
+ *
89
+ * `Refresh`
90
+ */
91
+ "browser.refresh": Record<never, never>;
92
+ /**
93
+ * The button on a file or folder that opens its actions.
94
+ *
95
+ * `Actions`
96
+ */
97
+ "browser.actions": Record<never, never>;
98
+ /**
99
+ * Shown when the current folder holds neither files nor folders.
100
+ *
101
+ * `Empty folder`
102
+ */
103
+ "browser.empty": Record<never, never>;
104
+ /**
105
+ * Shown in the file list when the current folder holds folders but no files.
106
+ *
107
+ * `No files`
108
+ */
109
+ "browser.noFiles": Record<never, never>;
110
+ /**
111
+ * The button that clears the selected files.
112
+ *
113
+ * `Clear`
114
+ */
115
+ "browser.clear": Record<never, never>;
116
+ /**
117
+ * A boolean cell of a table or a browser that holds true.
118
+ *
119
+ * `Yes`
120
+ */
121
+ "cell.yes": Record<never, never>;
122
+ /**
123
+ * A boolean cell of a table or a browser that holds false.
124
+ *
125
+ * `No`
126
+ */
127
+ "cell.no": Record<never, never>;
128
+ /**
129
+ * The status line of the code editor: the cursor's line and column, both counted from 1.
130
+ *
131
+ * `Ln {line}, Col {column}`
132
+ */
133
+ "code.cursor": { "line": string | number; "column": string | number };
134
+ /**
135
+ * The placeholder of the command palette's filter input.
136
+ *
137
+ * `Search...`
138
+ */
139
+ "command.placeholder": Record<never, never>;
140
+ /**
141
+ * Shown in the command palette when no option matches the typed filter.
142
+ *
143
+ * `No results found`
144
+ */
145
+ "command.empty": Record<never, never>;
146
+ /**
147
+ * The button that opens the date filters.
148
+ *
149
+ * `Dates`
150
+ */
151
+ "dateFilters.trigger": Record<never, never>;
152
+ /**
153
+ * The heading of the list of date fields to filter on.
154
+ *
155
+ * `Fields`
156
+ */
157
+ "dateFilters.fields": Record<never, never>;
158
+ /**
159
+ * The heading of the list of comparisons a date filter can make.
160
+ *
161
+ * `Operators`
162
+ */
163
+ "dateFilters.operators": Record<never, never>;
164
+ /**
165
+ * The comparison that keeps dates after the chosen one.
166
+ *
167
+ * `After`
168
+ */
169
+ "dateFilters.after": Record<never, never>;
170
+ /**
171
+ * The comparison that keeps dates before the chosen one.
172
+ *
173
+ * `Before`
174
+ */
175
+ "dateFilters.before": Record<never, never>;
176
+ /**
177
+ * The comparison that keeps dates within a chosen range.
178
+ *
179
+ * `Between`
180
+ */
181
+ "dateFilters.between": Record<never, never>;
182
+ /**
183
+ * The first step of the date filter stepper while no field is chosen.
184
+ *
185
+ * `Field`
186
+ */
187
+ "dateFilters.field": Record<never, never>;
188
+ /**
189
+ * The second step of the date filter stepper while no comparison is chosen.
190
+ *
191
+ * `Operator`
192
+ */
193
+ "dateFilters.operator": Record<never, never>;
194
+ /**
195
+ * The third step of the date filter stepper while no date is chosen.
196
+ *
197
+ * `Value`
198
+ */
199
+ "dateFilters.value": Record<never, never>;
200
+ /**
201
+ * The button that adds the composed date filter.
202
+ *
203
+ * `Apply`
204
+ */
205
+ "dateFilters.apply": Record<never, never>;
206
+ /**
207
+ * The placeholder of the search over the date fields.
208
+ *
209
+ * `Search fields...`
210
+ */
211
+ "dateFilters.searchFields": Record<never, never>;
212
+ /**
213
+ * The placeholder of the search over the comparisons.
214
+ *
215
+ * `Search operators...`
216
+ */
217
+ "dateFilters.searchOperators": Record<never, never>;
218
+ /**
219
+ * The toolbar button for the bold mark.
220
+ *
221
+ * `Bold`
222
+ */
223
+ "editor.bold": Record<never, never>;
224
+ /**
225
+ * The toolbar button for the italic mark.
226
+ *
227
+ * `Italic`
228
+ */
229
+ "editor.italic": Record<never, never>;
230
+ /**
231
+ * The toolbar button for the underline mark.
232
+ *
233
+ * `Underline`
234
+ */
235
+ "editor.underline": Record<never, never>;
236
+ /**
237
+ * The toolbar button for the strikethrough mark.
238
+ *
239
+ * `Strike`
240
+ */
241
+ "editor.strike": Record<never, never>;
242
+ /**
243
+ * The toolbar button for the inline code mark.
244
+ *
245
+ * `Code`
246
+ */
247
+ "editor.code": Record<never, never>;
248
+ /**
249
+ * The toolbar button for a heading; the level is 1 to 6. Keep it short: it is one of up to six side by side.
250
+ *
251
+ * `H{level}`
252
+ */
253
+ "editor.heading": { "level": string | number };
254
+ /**
255
+ * The toolbar button for a bulleted list.
256
+ *
257
+ * `Bullet list`
258
+ */
259
+ "editor.bulletList": Record<never, never>;
260
+ /**
261
+ * The toolbar button for a numbered list.
262
+ *
263
+ * `Ordered list`
264
+ */
265
+ "editor.orderedList": Record<never, never>;
266
+ /**
267
+ * The toolbar button for a block quotation.
268
+ *
269
+ * `Quote`
270
+ */
271
+ "editor.blockquote": Record<never, never>;
272
+ /**
273
+ * The toolbar button for a code block.
274
+ *
275
+ * `Code block`
276
+ */
277
+ "editor.codeBlock": Record<never, never>;
278
+ /**
279
+ * The toolbar button that inserts a horizontal rule.
280
+ *
281
+ * `Rule`
282
+ */
283
+ "editor.rule": Record<never, never>;
284
+ /**
285
+ * The toolbar button that undoes the last change.
286
+ *
287
+ * `Undo`
288
+ */
289
+ "editor.undo": Record<never, never>;
290
+ /**
291
+ * The toolbar button that redoes the last undone change.
292
+ *
293
+ * `Redo`
294
+ */
295
+ "editor.redo": Record<never, never>;
296
+ /**
297
+ * The error page's message when the error carries none.
298
+ *
299
+ * `Something went wrong.`
300
+ */
301
+ "error.unknown": Record<never, never>;
302
+ /**
303
+ * The error page's message for a 404.
304
+ *
305
+ * `The page you're looking for doesn't exist.`
306
+ */
307
+ "error.notFound": Record<never, never>;
308
+ /**
309
+ * The error page's button that clears the error and returns to the home page.
310
+ *
311
+ * `Go home`
312
+ */
313
+ "error.home": Record<never, never>;
314
+ /**
315
+ * The notification's title when an error the app did not shape reaches the error boundary.
316
+ *
317
+ * `An unexpected error occurred`
318
+ */
319
+ "error.unexpected": Record<never, never>;
320
+ /**
321
+ * The button that opens the facet filters.
322
+ *
323
+ * `Filters`
324
+ */
325
+ "facets.trigger": Record<never, never>;
326
+ /**
327
+ * The placeholder of the search inside the facet filters.
328
+ *
329
+ * `Search filters...`
330
+ */
331
+ "facets.placeholder": Record<never, never>;
332
+ /**
333
+ * The button that restores the form's initial values.
334
+ *
335
+ * `Reset`
336
+ */
337
+ "form.reset": Record<never, never>;
338
+ /**
339
+ * The button that submits the form.
340
+ *
341
+ * `Submit`
342
+ */
343
+ "form.submit": Record<never, never>;
344
+ /**
345
+ * The submit button's text while the submission is in flight.
346
+ *
347
+ * `Submitting...`
348
+ */
349
+ "form.submitting": Record<never, never>;
350
+ /**
351
+ * The button that opens the keyword filters.
352
+ *
353
+ * `Keywords`
354
+ */
355
+ "keywords.trigger": Record<never, never>;
356
+ /**
357
+ * The placeholder of the input that adds a keyword rows must contain.
358
+ *
359
+ * `Add keyword...`
360
+ */
361
+ "keywords.include": Record<never, never>;
362
+ /**
363
+ * The placeholder of the input that adds a keyword rows must not contain.
364
+ *
365
+ * `Exclude keyword...`
366
+ */
367
+ "keywords.exclude": Record<never, never>;
368
+ /**
369
+ * The heading of the section that lists the keywords rows must contain.
370
+ *
371
+ * `Include`
372
+ */
373
+ "keywords.includeLabel": Record<never, never>;
374
+ /**
375
+ * The heading of the section that lists the keywords rows must not contain.
376
+ *
377
+ * `Exclude`
378
+ */
379
+ "keywords.excludeLabel": Record<never, never>;
380
+ /**
381
+ * The heading of the control that chooses how the included keywords combine.
382
+ *
383
+ * `Match`
384
+ */
385
+ "keywords.match": Record<never, never>;
386
+ /**
387
+ * The match mode where a row must contain every included keyword.
388
+ *
389
+ * `AND`
390
+ */
391
+ "keywords.and": Record<never, never>;
392
+ /**
393
+ * The match mode where a row must contain any included keyword.
394
+ *
395
+ * `OR`
396
+ */
397
+ "keywords.or": Record<never, never>;
398
+ /**
399
+ * The button that goes to the first page.
400
+ *
401
+ * `First`
402
+ */
403
+ "pagination.first": Record<never, never>;
404
+ /**
405
+ * The button that goes to the previous page.
406
+ *
407
+ * `Previous`
408
+ */
409
+ "pagination.previous": Record<never, never>;
410
+ /**
411
+ * The button that goes to the next page.
412
+ *
413
+ * `Next`
414
+ */
415
+ "pagination.next": Record<never, never>;
416
+ /**
417
+ * The button that goes to the last page.
418
+ *
419
+ * `Last`
420
+ */
421
+ "pagination.last": Record<never, never>;
422
+ /**
423
+ * The summary beside the pager: the current page, the page count, and the total number of rows.
424
+ *
425
+ * `Page {page} of {count} ({total} results)`
426
+ */
427
+ "pagination.info": { "page": string | number; "count": string | number; "total": string | number };
428
+ /**
429
+ * An option of the page size select; the size is the number of rows per page.
430
+ *
431
+ * `Show {size}`
432
+ */
433
+ "pagination.size": { "size": string | number };
434
+ /**
435
+ * The message of the error thrown when a request fails and the caller names none.
436
+ *
437
+ * `Request failed`
438
+ */
439
+ "request.failed": Record<never, never>;
440
+ /**
441
+ * The title of the notification toasted when a request fails and the caller names none.
442
+ *
443
+ * `An unknown error occurred`
444
+ */
445
+ "request.unknown": Record<never, never>;
446
+ /**
447
+ * The text a single select shows while nothing is selected.
448
+ *
449
+ * `Select an option`
450
+ */
451
+ "select.placeholder": Record<never, never>;
452
+ /**
453
+ * The text a multi select shows while nothing is selected.
454
+ *
455
+ * `Select options`
456
+ */
457
+ "select.multiple": Record<never, never>;
458
+ /**
459
+ * The button that fetches the table's rows again.
460
+ *
461
+ * `Refresh`
462
+ */
463
+ "table.refresh": Record<never, never>;
464
+ /**
465
+ * The button that opens the column manager, and the heading of its one group.
466
+ *
467
+ * `Columns`
468
+ */
469
+ "table.columns": Record<never, never>;
470
+ /**
471
+ * The button on a row that opens its actions.
472
+ *
473
+ * `Actions`
474
+ */
475
+ "table.actions": Record<never, never>;
476
+ /**
477
+ * Shown in place of the rows when the table holds none.
478
+ *
479
+ * `No data`
480
+ */
481
+ "table.empty": Record<never, never>;
482
+ /**
483
+ * The button that clears the selected rows.
484
+ *
485
+ * `Clear`
486
+ */
487
+ "table.clear": Record<never, never>;
488
+ /**
489
+ * The placeholder of the column manager's search.
490
+ *
491
+ * `Search columns...`
492
+ */
493
+ "table.searchColumns": Record<never, never>;
494
+ /**
495
+ * The placeholder of the table's search.
496
+ *
497
+ * `Search...`
498
+ */
499
+ "table.search": Record<never, never>;
500
+ /**
501
+ * The placeholder of the tags input while it is empty.
502
+ *
503
+ * `Add tags...`
504
+ */
505
+ "tagsInput.placeholder": Record<never, never>;
506
+ }
507
+ export declare const locale: "en";
508
+ export declare const locales: readonly Locale[];
509
+ export declare const messages: readonly Key[];
510
+ export declare const documents: readonly Document[];
511
+ export declare const elements: readonly Element[];
512
+ export declare const directives: readonly Directive[];
513
+ export declare const content: { readonly output: "hast"; readonly marker: "dataDirective" };
514
+ export declare const isLocale: (value: unknown) => value is Locale;
515
+ export declare const isKey: (value: unknown) => value is Key;
516
+ export declare const contract: {
517
+ readonly locale: "en";
518
+ readonly locales: readonly Locale[];
519
+ readonly messages: readonly Key[];
520
+ readonly formats: {
521
+ readonly number: Record<never, never>;
522
+ readonly date: Record<never, never>;
523
+ readonly time: Record<never, never>;
524
+ };
525
+ /** Never present at runtime; carries each message's values in the types. */
526
+ readonly arguments?: Arguments;
527
+ };
528
+ export type Contract = typeof contract;
@@ -0,0 +1,92 @@
1
+ // Generated by @prosary/kit. Do not edit by hand.
2
+ export const locale = "en";
3
+ export const locales = Object.freeze([
4
+ "en"
5
+ ]);
6
+ export const messages = Object.freeze([
7
+ "breadcrumb.label",
8
+ "browser.refresh",
9
+ "browser.actions",
10
+ "browser.empty",
11
+ "browser.noFiles",
12
+ "browser.clear",
13
+ "cell.yes",
14
+ "cell.no",
15
+ "code.cursor",
16
+ "command.placeholder",
17
+ "command.empty",
18
+ "dateFilters.trigger",
19
+ "dateFilters.fields",
20
+ "dateFilters.operators",
21
+ "dateFilters.after",
22
+ "dateFilters.before",
23
+ "dateFilters.between",
24
+ "dateFilters.field",
25
+ "dateFilters.operator",
26
+ "dateFilters.value",
27
+ "dateFilters.apply",
28
+ "dateFilters.searchFields",
29
+ "dateFilters.searchOperators",
30
+ "editor.bold",
31
+ "editor.italic",
32
+ "editor.underline",
33
+ "editor.strike",
34
+ "editor.code",
35
+ "editor.heading",
36
+ "editor.bulletList",
37
+ "editor.orderedList",
38
+ "editor.blockquote",
39
+ "editor.codeBlock",
40
+ "editor.rule",
41
+ "editor.undo",
42
+ "editor.redo",
43
+ "error.unknown",
44
+ "error.notFound",
45
+ "error.home",
46
+ "error.unexpected",
47
+ "facets.trigger",
48
+ "facets.placeholder",
49
+ "form.reset",
50
+ "form.submit",
51
+ "form.submitting",
52
+ "keywords.trigger",
53
+ "keywords.include",
54
+ "keywords.exclude",
55
+ "keywords.includeLabel",
56
+ "keywords.excludeLabel",
57
+ "keywords.match",
58
+ "keywords.and",
59
+ "keywords.or",
60
+ "pagination.first",
61
+ "pagination.previous",
62
+ "pagination.next",
63
+ "pagination.last",
64
+ "pagination.info",
65
+ "pagination.size",
66
+ "request.failed",
67
+ "request.unknown",
68
+ "select.placeholder",
69
+ "select.multiple",
70
+ "table.refresh",
71
+ "table.columns",
72
+ "table.actions",
73
+ "table.empty",
74
+ "table.clear",
75
+ "table.searchColumns",
76
+ "table.search",
77
+ "tagsInput.placeholder"
78
+ ]);
79
+ const knownLocales = new Set(locales);
80
+ const knownKeys = new Set(messages);
81
+ export const isLocale = (value) => typeof value === "string" && knownLocales.has(value);
82
+ export const isKey = (value) => typeof value === "string" && knownKeys.has(value);
83
+ export const documents = Object.freeze([]);
84
+ export const elements = Object.freeze([]);
85
+ export const directives = Object.freeze([]);
86
+ export const content = Object.freeze({ output: "hast", marker: "dataDirective" });
87
+ export const formats = Object.freeze({
88
+ "number": {},
89
+ "date": {},
90
+ "time": {}
91
+ });
92
+ export const contract = Object.freeze({ locale, locales, messages, formats });
@@ -0,0 +1,5 @@
1
+ // Generated by @prosary/kit. Do not edit by hand.
2
+ import type { Bundle } from "prosary";
3
+ import type { Contract } from "../index.mjs";
4
+ declare const bundle: Bundle<Contract>;
5
+ export default bundle;
@@ -0,0 +1 @@
1
+ export default {"breadcrumb.label":[{"type":0,"value":"Breadcrumb"}],"browser.refresh":[{"type":0,"value":"Refresh"}],"browser.actions":[{"type":0,"value":"Actions"}],"browser.empty":[{"type":0,"value":"Empty folder"}],"browser.noFiles":[{"type":0,"value":"No files"}],"browser.clear":[{"type":0,"value":"Clear"}],"cell.yes":[{"type":0,"value":"Yes"}],"cell.no":[{"type":0,"value":"No"}],"code.cursor":[{"type":0,"value":"Ln "},{"type":1,"value":"line"},{"type":0,"value":", Col "},{"type":1,"value":"column"}],"command.placeholder":[{"type":0,"value":"Search..."}],"command.empty":[{"type":0,"value":"No results found"}],"dateFilters.trigger":[{"type":0,"value":"Dates"}],"dateFilters.fields":[{"type":0,"value":"Fields"}],"dateFilters.operators":[{"type":0,"value":"Operators"}],"dateFilters.after":[{"type":0,"value":"After"}],"dateFilters.before":[{"type":0,"value":"Before"}],"dateFilters.between":[{"type":0,"value":"Between"}],"dateFilters.field":[{"type":0,"value":"Field"}],"dateFilters.operator":[{"type":0,"value":"Operator"}],"dateFilters.value":[{"type":0,"value":"Value"}],"dateFilters.apply":[{"type":0,"value":"Apply"}],"dateFilters.searchFields":[{"type":0,"value":"Search fields..."}],"dateFilters.searchOperators":[{"type":0,"value":"Search operators..."}],"editor.bold":[{"type":0,"value":"Bold"}],"editor.italic":[{"type":0,"value":"Italic"}],"editor.underline":[{"type":0,"value":"Underline"}],"editor.strike":[{"type":0,"value":"Strike"}],"editor.code":[{"type":0,"value":"Code"}],"editor.heading":[{"type":0,"value":"H"},{"type":1,"value":"level"}],"editor.bulletList":[{"type":0,"value":"Bullet list"}],"editor.orderedList":[{"type":0,"value":"Ordered list"}],"editor.blockquote":[{"type":0,"value":"Quote"}],"editor.codeBlock":[{"type":0,"value":"Code block"}],"editor.rule":[{"type":0,"value":"Rule"}],"editor.undo":[{"type":0,"value":"Undo"}],"editor.redo":[{"type":0,"value":"Redo"}],"error.unknown":[{"type":0,"value":"Something went wrong."}],"error.notFound":[{"type":0,"value":"The page you're looking for doesn't exist."}],"error.home":[{"type":0,"value":"Go home"}],"error.unexpected":[{"type":0,"value":"An unexpected error occurred"}],"facets.trigger":[{"type":0,"value":"Filters"}],"facets.placeholder":[{"type":0,"value":"Search filters..."}],"form.reset":[{"type":0,"value":"Reset"}],"form.submit":[{"type":0,"value":"Submit"}],"form.submitting":[{"type":0,"value":"Submitting..."}],"keywords.trigger":[{"type":0,"value":"Keywords"}],"keywords.include":[{"type":0,"value":"Add keyword..."}],"keywords.exclude":[{"type":0,"value":"Exclude keyword..."}],"keywords.includeLabel":[{"type":0,"value":"Include"}],"keywords.excludeLabel":[{"type":0,"value":"Exclude"}],"keywords.match":[{"type":0,"value":"Match"}],"keywords.and":[{"type":0,"value":"AND"}],"keywords.or":[{"type":0,"value":"OR"}],"pagination.first":[{"type":0,"value":"First"}],"pagination.previous":[{"type":0,"value":"Previous"}],"pagination.next":[{"type":0,"value":"Next"}],"pagination.last":[{"type":0,"value":"Last"}],"pagination.info":[{"type":0,"value":"Page "},{"type":1,"value":"page"},{"type":0,"value":" of "},{"type":1,"value":"count"},{"type":0,"value":" ("},{"type":1,"value":"total"},{"type":0,"value":" results)"}],"pagination.size":[{"type":0,"value":"Show "},{"type":1,"value":"size"}],"request.failed":[{"type":0,"value":"Request failed"}],"request.unknown":[{"type":0,"value":"An unknown error occurred"}],"select.placeholder":[{"type":0,"value":"Select an option"}],"select.multiple":[{"type":0,"value":"Select options"}],"table.refresh":[{"type":0,"value":"Refresh"}],"table.columns":[{"type":0,"value":"Columns"}],"table.actions":[{"type":0,"value":"Actions"}],"table.empty":[{"type":0,"value":"No data"}],"table.clear":[{"type":0,"value":"Clear"}],"table.searchColumns":[{"type":0,"value":"Search columns..."}],"table.search":[{"type":0,"value":"Search..."}],"tagsInput.placeholder":[{"type":0,"value":"Add tags..."}]};
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Alexander Thorwaldson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,56 @@
1
- # Temporary Holding Version
1
+ # @zoobzio/prose
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The text of the foundation design system: every label, placeholder and
4
+ notice a component of [`@zoobzio/vue`](../../integrations/vue/) renders
5
+ when the consumer gives it none, authored as FormatJS message descriptors
6
+ and built by [`@prosary/kit`](https://github.com/zoobzio/prosary) into a
7
+ typed contract and a bundle per locale.
8
+
9
+ ```sh
10
+ pnpm --filter @zoobzio/prose build
11
+ ```
12
+
13
+ - `prosary.config.ts` — the kit config: where the messages are, the source
14
+ locale, and the translation cache. Exported as `@zoobzio/prose/config`,
15
+ so an app's own kit config can `extends` it and build these messages into
16
+ its own contract, translated with the app's.
17
+ - `src/messages/` — the source messages, in English, one file per
18
+ component or service: `empty` in `table.json` is the key `table.empty`.
19
+ Each carries a `description` for the translator.
20
+ - `.dist/` — the build: the `contract` with its `Key` and `Contract` types,
21
+ the `bundles` loaders, and `messages/<locale>.mjs` per locale. What the
22
+ package exports.
23
+ - `.i18n/` — the translations, as `prosary translate` writes them, checked
24
+ in. Empty until a `translate.model` is set in the config and the command
25
+ is run with the model's API key.
26
+
27
+ ## Use
28
+
29
+ `@zoobzio/vue` knows nothing of this package: its components render their
30
+ text as it is, in English by default. The Nuxt layer points the prosary
31
+ module at the build — `prosary: { build: "@zoobzio/prose" }` — the way it
32
+ points untheme at `@zoobzio/theme`, and lays these messages over the
33
+ components through its wrappers, so an app that extends the layer gets the
34
+ components' text in its contract, in the visitor's locale, with no setup.
35
+
36
+ An app with text of its own ships a prose package of the same shape, with a
37
+ kit config that extends this one, and points the layer's module at it:
38
+
39
+ ```ts
40
+ // @acme/prose/prosary.config.ts
41
+ export default defineConfig({
42
+ messages: "src/messages",
43
+ extends: "@zoobzio/prose/config",
44
+ translate: { source: "en", targets: ["fr", "de"], cache: ".i18n" },
45
+ });
46
+
47
+ // nuxt.config.ts
48
+ export default defineNuxtConfig({
49
+ extends: ["@zoobzio/nuxt"],
50
+ prosary: { build: "@acme/prose" },
51
+ });
52
+ ```
53
+
54
+ The app's keys join these; a key the app declares again replaces it; and
55
+ the app's `prosary translate` translates the app's own messages. A locale
56
+ this package lacks falls back to the source message.
package/package.json CHANGED
@@ -1,6 +1,57 @@
1
1
  {
2
2
  "name": "@zoobzio/prose",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.3",
4
+ "description": "The foundation design system's text: every label, placeholder and notice its components render, authored as FormatJS messages and built by @prosary/kit into a typed contract and a bundle per locale. An app's own prosary config extends it, so the components' text translates with the app's.",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "Alex Thorwaldson",
8
+ "email": "alex@zoobz.io",
9
+ "url": "https://zoobz.io"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/zoobzio/foundation.git",
14
+ "directory": "packages/prose"
15
+ },
16
+ "files": [
17
+ ".dist",
18
+ ".i18n",
19
+ "prosary.config.ts",
20
+ "src"
21
+ ],
22
+ "type": "module",
23
+ "sideEffects": false,
24
+ "main": "./.dist/index.mjs",
25
+ "types": "./.dist/index.d.mts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./.dist/index.d.mts",
29
+ "import": "./.dist/index.mjs"
30
+ },
31
+ "./bundles": {
32
+ "types": "./.dist/bundles.d.mts",
33
+ "import": "./.dist/bundles.mjs"
34
+ },
35
+ "./messages/*": "./.dist/messages/*.mjs",
36
+ "./config": "./prosary.config.ts",
37
+ "./package.json": "./package.json"
38
+ },
39
+ "peerDependencies": {
40
+ "@prosary/kit": "0.0.9",
41
+ "prosary": "0.0.9"
42
+ },
43
+ "devDependencies": {
44
+ "@prosary/kit": "0.0.9",
45
+ "@types/node": "^26.6.6",
46
+ "prosary": "0.0.9",
47
+ "vitest": "^5.0.3"
48
+ },
49
+ "scripts": {
50
+ "build": "prosary build",
51
+ "stub": "prosary build",
52
+ "translate": "prosary translate",
53
+ "lint": "oxlint",
54
+ "typecheck": "tsc --noEmit",
55
+ "test": "vitest run"
56
+ }
6
57
  }
@@ -0,0 +1,22 @@
1
+ import { defineConfig } from "@prosary/kit/config";
2
+
3
+ /**
4
+ * The text of the foundation design system: every label, placeholder and
5
+ * notice a component of `@zoobzio/vue` renders when the consumer gives it
6
+ * none. `prosary build` writes the contract module and a bundle per locale
7
+ * under `.dist/`, which this package exports; the Nuxt layer names it as
8
+ * its `prosary.build`, and an app's own `prosary.config.ts` extends this
9
+ * one, so the app builds these messages into its own contract and
10
+ * translates them with it.
11
+ *
12
+ * The source messages are the JSON files under `src/messages/`, one per
13
+ * component or service, each one's keys nested under its name: `empty` in
14
+ * `table.json` is `table.empty`. The source locale is English; the
15
+ * translations under `.i18n/` are written by `prosary translate`, given a
16
+ * `translate.model` and its API key, and checked in.
17
+ */
18
+ export default defineConfig({
19
+ messages: "src/messages",
20
+ translate: { source: "en", cache: ".i18n" },
21
+ outDir: ".dist",
22
+ });
@@ -0,0 +1,6 @@
1
+ {
2
+ "label": {
3
+ "defaultMessage": "Breadcrumb",
4
+ "description": "The accessible name of the breadcrumb navigation, read by screen readers."
5
+ }
6
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "refresh": {
3
+ "defaultMessage": "Refresh",
4
+ "description": "The button that fetches the current folder again."
5
+ },
6
+ "actions": {
7
+ "defaultMessage": "Actions",
8
+ "description": "The button on a file or folder that opens its actions."
9
+ },
10
+ "empty": {
11
+ "defaultMessage": "Empty folder",
12
+ "description": "Shown when the current folder holds neither files nor folders."
13
+ },
14
+ "noFiles": {
15
+ "defaultMessage": "No files",
16
+ "description": "Shown in the file list when the current folder holds folders but no files."
17
+ },
18
+ "clear": {
19
+ "defaultMessage": "Clear",
20
+ "description": "The button that clears the selected files."
21
+ }
22
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "yes": {
3
+ "defaultMessage": "Yes",
4
+ "description": "A boolean cell of a table or a browser that holds true."
5
+ },
6
+ "no": {
7
+ "defaultMessage": "No",
8
+ "description": "A boolean cell of a table or a browser that holds false."
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "cursor": {
3
+ "defaultMessage": "Ln {line}, Col {column}",
4
+ "description": "The status line of the code editor: the cursor's line and column, both counted from 1."
5
+ }
6
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "placeholder": {
3
+ "defaultMessage": "Search...",
4
+ "description": "The placeholder of the command palette's filter input."
5
+ },
6
+ "empty": {
7
+ "defaultMessage": "No results found",
8
+ "description": "Shown in the command palette when no option matches the typed filter."
9
+ }
10
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "trigger": {
3
+ "defaultMessage": "Dates",
4
+ "description": "The button that opens the date filters."
5
+ },
6
+ "fields": {
7
+ "defaultMessage": "Fields",
8
+ "description": "The heading of the list of date fields to filter on."
9
+ },
10
+ "operators": {
11
+ "defaultMessage": "Operators",
12
+ "description": "The heading of the list of comparisons a date filter can make."
13
+ },
14
+ "after": {
15
+ "defaultMessage": "After",
16
+ "description": "The comparison that keeps dates after the chosen one."
17
+ },
18
+ "before": {
19
+ "defaultMessage": "Before",
20
+ "description": "The comparison that keeps dates before the chosen one."
21
+ },
22
+ "between": {
23
+ "defaultMessage": "Between",
24
+ "description": "The comparison that keeps dates within a chosen range."
25
+ },
26
+ "field": {
27
+ "defaultMessage": "Field",
28
+ "description": "The first step of the date filter stepper while no field is chosen."
29
+ },
30
+ "operator": {
31
+ "defaultMessage": "Operator",
32
+ "description": "The second step of the date filter stepper while no comparison is chosen."
33
+ },
34
+ "value": {
35
+ "defaultMessage": "Value",
36
+ "description": "The third step of the date filter stepper while no date is chosen."
37
+ },
38
+ "apply": {
39
+ "defaultMessage": "Apply",
40
+ "description": "The button that adds the composed date filter."
41
+ },
42
+ "searchFields": {
43
+ "defaultMessage": "Search fields...",
44
+ "description": "The placeholder of the search over the date fields."
45
+ },
46
+ "searchOperators": {
47
+ "defaultMessage": "Search operators...",
48
+ "description": "The placeholder of the search over the comparisons."
49
+ }
50
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "bold": {
3
+ "defaultMessage": "Bold",
4
+ "description": "The toolbar button for the bold mark."
5
+ },
6
+ "italic": {
7
+ "defaultMessage": "Italic",
8
+ "description": "The toolbar button for the italic mark."
9
+ },
10
+ "underline": {
11
+ "defaultMessage": "Underline",
12
+ "description": "The toolbar button for the underline mark."
13
+ },
14
+ "strike": {
15
+ "defaultMessage": "Strike",
16
+ "description": "The toolbar button for the strikethrough mark."
17
+ },
18
+ "code": {
19
+ "defaultMessage": "Code",
20
+ "description": "The toolbar button for the inline code mark."
21
+ },
22
+ "heading": {
23
+ "defaultMessage": "H{level}",
24
+ "description": "The toolbar button for a heading; the level is 1 to 6. Keep it short: it is one of up to six side by side."
25
+ },
26
+ "bulletList": {
27
+ "defaultMessage": "Bullet list",
28
+ "description": "The toolbar button for a bulleted list."
29
+ },
30
+ "orderedList": {
31
+ "defaultMessage": "Ordered list",
32
+ "description": "The toolbar button for a numbered list."
33
+ },
34
+ "blockquote": {
35
+ "defaultMessage": "Quote",
36
+ "description": "The toolbar button for a block quotation."
37
+ },
38
+ "codeBlock": {
39
+ "defaultMessage": "Code block",
40
+ "description": "The toolbar button for a code block."
41
+ },
42
+ "rule": {
43
+ "defaultMessage": "Rule",
44
+ "description": "The toolbar button that inserts a horizontal rule."
45
+ },
46
+ "undo": {
47
+ "defaultMessage": "Undo",
48
+ "description": "The toolbar button that undoes the last change."
49
+ },
50
+ "redo": {
51
+ "defaultMessage": "Redo",
52
+ "description": "The toolbar button that redoes the last undone change."
53
+ }
54
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "unknown": {
3
+ "defaultMessage": "Something went wrong.",
4
+ "description": "The error page's message when the error carries none."
5
+ },
6
+ "notFound": {
7
+ "defaultMessage": "The page you're looking for doesn't exist.",
8
+ "description": "The error page's message for a 404."
9
+ },
10
+ "home": {
11
+ "defaultMessage": "Go home",
12
+ "description": "The error page's button that clears the error and returns to the home page."
13
+ },
14
+ "unexpected": {
15
+ "defaultMessage": "An unexpected error occurred",
16
+ "description": "The notification's title when an error the app did not shape reaches the error boundary."
17
+ }
18
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "trigger": {
3
+ "defaultMessage": "Filters",
4
+ "description": "The button that opens the facet filters."
5
+ },
6
+ "placeholder": {
7
+ "defaultMessage": "Search filters...",
8
+ "description": "The placeholder of the search inside the facet filters."
9
+ }
10
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "reset": {
3
+ "defaultMessage": "Reset",
4
+ "description": "The button that restores the form's initial values."
5
+ },
6
+ "submit": {
7
+ "defaultMessage": "Submit",
8
+ "description": "The button that submits the form."
9
+ },
10
+ "submitting": {
11
+ "defaultMessage": "Submitting...",
12
+ "description": "The submit button's text while the submission is in flight."
13
+ }
14
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "trigger": {
3
+ "defaultMessage": "Keywords",
4
+ "description": "The button that opens the keyword filters."
5
+ },
6
+ "include": {
7
+ "defaultMessage": "Add keyword...",
8
+ "description": "The placeholder of the input that adds a keyword rows must contain."
9
+ },
10
+ "exclude": {
11
+ "defaultMessage": "Exclude keyword...",
12
+ "description": "The placeholder of the input that adds a keyword rows must not contain."
13
+ },
14
+ "includeLabel": {
15
+ "defaultMessage": "Include",
16
+ "description": "The heading of the section that lists the keywords rows must contain."
17
+ },
18
+ "excludeLabel": {
19
+ "defaultMessage": "Exclude",
20
+ "description": "The heading of the section that lists the keywords rows must not contain."
21
+ },
22
+ "match": {
23
+ "defaultMessage": "Match",
24
+ "description": "The heading of the control that chooses how the included keywords combine."
25
+ },
26
+ "and": {
27
+ "defaultMessage": "AND",
28
+ "description": "The match mode where a row must contain every included keyword."
29
+ },
30
+ "or": {
31
+ "defaultMessage": "OR",
32
+ "description": "The match mode where a row must contain any included keyword."
33
+ }
34
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "first": {
3
+ "defaultMessage": "First",
4
+ "description": "The button that goes to the first page."
5
+ },
6
+ "previous": {
7
+ "defaultMessage": "Previous",
8
+ "description": "The button that goes to the previous page."
9
+ },
10
+ "next": {
11
+ "defaultMessage": "Next",
12
+ "description": "The button that goes to the next page."
13
+ },
14
+ "last": {
15
+ "defaultMessage": "Last",
16
+ "description": "The button that goes to the last page."
17
+ },
18
+ "info": {
19
+ "defaultMessage": "Page {page} of {count} ({total} results)",
20
+ "description": "The summary beside the pager: the current page, the page count, and the total number of rows."
21
+ },
22
+ "size": {
23
+ "defaultMessage": "Show {size}",
24
+ "description": "An option of the page size select; the size is the number of rows per page."
25
+ }
26
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "failed": {
3
+ "defaultMessage": "Request failed",
4
+ "description": "The message of the error thrown when a request fails and the caller names none."
5
+ },
6
+ "unknown": {
7
+ "defaultMessage": "An unknown error occurred",
8
+ "description": "The title of the notification toasted when a request fails and the caller names none."
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "placeholder": {
3
+ "defaultMessage": "Select an option",
4
+ "description": "The text a single select shows while nothing is selected."
5
+ },
6
+ "multiple": {
7
+ "defaultMessage": "Select options",
8
+ "description": "The text a multi select shows while nothing is selected."
9
+ }
10
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "refresh": {
3
+ "defaultMessage": "Refresh",
4
+ "description": "The button that fetches the table's rows again."
5
+ },
6
+ "columns": {
7
+ "defaultMessage": "Columns",
8
+ "description": "The button that opens the column manager, and the heading of its one group."
9
+ },
10
+ "actions": {
11
+ "defaultMessage": "Actions",
12
+ "description": "The button on a row that opens its actions."
13
+ },
14
+ "empty": {
15
+ "defaultMessage": "No data",
16
+ "description": "Shown in place of the rows when the table holds none."
17
+ },
18
+ "clear": {
19
+ "defaultMessage": "Clear",
20
+ "description": "The button that clears the selected rows."
21
+ },
22
+ "searchColumns": {
23
+ "defaultMessage": "Search columns...",
24
+ "description": "The placeholder of the column manager's search."
25
+ },
26
+ "search": {
27
+ "defaultMessage": "Search...",
28
+ "description": "The placeholder of the table's search."
29
+ }
30
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "placeholder": {
3
+ "defaultMessage": "Add tags...",
4
+ "description": "The placeholder of the tags input while it is empty."
5
+ }
6
+ }