@kanso-protocol/core 0.1.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.
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Kanso Protocol — Core Types
3
+ *
4
+ * These types define the shared API contract for all components.
5
+ * Every interactive component MUST use these types consistently.
6
+ */
7
+ /** Size-to-value mappings */
8
+ const KP_SIZES = {
9
+ xs: 24,
10
+ sm: 28,
11
+ md: 36,
12
+ lg: 44,
13
+ xl: 52,
14
+ };
15
+ const KP_RADII = {
16
+ xs: 8,
17
+ sm: 10,
18
+ md: 12,
19
+ lg: 14,
20
+ xl: 16,
21
+ };
22
+ const KP_ICON_SIZES = {
23
+ xs: 14,
24
+ sm: 16,
25
+ md: 18,
26
+ lg: 22,
27
+ xl: 24,
28
+ };
29
+
30
+ // Kanso Protocol — Core
31
+ // This file re-exports generated token constants and core utilities.
32
+ // Generated tokens will be available after running `npm run build:tokens`
33
+ // import { kpColorPrimaryDefaultBgRest } from './_generated/tokens';
34
+
35
+ /**
36
+ * Generated bundle index. Do not edit.
37
+ */
38
+
39
+ export { KP_ICON_SIZES, KP_RADII, KP_SIZES };
40
+ //# sourceMappingURL=kanso-protocol-core.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kanso-protocol-core.mjs","sources":["../../../../packages/core/src/lib/types.ts","../../../../packages/core/src/index.ts","../../../../packages/core/src/kanso-protocol-core.ts"],"sourcesContent":["/**\n * Kanso Protocol — Core Types\n *\n * These types define the shared API contract for all components.\n * Every interactive component MUST use these types consistently.\n */\n\n/** Component size scale */\nexport type KpSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Visual variant */\nexport type KpVariant = 'default' | 'subtle' | 'outline' | 'ghost';\n\n/** Color role */\nexport type KpColorRole = 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info' | 'neutral';\n\n/** Interactive component states (for documentation/testing) */\nexport type KpState = 'rest' | 'hover' | 'active' | 'focus' | 'disabled' | 'loading' | 'error';\n\n/** Size-to-value mappings */\nexport const KP_SIZES: Record<KpSize, number> = {\n xs: 24,\n sm: 28,\n md: 36,\n lg: 44,\n xl: 52,\n};\n\nexport const KP_RADII: Record<KpSize, number> = {\n xs: 8,\n sm: 10,\n md: 12,\n lg: 14,\n xl: 16,\n};\n\nexport const KP_ICON_SIZES: Record<KpSize, number> = {\n xs: 14,\n sm: 16,\n md: 18,\n lg: 22,\n xl: 24,\n};\n","// Kanso Protocol — Core\n// This file re-exports generated token constants and core utilities.\n\n// Generated tokens will be available after running `npm run build:tokens`\n// import { kpColorPrimaryDefaultBgRest } from './_generated/tokens';\n\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;AAKG;AAcH;AACO,MAAM,QAAQ,GAA2B;AAC9C,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;;AAGD,MAAM,QAAQ,GAA2B;AAC9C,IAAA,EAAE,EAAE,CAAC;AACL,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;;AAGD,MAAM,aAAa,GAA2B;AACnD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;;;ACzCR;AACA;AAEA;AACA;;ACJA;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@kanso-protocol/core",
3
+ "version": "0.1.0",
4
+ "description": "Kanso Protocol — core design tokens (CSS/SCSS variables + generated TS constants).",
5
+ "license": "MIT",
6
+ "author": "GregNBlack",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/GregNBlack/kanso-protocol.git",
10
+ "directory": "packages/core"
11
+ },
12
+ "homepage": "https://gregnblack.github.io/kanso-protocol",
13
+ "bugs": "https://github.com/GregNBlack/kanso-protocol/issues",
14
+ "keywords": [
15
+ "design-system",
16
+ "design-tokens",
17
+ "angular",
18
+ "kanso",
19
+ "dtcg"
20
+ ],
21
+ "sideEffects": false,
22
+ "peerDependencies": {
23
+ "@angular/core": ">=18.0.0"
24
+ },
25
+ "module": "fesm2022/kanso-protocol-core.mjs",
26
+ "typings": "types/kanso-protocol-core.d.ts",
27
+ "exports": {
28
+ "./package.json": {
29
+ "default": "./package.json"
30
+ },
31
+ ".": {
32
+ "types": "./types/kanso-protocol-core.d.ts",
33
+ "default": "./fesm2022/kanso-protocol-core.mjs"
34
+ }
35
+ },
36
+ "type": "module",
37
+ "dependencies": {
38
+ "tslib": "^2.3.0"
39
+ }
40
+ }