@enyxs/wikex-components 0.8.11

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 ADDED
@@ -0,0 +1,57 @@
1
+ # @enyxs/wikex-components
2
+
3
+ Reusable Material UI blocks with CMS metadata and inline-edit support.
4
+
5
+ ## Included blocks
6
+
7
+ - `hero-banner`
8
+ - `feature-grid`
9
+ - `image-text`
10
+ - `call-to-action`
11
+ - `announcement-bar`
12
+ - `metrics-strip`
13
+ - `testimonial-grid`
14
+ - `faq-section`
15
+ - `pricing-plans`
16
+ - `logo-cloud`
17
+ - `site-header` (Minimal UI)
18
+ - `centered-header` (Minimal UI)
19
+ - `utility-header` (Minimal UI)
20
+ - `site-footer` (Minimal UI)
21
+ - `compact-footer` (Minimal UI)
22
+ - `newsletter-footer` (Minimal UI)
23
+ - `social-footer` (Minimal UI)
24
+ - `download-section` (Wikex)
25
+
26
+ All blocks except `download-section` are part of the `minimal-ui` library. The
27
+ `download-section` belongs to `wikex`, allowing hosts to show separate component libraries.
28
+
29
+ Wikex download assets are stored in `src/wikex/assets/download-section/`. Replace the placeholder
30
+ files there, then update `src/wikex/download-assets.ts` if the filenames or formats change.
31
+
32
+ ## Install
33
+
34
+ Before publishing to an npm registry, consume the versioned GitLab package:
35
+
36
+ ```bash
37
+ npm install git+ssh://git@gitlab.com/tamenyxs/wikex-components.git#v0.8.1
38
+ ```
39
+
40
+ ## Use with a CMS registry
41
+
42
+ ```ts
43
+ import { wikexCmsBlocks } from "@enyxs/wikex-components";
44
+
45
+ export const cmsCodeBlocks = [...wikexCmsBlocks];
46
+ ```
47
+
48
+ The package has React, Material UI and Emotion as peer dependencies, so the host app owns their versions.
49
+
50
+ ## Release
51
+
52
+ ```bash
53
+ npm run check
54
+ npm run build
55
+ git tag v0.8.1
56
+ git push origin main --tags
57
+ ```
@@ -0,0 +1,58 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ type CmsFieldType = "text" | "textarea" | "richText" | "image" | "link" | "number" | "select";
4
+ type CmsFieldDefinition = {
5
+ key: string;
6
+ label: string;
7
+ type: CmsFieldType;
8
+ group?: string;
9
+ placeholder?: string;
10
+ helperText?: string;
11
+ required?: boolean;
12
+ options?: Array<{
13
+ value: string;
14
+ label: string;
15
+ }>;
16
+ hidden?: boolean;
17
+ };
18
+ type CmsComponentCategory = "minimal-ui" | "wikex" | "estate";
19
+ type CmsComponentPlacement = "header" | "content" | "footer";
20
+ type CmsComponentDefinition = {
21
+ kind: "cms-component";
22
+ category: CmsComponentCategory;
23
+ placement?: CmsComponentPlacement;
24
+ type: string;
25
+ name: string;
26
+ description: string;
27
+ icon: string;
28
+ fields: CmsFieldDefinition[];
29
+ defaults: Record<string, string | number>;
30
+ };
31
+ type CmsRendererProps = {
32
+ content: Record<string, string | number>;
33
+ editable?: boolean;
34
+ readOnlyFields?: string[];
35
+ onChange?: (field: string, value: string) => void;
36
+ onImageRequest?: (field: string) => void;
37
+ };
38
+ type CmsBlock = {
39
+ definition: CmsComponentDefinition;
40
+ Renderer: ComponentType<CmsRendererProps>;
41
+ };
42
+
43
+ declare const minimalUiBlocks: CmsBlock[];
44
+
45
+ declare const minimalMarketingBlocks: CmsBlock[];
46
+
47
+ declare const siteChromeBlocks: CmsBlock[];
48
+
49
+ declare const estateBlocks: CmsBlock[];
50
+
51
+ declare const estateProjectPageBlocks: CmsBlock[];
52
+
53
+ declare const minimalUiComponents: CmsBlock[];
54
+ declare const wikexComponents: CmsBlock[];
55
+ declare const estateComponents: CmsBlock[];
56
+ declare const wikexCmsBlocks: CmsBlock[];
57
+
58
+ export { type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsFieldDefinition, type CmsFieldType, type CmsRendererProps, estateBlocks, estateComponents, estateProjectPageBlocks, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, siteChromeBlocks, wikexCmsBlocks, wikexComponents };
@@ -0,0 +1,58 @@
1
+ import { ComponentType } from 'react';
2
+
3
+ type CmsFieldType = "text" | "textarea" | "richText" | "image" | "link" | "number" | "select";
4
+ type CmsFieldDefinition = {
5
+ key: string;
6
+ label: string;
7
+ type: CmsFieldType;
8
+ group?: string;
9
+ placeholder?: string;
10
+ helperText?: string;
11
+ required?: boolean;
12
+ options?: Array<{
13
+ value: string;
14
+ label: string;
15
+ }>;
16
+ hidden?: boolean;
17
+ };
18
+ type CmsComponentCategory = "minimal-ui" | "wikex" | "estate";
19
+ type CmsComponentPlacement = "header" | "content" | "footer";
20
+ type CmsComponentDefinition = {
21
+ kind: "cms-component";
22
+ category: CmsComponentCategory;
23
+ placement?: CmsComponentPlacement;
24
+ type: string;
25
+ name: string;
26
+ description: string;
27
+ icon: string;
28
+ fields: CmsFieldDefinition[];
29
+ defaults: Record<string, string | number>;
30
+ };
31
+ type CmsRendererProps = {
32
+ content: Record<string, string | number>;
33
+ editable?: boolean;
34
+ readOnlyFields?: string[];
35
+ onChange?: (field: string, value: string) => void;
36
+ onImageRequest?: (field: string) => void;
37
+ };
38
+ type CmsBlock = {
39
+ definition: CmsComponentDefinition;
40
+ Renderer: ComponentType<CmsRendererProps>;
41
+ };
42
+
43
+ declare const minimalUiBlocks: CmsBlock[];
44
+
45
+ declare const minimalMarketingBlocks: CmsBlock[];
46
+
47
+ declare const siteChromeBlocks: CmsBlock[];
48
+
49
+ declare const estateBlocks: CmsBlock[];
50
+
51
+ declare const estateProjectPageBlocks: CmsBlock[];
52
+
53
+ declare const minimalUiComponents: CmsBlock[];
54
+ declare const wikexComponents: CmsBlock[];
55
+ declare const estateComponents: CmsBlock[];
56
+ declare const wikexCmsBlocks: CmsBlock[];
57
+
58
+ export { type CmsBlock, type CmsComponentCategory, type CmsComponentDefinition, type CmsComponentPlacement, type CmsFieldDefinition, type CmsFieldType, type CmsRendererProps, estateBlocks, estateComponents, estateProjectPageBlocks, minimalMarketingBlocks, minimalUiBlocks, minimalUiComponents, siteChromeBlocks, wikexCmsBlocks, wikexComponents };