@liiift-studio/sanity-font-manager 2.3.3 → 2.3.5
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 +33 -0
- package/dist/index.js +2459 -0
- package/dist/index.mjs +2456 -0
- package/package.json +2 -1
- package/src/index.js +5 -0
- package/src/schema/openTypeField.js +1945 -0
- package/src/schema/styleCountField.js +12 -0
- package/src/schema/stylisticSetField.js +301 -0
package/README.md
CHANGED
|
@@ -235,6 +235,39 @@ Label-wrapped button that triggers a hidden file input.
|
|
|
235
235
|
|
|
236
236
|
---
|
|
237
237
|
|
|
238
|
+
## Schema field definitions
|
|
239
|
+
|
|
240
|
+
Pre-built Sanity schema field objects that can be spread directly into a typeface schema's `fields` array. Eliminates hundreds of lines of repeated field definitions across consumer studios.
|
|
241
|
+
|
|
242
|
+
### `openTypeField`
|
|
243
|
+
|
|
244
|
+
A complete `openType` object field wired to the `openType` tab group. Includes the `features` checkbox array (all standard OpenType feature keys) plus per-feature sub-objects with `title`, `feature`, and `customText` fields. Uses `SetOTF` internally for auto-detection.
|
|
245
|
+
|
|
246
|
+
```js
|
|
247
|
+
import { openTypeField } from '@liiift-studio/sanity-font-manager';
|
|
248
|
+
|
|
249
|
+
// In your typeface schema fields array:
|
|
250
|
+
openTypeField,
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Requires the `openType` group to be declared in your schema's `groups` array:
|
|
254
|
+
```js
|
|
255
|
+
{ name: 'openType', title: 'Open Type' }
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### `styleCountField`
|
|
259
|
+
|
|
260
|
+
A read-only `number` field in the `styles` group that displays the total count of static + variable font styles linked to the typeface. Uses `StyleCountInput` internally.
|
|
261
|
+
|
|
262
|
+
```js
|
|
263
|
+
import { styleCountField } from '@liiift-studio/sanity-font-manager';
|
|
264
|
+
|
|
265
|
+
// In your typeface schema fields array:
|
|
266
|
+
styleCountField,
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
238
271
|
## Hook
|
|
239
272
|
|
|
240
273
|
### `useSanityClient`
|