@nocode-factory/sanity-kit 2.47.0 → 2.47.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocode-factory/sanity-kit",
3
- "version": "2.47.0",
3
+ "version": "2.47.1",
4
4
  "description": "Outils Studio de NoCode Factory : Pages (liste + board), Composants, Historique",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -15,6 +15,10 @@
15
15
  "source": "./src/schema/index.ts",
16
16
  "default": "./dist/schema.js"
17
17
  },
18
+ "./code-embed": {
19
+ "source": "./src/code-embed.ts",
20
+ "default": "./dist/code-embed.js"
21
+ },
18
22
  "./web": {
19
23
  "source": "./src/web/index.ts",
20
24
  "default": "./dist/web.js"
@@ -92,7 +96,8 @@
92
96
  "./web": "./dist/web.js",
93
97
  "./web/server": "./dist/web-server.js",
94
98
  "./web/defaults": "./dist/web-defaults.js",
95
- "./schema": "./dist/schema.js"
99
+ "./schema": "./dist/schema.js",
100
+ "./code-embed": "./dist/code-embed.js"
96
101
  }
97
102
  },
98
103
  "repository": {
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Point d'entrée **Code embed** pour les fichiers de schéma.
3
+ *
4
+ * ```ts
5
+ * import {defineCodeEmbedType} from '@nocode-factory/sanity-kit/code-embed'
6
+ * export const codeEmbed = defineCodeEmbedType()
7
+ * ```
8
+ *
9
+ * Volontairement séparé de l'entrée principale : celle-ci embarque le tableau
10
+ * et le cerveau (React Flow et sa feuille de style `.css`), qui cassent les
11
+ * scripts Node important le schéma (`sanity exec`, génération des options,
12
+ * build du site). Ici, rien que l'éditeur de code et son type : importable sans
13
+ * risque depuis un `studio/schemaTypes/*`.
14
+ */
15
+ export {defineCodeEmbedType} from './form/codeEmbedType'
16
+ export type {CodeEmbedTypeOptions} from './form/codeEmbedType'
17
+ export {CodeEditorInput, codeEditorInput} from './form/CodeEditorInput'
18
+ export type {CodeLanguage} from './form/CodeEditorInput'
19
+ export {CodeEmbedInput} from './form/CodeEmbedInput'
@@ -1,5 +1,4 @@
1
1
  import {defineField, defineType, type ObjectDefinition} from 'sanity'
2
- import {CodeBlockIcon} from '@sanity/icons'
3
2
  import {codeEditorInput} from './CodeEditorInput'
4
3
  import {CodeEmbedInput} from './CodeEmbedInput'
5
4
 
@@ -30,7 +29,6 @@ export function defineCodeEmbedType(options: CodeEmbedTypeOptions = {}): ObjectD
30
29
  name,
31
30
  title,
32
31
  type: 'object',
33
- icon: CodeBlockIcon,
34
32
  components: {input: CodeEmbedInput},
35
33
  fields: [
36
34
  defineField({
package/src/version.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  * quelle version. Recopiée de `package.json` par `npm version` (scripts/sync-version.mjs) ; un test
4
4
  * le vérifie.
5
5
  */
6
- export const KIT_VERSION = '2.47.0'
6
+ export const KIT_VERSION = '2.47.1'