@rimelight/cms 0.0.4 → 0.0.6

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 (53) hide show
  1. package/dist/index.d.mts +118 -118
  2. package/dist/index.mjs +47 -47
  3. package/dist/integration.d.mts +3 -4
  4. package/dist/schema/index.d.mts +32 -33
  5. package/dist/schema/sqlite.d.mts +31 -32
  6. package/dist/storage/index.d.mts +12 -13
  7. package/package.json +13 -8
  8. package/src/admin/api/media-file.ts +1 -1
  9. package/src/admin/pages/assets.astro +11 -11
  10. package/src/admin/pages/pages-edit.astro +3 -3
  11. package/src/admin/pages/pages-index.astro +2 -2
  12. package/src/admin/pages/pages-preview.astro +3 -3
  13. package/src/admin/pages/pages-review.astro +2 -2
  14. package/src/admin/pages/templates-edit.astro +1 -1
  15. package/src/admin/pages/templates-index.astro +1 -1
  16. package/src/astro/BlockRenderer.astro +1 -1
  17. package/src/astro/blocks/CalloutBlock.astro +1 -1
  18. package/src/astro/blocks/OrderedListBlock.astro +2 -2
  19. package/src/astro/blocks/ParagraphBlock.astro +1 -1
  20. package/src/astro/blocks/TabsBlock.astro +5 -5
  21. package/src/astro/blocks/UnorderedListBlock.astro +2 -2
  22. package/src/auth/editor-guards.ts +1 -1
  23. package/src/cache/purge.ts +2 -2
  24. package/src/client/components/RimelightBlock.tsx +1 -1
  25. package/src/client/components/RimelightBlockPicker.tsx +1 -1
  26. package/src/client/components/RimelightPreview.tsx +27 -27
  27. package/src/client/components/RimelightPropertiesPanel.tsx +4 -4
  28. package/src/client/components/RimelightTemplateEditor.tsx +9 -5
  29. package/src/client/components/editors/CalloutEditor.tsx +10 -10
  30. package/src/client/components/editors/CardEditor.tsx +5 -5
  31. package/src/client/components/editors/CardsEditor.tsx +2 -2
  32. package/src/client/components/editors/CodeEditor.tsx +5 -5
  33. package/src/client/components/editors/DialogueEditor.tsx +6 -6
  34. package/src/client/components/editors/FileTreeEditor.tsx +1 -1
  35. package/src/client/components/editors/ImageEditor.tsx +9 -9
  36. package/src/client/components/editors/ParagraphEditor.tsx +1 -1
  37. package/src/client/components/editors/SceneEditor.tsx +9 -9
  38. package/src/client/components/editors/ScriptEditor.tsx +8 -8
  39. package/src/client/components/editors/SectionEditor.tsx +3 -3
  40. package/src/client/components/editors/StepItemEditor.tsx +6 -5
  41. package/src/client/components/editors/StepsEditor.tsx +1 -1
  42. package/src/client/components/editors/TabItemEditor.tsx +3 -3
  43. package/src/client/components/editors/TableEditor.tsx +4 -4
  44. package/src/client/components/editors/TabsEditor.tsx +1 -1
  45. package/src/client/state/editor-store.ts +23 -23
  46. package/src/client/utils/sortable.ts +13 -12
  47. package/src/client/utils/tree-sanitizer.ts +1 -1
  48. package/src/core/excerpt.ts +16 -16
  49. package/src/core/page-definitions.ts +2 -2
  50. package/src/docs/agent.ts +1 -1
  51. package/src/docs/routing.ts +2 -2
  52. package/src/loader/live.ts +1 -1
  53. package/src/markdown/serializer.ts +26 -26
@@ -37,17 +37,17 @@ const TARGET_OPTIONS = [
37
37
  ]
38
38
 
