@nextmoe/edit-ui-catalog 0.3.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.
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @nextmoe/edit-ui-catalog
2
+
3
+ Field presets for the NextMoe catalog editing API.
4
+
5
+ `@nextmoe/edit-ui-vue` renders whatever schema it is handed, and deliberately
6
+ knows nothing about any particular backend. That leaves every site to rediscover,
7
+ for all fifty registered field keys, which control to use, which enum values the
8
+ server accepts as integers, and what shape one element of a list actually is —
9
+ none of which the schema endpoint reports.
10
+
11
+ This package is that answer, written once and tested against a census of the
12
+ engine's own field specs (`schema/inventory.json`). It is still only
13
+ configuration: nothing here calls an API. The site supplies `uploadImage`,
14
+ `resolveImage`, `searchEntities` and `resolveEntities`.
15
+
16
+ ```ts
17
+ import { catalogConfig } from '@nextmoe/edit-ui-catalog'
18
+
19
+ const config = catalogConfig('catalog.work', {
20
+ searchEntities: { character: searchCharacters, tag: searchTags },
21
+ uploadImage
22
+ })
23
+ ```
24
+
25
+ ## Provenance
26
+
27
+ `schema/inventory.json` and `schema/inventory-report.md` are a census of
28
+ `nextmoe-infra`'s `apps/api/internal/platform/catalog/editspec/` at
29
+ `w161-hotfix` / `3454161d`. They are not published to npm; they exist so the
30
+ completeness tests can assert that no registered field is missing a preset, and
31
+ so a future engine change can be diffed against what this table was built from.