@hubspot/ui-extensions-sdk-api-metadata 0.11.6
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 +54 -0
- package/dist/__generated__/component-props.d.ts +2 -0
- package/dist/__generated__/component-props.js +19611 -0
- package/package.json +38 -0
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @hubspot/ui-extensions-sdk-api-metadata
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@hubspot/ui-extensions-sdk-api-metadata)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
This package provides machine-readable API metadata for the [HubSpot UI Extensions SDK](https://www.npmjs.com/package/@hubspot/ui-extensions). It contains extracted TypeScript type information for component props and other exported types from the SDK.
|
|
7
|
+
|
|
8
|
+
## ⚠️ Internal Use Only
|
|
9
|
+
|
|
10
|
+
**This package is intended for internal HubSpot tooling and is not designed for direct use by extension developers.** If you're building UI extensions for HubSpot, please use the [`@hubspot/ui-extensions`](https://www.npmjs.com/package/@hubspot/ui-extensions) package instead.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
This package currently serves as a data source for documentation generation tools. In the future, it may be used by other tools that need programmatic access to SDK type information.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @hubspot/ui-extensions-sdk-api-metadata
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { componentPropsReader } from '@hubspot/ui-extensions-sdk-api-metadata/component-props';
|
|
26
|
+
|
|
27
|
+
// Find a specific component's props by export name
|
|
28
|
+
const buttonProps = componentPropsReader.findExportByName({
|
|
29
|
+
exportName: 'ButtonProps',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Look up a referenced type by its ID
|
|
33
|
+
const referencedType = componentPropsReader.findReferencedTypeById(typeId);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## API
|
|
37
|
+
|
|
38
|
+
The package exports a `componentPropsReader` object implementing the `AnalyzeResultReader` interface:
|
|
39
|
+
|
|
40
|
+
| Method | Description |
|
|
41
|
+
|--------|-------------|
|
|
42
|
+
| `findExportByName(options)` | Finds an export by its name and path |
|
|
43
|
+
| `findReferencedTypeById(typeId)` | Finds a referenced type by its unique identifier |
|
|
44
|
+
|
|
45
|
+
See [`@hubspot/ts-export-types-reader`](https://www.npmjs.com/package/@hubspot/ts-export-types-reader) for more details.
|
|
46
|
+
|
|
47
|
+
## Related Packages
|
|
48
|
+
|
|
49
|
+
- [`@hubspot/ui-extensions`](https://www.npmjs.com/package/@hubspot/ui-extensions) — The main SDK for building HubSpot UI extensions
|
|
50
|
+
- [`@hubspot/ts-export-types-reader`](https://www.npmjs.com/package/@hubspot/ts-export-types-reader) — Runtime reader for extracted type metadata
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT © HubSpot
|