@carbon-labs/utilities 0.16.0 → 0.18.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/es/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2024
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ export * from './settings/index.js';
11
+ export * from './usePrefix.js';
12
+
13
+ // Made with Bob
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2024
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ export { default as settings } from './settings.js';
11
+
12
+ // Made with Bob
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2024
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+
10
+ interface Settings {
11
+ /**
12
+ * Stable prefix for Carbon Labs components
13
+ * @default 'clabs'
14
+ */
15
+ stablePrefix: string;
16
+
17
+ /**
18
+ * Core Carbon prefix
19
+ * @default 'cds'
20
+ */
21
+ prefix: string;
22
+ }
23
+
24
+ declare const settings: Settings;
25
+
26
+ export default settings;
27
+
28
+ // Made with Bob
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import React from 'react';
9
+
10
+ export const PrefixContext: React.Context<string>;
11
+
12
+ /**
13
+ * Sets the prefix context
14
+ * @returns context value
15
+ */
16
+ export function usePrefix(): string;
17
+
18
+ // Made with Bob
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon-labs/utilities",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -13,19 +13,31 @@
13
13
  "url": "https://github.com/carbon-design-system/carbon-labs",
14
14
  "directory": "packages/utilities"
15
15
  },
16
+ "main": "./es/index.js",
17
+ "module": "./es/index.js",
18
+ "types": "./es/index.d.ts",
19
+ "sideEffects": false,
16
20
  "exports": {
17
21
  ".": {
18
- "default": "./src/index.js"
22
+ "types": "./es/index.d.ts",
23
+ "import": "./es/index.js",
24
+ "default": "./es/index.js"
19
25
  },
20
- "./es/": "./es/"
26
+ "./es/*": {
27
+ "types": "./es/*.d.ts",
28
+ "import": "./es/*",
29
+ "default": "./es/*"
30
+ }
21
31
  },
22
32
  "scripts": {
23
- "build": "yarn clean && babel src --quiet -d es",
24
- "clean": "rm -rf es"
33
+ "build": "bash scripts/build.sh",
34
+ "clean": "rimraf es"
25
35
  },
26
36
  "files": [
27
37
  "es/**/*.js",
28
- "es/index.js"
38
+ "es/**/*.d.ts",
39
+ "es/index.js",
40
+ "es/index.d.ts"
29
41
  ],
30
42
  "dependencies": {
31
43
  "react": "^18.3.1",
@@ -33,7 +45,8 @@
33
45
  },
34
46
  "devDependencies": {
35
47
  "@rollup/plugin-babel": "^6.0.4",
36
- "babel-cli": "^6.26.0"
48
+ "babel-cli": "^6.26.0",
49
+ "rimraf": "^6.0.1"
37
50
  },
38
- "gitHead": "a5745110a01ff799eb90643535370b87f17ea4fa"
51
+ "gitHead": "10256fd61b3a9e1298dcc82df501659d699f6bcf"
39
52
  }