@quitecustard/payload 0.1.0 → 0.1.1

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 CHANGED
@@ -46,9 +46,9 @@ shows on hover — this page is the map, not the reference.
46
46
 
47
47
  ### `fields/` — field and admin-config factories
48
48
 
49
- This package ships no UI, so every field rendered by a custom component takes that component's
50
- import path as a **required** parameter rather than assuming one. Each is a factory, never a shared
51
- constant: `buildConfig` sanitises field objects in place, so two collections must not receive one.
49
+ Every field rendered by a custom component takes that component's import path as a **required**
50
+ parameter — pass your own. Each is a factory, never a shared constant: `buildConfig` sanitises field
51
+ objects in place, so two collections must not receive one.
52
52
 
53
53
  - `link-field` — polymorphic link (internal reference, custom URL, optional static route, dropdown,
54
54
  phone, email); each type appears only if its collection or component was supplied
@@ -1,9 +1,9 @@
1
1
  import type { TextField } from 'payload';
2
2
  import { type ComponentFieldOverrides } from '../internal/component-field.js';
3
3
  /**
4
- * A text field rendered by a custom colour-picker admin component. `component` is the path Payload
5
- * resolves for `admin.components.Field` (e.g. `@/components/colour-picker/ColourPicker`) - this
6
- * package ships no UI, so the consumer's own component is a required parameter, not a default.
4
+ * A text field rendered by a custom colour-picker admin component. `component` is required: the
5
+ * import path of your own component (e.g. `@/components/colour-picker/ColourPicker`), as Payload
6
+ * resolves it for `admin.components.Field`.
7
7
  *
8
8
  * ```ts
9
9
  * colourField('@/components/colour-picker/ColourPicker', { name: 'colour', label: 'Colour' })
@@ -1,8 +1,8 @@
1
1
  import { componentField } from '../internal/component-field.js';
2
2
  /**
3
- * A text field rendered by a custom colour-picker admin component. `component` is the path Payload
4
- * resolves for `admin.components.Field` (e.g. `@/components/colour-picker/ColourPicker`) - this
5
- * package ships no UI, so the consumer's own component is a required parameter, not a default.
3
+ * A text field rendered by a custom colour-picker admin component. `component` is required: the
4
+ * import path of your own component (e.g. `@/components/colour-picker/ColourPicker`), as Payload
5
+ * resolves it for `admin.components.Field`.
6
6
  *
7
7
  * ```ts
8
8
  * colourField('@/components/colour-picker/ColourPicker', { name: 'colour', label: 'Colour' })
@@ -1,9 +1,8 @@
1
1
  import type { NumberField } from 'payload';
2
2
  import { type ComponentFieldOverrides } from '../internal/component-field.js';
3
3
  /**
4
- * A number field rendered by a custom height-input admin component. `component` is the path
5
- * Payload resolves for `admin.components.Field` - this package ships no UI, so the consumer's own
6
- * component is a required parameter, not a default.
4
+ * A number field rendered by a custom height-input admin component. `component` is required: the
5
+ * import path of your own component, as Payload resolves it for `admin.components.Field`.
7
6
  *
8
7
  * ```ts
9
8
  * heightField('@/components/height-input/HeightInput')
@@ -1,8 +1,7 @@
1
1
  import { componentField } from '../internal/component-field.js';
2
2
  /**
3
- * A number field rendered by a custom height-input admin component. `component` is the path
4
- * Payload resolves for `admin.components.Field` - this package ships no UI, so the consumer's own
5
- * component is a required parameter, not a default.
3
+ * A number field rendered by a custom height-input admin component. `component` is required: the
4
+ * import path of your own component, as Payload resolves it for `admin.components.Field`.
6
5
  *
7
6
  * ```ts
8
7
  * heightField('@/components/height-input/HeightInput')
@@ -1,9 +1,8 @@
1
1
  import type { TextField } from 'payload';
2
2
  import { type ComponentFieldOverrides } from '../internal/component-field.js';
3
3
  /**
4
- * A text field rendered by a custom phone-input admin component. `component` is the path Payload
5
- * resolves for `admin.components.Field` - this package ships no UI, so the consumer's own
6
- * component is a required parameter, not a default.
4
+ * A text field rendered by a custom phone-input admin component. `component` is required: the
5
+ * import path of your own component, as Payload resolves it for `admin.components.Field`.
7
6
  *
8
7
  * ```ts
9
8
  * phoneField('@/components/phone/Phone', { name: 'phone', required: true })
@@ -1,8 +1,7 @@
1
1
  import { componentField } from '../internal/component-field.js';
2
2
  /**
3
- * A text field rendered by a custom phone-input admin component. `component` is the path Payload
4
- * resolves for `admin.components.Field` - this package ships no UI, so the consumer's own
5
- * component is a required parameter, not a default.
3
+ * A text field rendered by a custom phone-input admin component. `component` is required: the
4
+ * import path of your own component, as Payload resolves it for `admin.components.Field`.
6
5
  *
7
6
  * ```ts
8
7
  * phoneField('@/components/phone/Phone', { name: 'phone', required: true })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quitecustard/payload",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Payload v3 helpers: relation narrowing, transactions, autosave-vs-unpublish detection, sync locks, unique slugs and usernames",
5
5
  "keywords": [
6
6
  "payload",
@@ -37,7 +37,7 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "@quitecustard/core": "^0.1.0"
40
+ "@quitecustard/core": "^0.1.1"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@payloadcms/drizzle": "^3.0.0",