@preprio/toolkit 0.5.0-rc.1 → 0.5.0-rc.10

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.
Files changed (61) hide show
  1. package/README.md +416 -23
  2. package/dist/astro/index.cjs +1290 -1
  3. package/dist/astro/index.d.cts +47 -1
  4. package/dist/astro/index.d.ts +47 -1
  5. package/dist/astro/index.js +1297 -1
  6. package/dist/chunk-F46GJS6Y.js +26 -0
  7. package/dist/{chunk-4JNKYIEV.js → chunk-IDEC77LZ.js} +1423 -642
  8. package/dist/chunk-IPMB32AZ.js +246 -0
  9. package/dist/chunk-KD3GK6TO.js +1221 -0
  10. package/dist/chunk-S3VT4UWM.js +75 -0
  11. package/dist/chunk-TBBU3LDD.js +184 -0
  12. package/dist/chunk-URXSDJOU.js +356 -0
  13. package/dist/codegen/index.cjs +82 -0
  14. package/dist/codegen/index.d.cts +70 -0
  15. package/dist/codegen/index.d.ts +70 -0
  16. package/dist/codegen/index.js +64 -0
  17. package/dist/index.cjs +3342 -417
  18. package/dist/index.d.cts +276 -5
  19. package/dist/index.d.ts +276 -5
  20. package/dist/index.js +307 -144
  21. package/dist/live-preview-DLXGXRE5.js +18 -0
  22. package/dist/nextjs/components.cjs +1582 -386
  23. package/dist/nextjs/components.d.cts +1 -1
  24. package/dist/nextjs/components.d.ts +1 -1
  25. package/dist/nextjs/components.js +4 -1
  26. package/dist/nextjs/index.cjs +1181 -6
  27. package/dist/nextjs/index.d.cts +83 -3
  28. package/dist/nextjs/index.d.ts +83 -3
  29. package/dist/nextjs/index.js +1179 -7
  30. package/dist/nextjs/live-action.cjs +285 -0
  31. package/dist/nextjs/live-action.d.cts +12 -0
  32. package/dist/nextjs/live-action.d.ts +12 -0
  33. package/dist/nextjs/live-action.js +68 -0
  34. package/dist/nextjs/live.cjs +1899 -0
  35. package/dist/nextjs/live.d.cts +54 -0
  36. package/dist/nextjs/live.d.ts +54 -0
  37. package/dist/nextjs/live.js +268 -0
  38. package/dist/nuxt/chunk-BWPGO25E.js +340 -0
  39. package/dist/nuxt/index.cjs +1 -1
  40. package/dist/nuxt/index.js +1 -1
  41. package/dist/nuxt/live-preview-2RCU35W5.js +1189 -0
  42. package/dist/nuxt/live.cjs +1816 -0
  43. package/dist/nuxt/live.d.cts +43 -0
  44. package/dist/nuxt/live.d.ts +43 -0
  45. package/dist/nuxt/live.js +198 -0
  46. package/dist/{pixel-e1fUWl2Y.d.cts → pixel-CX422dCO.d.cts} +18 -3
  47. package/dist/{pixel-e1fUWl2Y.d.ts → pixel-CX422dCO.d.ts} +18 -3
  48. package/dist/react/components.cjs +1582 -386
  49. package/dist/react/components.d.cts +17 -2
  50. package/dist/react/components.d.ts +17 -2
  51. package/dist/react/components.js +1582 -386
  52. package/dist/sveltekit/chunk-BWPGO25E.js +340 -0
  53. package/dist/sveltekit/index.cjs +1 -1
  54. package/dist/sveltekit/index.js +1 -1
  55. package/dist/sveltekit/live-preview-2RCU35W5.js +1189 -0
  56. package/dist/sveltekit/live.cjs +1830 -0
  57. package/dist/sveltekit/live.d.cts +59 -0
  58. package/dist/sveltekit/live.d.ts +59 -0
  59. package/dist/sveltekit/live.js +204 -0
  60. package/package.json +37 -11
  61. package/src/astro/PreprToolbar.astro +7 -1
@@ -2,6 +2,8 @@ type Dictionary = Record<string, unknown>;
2
2
  declare const dictionaries: {
3
3
  en: Dictionary;
4
4
  nl: Dictionary;
5
+ fr: Dictionary;
6
+ de: Dictionary;
5
7
  };
6
8
  type Locale = keyof typeof dictionaries;
7
9
 
@@ -58,10 +60,23 @@ interface PreprPreviewOptions extends PreprToolbarOptions {
58
60
  */
59
61
  ui?: boolean;
60
62
  /**
61
- * Replace the `*.prepr.io` editor-origin wildcard with an exact list.
62
- * Intended for self-hosted editors; when set, the wildcard no longer applies.
63
+ * Replace the `*.prepr.io` editor-origin wildcard with an exact list, e.g.
64
+ * `['http://acme.localhost:8000']`. Intended for self-hosted or locally run
65
+ * editors; when set, the wildcard no longer applies. Entries are compared to
66
+ * the editor's origin exactly: scheme, host and port.
67
+ *
68
+ * `['*']` accepts any editor origin. Use it for development only: any page
69
+ * that frames the preview can then switch on preview and edit mode and
70
+ * receives the field-edit events, which carry content item ids.
63
71
  */
64
72
  allowedEditorOrigins?: string[];
73
+ /**
74
+ * Set when your preview token uses GraphQL strict mode, where required
75
+ * fields are never null. The editor then holds back new entries until
76
+ * their required fields are filled, and never sends a cleared required
77
+ * field as null.
78
+ */
79
+ strictMode?: boolean;
65
80
  /**
66
81
  * Strip the invisible stega characters out of visible text at runtime.
67
82
  * Default `true`.
@@ -2,6 +2,8 @@ type Dictionary = Record<string, unknown>;
2
2
  declare const dictionaries: {
3
3
  en: Dictionary;
4
4
  nl: Dictionary;
5
+ fr: Dictionary;
6
+ de: Dictionary;
5
7
  };
6
8
  type Locale = keyof typeof dictionaries;
7
9
 
@@ -58,10 +60,23 @@ interface PreprPreviewOptions extends PreprToolbarOptions {
58
60
  */
59
61
  ui?: boolean;
60
62
  /**
61
- * Replace the `*.prepr.io` editor-origin wildcard with an exact list.
62
- * Intended for self-hosted editors; when set, the wildcard no longer applies.
63
+ * Replace the `*.prepr.io` editor-origin wildcard with an exact list, e.g.
64
+ * `['http://acme.localhost:8000']`. Intended for self-hosted or locally run
65
+ * editors; when set, the wildcard no longer applies. Entries are compared to
66
+ * the editor's origin exactly: scheme, host and port.
67
+ *
68
+ * `['*']` accepts any editor origin. Use it for development only: any page
69
+ * that frames the preview can then switch on preview and edit mode and
70
+ * receives the field-edit events, which carry content item ids.
63
71
  */
64
72
  allowedEditorOrigins?: string[];
73
+ /**
74
+ * Set when your preview token uses GraphQL strict mode, where required
75
+ * fields are never null. The editor then holds back new entries until
76
+ * their required fields are filled, and never sends a cleared required
77
+ * field as null.
78
+ */
79
+ strictMode?: boolean;
65
80
  /**
66
81
  * Strip the invisible stega characters out of visible text at runtime.
67
82
  * Default `true`.