@cmssy/types 0.1.2 → 0.3.0
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 +1 -1
- package/dist/block.d.ts +2 -7
- package/dist/block.d.ts.map +1 -1
- package/dist/block.js +1 -1
- package/dist/block.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/template.d.ts +7 -12
- package/dist/template.d.ts.map +1 -1
- package/dist/template.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ const config: BlockConfig = {
|
|
|
37
37
|
- **Layout**: `LayoutPosition`, `LayoutOverride`
|
|
38
38
|
- **Modules**: `WorkspaceModule`, `FeatureFlag`, `BlockRequires`
|
|
39
39
|
- **Block Config**: `BlockConfig`, `BlockSource`, `PackageType`
|
|
40
|
-
- **Template Config**: `TemplateConfig`, `TemplatePageBlueprint`, `
|
|
40
|
+
- **Template Config**: `TemplateConfig`, `TemplatePageBlueprint`, `TemplateLayoutPosition`
|
|
41
41
|
|
|
42
42
|
## Development
|
|
43
43
|
|
package/dist/block.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface BlockConfig {
|
|
|
12
12
|
name: string;
|
|
13
13
|
/** Short description */
|
|
14
14
|
description?: string;
|
|
15
|
-
/** Long description for
|
|
15
|
+
/** Long description for design library listing */
|
|
16
16
|
longDescription?: string;
|
|
17
17
|
/** Category for organization */
|
|
18
18
|
category: string;
|
|
@@ -26,17 +26,12 @@ export interface BlockConfig {
|
|
|
26
26
|
layoutPosition?: LayoutPosition;
|
|
27
27
|
/** Platform features this block needs */
|
|
28
28
|
requires?: BlockRequires;
|
|
29
|
-
/** Pricing configuration */
|
|
30
|
-
pricing?: {
|
|
31
|
-
licenseType: "free" | "paid";
|
|
32
|
-
priceCents?: number;
|
|
33
|
-
};
|
|
34
29
|
}
|
|
35
30
|
/**
|
|
36
31
|
* Block source types.
|
|
37
32
|
*/
|
|
38
33
|
export declare const BlockSource: {
|
|
39
|
-
readonly
|
|
34
|
+
readonly LIBRARY: "library";
|
|
40
35
|
readonly CUSTOM: "custom";
|
|
41
36
|
};
|
|
42
37
|
export type BlockSource = (typeof BlockSource)[keyof typeof BlockSource];
|
package/dist/block.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../src/block.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../src/block.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAEpC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,sEAAsE;IACtE,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,aAAa,CAAC;CAE1B;AAMD;;GAEG;AACH,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/block.js
CHANGED
package/dist/block.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.js","sourceRoot":"","sources":["../src/block.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"block.js","sourceRoot":"","sources":["../src/block.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuCH,gFAAgF;AAChF,eAAe;AACf,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACZ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export { FieldType, fieldTypeValues, type FieldValidation, type ValidationPatter
|
|
|
8
8
|
export { LayoutPosition, layoutPositionValues, LayoutOverrideAction, type LayoutOverride, } from "./layout.js";
|
|
9
9
|
export { WorkspaceModule, workspaceModuleValues, FeatureFlag, featureFlagValues, type BlockRequires, } from "./modules.js";
|
|
10
10
|
export { type BlockConfig, BlockSource, PackageType, } from "./block.js";
|
|
11
|
-
export { type TemplateBlockInstance, type TemplatePageBlueprint, type
|
|
11
|
+
export { type TemplateBlockInstance, type TemplatePageBlueprint, type TemplateLayoutPosition, type TemplateTheme, type TemplateConfig, type ResourceConfig, isTemplateConfig, } from "./template.js";
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,SAAS,EACT,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EACX,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,SAAS,EACT,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,KAAK,WAAW,EAChB,WAAW,EACX,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
|
package/dist/template.d.ts
CHANGED
|
@@ -30,11 +30,11 @@ export interface TemplatePageBlueprint {
|
|
|
30
30
|
metadata?: Record<string, unknown>;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Layout
|
|
33
|
+
* Layout position configuration for site-wide elements.
|
|
34
34
|
*/
|
|
35
|
-
export interface
|
|
36
|
-
/** Layout position */
|
|
37
|
-
|
|
35
|
+
export interface TemplateLayoutPosition {
|
|
36
|
+
/** Layout position (header, footer, sidebar_left, etc.) */
|
|
37
|
+
position: LayoutPosition;
|
|
38
38
|
/** Block type to use */
|
|
39
39
|
type: string;
|
|
40
40
|
/** Block content/props */
|
|
@@ -61,7 +61,7 @@ export interface TemplateConfig {
|
|
|
61
61
|
name: string;
|
|
62
62
|
/** Template description */
|
|
63
63
|
description?: string;
|
|
64
|
-
/** Long description for
|
|
64
|
+
/** Long description for design library listing */
|
|
65
65
|
longDescription?: string;
|
|
66
66
|
/** Category */
|
|
67
67
|
category?: string;
|
|
@@ -69,17 +69,12 @@ export interface TemplateConfig {
|
|
|
69
69
|
tags?: string[];
|
|
70
70
|
/** Pages in this template */
|
|
71
71
|
pages: TemplatePageBlueprint[];
|
|
72
|
-
/** Layout
|
|
73
|
-
|
|
72
|
+
/** Layout positions shared across all pages (header, footer, sidebars, etc.) */
|
|
73
|
+
layoutPositions?: TemplateLayoutPosition[];
|
|
74
74
|
/** Theme configuration */
|
|
75
75
|
theme?: TemplateTheme;
|
|
76
76
|
/** Optional schema for template-level settings */
|
|
77
77
|
schema?: Record<string, FieldConfig>;
|
|
78
|
-
/** Pricing configuration */
|
|
79
|
-
pricing?: {
|
|
80
|
-
licenseType: "free" | "paid";
|
|
81
|
-
priceCents?: number;
|
|
82
|
-
};
|
|
83
78
|
}
|
|
84
79
|
import type { BlockConfig } from "./block.js";
|
|
85
80
|
export type ResourceConfig = BlockConfig | TemplateConfig;
|
package/dist/template.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMlD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,qBAAqB;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM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AAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAMD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,6BAA6B;IAC7B,KAAK,EAAE,qBAAqB,EAAE,CAAC;IAE/B,gFAAgF;IAChF,eAAe,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAE3C,0BAA0B;IAC1B,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAEtC;AAMD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,cAAc,CAAC;AAE1D;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,IAAI,cAAc,CAEjF"}
|
package/dist/template.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA;;GAEG;AA4GH;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAsB;IACrD,OAAO,OAAO,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,CAAE,MAAyB,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|