@canonical/ds-types 0.12.0-experimental.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 ADDED
@@ -0,0 +1,60 @@
1
+ # @canonical/ds-types
2
+
3
+ TypeScript types for modifier families and component props in the Pragma design system.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ bun add @canonical/ds-types
9
+ ```
10
+
11
+ ## Modifier Families
12
+
13
+ A modifier family is a set of related visual variants that components can support. Instead of accepting arbitrary strings for appearance props, components use modifier family types to ensure type safety and enable IDE autocomplete.
14
+
15
+ The package currently defines two modifier families:
16
+
17
+ **severity** controls intent-based colouring for communicating status or importance:
18
+ - `neutral` - Default state with no specific intent
19
+ - `positive` - Success, confirmation, or approval
20
+ - `negative` - Error, danger, or destructive actions
21
+ - `caution` - Warning or attention required
22
+ - `information` - Informational content
23
+
24
+ **emphasis** controls visual prominence:
25
+ - `neutral` - Standard presentation
26
+ - `highlighted` - Increased visual weight
27
+ - `muted` - Reduced visual weight
28
+ - `accented` - Brand or accent colouring
29
+
30
+ ## Usage
31
+
32
+ Import the `ModifierFamily` type helper and use it to constrain props:
33
+
34
+ ```typescript
35
+ import type { ModifierFamily } from "@canonical/ds-types";
36
+
37
+ interface ButtonProps {
38
+ appearance?: ModifierFamily<"severity">;
39
+ }
40
+ ```
41
+
42
+ The `ModifierFamily<"severity">` type resolves to the union `"neutral" | "positive" | "negative" | "caution" | "information"`. TypeScript will reject invalid values at compile time.
43
+
44
+ ## Runtime Constants
45
+
46
+ The same values are available as runtime constants for cases where you need to iterate over options or validate user input:
47
+
48
+ ```typescript
49
+ import { MODIFIER_FAMILIES } from "@canonical/ds-types";
50
+
51
+ // MODIFIER_FAMILIES.severity = ["neutral", "positive", "negative", "caution", "information"]
52
+ // MODIFIER_FAMILIES.emphasis = ["neutral", "highlighted", "muted", "accented"]
53
+
54
+ const isValidSeverity = (value: string): value is ModifierFamily<"severity"> =>
55
+ MODIFIER_FAMILIES.severity.includes(value as ModifierFamily<"severity">);
56
+ ```
57
+
58
+ ## Design System Ontology
59
+
60
+ The modifier families defined in this package derive from the [Design System Ontology](https://github.com/canonical/design-system). The ontology provides the authoritative specification for which modifiers exist and their semantic meaning. Changes to modifier families should originate in the ontology and propagate to this package to maintain consistency between design specifications and implementation.
@@ -0,0 +1,3 @@
1
+ export * from "./modifierFamilies/index.js";
2
+ export * from "./navigation/index.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,19 @@
1
+ export const MODIFIER_FAMILIES = {
2
+ /** @implements ds:global.modifier_family.anticipation */
3
+ anticipation: ["constructive", "caution", "destructive"],
4
+ /** @implements ds:global.modifier_family.criticality */
5
+ criticality: ["success", "error", "warning", "information"],
6
+ /** @implements ds:global.modifier_family.density */
7
+ density: ["dense", "comfortable"],
8
+ /** @implements ds:global.modifier_family.emphasis */
9
+ emphasis: ["primary", "secondary", "tertiary"],
10
+ /** @implements ds:global.modifier_family.importance */
11
+ importance: ["primary", "secondary", "tertiary"],
12
+ /** @implements ds:global.modifier_family.lifecycle */
13
+ lifecycle: ["planned", "in_progress", "completed", "failed"],
14
+ /** @implements ds:global.modifier_family.release */
15
+ release: ["alpha", "beta", "experimental", "stable"],
16
+ /** @implements ds:global.modifier_family.severity */
17
+ severity: ["neutral", "positive", "negative", "caution", "information"],
18
+ };
19
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/modifierFamilies/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,yDAAyD;IACzD,YAAY,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,aAAa,CAAC;IACxD,wDAAwD;IACxD,WAAW,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC;IAC3D,oDAAoD;IACpD,OAAO,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC;IACjC,qDAAqD;IACrD,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC;IAC9C,uDAAuD;IACvD,UAAU,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC;IAChD,sDAAsD;IACtD,SAAS,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,CAAC;IAC5D,oDAAoD;IACpD,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,CAAC;IACpD,qDAAqD;IACrD,QAAQ,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,CAAC;CAC/D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./constants.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modifierFamilies/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modifierFamilies/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Get the unique identifier for an item (url or key)
3
+ *
4
+ * @throws Error if item has neither url nor key
5
+ */
6
+ export function getItemId(item) {
7
+ if (item.url)
8
+ return item.url;
9
+ if (item.key)
10
+ return item.key;
11
+ throw new Error("Item must have either url or key");
12
+ }
13
+ /**
14
+ * Annotate a navigation tree with parent references and depth
15
+ *
16
+ * Transforms Item tree into _Item tree with parentUrl and depth.
17
+ *
18
+ * @param root - The root item to annotate
19
+ * @param parentUrl - Parent URL (null for root)
20
+ * @param depth - Current depth (0 for root)
21
+ * @returns Annotated item tree
22
+ */
23
+ export function annotateTree(root, parentUrl = null, depth = 0) {
24
+ const { items, ...rest } = root;
25
+ const annotated = {
26
+ ...rest,
27
+ parentUrl,
28
+ depth,
29
+ };
30
+ if (items) {
31
+ annotated.items = items.map((child) => annotateTree(child, getItemId(root), depth + 1));
32
+ }
33
+ return annotated;
34
+ }
35
+ /**
36
+ * Create an index for O(1) lookup of items by URL or key
37
+ *
38
+ * @param root - The annotated root item
39
+ * @returns Index mapping URL/key to item
40
+ */
41
+ export function prepareIndex(root) {
42
+ const index = {};
43
+ const stack = [root];
44
+ while (stack.length > 0) {
45
+ const item = stack.pop();
46
+ if (!item)
47
+ continue;
48
+ const id = getItemId(item);
49
+ index[id] = item;
50
+ if (item.items) {
51
+ for (let i = item.items.length - 1; i >= 0; i--) {
52
+ stack.push(item.items[i]);
53
+ }
54
+ }
55
+ }
56
+ return index;
57
+ }
58
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/navigation/helpers.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAkB;IAC1C,IAAI,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC;IAC9B,IAAI,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC;IAC9B,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAC1B,IAAU,EACV,YAA2B,IAAI,EAC/B,KAAK,GAAG,CAAC;IAET,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IAChC,MAAM,SAAS,GAAU;QACvB,GAAG,IAAI;QACP,SAAS;QACT,KAAK;KACN,CAAC;IACF,IAAI,KAAK,EAAE,CAAC;QACV,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACpC,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAChD,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAW;IACtC,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,MAAM,KAAK,GAAY,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,MAAM,EAAE,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3B,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;QACjB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBAChD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/navigation/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from "./modifierFamilies/index.js";
2
+ export * from "./navigation/index.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare const MODIFIER_FAMILIES: {
2
+ /** @implements ds:global.modifier_family.anticipation */
3
+ readonly anticipation: readonly ["constructive", "caution", "destructive"];
4
+ /** @implements ds:global.modifier_family.criticality */
5
+ readonly criticality: readonly ["success", "error", "warning", "information"];
6
+ /** @implements ds:global.modifier_family.density */
7
+ readonly density: readonly ["dense", "comfortable"];
8
+ /** @implements ds:global.modifier_family.emphasis */
9
+ readonly emphasis: readonly ["primary", "secondary", "tertiary"];
10
+ /** @implements ds:global.modifier_family.importance */
11
+ readonly importance: readonly ["primary", "secondary", "tertiary"];
12
+ /** @implements ds:global.modifier_family.lifecycle */
13
+ readonly lifecycle: readonly ["planned", "in_progress", "completed", "failed"];
14
+ /** @implements ds:global.modifier_family.release */
15
+ readonly release: readonly ["alpha", "beta", "experimental", "stable"];
16
+ /** @implements ds:global.modifier_family.severity */
17
+ readonly severity: readonly ["neutral", "positive", "negative", "caution", "information"];
18
+ };
19
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modifierFamilies/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;IAC5B,yDAAyD;;IAEzD,wDAAwD;;IAExD,oDAAoD;;IAEpD,qDAAqD;;IAErD,uDAAuD;;IAEvD,sDAAsD;;IAEtD,oDAAoD;;IAEpD,qDAAqD;;CAE7C,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./constants.js";
2
+ export type * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modifierFamilies/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { MODIFIER_FAMILIES } from "./constants.js";
2
+ /**
3
+ * A helper type that extracts the union type of a modifier family
4
+ * e.g. `ModifierFamily<'severity'>` will resolve to `'neutral' | 'positive' | 'negative' | 'caution' | 'information'`
5
+ */
6
+ export type ModifierFamily<T extends keyof typeof MODIFIER_FAMILIES> = (typeof MODIFIER_FAMILIES)[T][number];
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modifierFamilies/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,OAAO,iBAAiB,IACjE,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { _Index, _Item, Item } from "./types.js";
2
+ /**
3
+ * Get the unique identifier for an item (url or key)
4
+ *
5
+ * @throws Error if item has neither url nor key
6
+ */
7
+ export declare function getItemId(item: Item | _Item): string;
8
+ /**
9
+ * Annotate a navigation tree with parent references and depth
10
+ *
11
+ * Transforms Item tree into _Item tree with parentUrl and depth.
12
+ *
13
+ * @param root - The root item to annotate
14
+ * @param parentUrl - Parent URL (null for root)
15
+ * @param depth - Current depth (0 for root)
16
+ * @returns Annotated item tree
17
+ */
18
+ export declare function annotateTree(root: Item, parentUrl?: string | null, depth?: number): _Item;
19
+ /**
20
+ * Create an index for O(1) lookup of items by URL or key
21
+ *
22
+ * @param root - The annotated root item
23
+ * @returns Index mapping URL/key to item
24
+ */
25
+ export declare function prepareIndex(root: _Item): _Index;
26
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,MAAM,CAIpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,SAAS,GAAE,MAAM,GAAG,IAAW,EAC/B,KAAK,SAAI,GACR,KAAK,CAaP;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,CAehD"}
@@ -0,0 +1,2 @@
1
+ export type * from "./types.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,92 @@
1
+ import type { ComponentType } from "react";
2
+ /**
3
+ * Default component type for navigation items.
4
+ * A component that accepts any props.
5
+ */
6
+ export type DefaultComponent = ComponentType<any>;
7
+ /**
8
+ * Navigation item - Public API (WD405)
9
+ *
10
+ * A unified type for navigation items across the design system.
11
+ * Used by Breadcrumbs, SiteNavigation, FileTree, MegaMenu, etc.
12
+ *
13
+ * @template C - Custom component type for rendering the item
14
+ */
15
+ export interface Item<C = DefaultComponent> {
16
+ /**
17
+ * Unique identifier for the item when a URL is not provided.
18
+ * e.g. 'section-header' for a non-navigable grouping item.
19
+ */
20
+ key?: string;
21
+ /**
22
+ * Navigation URL for the item, used for navigable links.
23
+ * e.g. '/dashboard' for directing to the dashboard page.
24
+ */
25
+ url?: string;
26
+ /**
27
+ * Display text for the item in the navigation UI.
28
+ * e.g. 'Dashboard' as the visible label.
29
+ */
30
+ label?: string;
31
+ /**
32
+ * Flag indicating whether the item is interactive or disabled.
33
+ * e.g. true to prevent clicks on unavailable features.
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * CSS class name for custom styling of the item.
38
+ * e.g. 'nav-item-active' to highlight the current page.
39
+ */
40
+ className?: string;
41
+ /**
42
+ * Array of child items for nested navigation structures.
43
+ * e.g. Submenu items under a parent like 'Settings'.
44
+ */
45
+ items?: Item<C>[];
46
+ /**
47
+ * Enum value determining the type of display for items.
48
+ * e.g. 'list' for rendering as a simple list.
49
+ */
50
+ displayItemsType?: "default" | "custom";
51
+ /**
52
+ * Custom component for rendering the item itself.
53
+ * e.g. A specialized renderer for complex items.
54
+ */
55
+ Component?: C;
56
+ }
57
+ /**
58
+ * Annotated navigation item - Private API (WD405)
59
+ *
60
+ * Internal type with parent reference and depth annotations.
61
+ * Generated by annotateTree() helper.
62
+ *
63
+ * @template C - Custom component type for rendering the item
64
+ */
65
+ export interface _Item<C = DefaultComponent> extends Item<C> {
66
+ /**
67
+ * URL (or key) of the parent item in the navigation hierarchy.
68
+ * e.g. '/parent' for a child item under '/parent', or null for the root.
69
+ */
70
+ parentUrl: string | null;
71
+ /**
72
+ * Integer representing the nesting level in the tree.
73
+ * e.g. 0 for top-level items, 1 for their children, 2 for grandchildren.
74
+ */
75
+ depth: number;
76
+ /**
77
+ * Array of annotated child items, if any.
78
+ * e.g. Prepared sub-items with their own parentUrl and depth.
79
+ */
80
+ items?: _Item<C>[];
81
+ }
82
+ /**
83
+ * Index for quick lookup of items by URL or key - Private API (WD405)
84
+ *
85
+ * A dictionary for O(1) lookup of prepared items.
86
+ *
87
+ * @template C - Custom component type for rendering the item
88
+ */
89
+ export type _Index<C = DefaultComponent> = {
90
+ [url: string]: _Item<C>;
91
+ };
92
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;GAGG;AAEH,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI,CAAC,CAAC,GAAG,gBAAgB;IACxC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAElB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAExC;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,IAAI,CAAC,CAAC,CAAC;IAC1D;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG,gBAAgB,IAAI;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;CACzB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@canonical/ds-types",
3
+ "description": "Types and related type utilities for Pragma.",
4
+ "version": "0.12.0-experimental.0",
5
+ "type": "module",
6
+ "main": "dist/esm/index.js",
7
+ "module": "dist/esm/index.js",
8
+ "types": "dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/esm/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "author": {
19
+ "email": "webteam@canonical.com",
20
+ "name": "Canonical Webteam"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/canonical/ds25"
25
+ },
26
+ "license": "LGPL-3.0",
27
+ "bugs": {
28
+ "url": "https://github.com/canonical/ds25/issues"
29
+ },
30
+ "homepage": "https://github.com/canonical/ds25#readme",
31
+ "scripts": {
32
+ "build": "bun run build:package",
33
+ "build:all": "bun run build:package",
34
+ "build:package": "bun run build:package:tsc",
35
+ "build:package:tsc": "tsc -p tsconfig.build.json",
36
+ "check": "bun run check:biome && bun run check:ts && bun run check:webarchitect",
37
+ "check:webarchitect": "webarchitect library",
38
+ "check:fix": "bun run check:biome:fix && bun run check:ts",
39
+ "check:biome": "biome check",
40
+ "check:biome:fix": "biome check --write",
41
+ "check:ts": "tsc --noEmit",
42
+ "test": "echo 'No tests defined yet'"
43
+ },
44
+ "devDependencies": {
45
+ "@biomejs/biome": "2.3.11",
46
+ "@canonical/biome-config": "^0.11.0",
47
+ "@canonical/typescript-config-base": "^0.11.0",
48
+ "@canonical/webarchitect": "^0.12.0-experimental.0",
49
+ "typescript": "^5.9.3"
50
+ }
51
+ }