39
39
  export const CalloutEditor: Component<CalloutEditorProps> = (componentProps) => {
40
- const [linkSettingsOpen, setLinkSettingsOpen] = createSignal(!!componentProps.props.to)
40
+ const [linkSettingsOpen, setLinkSettingsOpen] = createSignal(!!componentProps.props["to"])
41
41
  let childrenContainer: HTMLDivElement | undefined = undefined
42
42
  let sortableInstance: any = null
43
43
 
44
- const variant = () => componentProps.props.variant || "info"
44
+ const variant = () => componentProps.props["variant"] || "info"
45
45
 
46
46
  const childrenBlocks = (): BaseBlock[] => {
47
47
  if (typeof componentProps.children === "function") {
48
48
  return componentProps.children() || []
49
49
  }
50
- return componentProps.children || componentProps.props.children || []
50
+ return componentProps.children || componentProps.props["children"] || []
51
51
  }
52
52
 
53
53
  onMount(() => {
@@ -89,8 +89,8 @@ export const CalloutEditor: Component<CalloutEditorProps> = (componentProps) =>
89
89
  const saveLinkProps = (to?: string, target?: string) => {
90
90
  componentProps.onPropsChange({
91
91
  ...componentProps.props,
92
- to: to !== undefined ? to : componentProps.props.to,
93
- target: target !== undefined ? target : componentProps.props.target
92
+ to: to !== undefined ? to : componentProps.props["to"],
93
+ target: target !== undefined ? target : componentProps.props["target"]
94
94
  })
95
95
  }
96
96
 
@@ -125,7 +125,7 @@ export const CalloutEditor: Component<CalloutEditorProps> = (componentProps) =>
125
125
  onClick={() => setLinkSettingsOpen(!linkSettingsOpen())}
126
126
  title="Link settings"
127
127
  leadingIcon="link"
128
- label={componentProps.props.to ? "Linked" : "Add Link"}
128
+ label={componentProps.props["to"] ? "Linked" : "Add Link"}
129
129
  />
130
130
  </div>
131
131
 
@@ -135,9 +135,9 @@ export const CalloutEditor: Component<CalloutEditorProps> = (componentProps) =>
135
135
  <RLSInput
136
136
  type="text"
137
137
  placeholder="Link URL (e.g. https://... or /slug)"
138
- value={componentProps.props.to || ""}
138
+ value={componentProps.props["to"] || ""}
139
139
  onBlur={(e: FocusEvent & { currentTarget: HTMLInputElement }) =>
140
- saveLinkProps(e.currentTarget.value, componentProps.props.target)
140
+ saveLinkProps(e.currentTarget.value, componentProps.props["target"])
141
141
  }
142
142
  size="sm"
143
143
  />
@@ -145,9 +145,9 @@ export const CalloutEditor: Component<CalloutEditorProps> = (componentProps) =>
145
145
  <div class="w-32">
146
146
  <RLSSelect
147
147
  items={TARGET_OPTIONS}
148
- value={componentProps.props.target || "_self"}
148
+ value={componentProps.props["target"] || "_self"}
149
149
  onChange={(e: Event & { currentTarget: HTMLSelectElement }) =>
150
- saveLinkProps(componentProps.props.to, e.currentTarget.value)
150
+ saveLinkProps(componentProps.props["to"], e.currentTarget.value)
151
151
  }
152
152
  size="xs"
153
153
  />
@@ -20,14 +20,14 @@ export const CardEditor: Component<CardEditorProps> = (componentProps) => {
20
20
  <RLSInput
21
21
  type="text"
22
22
  placeholder="Card Title"
23
- value={componentProps.props.title || ""}
23
+ value={componentProps.props["title"] || ""}
24
24
  onBlur={(e) => save("title", e.currentTarget.value)}
25
25
  size="sm"
26
26
  />
27
27
  <RLSInput
28
28
  type="text"
29
29
  placeholder="Link (href e.g. /docs/getting-started)"
30
- value={componentProps.props.href || ""}
30
+ value={componentProps.props["href"] || ""}
31
31
  onBlur={(e) => save("href", e.currentTarget.value)}
32
32
  size="sm"
33
33
  />
@@ -35,7 +35,7 @@ export const CardEditor: Component<CardEditorProps> = (componentProps) => {
35
35
  <RLSInput
36
36
  type="text"
37
37
  placeholder="Card Description"
38
- value={componentProps.props.description || ""}
38
+ value={componentProps.props["description"] || ""}
39
39
  onBlur={(e) => save("description", e.currentTarget.value)}
40
40
  size="sm"
41
41
  />
@@ -43,14 +43,14 @@ export const CardEditor: Component<CardEditorProps> = (componentProps) => {
43
43
  <RLSInput
44
44
  type="text"
45
45
  placeholder="Icon (e.g. i-lucide-book-open)"
46
- value={componentProps.props.icon || ""}
46
+ value={componentProps.props["icon"] || ""}
47
47
  onBlur={(e) => save("icon", e.currentTarget.value)}
48
48
  size="sm"
49
49
  />
50
50
  <RLSInput
51
51
  type="text"
52
52
  placeholder="Badge (optional e.g. New, Beta)"
53
- value={componentProps.props.badge || ""}
53
+ value={componentProps.props["badge"] || ""}
54
54
  onBlur={(e) => save("badge", e.currentTarget.value)}
55
55
  size="sm"
56
56
  />
@@ -30,7 +30,7 @@ export const CardsEditor: Component<CardsEditorProps> = (componentProps) => {
30
30
  if (typeof componentProps.children === "function") {
31
31
  return componentProps.children() || []
32
32
  }
33
- return componentProps.children || componentProps.props.children || []
33
+ return componentProps.children || componentProps.props["children"] || []
34
34
  }
35
35
 
36
36
  onMount(() => {
@@ -84,7 +84,7 @@ export const CardsEditor: Component<CardsEditorProps> = (componentProps) => {
84
84
  <div class="w-32">
85
85
  <RLSSelect
86
86
  items={COLUMN_OPTIONS}
87
- value={String(componentProps.props.columns || 2)}
87
+ value={String(componentProps.props["columns"] || 2)}
88
88
  onChange={(e: Event & { currentTarget: HTMLSelectElement }) =>
89
89
  setColumns(e.currentTarget.value)
90
90
  }
@@ -37,15 +37,15 @@ export const CodeEditor: Component<CodeEditorProps> = (componentProps) => {
37
37
  const saveProps = (lang?: string, code?: string, caption?: string) => {
38
38
  componentProps.onPropsChange({
39
39
  ...componentProps.props,
40
- language: lang !== undefined ? lang : componentProps.props.language || "typescript",
40
+ language: lang !== undefined ? lang : componentProps.props["language"] || "typescript",
41
41
  code: code !== undefined ? code : codeTextarea?.value || "",
42
- caption: caption !== undefined ? caption : componentProps.props.caption || ""
42
+ caption: caption !== undefined ? caption : componentProps.props["caption"] || ""
43
43
  })
44
44
  }
45
45
 
46
46
  onMount(() => {
47
47
  if (codeTextarea) {
48
- codeTextarea.value = componentProps.props.code || ""
48
+ codeTextarea.value = componentProps.props["code"] || ""
49
49
  autoResize()
50
50
  }
51
51
  })
@@ -58,7 +58,7 @@ export const CodeEditor: Component<CodeEditorProps> = (componentProps) => {
58
58
  <div class="w-36">
59
59
  <RLSSelect
60
60
  items={LANGUAGES}
61
- value={componentProps.props.language || "typescript"}
61
+ value={componentProps.props["language"] || "typescript"}
62
62
  onChange={(e) => saveProps(e.currentTarget.value)}
63
63
  size="xs"
64
64
  />
@@ -89,7 +89,7 @@ export const CodeEditor: Component<CodeEditorProps> = (componentProps) => {
89
89
  <RLSInput
90
90
  type="text"
91
91
  data-field="caption"
92
- value={componentProps.props.caption || ""}
92
+ value={componentProps.props["caption"] || ""}
93
93
  onBlur={(e) => saveProps(undefined, undefined, e.currentTarget.value)}
94
94
  size="sm"
95
95
  placeholder="Caption (optional)"
@@ -11,10 +11,10 @@ export const DialogueEditor: Component<DialogueEditorProps> = (componentProps) =
11
11
  const saveProps = (character?: string, parenthetical?: string, line?: string) => {
12
12
  componentProps.onPropsChange({
13
13
  ...componentProps.props,
14
- character: character !== undefined ? character : componentProps.props.character || "",
14
+ character: character !== undefined ? character : componentProps.props["character"] || "",
15
15
  parenthetical:
16
- parenthetical !== undefined ? parenthetical : componentProps.props.parenthetical || "",
17
- line: line !== undefined ? line : componentProps.props.line || ""
16
+ parenthetical !== undefined ? parenthetical : componentProps.props["parenthetical"] || "",
17
+ line: line !== undefined ? line : componentProps.props["line"] || ""
18
18
  })
19
19
  }
20
20
 
@@ -23,7 +23,7 @@ export const DialogueEditor: Component<DialogueEditorProps> = (componentProps) =
23
23
  <div class="w-48 mx-auto">
24
24
  <RLSInput
25
25
  data-field="character"
26
- value={componentProps.props.character || ""}
26
+ value={componentProps.props["character"] || ""}
27
27
  onBlur={(e) => saveProps(e.currentTarget.value)}
28
28
  class="text-center font-bold text-sm uppercase"
29
29
  placeholder="CHARACTER"
@@ -33,7 +33,7 @@ export const DialogueEditor: Component<DialogueEditorProps> = (componentProps) =
33
33
  <div class="w-64 mx-auto">
34
34
  <RLSInput
35
35
  data-field="parenthetical"
36
- value={componentProps.props.parenthetical || ""}
36
+ value={componentProps.props["parenthetical"] || ""}
37
37
  onBlur={(e) => saveProps(undefined, e.currentTarget.value)}
38
38
  class="text-center italic text-sm"
39
39
  placeholder="(parenthetical)"
@@ -42,7 +42,7 @@ export const DialogueEditor: Component<DialogueEditorProps> = (componentProps) =
42
42
  </div>
43
43
  <RLSTextarea
44
44
  data-field="line"
45
- value={componentProps.props.line || ""}
45
+ value={componentProps.props["line"] || ""}
46
46
  onBlur={(e) => saveProps(undefined, undefined, e.currentTarget.value)}
47
47
  placeholder="Dialogue line..."
48
48
  rows={2}
@@ -10,7 +10,7 @@ export const FileTreeEditor: Component<FileTreeEditorProps> = (componentProps) =
10
10
  let jsonTextarea: HTMLTextAreaElement | undefined
11
11
 
12
12
  const tree = (): FileTreeNode[] =>
13
- componentProps.props.tree || [
13
+ componentProps.props["tree"] || [
14
14
  { name: "src", isDir: true, children: [{ name: "index.ts", isDir: false }] },
15
15
  { name: "package.json", isDir: false }
16
16
  ]
@@ -10,9 +10,9 @@ export const ImageEditor: Component<ImageEditorProps> = (componentProps) => {
10
10
  const saveProps = (src?: string, alt?: string, caption?: string) => {
11
11
  componentProps.onPropsChange({
12
12
  ...componentProps.props,
13
- src: src !== undefined ? src : componentProps.props.src || "",
14
- alt: alt !== undefined ? alt : componentProps.props.alt || "",
15
- caption: caption !== undefined ? caption : componentProps.props.caption || ""
13
+ src: src !== undefined ? src : componentProps.props["src"] || "",
14
+ alt: alt !== undefined ? alt : componentProps.props["alt"] || "",
15
+ caption: caption !== undefined ? caption : componentProps.props["caption"] || ""
16
16
  })
17
17
  }
18
18
 
@@ -23,7 +23,7 @@ export const ImageEditor: Component<ImageEditorProps> = (componentProps) => {
23
23
  <RLSInput
24
24
  id="image-src-input"
25
25
  type="text"
26
- value={componentProps.props.src || ""}
26
+ value={componentProps.props["src"] || ""}
27
27
  onBlur={(e) => saveProps(e.currentTarget.value)}
28
28
  placeholder="https://..."
29
29
  leadingIcon="image"
@@ -36,7 +36,7 @@ export const ImageEditor: Component<ImageEditorProps> = (componentProps) => {
36
36
  <RLSInput
37
37
  id="image-alt-input"
38
38
  type="text"
39
- value={componentProps.props.alt || ""}
39
+ value={componentProps.props["alt"] || ""}
40
40
  onBlur={(e) => saveProps(undefined, e.currentTarget.value)}
41
41
  placeholder="Alt description"
42
42
  size="sm"
@@ -48,7 +48,7 @@ export const ImageEditor: Component<ImageEditorProps> = (componentProps) => {
48
48
  <RLSInput
49
49
  id="image-caption-input"
50
50
  type="text"
51
- value={componentProps.props.caption || ""}
51
+ value={componentProps.props["caption"] || ""}
52
52
  onBlur={(e) => saveProps(undefined, undefined, e.currentTarget.value)}
53
53
  placeholder="Image caption"
54
54
  size="sm"
@@ -56,11 +56,11 @@ export const ImageEditor: Component<ImageEditorProps> = (componentProps) => {
56
56
  </div>
57
57
  </div>
58
58
 
59
- {componentProps.props.src && (
59
+ {componentProps.props["src"] && (
60
60
  <div class="mt-2 flex justify-center p-2 rounded-lg border border-default">
61
61
  <img
62
- src={componentProps.props.src}
63
- alt={componentProps.props.alt || "Image preview"}
62
+ src={componentProps.props["src"]}
63
+ alt={componentProps.props["alt"] || "Image preview"}
64
64
  class="max-h-48 object-cover rounded shadow-sm"
65
65
  />
66
66
  </div>
@@ -155,7 +155,7 @@ export const ParagraphEditor: Component<ParagraphEditorProps> = (componentProps)
155
155
 
156
156
  onMount(() => {
157
157
  if (!editableDiv) return
158
- const text = componentProps.props.text
158
+ const text = componentProps.props["text"]
159
159
  if (!text) {
160
160
  editableDiv.innerHTML = ""
161
161
  } else if (Array.isArray(text)) {
@@ -41,13 +41,13 @@ export const SceneEditor: Component<SceneEditorProps> = (componentProps) => {
41
41
  if (typeof componentProps.children === "function") {
42
42
  return componentProps.children() || []
43
43
  }
44
- return componentProps.children || componentProps.props.children || []
44
+ return componentProps.children || componentProps.props["children"] || []
45
45
  }
46
46
 
47
47
  const slugText = () => {
48
- const setting = componentProps.props.setting || "INT."
49
- const loc = (componentProps.props.location || "LOCATION").toUpperCase()
50
- const time = componentProps.props.timeOfDay || "MORNING"
48
+ const setting = componentProps.props["setting"] || "INT."
49
+ const loc = (componentProps.props["location"] || "LOCATION").toUpperCase()
50
+ const time = componentProps.props["timeOfDay"] || "MORNING"
51
51
  return `${setting} ${loc} - ${time}`
52
52
  }
53
53
 
@@ -114,7 +114,7 @@ export const SceneEditor: Component<SceneEditorProps> = (componentProps) => {
114
114
  <RLSInput
115
115
  id="scene-location-input"
116
116
  data-field="location"
117
- value={componentProps.props.location || ""}
117
+ value={componentProps.props["location"] || ""}
118
118
  onBlur={(e) => saveProps({ location: e.currentTarget.value })}
119
119
  placeholder="E.g. LIVING ROOM"
120
120
  size="sm"
@@ -125,7 +125,7 @@ export const SceneEditor: Component<SceneEditorProps> = (componentProps) => {
125
125
  <span class="text-xs font-semibold text-muted uppercase tracking-wide">Setting</span>
126
126
  <RLSSelect
127
127
  items={SETTINGS}
128
- value={componentProps.props.setting || "INT."}
128
+ value={componentProps.props["setting"] || "INT."}
129
129
  onChange={(e) => saveProps({ setting: e.currentTarget.value })}
130
130
  size="sm"
131
131
  />
@@ -135,7 +135,7 @@ export const SceneEditor: Component<SceneEditorProps> = (componentProps) => {
135
135
  <span class="text-xs font-semibold text-muted uppercase tracking-wide">Time of Day</span>
136
136
  <RLSSelect
137
137
  items={TIMES_OF_DAY}
138
- value={componentProps.props.timeOfDay || "MORNING"}
138
+ value={componentProps.props["timeOfDay"] || "MORNING"}
139
139
  onChange={(e) => saveProps({ timeOfDay: e.currentTarget.value })}
140
140
  size="sm"
141
141
  />
@@ -149,7 +149,7 @@ export const SceneEditor: Component<SceneEditorProps> = (componentProps) => {
149
149
  <RLSTextarea
150
150
  id="scene-description-textarea"
151
151
  data-field="description"
152
- value={componentProps.props.description || ""}
152
+ value={componentProps.props["description"] || ""}
153
153
  onBlur={(e) => saveProps({ description: e.currentTarget.value })}
154
154
  placeholder="Action lines..."
155
155
  rows={3}
@@ -163,7 +163,7 @@ export const SceneEditor: Component<SceneEditorProps> = (componentProps) => {
163
163
  <div class="w-48">
164
164
  <RLSSelect
165
165
  items={TRANSITIONS}
166
- value={componentProps.props.transition || "NONE"}
166
+ value={componentProps.props["transition"] || "NONE"}
167
167
  onChange={(e) => saveProps({ transition: e.currentTarget.value })}
168
168
  size="sm"
169
169
  />
@@ -22,12 +22,12 @@ export const ScriptEditor: Component<ScriptEditorProps> = (componentProps) => {
22
22
  let childrenContainer: HTMLDivElement | null = null as HTMLDivElement | null
23
23
  let sortableInstance: any = null
24
24
 
25
- const characters = (): string[] => componentProps.props.characters || []
25
+ const characters = (): string[] => componentProps.props["characters"] || []
26
26
  const childrenBlocks = (): BaseBlock[] => {
27
27
  if (typeof componentProps.children === "function") {
28
28
  return componentProps.children() || []
29
29
  }
30
- return componentProps.children || componentProps.props.children || []
30
+ return componentProps.children || componentProps.props["children"] || []
31
31
  }
32
32
 
33
33
  onMount(() => {
@@ -96,7 +96,7 @@ export const ScriptEditor: Component<ScriptEditorProps> = (componentProps) => {
96
96
  <span class="text-xs font-bold text-muted uppercase tracking-widest">Script Title</span>
97
97
  <RLSInput
98
98
  data-field="title"
99
- value={componentProps.props.title || ""}
99
+ value={componentProps.props["title"] || ""}
100
100
  onInput={(e) => saveProps({ title: e.currentTarget.value })}
101
101
  placeholder="Script Title"
102
102
  size="sm"
@@ -107,7 +107,7 @@ export const ScriptEditor: Component<ScriptEditorProps> = (componentProps) => {
107
107
  <span class="text-xs font-bold text-muted uppercase tracking-widest">Synopsis</span>
108
108
  <RLSTextarea
109
109
  data-field="synopsis"
110
- value={componentProps.props.synopsis || ""}
110
+ value={componentProps.props["synopsis"] || ""}
111
111
  onInput={(e) => saveProps({ synopsis: e.currentTarget.value })}
112
112
  placeholder="Synopsis..."
113
113
  rows={2}
@@ -167,21 +167,21 @@ export const ScriptEditor: Component<ScriptEditorProps> = (componentProps) => {
167
167
  <div class="grid grid-cols-3 gap-2">
168
168
  <RLSInput
169
169
  data-field="aPlot"
170
- value={componentProps.props.aPlot || ""}
170
+ value={componentProps.props["aPlot"] || ""}
171
171
  onInput={(e) => saveProps({ aPlot: e.currentTarget.value })}
172
172
  placeholder="A-Plot"
173
173
  size="sm"
174
174
  />
175
175
  <RLSInput
176
176
  data-field="bPlot"
177
- value={componentProps.props.bPlot || ""}
177
+ value={componentProps.props["bPlot"] || ""}
178
178
  onInput={(e) => saveProps({ bPlot: e.currentTarget.value })}
179
179
  placeholder="B-Plot"
180
180
  size="sm"
181
181
  />
182
182
  <RLSInput
183
183
  data-field="cPlot"
184
- value={componentProps.props.cPlot || ""}
184
+ value={componentProps.props["cPlot"] || ""}
185
185
  onInput={(e) => saveProps({ cPlot: e.currentTarget.value })}
186
186
  placeholder="C-Plot"
187
187
  size="sm"
@@ -193,7 +193,7 @@ export const ScriptEditor: Component<ScriptEditorProps> = (componentProps) => {
193
193
  <span class="text-xs font-bold text-muted uppercase tracking-widest">Stinger</span>
194
194
  <RLSInput
195
195
  data-field="stinger"
196
- value={componentProps.props.stinger || ""}
196
+ value={componentProps.props["stinger"] || ""}
197
197
  onInput={(e) => saveProps({ stinger: e.currentTarget.value })}
198
198
  placeholder="Stinger (post-credits etc)"
199
199
  size="sm"
@@ -26,7 +26,7 @@ export const SectionEditor: Component<SectionEditorProps> = (componentProps) =>
26
26
  if (typeof componentProps.children === "function") {
27
27
  return componentProps.children() || []
28
28
  }
29
- return componentProps.children || componentProps.props.children || []
29
+ return componentProps.children || componentProps.props["children"] || []
30
30
  }
31
31
 
32
32
  onMount(() => {
@@ -84,7 +84,7 @@ export const SectionEditor: Component<SectionEditorProps> = (componentProps) =>
84
84
  <input
85
85
  ref={(el) => (titleInput = el)}
86
86
  type="text"
87
- value={componentProps.props.title || ""}
87
+ value={componentProps.props["title"] || ""}
88
88
  onInput={saveProps}
89
89
  placeholder="Section Title"
90
90
  class="flex-1 font-bold text-lg bg-transparent border-0 focus:outline-none text-highlighted placeholder:text-muted/60 py-0.5"
@@ -94,7 +94,7 @@ export const SectionEditor: Component<SectionEditorProps> = (componentProps) =>
94
94
  <input
95
95
  ref={(el) => (descInput = el)}
96
96
  type="text"
97
- value={componentProps.props.description || ""}
97
+ value={componentProps.props["description"] || ""}
98
98
  onInput={saveProps}
99
99
  placeholder="Section description (optional)..."
100
100
  class="text-sm text-muted bg-transparent border-0 focus:outline-none placeholder:text-muted/50 py-0.5"
@@ -23,7 +23,7 @@ export const StepItemEditor: Component<StepItemEditorProps> = (componentProps) =
23
23
  if (typeof componentProps.children === "function") {
24
24
  return componentProps.children() || []
25
25
  }
26
- return componentProps.children || componentProps.props.children || []
26
+ return componentProps.children || componentProps.props["children"] || []
27
27
  }
28
28
 
29
29
  onMount(() => {
@@ -65,8 +65,9 @@ export const StepItemEditor: Component<StepItemEditorProps> = (componentProps) =
65
65
  const saveMeta = (title?: string, description?: string) => {
66
66
  componentProps.onPropsChange({
67
67
  ...componentProps.props,
68
- title: title !== undefined ? title : componentProps.props.title || "",
69
- description: description !== undefined ? description : componentProps.props.description || ""
68
+ title: title !== undefined ? title : componentProps.props["title"] || "",
69
+ description:
70
+ description !== undefined ? description : componentProps.props["description"] || ""
70
71
  })
71
72
  }
72
73
 
@@ -76,14 +77,14 @@ export const StepItemEditor: Component<StepItemEditorProps> = (componentProps) =
76
77
  <RLSInput
77
78
  type="text"
78
79
  placeholder="Step title (e.g. Install Dependencies)"
79
- value={componentProps.props.title || ""}
80
+ value={componentProps.props["title"] || ""}
80
81
  onBlur={(e) => saveMeta(e.currentTarget.value, undefined)}
81
82
  size="sm"
82
83
  />
83
84
  <RLSInput
84
85
  type="text"
85
86
  placeholder="Step description (optional)"
86
- value={componentProps.props.description || ""}
87
+ value={componentProps.props["description"] || ""}
87
88
  onBlur={(e) => saveMeta(undefined, e.currentTarget.value)}
88
89
  size="sm"
89
90
  />
@@ -22,7 +22,7 @@ export const StepsEditor: Component<StepsEditorProps> = (componentProps) => {
22
22
  if (typeof componentProps.children === "function") {
23
23
  return componentProps.children() || []
24
24
  }
25
- return componentProps.children || componentProps.props.children || []
25
+ return componentProps.children || componentProps.props["children"] || []
26
26
  }
27
27
 
28
28
  onMount(() => {
@@ -23,7 +23,7 @@ export const TabItemEditor: Component<TabItemEditorProps> = (componentProps) =>
23
23
  if (typeof componentProps.children === "function") {
24
24
  return componentProps.children() || []
25
25
  }
26
- return componentProps.children || componentProps.props.children || []
26
+ return componentProps.children || componentProps.props["children"] || []
27
27
  }
28
28
 
29
29
  onMount(() => {
@@ -66,7 +66,7 @@ export const TabItemEditor: Component<TabItemEditorProps> = (componentProps) =>
66
66
  componentProps.onPropsChange({
67
67
  ...componentProps.props,
68
68
  label,
69
- value: componentProps.props.value || label.toLowerCase().replace(/\s+/g, "-")
69
+ value: componentProps.props["value"] || label.toLowerCase().replace(/\s+/g, "-")
70
70
  })
71
71
  }
72
72
 
@@ -78,7 +78,7 @@ export const TabItemEditor: Component<TabItemEditorProps> = (componentProps) =>
78
78
  <RLSInput
79
79
  type="text"
80
80
  placeholder="e.g. pnpm, Astro, TypeScript"
81
- value={componentProps.props.label || ""}
81
+ value={componentProps.props["label"] || ""}
82
82
  onBlur={(e) => saveLabel(e.currentTarget.value)}
83
83
  size="sm"
84
84
  />
@@ -10,20 +10,20 @@ export interface TableEditorProps {
10
10
 
11
11
  export const TableEditor: Component<TableEditorProps> = (componentProps) => {
12
12
  const columns = (): TableColumnDef[] =>
13
- componentProps.props.columns || [
13
+ componentProps.props["columns"] || [
14
14
  { key: "col1", header: "Header 1", align: "left" },
15
15
  { key: "col2", header: "Header 2", align: "left" }
16
16
  ]
17
17
 
18
18
  const rows = (): Record<string, string>[] =>
19
- componentProps.props.rows || [{ col1: "Cell 1", col2: "Cell 2" }]
19
+ componentProps.props["rows"] || [{ col1: "Cell 1", col2: "Cell 2" }]
20
20
 
21
21
  const save = (newCols: TableColumnDef[], newRows: Record<string, string>[], caption?: string) => {
22
22
  componentProps.onPropsChange({
23
23
  ...componentProps.props,
24
24
  columns: newCols,
25
25
  rows: newRows,
26
- caption: caption !== undefined ? caption : componentProps.props.caption || ""
26
+ caption: caption !== undefined ? caption : componentProps.props["caption"] || ""
27
27
  })
28
28
  }
29
29
 
@@ -172,7 +172,7 @@ export const TableEditor: Component<TableEditorProps> = (componentProps) => {
172
172
  <RLSInput
173
173
  type="text"
174
174
  placeholder="Table caption (optional)"
175
- value={componentProps.props.caption || ""}
175
+ value={componentProps.props["caption"] || ""}
176
176
  onBlur={(e) => save(columns(), rows(), e.currentTarget.value)}
177
177
  size="sm"
178
178
  />
@@ -22,7 +22,7 @@ export const TabsEditor: Component<TabsEditorProps> = (componentProps) => {
22
22
  if (typeof componentProps.children === "function") {
23
23
  return componentProps.children() || []
24
24
  }
25
- return componentProps.children || componentProps.props.children || []
25
+ return componentProps.children || componentProps.props["children"] || []
26
26
  }
27
27
 
28
28
  onMount(() => {