@rigel-cms/rigel 0.0.0-stage → 0.1.0-beta.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/LICENSE +203 -0
- package/README.md +8 -2
- package/package.json +78 -4
- package/src/article-body.ts +60 -0
- package/src/article-render.ts +87 -0
- package/src/config.ts +97 -0
- package/src/content.ts +5 -0
- package/src/editor/App.svelte +972 -0
- package/src/editor/assets/rigelcms-icon.png +0 -0
- package/src/editor/assets/sidebar/LICENSE +21 -0
- package/src/editor/assets/sidebar/book-open.svg +1 -0
- package/src/editor/assets/sidebar/calendar.svg +1 -0
- package/src/editor/assets/sidebar/chart-bar.svg +1 -0
- package/src/editor/assets/sidebar/file-text.svg +1 -0
- package/src/editor/assets/sidebar/files.svg +1 -0
- package/src/editor/assets/sidebar/folder.svg +1 -0
- package/src/editor/assets/sidebar/folders.svg +1 -0
- package/src/editor/assets/sidebar/gear.svg +1 -0
- package/src/editor/assets/sidebar/globe.svg +1 -0
- package/src/editor/assets/sidebar/heart.svg +1 -0
- package/src/editor/assets/sidebar/house.svg +1 -0
- package/src/editor/assets/sidebar/images.svg +1 -0
- package/src/editor/assets/sidebar/layout.svg +1 -0
- package/src/editor/assets/sidebar/list.svg +1 -0
- package/src/editor/assets/sidebar/magnifying-glass.svg +1 -0
- package/src/editor/assets/sidebar/megaphone.svg +1 -0
- package/src/editor/assets/sidebar/newspaper.svg +1 -0
- package/src/editor/assets/sidebar/pencil-simple.svg +1 -0
- package/src/editor/assets/sidebar/shopping-bag.svg +1 -0
- package/src/editor/assets/sidebar/sidebar-simple.svg +1 -0
- package/src/editor/assets/sidebar/square-half.svg +1 -0
- package/src/editor/assets/sidebar/squares-four.svg +1 -0
- package/src/editor/assets/sidebar/tag.svg +1 -0
- package/src/editor/assets/sidebar/user.svg +1 -0
- package/src/editor/assets/sidebar/users.svg +1 -0
- package/src/editor/blocks/bulleted-list.ts +2 -0
- package/src/editor/blocks/code.ts +1 -0
- package/src/editor/blocks/divider.ts +14 -0
- package/src/editor/blocks/h1.ts +2 -0
- package/src/editor/blocks/h2.ts +2 -0
- package/src/editor/blocks/h3.ts +2 -0
- package/src/editor/blocks/h4.ts +2 -0
- package/src/editor/blocks/h5.ts +2 -0
- package/src/editor/blocks/h6.ts +2 -0
- package/src/editor/blocks/image.ts +34 -0
- package/src/editor/blocks/index.ts +40 -0
- package/src/editor/blocks/numbered-list.ts +2 -0
- package/src/editor/blocks/paragraph.ts +1 -0
- package/src/editor/blocks/quote.ts +1 -0
- package/src/editor/blocks/table.ts +5 -0
- package/src/editor/lib/ActionDialog.svelte +51 -0
- package/src/editor/lib/BlockEditor.svelte +614 -0
- package/src/editor/lib/CollectionPanel.svelte +103 -0
- package/src/editor/lib/DatePicker.svelte +106 -0
- package/src/editor/lib/Field.svelte +80 -0
- package/src/editor/lib/Icon.svelte +34 -0
- package/src/editor/lib/ImagePicker.svelte +264 -0
- package/src/editor/lib/MarkdownEditor.svelte +206 -0
- package/src/editor/lib/MenuEditor.svelte +209 -0
- package/src/editor/lib/PropertiesTabs.svelte +15 -0
- package/src/editor/lib/ReferenceSelect.svelte +17 -0
- package/src/editor/lib/SchemaField.svelte +156 -0
- package/src/editor/lib/SchemaPanel.svelte +189 -0
- package/src/editor/lib/Select.svelte +138 -0
- package/src/editor/lib/SeoGuidance.svelte +21 -0
- package/src/editor/lib/Settings.svelte +183 -0
- package/src/editor/lib/Shortcuts.svelte +29 -0
- package/src/editor/lib/SidebarIcon.svelte +8 -0
- package/src/editor/lib/SitePreview.svelte +50 -0
- package/src/editor/lib/TopBar.svelte +165 -0
- package/src/editor/lib/UnsavedChanges.svelte +38 -0
- package/src/editor/lib/VisualEditor.svelte +494 -0
- package/src/editor/lib/calendar.ts +55 -0
- package/src/editor/lib/github-auth.ts +117 -0
- package/src/editor/lib/github-backend.ts +263 -0
- package/src/editor/lib/icons.ts +111 -0
- package/src/editor/lib/images.ts +195 -0
- package/src/editor/lib/markdown.ts +71 -0
- package/src/editor/lib/media-library.ts +39 -0
- package/src/editor/lib/menu-tree.ts +37 -0
- package/src/editor/lib/rich-markdown.ts +30 -0
- package/src/editor/lib/schema-edit.ts +110 -0
- package/src/editor/lib/settings.ts +103 -0
- package/src/editor/lib/slugify.ts +10 -0
- package/src/editor/lib/storage.ts +17 -0
- package/src/editor/lib/store.svelte.ts +33 -0
- package/src/editor/main.ts +9 -0
- package/src/editor/styles.css +1280 -0
- package/src/env.d.ts +22 -0
- package/src/index.ts +128 -0
- package/src/manifest/frontmatter.ts +56 -0
- package/src/manifest/loader.ts +14 -0
- package/src/manifest/menu.ts +46 -0
- package/src/manifest/navigation.ts +94 -0
- package/src/manifest/references.ts +39 -0
- package/src/manifest/seo.ts +15 -0
- package/src/manifest/types.ts +75 -0
- package/src/media-types.ts +21 -0
- package/src/preview-urls.ts +3 -0
- package/src/preview.ts +167 -0
- package/src/routes/local-api.ts +42 -0
- package/src/routes/local-documents.ts +83 -0
- package/src/routes/local-media.ts +124 -0
- package/src/routes/local-menu.ts +81 -0
- package/src/routes/local-post.ts +80 -0
- package/src/routes/manifest.json.ts +15 -0
- package/src/routes/media-files.ts +126 -0
- package/src/routes/media-validation.ts +37 -0
- package/src/routes/media.json.ts +12 -0
- package/src/routes/rigel-page.astro +25 -0
- package/src/routes/serialize.ts +139 -0
- package/src/schema/docs.ts +33 -0
- package/src/schema/paths.ts +136 -0
- package/src/schema/store.ts +141 -0
- package/src/schema/types.ts +81 -0
- package/src/schema/validate.ts +327 -0
- package/src/vite/manifest-plugin.ts +180 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Copyright 2026 Alex Zappa (FreshJuice)
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright [yyyy] [name of copyright owner]
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Rigel CMS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A CMS for Astro sites. You edit the text, git keeps the history.
|
|
4
|
+
|
|
5
|
+
`@rigel-cms/rigel` is a beta package and a work in progress. Expect bugs and breaking changes.
|
|
6
|
+
|
|
7
|
+
## License
|
|
8
|
+
|
|
9
|
+
[Apache-2.0](LICENSE). Copyright 2026 [Alex Zappa](https://alex.zappa.dev/) ([FreshJuice](https://freshjuice.dev/)).
|
package/package.json
CHANGED
|
@@ -1,6 +1,80 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigel-cms/rigel",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
|
+
"description": "Rigel CMS — the copy editor for Astro sites. Clients edit text, git keeps the history.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "FreshJuice",
|
|
7
|
+
"email": "contact@freshjuice.dev",
|
|
8
|
+
"url": "https://freshjuice.dev/"
|
|
9
|
+
},
|
|
10
|
+
"contributors": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Alex Zappa",
|
|
13
|
+
"email": "alex@zappa.dev",
|
|
14
|
+
"url": "https://alex.zappa.dev/"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+ssh://git@github.com/rigel-cms/rigel.git"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://rigelcms.dev",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=24.0.0 <25.0.0"
|
|
26
|
+
},
|
|
27
|
+
"packageManager": "pnpm@11.7.0",
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "pnpm typecheck",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"typecheck": "tsc --noEmit"
|
|
32
|
+
},
|
|
33
|
+
"exports": {
|
|
34
|
+
".": "./src/index.ts",
|
|
35
|
+
"./content": "./src/content.ts",
|
|
36
|
+
"./preview": "./src/preview.ts",
|
|
37
|
+
"./article": "./src/article-render.ts",
|
|
38
|
+
"./types": "./src/env.d.ts",
|
|
39
|
+
"./routes/*": "./src/routes/*"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"src",
|
|
43
|
+
"!src/**/*.test.ts",
|
|
44
|
+
"README.md"
|
|
45
|
+
],
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"astro": "^7.3.0",
|
|
48
|
+
"svelte": "^5.57.0",
|
|
49
|
+
"vite": "^8.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
|
|
53
|
+
"@types/markdown-it": "^14.2.0",
|
|
54
|
+
"@types/node": "^24.0.0",
|
|
55
|
+
"astro": "^7.3.2",
|
|
56
|
+
"svelte": "^5.57.0",
|
|
57
|
+
"typescript": "^6.0.3",
|
|
58
|
+
"vite": "^8.0.0",
|
|
59
|
+
"vitest": "^5.0.0"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
63
|
+
"@lexical/code": "~0.52.0",
|
|
64
|
+
"@lexical/history": "~0.52.0",
|
|
65
|
+
"@lexical/link": "~0.52.0",
|
|
66
|
+
"@lexical/list": "~0.52.0",
|
|
67
|
+
"@lexical/rich-text": "~0.52.0",
|
|
68
|
+
"@lexical/table": "~0.52.0",
|
|
69
|
+
"dompurify": "^3.4.15",
|
|
70
|
+
"lexical": "~0.52.0",
|
|
71
|
+
"markdown-it": "^14.3.2",
|
|
72
|
+
"prosemirror-commands": "^1.7.2",
|
|
73
|
+
"prosemirror-example-setup": "^1.2.3",
|
|
74
|
+
"prosemirror-markdown": "^1.13.8",
|
|
75
|
+
"prosemirror-model": "^1.25.12",
|
|
76
|
+
"prosemirror-schema-list": "^1.5.1",
|
|
77
|
+
"prosemirror-state": "^1.4.4",
|
|
78
|
+
"prosemirror-view": "^1.42.5"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { SerializedEditorState } from "lexical";
|
|
2
|
+
import { safePreviewUrl } from "./preview-urls";
|
|
3
|
+
|
|
4
|
+
export type ArticleBody = SerializedEditorState;
|
|
5
|
+
export type ArticleNode = { type: string; version: number; children?: ArticleNode[]; text?: string; format?: number | string; tag?: string; listType?: string; start?: number; url?: string; src?: string; alt?: string; credit?: string; creditURL?: string; [key: string]: unknown };
|
|
6
|
+
export const MAX_TABLE_ROWS = 50;
|
|
7
|
+
export const MAX_TABLE_COLUMNS = 20;
|
|
8
|
+
|
|
9
|
+
export function emptyBody(): ArticleBody {
|
|
10
|
+
const paragraph = { type: "paragraph", version: 1, children: [], direction: null, format: "", indent: 0 };
|
|
11
|
+
return { root: { type: "root", version: 1, children: [paragraph], direction: null, format: "", indent: 0 } };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function validateBody(value: unknown): asserts value is ArticleBody {
|
|
15
|
+
const types = new Set(["root", "paragraph", "heading", "quote", "list", "listitem", "code", "text", "linebreak", "link", "image", "divider", "table", "tablerow", "tablecell"]);
|
|
16
|
+
let count = 0;
|
|
17
|
+
let textSize = 0;
|
|
18
|
+
function check(raw: unknown, parent = "", depth = 0) {
|
|
19
|
+
if (++count > 10000 || depth > 32 || !raw || typeof raw !== "object" || Array.isArray(raw)) throw new Error("Invalid or oversized article block tree");
|
|
20
|
+
const node = raw as ArticleNode;
|
|
21
|
+
if (!types.has(node.type) || node.version !== 1 || (node.type === "root") !== !parent) throw new Error("Unsupported article block");
|
|
22
|
+
const inline = ["text", "linebreak", "link"];
|
|
23
|
+
if (parent === "root" && (inline.includes(node.type) || ["listitem", "tablerow", "tablecell"].includes(node.type))) throw new Error("Expected an article block");
|
|
24
|
+
if (node.type === "table" && parent !== "root") throw new Error("Nested tables are not supported");
|
|
25
|
+
if (node.type === "tablerow" && parent !== "table" || node.type === "tablecell" && parent !== "tablerow") throw new Error("Invalid table structure");
|
|
26
|
+
if (parent === "table" && node.type !== "tablerow" || parent === "tablerow" && node.type !== "tablecell" || parent === "tablecell" && node.type !== "paragraph") throw new Error("Invalid table content");
|
|
27
|
+
if (node.type === "tablecell") {
|
|
28
|
+
if (![0, 1, 2, 3].includes(Number(node.headerState)) || typeof node.headerState !== "number" || (node.colSpan ?? 1) !== 1 || (node.rowSpan ?? 1) !== 1) throw new Error("Invalid table cell or unsupported merged cells");
|
|
29
|
+
if (node.backgroundColor || node.verticalAlign) throw new Error("Custom table cell styles are not supported");
|
|
30
|
+
}
|
|
31
|
+
for (const key of ["width", "height"]) if (node[key] !== undefined && (typeof node[key] !== "number" || !Number.isFinite(node[key]) || node[key] <= 0 || node[key] > 2000)) throw new Error("Invalid table dimensions");
|
|
32
|
+
if (node.colWidths !== undefined && (!Array.isArray(node.colWidths) || node.colWidths.length > MAX_TABLE_COLUMNS || node.colWidths.some(width => typeof width !== "number" || !Number.isFinite(width) || width <= 0 || width > 2000))) throw new Error("Invalid table column widths");
|
|
33
|
+
if (parent === "list" && node.type !== "listitem") throw new Error("Lists require list items");
|
|
34
|
+
if (["paragraph", "heading", "link", "code"].includes(parent) && !inline.includes(node.type)) throw new Error("Expected inline article content");
|
|
35
|
+
if (node.type === "heading" && !["h1", "h2", "h3", "h4", "h5", "h6"].includes(node.tag ?? "")) throw new Error("Use heading levels 1–6");
|
|
36
|
+
if (node.type === "list" && !["bullet", "number"].includes(node.listType ?? "")) throw new Error("Unsupported list type");
|
|
37
|
+
if (node.start !== undefined && (!Number.isInteger(node.start) || node.start < 1 || node.start > 1000000)) throw new Error("Invalid list start");
|
|
38
|
+
if (node.type === "text" && (typeof node.text !== "string" || typeof node.format !== "number" || !Number.isInteger(node.format) || node.format < 0 || node.format > 255)) throw new Error("Invalid article text");
|
|
39
|
+
if (node.type === "text" && (textSize += node.text!.length) > 1000000) throw new Error("Article text is too large");
|
|
40
|
+
if (node.style || node.textStyle) throw new Error("Custom article styles are not supported");
|
|
41
|
+
if (node.type === "image" && (typeof node.src !== "string" || typeof node.alt !== "string")) throw new Error("Images require a URL and alt text");
|
|
42
|
+
if (node.type === "link" && typeof node.url !== "string") throw new Error("Links require a URL");
|
|
43
|
+
if (node.type === "image" && !safePreviewUrl(node.src!, true)) throw new Error("Unsafe image URL");
|
|
44
|
+
if (node.type === "image" && node.url !== undefined && (typeof node.url !== "string" || node.url && !safePreviewUrl(node.url))) throw new Error("Unsafe image link URL");
|
|
45
|
+
if (node.type === "link" && !safePreviewUrl(node.url!)) throw new Error("Unsafe link URL");
|
|
46
|
+
for (const key of ["credit", "creditURL"]) if (node[key] !== undefined && typeof node[key] !== "string") throw new Error("Invalid image credit");
|
|
47
|
+
if (node.creditURL && !safePreviewUrl(node.creditURL)) throw new Error("Unsafe image credit URL");
|
|
48
|
+
if (!["text", "linebreak", "image", "divider"].includes(node.type)) {
|
|
49
|
+
if (!Array.isArray(node.children)) throw new Error("Article block requires children");
|
|
50
|
+
for (const child of node.children) check(child, node.type, depth + 1);
|
|
51
|
+
if (["table", "tablerow", "tablecell"].includes(node.type) && !node.children.length) throw new Error("Table elements cannot be empty");
|
|
52
|
+
if (node.type === "table") {
|
|
53
|
+
const columns = node.children[0]?.children?.length ?? 0;
|
|
54
|
+
if (node.children.length > MAX_TABLE_ROWS || columns > MAX_TABLE_COLUMNS || node.children.some(row => row.children?.length !== columns)) throw new Error("Table must be rectangular and at most 50 rows by 20 columns");
|
|
55
|
+
}
|
|
56
|
+
} else if (node.children !== undefined) throw new Error("Unexpected article children");
|
|
57
|
+
}
|
|
58
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Expected a Lexical article body");
|
|
59
|
+
check((value as ArticleBody).root);
|
|
60
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { validateBody, type ArticleBody, type ArticleNode } from "./article-body";
|
|
2
|
+
import { safePreviewUrl } from "./preview-urls";
|
|
3
|
+
|
|
4
|
+
const escape = (text: unknown) => String(text ?? "").replace(/[&<>"']/g, character => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[character]!);
|
|
5
|
+
|
|
6
|
+
function renderText(node: ArticleNode): string {
|
|
7
|
+
let text = escape(node.text);
|
|
8
|
+
const format = Number(node.format);
|
|
9
|
+
for (const [bit, tag] of [[16, "code"], [1, "strong"], [2, "em"], [4, "s"], [8, "u"], [32, "sub"], [64, "sup"], [128, "mark"]] as const) if (format & bit) text = `<${tag}>${text}</${tag}>`;
|
|
10
|
+
return text;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function renderArticle(body: ArticleBody): string {
|
|
14
|
+
validateBody(body);
|
|
15
|
+
function walk(node: ArticleNode): string {
|
|
16
|
+
const content = () => (node.children ?? []).map(walk).join("");
|
|
17
|
+
if (node.type === "text") return renderText(node);
|
|
18
|
+
if (node.type === "linebreak") return "<br>";
|
|
19
|
+
if (node.type === "root") return content();
|
|
20
|
+
if (node.type === "paragraph") return `<p>${content()}</p>`;
|
|
21
|
+
if (node.type === "heading") return `<${node.tag}>${content()}</${node.tag}>`;
|
|
22
|
+
if (node.type === "quote") return `<blockquote>${content()}</blockquote>`;
|
|
23
|
+
if (node.type === "code") return `<pre><code>${escape(plain(node))}</code></pre>`;
|
|
24
|
+
if (node.type === "list") return node.listType === "number" ? `<ol start="${node.start ?? 1}">${content()}</ol>` : `<ul>${content()}</ul>`;
|
|
25
|
+
if (node.type === "listitem") return `<li>${content()}</li>`;
|
|
26
|
+
if (node.type === "table") {
|
|
27
|
+
const rows = node.children!;
|
|
28
|
+
const header = rows[0].children!.every(cell => Number(cell.headerState) & 1);
|
|
29
|
+
return `<table>${header ? `<thead>${walk(rows[0])}</thead>` : ""}<tbody>${rows.slice(header ? 1 : 0).map(walk).join("")}</tbody></table>`;
|
|
30
|
+
}
|
|
31
|
+
if (node.type === "tablerow") return `<tr>${content()}</tr>`;
|
|
32
|
+
if (node.type === "tablecell") return Number(node.headerState) ? `<th scope="${Number(node.headerState) & 1 ? "col" : "row"}">${content()}</th>` : `<td>${content()}</td>`;
|
|
33
|
+
if (node.type === "link") return safePreviewUrl(node.url!) ? `<a href="${escape(node.url)}">${content()}</a>` : content();
|
|
34
|
+
if (node.type === "divider") return "<hr>";
|
|
35
|
+
if (node.type === "image") {
|
|
36
|
+
if (!safePreviewUrl(node.src!, true)) return "";
|
|
37
|
+
const credit = node.credit ? (node.creditURL && safePreviewUrl(node.creditURL) ? `<a href="${escape(node.creditURL)}">${escape(node.credit)}</a>` : escape(node.credit)) : "";
|
|
38
|
+
const image = `<img src="${escape(node.src)}" alt="${escape(node.alt)}">`;
|
|
39
|
+
return `<figure>${node.url ? `<a href="${escape(node.url)}">${image}</a>` : image}${credit ? `<figcaption>${credit}</figcaption>` : ""}</figure>`;
|
|
40
|
+
}
|
|
41
|
+
return "";
|
|
42
|
+
}
|
|
43
|
+
return walk(body.root as unknown as ArticleNode);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function plain(node: ArticleNode): string {
|
|
47
|
+
return node.type === "text" ? node.text ?? "" : node.type === "linebreak" ? "\n" : (node.children ?? []).map(plain).join("");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function articleMarkdown(body: ArticleBody): string {
|
|
51
|
+
validateBody(body);
|
|
52
|
+
const escaped = (text: string) => text.replace(/[\\`*_[\]<>#~]/g, "\\$&");
|
|
53
|
+
function walk(node: ArticleNode, depth = 0): string {
|
|
54
|
+
const content = () => (node.children ?? []).map(child => walk(child, depth)).join("");
|
|
55
|
+
if (node.type === "text") {
|
|
56
|
+
let text = escaped(node.text ?? "");
|
|
57
|
+
const format = Number(node.format);
|
|
58
|
+
if (format & (8 | 32 | 64 | 128)) return renderText(node);
|
|
59
|
+
if (format & 16) { const ticks = "`".repeat(Math.max(1, ...(node.text?.match(/`+/g) ?? []).map(run => run.length + 1))); text = ticks + " " + (node.text ?? "") + " " + ticks; }
|
|
60
|
+
if (format & 1) text = `**${text}**`;
|
|
61
|
+
if (format & 2) text = `*${text}*`;
|
|
62
|
+
if (format & 4) text = `~~${text}~~`;
|
|
63
|
+
return text;
|
|
64
|
+
}
|
|
65
|
+
if (node.type === "linebreak") return "\n";
|
|
66
|
+
if (node.type === "paragraph") return content() + "\n\n";
|
|
67
|
+
if (node.type === "heading") return "#".repeat(Number(node.tag?.slice(1))) + " " + content() + "\n\n";
|
|
68
|
+
if (node.type === "quote") return content().trimEnd().split("\n").map(line => "> " + line).join("\n") + "\n\n";
|
|
69
|
+
if (node.type === "code") { const text = plain(node); const fence = "`".repeat(Math.max(3, ...(text.match(/`+/g) ?? []).map(run => run.length + 1))); return fence + "\n" + text + "\n" + fence + "\n\n"; }
|
|
70
|
+
if (node.type === "list") return (node.children ?? []).map((child, index) => " ".repeat(depth) + (node.listType === "number" ? `${(node.start ?? 1) + index}. ` : "- ") + walk(child, depth + 1).trimEnd() + "\n").join("") + "\n";
|
|
71
|
+
if (node.type === "table") {
|
|
72
|
+
const rows = node.children!;
|
|
73
|
+
const row = (cells: ArticleNode[]) => "| " + cells.map(cell => walk(cell).trim().replace(/\|/g, "\\|").replace(/\n+/g, "<br>")).join(" | ") + " |\n";
|
|
74
|
+
const header = rows[0].children!.every(cell => Number(cell.headerState) & 1);
|
|
75
|
+
return (header ? row(rows[0].children!) : "| " + rows[0].children!.map(() => " ").join(" | ") + " |\n") + "| " + rows[0].children!.map(() => "---").join(" | ") + " |\n" + rows.slice(header ? 1 : 0).map(item => row(item.children!)).join("") + "\n";
|
|
76
|
+
}
|
|
77
|
+
if (node.type === "link") return safePreviewUrl(node.url!) ? `[${content()}](<${node.url!.replace(/[<>]/g, character => encodeURIComponent(character))}>)` : content();
|
|
78
|
+
if (node.type === "image") {
|
|
79
|
+
if (!safePreviewUrl(node.src!, true)) return "";
|
|
80
|
+
const image = `)}>)`;
|
|
81
|
+
return (node.url ? `[${image}](<${node.url.replace(/[<>]/g, character => encodeURIComponent(character))}>)` : image) + "\n\n";
|
|
82
|
+
}
|
|
83
|
+
if (node.type === "divider") return "---\n\n";
|
|
84
|
+
return content();
|
|
85
|
+
}
|
|
86
|
+
return walk(body.root as unknown as ArticleNode).trimEnd() + "\n";
|
|
87
|
+
}
|
package/src/config.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { CollectionField } from "./manifest/types";
|
|
2
|
+
import { validateSchema } from "./schema/validate";
|
|
3
|
+
import type { Schema } from "./schema/types";
|
|
4
|
+
import { validateSidebar, type SidebarEntry } from "./manifest/navigation";
|
|
5
|
+
import { withSeoFields } from "./manifest/seo";
|
|
6
|
+
|
|
7
|
+
export interface RigelConfig {
|
|
8
|
+
copyDir: string;
|
|
9
|
+
mediaDir?: string;
|
|
10
|
+
preview?: import("./preview").PreviewConfig;
|
|
11
|
+
backend: "local" | "github";
|
|
12
|
+
demo?: boolean;
|
|
13
|
+
collections?: CollectionConfig[];
|
|
14
|
+
menus?: { folder: string; maxDepth?: number };
|
|
15
|
+
schema?: Schema;
|
|
16
|
+
sidebar?: SidebarEntry[];
|
|
17
|
+
repo?: string;
|
|
18
|
+
branch?: string;
|
|
19
|
+
publishBranch?: string;
|
|
20
|
+
repoRoot?: string;
|
|
21
|
+
authOrigin?: string;
|
|
22
|
+
appSlug?: string;
|
|
23
|
+
users?: string[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CollectionConfig {
|
|
27
|
+
name: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
listTitle?: string;
|
|
30
|
+
folder: string;
|
|
31
|
+
fields: CollectionField[];
|
|
32
|
+
columns?: string[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const DEFAULTS: Pick<RigelConfig, "copyDir" | "backend"> = {
|
|
36
|
+
copyDir: "src/content/copy",
|
|
37
|
+
backend: "local",
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export function parseConfig(options: Partial<RigelConfig> = {}): RigelConfig {
|
|
41
|
+
const cfg = { ...DEFAULTS, ...options };
|
|
42
|
+
if (cfg.demo === undefined) cfg.demo = true;
|
|
43
|
+
if (typeof cfg.demo !== "boolean") throw new Error("rigel: demo must be boolean");
|
|
44
|
+
if (cfg.mediaDir !== undefined && (typeof cfg.mediaDir !== "string" || !cfg.mediaDir.split("/").every(part => /^[a-zA-Z0-9_-][a-zA-Z0-9_. -]*$/.test(part)))) throw new Error("rigel: mediaDir must be a relative folder inside publicDir");
|
|
45
|
+
if (cfg.backend === "github") {
|
|
46
|
+
if (typeof cfg.repo !== "string" || !/^[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\/[a-zA-Z0-9_.-]+$/.test(cfg.repo) || [".", ".."].includes(cfg.repo.split("/")[1])) throw new Error("rigel: github backend requires `repo: owner/name`");
|
|
47
|
+
cfg.branch ??= "drafts";
|
|
48
|
+
cfg.publishBranch ??= "main";
|
|
49
|
+
cfg.repoRoot ??= "";
|
|
50
|
+
cfg.authOrigin ??= "https://auth.rigelcms.dev";
|
|
51
|
+
cfg.appSlug ??= "rigel-cms";
|
|
52
|
+
const safePath = (value: unknown): value is string => typeof value === "string" && value.split("/").every(part => /^[a-zA-Z0-9_-][a-zA-Z0-9_. -]*$/.test(part));
|
|
53
|
+
for (const folder of [cfg.copyDir, ...(cfg.repoRoot === "" ? [] : [cfg.repoRoot]), ...(cfg.collections ?? []).map(c => c.folder), ...(cfg.schema?.documents ?? []).map(d => d.folder)]) if (!safePath(folder)) throw new Error("rigel: github content paths must be safe relative folders");
|
|
54
|
+
for (const branch of [cfg.branch, cfg.publishBranch]) if (typeof branch !== "string" || !branch || /[\s~^:?*\[\\\x00-\x1f\x7f]/.test(branch) || branch.includes("..") || branch.includes("@{") || branch.split("/").some(part => !part || part.startsWith(".") || part.endsWith(".") || part.endsWith(".lock")) || branch === "@" || branch.startsWith("-")) throw new Error("rigel: invalid github branch");
|
|
55
|
+
if (cfg.branch === cfg.publishBranch) throw new Error("rigel: drafts branch must differ from publishBranch");
|
|
56
|
+
if (typeof cfg.appSlug !== "string" || !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(cfg.appSlug)) throw new Error("rigel: invalid github appSlug");
|
|
57
|
+
try {
|
|
58
|
+
const url = new URL(cfg.authOrigin);
|
|
59
|
+
if (url.username || url.password || url.search || url.hash || url.pathname !== "/" || (url.protocol !== "https:" && !(url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname)))) throw new Error();
|
|
60
|
+
cfg.authOrigin = url.origin;
|
|
61
|
+
} catch { throw new Error("rigel: authOrigin must be an HTTPS origin (HTTP is allowed on loopback)"); }
|
|
62
|
+
}
|
|
63
|
+
if (cfg.menus !== undefined) {
|
|
64
|
+
const menus = cfg.menus;
|
|
65
|
+
if (!menus || typeof menus.folder !== "string" || !menus.folder.split("/").every((part) => /^[a-zA-Z0-9_-][a-zA-Z0-9_. -]*$/.test(part)))
|
|
66
|
+
throw new Error("rigel: menus.folder must be a relative folder inside the site root");
|
|
67
|
+
const maxDepth = menus.maxDepth === undefined ? 3 : menus.maxDepth;
|
|
68
|
+
if (!Number.isInteger(maxDepth) || maxDepth < 1 || maxDepth > 10)
|
|
69
|
+
throw new Error("rigel: menus.maxDepth must be an integer from 1 to 10");
|
|
70
|
+
cfg.menus = { folder: menus.folder, maxDepth };
|
|
71
|
+
}
|
|
72
|
+
if (cfg.schema !== undefined) {
|
|
73
|
+
const declared = validateSchema(cfg.schema);
|
|
74
|
+
const schema = cfg.demo ? declared : validateSchema({ ...declared, documents: declared.documents.filter(type => !type.demo) });
|
|
75
|
+
cfg.schema = { ...schema, documents: schema.documents.map(type => {
|
|
76
|
+
if (type.shared) return type;
|
|
77
|
+
const fields = withSeoFields(type.fields.map(field => field.key === "title" && field.label === "Title" ? { ...field, label: "Page name" } : field));
|
|
78
|
+
if (!fields.some(field => field.key === "draft")) fields.push({ key: "draft", label: "Draft", type: "boolean" });
|
|
79
|
+
return { ...type, fields };
|
|
80
|
+
}) };
|
|
81
|
+
}
|
|
82
|
+
if (cfg.collections) cfg.collections = cfg.collections.map(collection => ({ ...collection, fields: withSeoFields(collection.fields) }));
|
|
83
|
+
for (const collection of cfg.collections ?? []) {
|
|
84
|
+
for (const field of collection.fields) {
|
|
85
|
+
if (field.type !== "reference") continue;
|
|
86
|
+
if (field.multiple !== undefined && typeof field.multiple !== "boolean") throw new Error(`rigel: ${collection.name}.${field.key}: multiple must be boolean`);
|
|
87
|
+
if ((field.to !== undefined ? 1 : 0) + (field.options !== undefined ? 1 : 0) !== 1) throw new Error(`rigel: ${collection.name}.${field.key}: reference requires either to or options`);
|
|
88
|
+
if (field.to !== undefined && !cfg.schema?.documents.some(type => type.name === field.to)) throw new Error(`rigel: ${collection.name}.${field.key}: unknown reference target`);
|
|
89
|
+
if (field.options !== undefined) {
|
|
90
|
+
if (!Array.isArray(field.options) || field.options.some(option => !option || typeof option.value !== "string" || !option.value.trim() || typeof option.label !== "string" || !option.label.trim() || ["photo", "description", "email", "url"].some(key => key in option && typeof option[key as keyof typeof option] !== "string")) || new Set(field.options.map(option => option.value)).size !== field.options.length) throw new Error(`rigel: ${collection.name}.${field.key}: invalid reference options`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (cfg.sidebar !== undefined) validateSidebar(cfg.sidebar);
|
|
95
|
+
|
|
96
|
+
return cfg;
|
|
97
|
+
}
|
package/src/content.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { MenuItem, MenuDocument } from "./manifest/menu";
|
|
2
|
+
export { defineCopy } from "./manifest/types";
|
|
3
|
+
export type { CopyField, CopyGroup, CopyPage, Manifest, ManifestCollection } from "./manifest/types";
|
|
4
|
+
export { defineSchema, defineDocument, defineObject, defineField } from "./schema/types";
|
|
5
|
+
export type { Schema, DocumentDef, ObjectDef, FieldDef, ContentDocument } from "./schema/types";
|