@alstar/studio 0.0.0-beta.4 → 0.0.0-beta.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.
- package/api/api-key.ts +74 -0
- package/api/block.ts +39 -21
- package/api/index.ts +9 -1
- package/api/mcp.ts +53 -0
- package/bin/alstar.ts +42 -0
- package/components/{AdminPanel/AdminPanel.ts → AdminPanel.ts} +22 -27
- package/components/Block.ts +51 -112
- package/components/Entries.ts +17 -10
- package/components/Entry.ts +9 -15
- package/components/Settings.ts +98 -0
- package/components/fields/Blocks.ts +118 -0
- package/components/fields/Text.ts +42 -0
- package/components/fields/index.ts +4 -0
- package/components/icons.ts +97 -0
- package/components/index.ts +1 -1
- package/components/layout.ts +8 -5
- package/index.ts +48 -20
- package/package.json +2 -1
- package/public/admin-panel.css +90 -0
- package/public/blocks.css +53 -0
- package/public/main.css +11 -1
- package/public/main.js +4 -0
- package/public/settings.css +24 -0
- package/queries/block-with-children.ts +74 -0
- package/queries/block.ts +287 -0
- package/queries/db-types.ts +15 -0
- package/queries/getBlockTrees-2.ts +0 -0
- package/queries/getBlockTrees.ts +316 -0
- package/queries/getBlocks.ts +214 -0
- package/queries/index.ts +2 -98
- package/queries/structure-types.ts +97 -0
- package/schemas.ts +15 -54
- package/types.ts +95 -5
- package/utils/buildBlocksTree.ts +4 -4
- package/utils/define.ts +21 -5
- package/utils/file-based-router.ts +9 -1
- package/utils/get-config.ts +8 -9
- package/utils/get-or-create-row.ts +28 -0
- package/utils/startup-log.ts +9 -0
- package/components/AdminPanel/AdminPanel.css +0 -59
- package/components/Field.ts +0 -164
- package/components/Fields.ts +0 -43
- /package/{components/Entry.css → public/entry.css} +0 -0
package/components/Fields.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { html } from 'hono/html'
|
|
2
|
-
import { type Block } from '../types.ts'
|
|
3
|
-
import { type HtmlEscapedString } from 'hono/utils/html'
|
|
4
|
-
import Field from './Field.ts'
|
|
5
|
-
import {
|
|
6
|
-
buildStructurePath,
|
|
7
|
-
type StructurePath,
|
|
8
|
-
} from '../utils/build-structure-path.ts'
|
|
9
|
-
|
|
10
|
-
const Fields = (props: {
|
|
11
|
-
entryId: string | number
|
|
12
|
-
parentId: string | number
|
|
13
|
-
blockStructure: Block
|
|
14
|
-
structurePath: StructurePath
|
|
15
|
-
}): HtmlEscapedString | Promise<HtmlEscapedString> => {
|
|
16
|
-
const updatedPath = buildStructurePath(
|
|
17
|
-
props.blockStructure,
|
|
18
|
-
props.structurePath,
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
return html`
|
|
22
|
-
<div class="fields">
|
|
23
|
-
${props.blockStructure.fields
|
|
24
|
-
? props.blockStructure.fields?.map((field, idx) => {
|
|
25
|
-
return Field({
|
|
26
|
-
entryId: props.entryId,
|
|
27
|
-
parentId: props.parentId,
|
|
28
|
-
blockStructure: field,
|
|
29
|
-
sortOrder: idx,
|
|
30
|
-
structurePath: [...updatedPath, 'fields'],
|
|
31
|
-
})
|
|
32
|
-
})
|
|
33
|
-
: Field({
|
|
34
|
-
entryId: props.entryId,
|
|
35
|
-
parentId: props.parentId,
|
|
36
|
-
blockStructure: props.blockStructure,
|
|
37
|
-
structurePath: updatedPath,
|
|
38
|
-
})}
|
|
39
|
-
</div>
|
|
40
|
-
`
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default Fields
|
|
File without changes
|