rimecms 0.28.7 → 0.28.9

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.
@@ -1,5 +1,10 @@
1
1
  import { flatten } from 'flat';
2
2
  import cache from '../../dev/cache/index.server.js';
3
+ /**
4
+ * We actually need to serialize config values that will trigger
5
+ * types, routes, or schema generations, meaning that for now
6
+ * a basic serialization approach is sufficient.
7
+ */
3
8
  const serializeValue = (value) => {
4
9
  if (value === null)
5
10
  return 'null';
@@ -13,8 +18,16 @@ const serializeValue = (value) => {
13
18
  }
14
19
  return `func:${value.toString()}`;
15
20
  case 'object':
16
- // Handle arrays and objects
17
21
  try {
22
+ // Builder instances (fields, tabs, blocks, ...) may hold their real state behind
23
+ // private class fields (e.g. TabBuilder's #tab), invisible to Object.keys()/
24
+ // JSON.stringify() — flatten() then treats them as leaf objects with zero own keys,
25
+ // silently serializing as `{}` regardless of actual content. compile() is the same
26
+ // method already calls to get a plain, fully-resolved representation, so
27
+ // reuse it here instead of reflecting blindly.
28
+ if (typeof value.compile === 'function') {
29
+ return serializeValue(value.compile());
30
+ }
18
31
  if (Array.isArray(value)) {
19
32
  return `array:${JSON.stringify(value)}`;
20
33
  }
@@ -1,3 +1,4 @@
1
1
  import Button from './components/ui/button/button.svelte';
2
+ import Input from './components/ui/input/Input.svelte';
2
3
  import SpinLoader from './components/ui/spin-loader/SpinLoader.svelte';
3
- export { Button, SpinLoader };
4
+ export { Button, Input, SpinLoader };
package/dist/panel/ui.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // For shared ui components ex: use a panel button in a plugin
2
2
  import Button from './components/ui/button/button.svelte';
3
+ import Input from './components/ui/input/Input.svelte';
3
4
  import SpinLoader from './components/ui/spin-loader/SpinLoader.svelte';
4
- export { Button, SpinLoader };
5
+ export { Button, Input, SpinLoader };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimecms",
3
- "version": "0.28.7",
3
+ "version": "0.28.9",
4
4
  "homepage": "https://github.com/bienbiendev/rime",
5
5
  "scripts": {
6
6
  "dev": "vite dev",