@yimoka/designable-playground 0.0.0-stage → 0.1.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/README.md +8 -2
- package/dist/demo/components/Alert/index.d.ts +4 -0
- package/dist/demo/components/Alert/index.js +41 -0
- package/dist/demo/components/ArrayCards/index.d.ts +17 -0
- package/dist/demo/components/ArrayCards/index.js +62 -0
- package/dist/demo/components/ArrayList/index.d.ts +25 -0
- package/dist/demo/components/ArrayList/index.js +143 -0
- package/dist/demo/components/ArrayTable/index.d.ts +39 -0
- package/dist/demo/components/ArrayTable/index.js +247 -0
- package/dist/demo/components/AutoComplete/index.d.ts +4 -0
- package/dist/demo/components/AutoComplete/index.js +52 -0
- package/dist/demo/components/Avatar/index.d.ts +4 -0
- package/dist/demo/components/Avatar/index.js +34 -0
- package/dist/demo/components/Badge/index.d.ts +4 -0
- package/dist/demo/components/Badge/index.js +35 -0
- package/dist/demo/components/Button/index.d.ts +4 -0
- package/dist/demo/components/Button/index.js +86 -0
- package/dist/demo/components/Card/index.d.ts +4 -0
- package/dist/demo/components/Card/index.js +72 -0
- package/dist/demo/components/Carousel/index.d.ts +4 -0
- package/dist/demo/components/Carousel/index.js +33 -0
- package/dist/demo/components/Cascader/index.d.ts +4 -0
- package/dist/demo/components/Cascader/index.js +60 -0
- package/dist/demo/components/Checkbox/index.d.ts +8 -0
- package/dist/demo/components/Checkbox/index.js +55 -0
- package/dist/demo/components/ColorPicker/index.d.ts +4 -0
- package/dist/demo/components/ColorPicker/index.js +38 -0
- package/dist/demo/components/DatePicker/index.d.ts +4 -0
- package/dist/demo/components/DatePicker/index.js +61 -0
- package/dist/demo/components/DateRangePicker/index.d.ts +4 -0
- package/dist/demo/components/DateRangePicker/index.js +58 -0
- package/dist/demo/components/Divider/index.d.ts +4 -0
- package/dist/demo/components/Divider/index.js +39 -0
- package/dist/demo/components/Empty/index.d.ts +4 -0
- package/dist/demo/components/Empty/index.js +29 -0
- package/dist/demo/components/Flex/index.d.ts +4 -0
- package/dist/demo/components/Flex/index.js +51 -0
- package/dist/demo/components/Form/index.d.ts +21 -0
- package/dist/demo/components/Form/index.js +116 -0
- package/dist/demo/components/FormCollapse/index.d.ts +28 -0
- package/dist/demo/components/FormCollapse/index.js +164 -0
- package/dist/demo/components/FormGrid/index.d.ts +22 -0
- package/dist/demo/components/FormGrid/index.js +134 -0
- package/dist/demo/components/FormItem/index.d.ts +14 -0
- package/dist/demo/components/FormItem/index.js +33 -0
- package/dist/demo/components/FormLayout/index.d.ts +26 -0
- package/dist/demo/components/FormLayout/index.js +260 -0
- package/dist/demo/components/FormTab/index.d.ts +15 -0
- package/dist/demo/components/FormTab/index.js +186 -0
- package/dist/demo/components/GridCol/index.d.ts +4 -0
- package/dist/demo/components/GridCol/index.js +53 -0
- package/dist/demo/components/GridRow/index.d.ts +4 -0
- package/dist/demo/components/GridRow/index.js +70 -0
- package/dist/demo/components/HTMLContent/index.d.ts +4 -0
- package/dist/demo/components/HTMLContent/index.js +34 -0
- package/dist/demo/components/I18nEditor/index.d.ts +8 -0
- package/dist/demo/components/I18nEditor/index.js +64 -0
- package/dist/demo/components/Image/index.d.ts +4 -0
- package/dist/demo/components/Image/index.js +36 -0
- package/dist/demo/components/Input/index.d.ts +4 -0
- package/dist/demo/components/Input/index.js +36 -0
- package/dist/demo/components/InputSearch/index.d.ts +4 -0
- package/dist/demo/components/InputSearch/index.js +40 -0
- package/dist/demo/components/Link/index.d.ts +4 -0
- package/dist/demo/components/Link/index.js +37 -0
- package/dist/demo/components/Mentions/index.d.ts +4 -0
- package/dist/demo/components/Mentions/index.js +41 -0
- package/dist/demo/components/NumberPicker/index.d.ts +6 -0
- package/dist/demo/components/NumberPicker/index.js +63 -0
- package/dist/demo/components/ObjectContainer/index.d.ts +14 -0
- package/dist/demo/components/ObjectContainer/index.js +46 -0
- package/dist/demo/components/Password/index.d.ts +6 -0
- package/dist/demo/components/Password/index.js +44 -0
- package/dist/demo/components/QRCode/index.d.ts +4 -0
- package/dist/demo/components/QRCode/index.js +34 -0
- package/dist/demo/components/Radio/index.d.ts +6 -0
- package/dist/demo/components/Radio/index.js +49 -0
- package/dist/demo/components/Rate/index.d.ts +6 -0
- package/dist/demo/components/Rate/index.js +43 -0
- package/dist/demo/components/Search/index.d.ts +4 -0
- package/dist/demo/components/Search/index.js +42 -0
- package/dist/demo/components/SearchSelect/index.d.ts +4 -0
- package/dist/demo/components/SearchSelect/index.js +53 -0
- package/dist/demo/components/Select/index.d.ts +4 -0
- package/dist/demo/components/Select/index.js +59 -0
- package/dist/demo/components/Slider/index.d.ts +6 -0
- package/dist/demo/components/Slider/index.js +61 -0
- package/dist/demo/components/Space/index.d.ts +9 -0
- package/dist/demo/components/Space/index.js +61 -0
- package/dist/demo/components/Statistic/index.d.ts +4 -0
- package/dist/demo/components/Statistic/index.js +33 -0
- package/dist/demo/components/Switch/index.d.ts +4 -0
- package/dist/demo/components/Switch/index.js +49 -0
- package/dist/demo/components/Tabs/index.d.ts +10 -0
- package/dist/demo/components/Tabs/index.js +181 -0
- package/dist/demo/components/Tag/index.d.ts +4 -0
- package/dist/demo/components/Tag/index.js +33 -0
- package/dist/demo/components/Text/index.d.ts +11 -0
- package/dist/demo/components/Text/index.js +64 -0
- package/dist/demo/components/TextArea/index.d.ts +6 -0
- package/dist/demo/components/TextArea/index.js +43 -0
- package/dist/demo/components/TimePicker/index.d.ts +4 -0
- package/dist/demo/components/TimePicker/index.js +69 -0
- package/dist/demo/components/TimeRangePicker/index.d.ts +4 -0
- package/dist/demo/components/TimeRangePicker/index.js +68 -0
- package/dist/demo/components/Transfer/index.d.ts +6 -0
- package/dist/demo/components/Transfer/index.js +59 -0
- package/dist/demo/components/TreeSelect/index.d.ts +4 -0
- package/dist/demo/components/TreeSelect/index.js +63 -0
- package/dist/demo/components/Upload/index.d.ts +8 -0
- package/dist/demo/components/Upload/index.js +64 -0
- package/dist/demo/components/index.d.ts +55 -0
- package/dist/demo/components/index.js +55 -0
- package/dist/demo/components/shared.d.ts +143 -0
- package/dist/demo/components/shared.js +315 -0
- package/dist/src/Playground.d.ts +3 -0
- package/dist/src/Playground.js +304 -0
- package/dist/src/antd/AntdPlayground.d.ts +16 -0
- package/dist/src/antd/AntdPlayground.js +136 -0
- package/dist/src/antd/index.d.ts +1 -0
- package/dist/src/antd/index.js +1 -0
- package/dist/src/context.d.ts +4 -0
- package/dist/src/context.js +13 -0
- package/dist/src/examples/index.d.ts +267 -0
- package/dist/src/examples/index.js +824 -0
- package/dist/src/hooks/index.d.ts +4 -0
- package/dist/src/hooks/index.js +4 -0
- package/dist/src/hooks/remoteSchemaAdapter.d.ts +53 -0
- package/dist/src/hooks/remoteSchemaAdapter.js +262 -0
- package/dist/src/hooks/usePlayground.d.ts +38 -0
- package/dist/src/hooks/usePlayground.js +642 -0
- package/dist/src/hooks/usePlaygroundRemotePersistence.d.ts +135 -0
- package/dist/src/hooks/usePlaygroundRemotePersistence.js +736 -0
- package/dist/src/hooks/useSchemaEditorDraft.d.ts +4 -0
- package/dist/src/hooks/useSchemaEditorDraft.js +44 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.js +14 -0
- package/dist/src/layouts/PlaygroundLayout/ErrorBoundaries.d.ts +59 -0
- package/dist/src/layouts/PlaygroundLayout/ErrorBoundaries.js +161 -0
- package/dist/src/layouts/PlaygroundLayout/index.d.ts +7 -0
- package/dist/src/layouts/PlaygroundLayout/index.js +443 -0
- package/dist/src/layouts/index.d.ts +1 -0
- package/dist/src/layouts/index.js +1 -0
- package/dist/src/panels/CompositePanel/index.d.ts +6 -0
- package/dist/src/panels/CompositePanel/index.js +139 -0
- package/dist/src/panels/ToolbarPanel/index.d.ts +3 -0
- package/dist/src/panels/ToolbarPanel/index.js +24 -0
- package/dist/src/panels/index.d.ts +2 -0
- package/dist/src/panels/index.js +2 -0
- package/dist/src/presets/antd.d.ts +19 -0
- package/dist/src/presets/antd.js +112 -0
- package/dist/src/presets/index.d.ts +4 -0
- package/dist/src/presets/index.js +3 -0
- package/dist/src/presets/runtime-array-helpers.d.ts +8 -0
- package/dist/src/presets/runtime-array-helpers.js +147 -0
- package/dist/src/presets/runtime-component-props.d.ts +3 -0
- package/dist/src/presets/runtime-component-props.js +5 -0
- package/dist/src/presets/runtime-components.d.ts +5 -0
- package/dist/src/presets/runtime-components.js +419 -0
- package/dist/src/presets/runtime-form-components.d.ts +9 -0
- package/dist/src/presets/runtime-form-components.js +94 -0
- package/dist/src/presets/scenario-catalog.d.ts +6 -0
- package/dist/src/presets/scenario-catalog.js +128 -0
- package/dist/src/presets/scenarios.d.ts +52 -0
- package/dist/src/presets/scenarios.js +603 -0
- package/dist/src/runtime/actions.d.ts +19 -0
- package/dist/src/runtime/actions.js +307 -0
- package/dist/src/runtime/contracts.d.ts +149 -0
- package/dist/src/runtime/contracts.js +1 -0
- package/dist/src/runtime/document-bindings.d.ts +3 -0
- package/dist/src/runtime/document-bindings.js +101 -0
- package/dist/src/runtime/document-core.d.ts +57 -0
- package/dist/src/runtime/document-core.js +379 -0
- package/dist/src/runtime/document-entity.d.ts +12 -0
- package/dist/src/runtime/document-entity.js +351 -0
- package/dist/src/runtime/document-expressions.d.ts +35 -0
- package/dist/src/runtime/document-expressions.js +346 -0
- package/dist/src/runtime/document-security.d.ts +34 -0
- package/dist/src/runtime/document-security.js +538 -0
- package/dist/src/runtime/document.d.ts +16 -0
- package/dist/src/runtime/document.js +212 -0
- package/dist/src/runtime/environment.d.ts +16 -0
- package/dist/src/runtime/environment.js +76 -0
- package/dist/src/runtime/i18n-schema.d.ts +36 -0
- package/dist/src/runtime/i18n-schema.js +338 -0
- package/dist/src/runtime/i18n.d.ts +25 -0
- package/dist/src/runtime/i18n.js +447 -0
- package/dist/src/runtime/index.d.ts +8 -0
- package/dist/src/runtime/index.js +8 -0
- package/dist/src/runtime/navigation.d.ts +5 -0
- package/dist/src/runtime/navigation.js +43 -0
- package/dist/src/runtime/playground.d.ts +30 -0
- package/dist/src/runtime/playground.js +243 -0
- package/dist/src/runtime/preview-boundaries.d.ts +13 -0
- package/dist/src/runtime/preview-boundaries.js +43 -0
- package/dist/src/runtime/preview.d.ts +44 -0
- package/dist/src/runtime/preview.js +574 -0
- package/dist/src/runtime/settings/RuntimeJsonEditor.d.ts +10 -0
- package/dist/src/runtime/settings/RuntimeJsonEditor.js +21 -0
- package/dist/src/runtime/settings/RuntimeStoreEntitySettings.d.ts +15 -0
- package/dist/src/runtime/settings/RuntimeStoreEntitySettings.js +65 -0
- package/dist/src/runtime/templates.d.ts +1560 -0
- package/dist/src/runtime/templates.js +508 -0
- package/dist/src/runtime/website-contact-template.d.ts +1 -0
- package/dist/src/runtime/website-contact-template.js +66 -0
- package/dist/src/runtime/website-template-shared.d.ts +14 -0
- package/dist/src/runtime/website-template-shared.js +210 -0
- package/dist/src/runtime/website-templates.d.ts +5 -0
- package/dist/src/runtime/website-templates.js +976 -0
- package/dist/src/shared/clipboard.d.ts +4 -0
- package/dist/src/shared/clipboard.js +56 -0
- package/dist/src/shared/componentRegistry.d.ts +133 -0
- package/dist/src/shared/componentRegistry.js +381 -0
- package/dist/src/shared/formilyCompatibility.d.ts +8 -0
- package/dist/src/shared/formilyCompatibility.js +40 -0
- package/dist/src/shared/index.d.ts +6 -0
- package/dist/src/shared/index.js +6 -0
- package/dist/src/shared/productionAcceptance.d.ts +63 -0
- package/dist/src/shared/productionAcceptance.js +201 -0
- package/dist/src/shared/schema-options.d.ts +16 -0
- package/dist/src/shared/schema-options.js +138 -0
- package/dist/src/shared/schema.d.ts +63 -0
- package/dist/src/shared/schema.js +627 -0
- package/dist/src/shared/styleSecurity.d.ts +2 -0
- package/dist/src/shared/styleSecurity.js +35 -0
- package/dist/src/transformers/formily.d.ts +34 -0
- package/dist/src/transformers/formily.js +943 -0
- package/dist/src/transformers/index.d.ts +1 -0
- package/dist/src/transformers/index.js +1 -0
- package/dist/src/types.d.ts +186 -0
- package/dist/src/types.js +1 -0
- package/dist/src/widgets/ActionsWidget/index.d.ts +3 -0
- package/dist/src/widgets/ActionsWidget/index.js +10 -0
- package/dist/src/widgets/ComponentTreeWidget/index.d.ts +3 -0
- package/dist/src/widgets/ComponentTreeWidget/index.js +333 -0
- package/dist/src/widgets/NodeActionsWidget/index.d.ts +2 -0
- package/dist/src/widgets/NodeActionsWidget/index.js +125 -0
- package/dist/src/widgets/OutlineTreeWidget/index.d.ts +3 -0
- package/dist/src/widgets/OutlineTreeWidget/index.js +432 -0
- package/dist/src/widgets/OutlineTreeWidget/shared.d.ts +32 -0
- package/dist/src/widgets/OutlineTreeWidget/shared.js +79 -0
- package/dist/src/widgets/PreviewWidget/index.d.ts +2 -0
- package/dist/src/widgets/PreviewWidget/index.js +1566 -0
- package/dist/src/widgets/ProductionReadinessWidget/index.d.ts +18 -0
- package/dist/src/widgets/ProductionReadinessWidget/index.js +356 -0
- package/dist/src/widgets/RemotePersistenceStatusWidget/index.d.ts +18 -0
- package/dist/src/widgets/RemotePersistenceStatusWidget/index.js +438 -0
- package/dist/src/widgets/RemoteVersionHistoryWidget/index.d.ts +39 -0
- package/dist/src/widgets/RemoteVersionHistoryWidget/index.js +475 -0
- package/dist/src/widgets/ResourceWidget/index.d.ts +3 -0
- package/dist/src/widgets/ResourceWidget/index.js +491 -0
- package/dist/src/widgets/SchemaCodeView/index.d.ts +7 -0
- package/dist/src/widgets/SchemaCodeView/index.js +225 -0
- package/dist/src/widgets/SchemaEditorWidget/index.d.ts +10 -0
- package/dist/src/widgets/SchemaEditorWidget/index.js +484 -0
- package/dist/src/widgets/SettingsPanelWidget/index.d.ts +3 -0
- package/dist/src/widgets/SettingsPanelWidget/index.js +190 -0
- package/dist/src/widgets/StorageActionsWidget/index.d.ts +2 -0
- package/dist/src/widgets/StorageActionsWidget/index.js +284 -0
- package/dist/src/widgets/index.d.ts +13 -0
- package/dist/src/widgets/index.js +13 -0
- package/package.json +100 -4
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
export const PAGE_BACKGROUND = '#f5f5f0';
|
|
2
|
+
export const INK = '#111318';
|
|
3
|
+
export const MUTED = '#62666f';
|
|
4
|
+
export const ACCENT = '#b7f34a';
|
|
5
|
+
export const VIOLET = '#7768ff';
|
|
6
|
+
export const STUDIO_IMAGE_DATA_URI = `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(`
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 720">
|
|
8
|
+
<defs>
|
|
9
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
10
|
+
<stop offset="0" stop-color="#17191f"/>
|
|
11
|
+
<stop offset="1" stop-color="#7667f3"/>
|
|
12
|
+
</linearGradient>
|
|
13
|
+
<linearGradient id="card" x1="0" y1="0" x2="1" y2="1">
|
|
14
|
+
<stop offset="0" stop-color="#efff64"/>
|
|
15
|
+
<stop offset="1" stop-color="#b9ff74"/>
|
|
16
|
+
</linearGradient>
|
|
17
|
+
</defs>
|
|
18
|
+
<rect width="1200" height="720" rx="42" fill="url(#bg)"/>
|
|
19
|
+
<circle cx="1020" cy="110" r="210" fill="#ffffff" opacity=".06"/>
|
|
20
|
+
<rect x="92" y="92" width="720" height="536" rx="30" fill="#ffffff" opacity=".96"/>
|
|
21
|
+
<rect x="138" y="145" width="238" height="22" rx="11" fill="#d9dce3"/>
|
|
22
|
+
<rect x="138" y="210" width="520" height="56" rx="18" fill="#17191f"/>
|
|
23
|
+
<rect x="138" y="292" width="420" height="18" rx="9" fill="#c8cbd2"/>
|
|
24
|
+
<rect x="138" y="330" width="350" height="18" rx="9" fill="#c8cbd2"/>
|
|
25
|
+
<rect x="138" y="406" width="250" height="138" rx="22" fill="url(#card)"/>
|
|
26
|
+
<rect x="414" y="406" width="342" height="138" rx="22" fill="#ece9ff"/>
|
|
27
|
+
<path d="M884 272h186v186H884z" fill="none" stroke="#efff64" stroke-width="26"/>
|
|
28
|
+
<path d="m870 512 228-228" stroke="#ffffff" stroke-width="18" opacity=".8"/>
|
|
29
|
+
<text x="884" y="585" fill="#ffffff" font-family="Arial,sans-serif" font-size="34" font-weight="700">CLARITY / 26</text>
|
|
30
|
+
</svg>
|
|
31
|
+
`)}`;
|
|
32
|
+
export const createWebsiteDocument = (templateId, templateVersion, properties) => ({
|
|
33
|
+
kind: 'yimoka.designable.runtime-document',
|
|
34
|
+
version: 1,
|
|
35
|
+
metadata: {
|
|
36
|
+
scenarioId: 'website',
|
|
37
|
+
template: { id: templateId, version: templateVersion },
|
|
38
|
+
},
|
|
39
|
+
schema: { type: 'object', properties },
|
|
40
|
+
store: { defaultValues: {}, type: 'base' },
|
|
41
|
+
});
|
|
42
|
+
export const createWebsiteNavigation = () => ({
|
|
43
|
+
type: 'void',
|
|
44
|
+
'x-component': 'Flex',
|
|
45
|
+
'x-component-props': {
|
|
46
|
+
align: 'center',
|
|
47
|
+
gap: 20,
|
|
48
|
+
justify: 'space-between',
|
|
49
|
+
wrap: true,
|
|
50
|
+
style: {
|
|
51
|
+
background: '#ffffff',
|
|
52
|
+
borderBottom: '1px solid #e4e5df',
|
|
53
|
+
padding: '18px 28px',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
properties: {
|
|
57
|
+
brand: {
|
|
58
|
+
type: 'void',
|
|
59
|
+
'x-component': 'Text',
|
|
60
|
+
'x-component-props': {
|
|
61
|
+
children: 'YIMOKA / STUDIO',
|
|
62
|
+
strong: true,
|
|
63
|
+
style: { color: INK, fontSize: 15, letterSpacing: 1.4 },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
links: {
|
|
67
|
+
type: 'void',
|
|
68
|
+
'x-component': 'Space',
|
|
69
|
+
'x-component-props': { size: 20, wrap: true },
|
|
70
|
+
properties: {
|
|
71
|
+
home: {
|
|
72
|
+
type: 'void',
|
|
73
|
+
'x-component': 'Link',
|
|
74
|
+
'x-component-props': {
|
|
75
|
+
children: '首页',
|
|
76
|
+
href: '/demos/runtime/website/template-landing-home?view=preview',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
news: {
|
|
80
|
+
type: 'void',
|
|
81
|
+
'x-component': 'Link',
|
|
82
|
+
'x-component-props': {
|
|
83
|
+
children: '新闻',
|
|
84
|
+
href: '/demos/runtime/website/template-news-index?view=preview',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
about: {
|
|
88
|
+
type: 'void',
|
|
89
|
+
'x-component': 'Link',
|
|
90
|
+
'x-component-props': {
|
|
91
|
+
children: '关于',
|
|
92
|
+
href: '/demos/runtime/website/template-about?view=preview',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
contact: {
|
|
96
|
+
type: 'void',
|
|
97
|
+
'x-component': 'Button',
|
|
98
|
+
'x-component-props': {
|
|
99
|
+
children: '开始合作',
|
|
100
|
+
href: '/demos/runtime/website/template-contact?view=preview',
|
|
101
|
+
style: { borderRadius: 999 },
|
|
102
|
+
type: 'primary',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
export const createWebsiteFooter = () => ({
|
|
110
|
+
type: 'void',
|
|
111
|
+
'x-component': 'Flex',
|
|
112
|
+
'x-component-props': {
|
|
113
|
+
align: 'center',
|
|
114
|
+
gap: 16,
|
|
115
|
+
justify: 'space-between',
|
|
116
|
+
wrap: true,
|
|
117
|
+
style: { background: INK, color: '#ffffff', padding: '34px 28px' },
|
|
118
|
+
},
|
|
119
|
+
properties: {
|
|
120
|
+
brand: {
|
|
121
|
+
type: 'void',
|
|
122
|
+
'x-component': 'Text',
|
|
123
|
+
'x-component-props': {
|
|
124
|
+
children: 'YIMOKA / 让复杂变得清晰',
|
|
125
|
+
strong: true,
|
|
126
|
+
style: { color: '#ffffff' },
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
copyright: {
|
|
130
|
+
type: 'void',
|
|
131
|
+
'x-component': 'Text',
|
|
132
|
+
'x-component-props': {
|
|
133
|
+
children: '© 2026 Yimoka Studio',
|
|
134
|
+
style: { color: '#a8abb3', fontSize: 12 },
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
export const createNewsCard = (category, date, title, summary) => ({
|
|
140
|
+
type: 'void',
|
|
141
|
+
'x-component': 'Card',
|
|
142
|
+
'x-component-props': {
|
|
143
|
+
bordered: false,
|
|
144
|
+
hoverable: true,
|
|
145
|
+
style: {
|
|
146
|
+
background: '#ffffff',
|
|
147
|
+
border: '1px solid #e3e4de',
|
|
148
|
+
borderRadius: 18,
|
|
149
|
+
height: '100%',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
properties: {
|
|
153
|
+
meta: {
|
|
154
|
+
type: 'void',
|
|
155
|
+
'x-component': 'Flex',
|
|
156
|
+
'x-component-props': { justify: 'space-between', style: { marginBottom: 28 } },
|
|
157
|
+
properties: {
|
|
158
|
+
category: {
|
|
159
|
+
type: 'void',
|
|
160
|
+
'x-component': 'Tag',
|
|
161
|
+
'x-component-props': { children: category, color: 'default' },
|
|
162
|
+
},
|
|
163
|
+
date: {
|
|
164
|
+
type: 'void',
|
|
165
|
+
'x-component': 'Text',
|
|
166
|
+
'x-component-props': { children: date, style: { color: MUTED, fontSize: 12 } },
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
title: {
|
|
171
|
+
type: 'void',
|
|
172
|
+
'x-component': 'Text',
|
|
173
|
+
'x-component-props': {
|
|
174
|
+
children: title,
|
|
175
|
+
strong: true,
|
|
176
|
+
style: {
|
|
177
|
+
color: INK,
|
|
178
|
+
display: 'block',
|
|
179
|
+
fontSize: 22,
|
|
180
|
+
lineHeight: 1.35,
|
|
181
|
+
marginBottom: 14,
|
|
182
|
+
overflowWrap: 'anywhere',
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
summary: {
|
|
187
|
+
type: 'void',
|
|
188
|
+
'x-component': 'Text',
|
|
189
|
+
'x-component-props': {
|
|
190
|
+
children: summary,
|
|
191
|
+
style: {
|
|
192
|
+
color: MUTED,
|
|
193
|
+
display: 'block',
|
|
194
|
+
lineHeight: 1.75,
|
|
195
|
+
marginBottom: 24,
|
|
196
|
+
overflowWrap: 'anywhere',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
action: {
|
|
201
|
+
type: 'void',
|
|
202
|
+
'x-component': 'Link',
|
|
203
|
+
'x-component-props': {
|
|
204
|
+
children: '阅读文章 →',
|
|
205
|
+
href: '/demos/runtime/website/template-news-detail?view=preview',
|
|
206
|
+
strong: true,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const landingHomeTemplateDocumentV2Source: import("./contracts").RuntimeDocumentV1;
|
|
2
|
+
export declare const newsIndexTemplateDocumentSource: import("./contracts").RuntimeDocumentV1;
|
|
3
|
+
export declare const newsDetailTemplateDocumentSource: import("./contracts").RuntimeDocumentV1;
|
|
4
|
+
export declare const aboutTemplateDocumentSource: import("./contracts").RuntimeDocumentV1;
|
|
5
|
+
export { contactTemplateDocumentSource } from "./website-contact-template.js";
|