@nixxie-cms/fields-markdown 1.0.1 → 2.1.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/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @nixxie-cms/fields-markdown
|
|
2
|
+
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 450043a:
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [0fe028d]
|
|
12
|
+
- Updated dependencies [690e433]
|
|
13
|
+
- Updated dependencies [2c0d28c]
|
|
14
|
+
- Updated dependencies [450043a]
|
|
15
|
+
- @nixxie-cms/core@2.0.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { TextFieldConfig } from '@nixxie-cms/core/fields';
|
|
2
|
-
import type {
|
|
3
|
-
export type MarkdownFieldConfig<
|
|
2
|
+
import type { BaseCollectionTypeInfo, FieldTypeFunc } from '@nixxie-cms/core/types';
|
|
3
|
+
export type MarkdownFieldConfig<CollectionTypeInfo extends BaseCollectionTypeInfo> = TextFieldConfig<CollectionTypeInfo>;
|
|
4
4
|
/**
|
|
5
5
|
* A Markdown content field. Stores raw Markdown as text and presents a multi-line editor in the
|
|
6
6
|
* Admin UI. Render it on the frontend with your Markdown library of choice.
|
|
7
7
|
*/
|
|
8
|
-
export declare function markdown<
|
|
8
|
+
export declare function markdown<CollectionTypeInfo extends BaseCollectionTypeInfo>(config?: MarkdownFieldConfig<CollectionTypeInfo>): FieldTypeFunc<CollectionTypeInfo>;
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEnF,MAAM,MAAM,mBAAmB,CAAC,kBAAkB,SAAS,sBAAsB,IAC/E,eAAe,CAAC,kBAAkB,CAAC,CAAA;AAErC;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,kBAAkB,SAAS,sBAAsB,EACxE,MAAM,GAAE,mBAAmB,CAAC,kBAAkB,CAAM,GACnD,aAAa,CAAC,kBAAkB,CAAC,CAQnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nixxie-cms/fields-markdown",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/nixxie-cms-fields-markdown.cjs.js",
|
|
6
6
|
"module": "dist/nixxie-cms-fields-markdown.esm.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"@babel/runtime": "^7.24.7"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@nixxie-cms/core": "^1.0
|
|
19
|
+
"@nixxie-cms/core": "^2.1.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@nixxie-cms/core": "^
|
|
22
|
+
"@nixxie-cms/core": "^2.0.0"
|
|
23
23
|
},
|
|
24
24
|
"preconstruct": {
|
|
25
25
|
"entrypoints": [
|
package/src/index.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { text } from '@nixxie-cms/core/fields'
|
|
2
2
|
import type { TextFieldConfig } from '@nixxie-cms/core/fields'
|
|
3
|
-
import type {
|
|
3
|
+
import type { BaseCollectionTypeInfo, FieldTypeFunc } from '@nixxie-cms/core/types'
|
|
4
4
|
|
|
5
|
-
export type MarkdownFieldConfig<
|
|
6
|
-
TextFieldConfig<
|
|
5
|
+
export type MarkdownFieldConfig<CollectionTypeInfo extends BaseCollectionTypeInfo> =
|
|
6
|
+
TextFieldConfig<CollectionTypeInfo>
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A Markdown content field. Stores raw Markdown as text and presents a multi-line editor in the
|
|
10
10
|
* Admin UI. Render it on the frontend with your Markdown library of choice.
|
|
11
11
|
*/
|
|
12
|
-
export function markdown<
|
|
13
|
-
config: MarkdownFieldConfig<
|
|
14
|
-
): FieldTypeFunc<
|
|
15
|
-
return text<
|
|
12
|
+
export function markdown<CollectionTypeInfo extends BaseCollectionTypeInfo>(
|
|
13
|
+
config: MarkdownFieldConfig<CollectionTypeInfo> = {}
|
|
14
|
+
): FieldTypeFunc<CollectionTypeInfo> {
|
|
15
|
+
return text<CollectionTypeInfo>({
|
|
16
16
|
...config,
|
|
17
17
|
ui: {
|
|
18
18
|
displayMode: 'textarea',
|