open-index/open-npm huggingface dataset:
npm package: @polarityio/integration-types
Description: TypeScript type definitions for Polarity Integrations
Author: Polarity IO
Latest version: 1.0.3

# @polarityio/integration-types

TypeScript type definitions for building [Polarity](https://www.polarity.io) Integrations.

This package provides **types only** (no runtime code, no dependencies) so integrations can get full type safety without pulling in the runtime dependencies of `polarity-integration-utils`.

## Installation

```bash
npm install --save-dev @polarityio/integration-types
```

## Usage

```typescript
import type {
  Entity,
  DoLookupUserOptions,
  DoLookupResult,
  IntegrationContext,
  Integration
} from '@polarityio/integration-types';
```

## What's Included

| Module | Types |
|--------|-------|
| **Entity** | `Entity`, `EntityType`, `EntityTypeIdentifier`, `StandardEntityType`, `Channel`, `EntityPosition`, `RequestContext`, `OnDemandRequestContext`, `ScreenChangeRequestContext` |
| **Results** | `LookupResult<TDetails>`, `DoLookupResult<TDetails>` |
| **User Options** | `DoLookupUserOptions`, `ValidateOptionsUserOption`, `ValidateOptionsUserOptions`, `SelectTypeOptionValue`, `PossibleUserOptionValue`, `ValidationError` |
| **Context** | `IntegrationContext`, `PolarityCache`, `GlobalCache`, `IntegrationCache`, `UserCache`, `CacheOptions` |
| **Logging** | `Logger` |
| **Contract** | `Integration` |
| **Polling** | `Poll`, `PollSpec`, `IntervalPollSpec`, `CronPollSpec`, `PollFunction` |

## Notes

- This package exports **type definitions only** — no JavaScript is emitted.
- To create `IntegrationError` instances at runtime, use `polarity-integration-utils`.
- Types are kept in sync with the canonical definitions in `polarity-integration-utils`.

## License

MIT
npm package: @polarityio/pi-card
Description: Card container component with optional collapsible title bar and icon support
Latest version: 1.0.2

# Polarity Integration Component Library

## Card Component

A collapsible content container with an optional title bar, prefix/suffix icons, and expand/collapse functionality.

## Installation

```bash
npm install @polarityio/pi-card
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-card';
```

### Basic Card

```html
<pi-card card-title="Summary">
  <p>Card content goes here.</p>
</pi-card>
```

### Collapsible Card with Icons

```javascript
import { html } from 'lit';
import { faShieldHalved } from '@fortawesome/free-solid-svg-icons';

html`
  <pi-card
    card-title="Details"
    collapsible
    .prefixIcon=${faShieldHalved}
  >
    <p>This content can be expanded or collapsed.</p>
  </pi-card>
`;
```

### Custom Title Slot

```html
<pi-card collapsible>
  <span slot="title">
    <strong>Custom</strong> title content
  </span>
  <p>Card body content.</p>
</pi-card>
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `cardTitle` | `string` | `''` | Plain string title displayed in the title bar. Set via `card-title` attribute. |
| `prefixIcon` | `IconDefinition \| undefined` | `undefined` | FontAwesome icon displayed before the title text. |
| `suffixIcon` | `IconDefinition \| undefined` | `undefined` | FontAwesome icon displayed after the title text. |
| `collapsible` | `boolean` | `false` | Whether the card can be expanded/collapsed by clicking the title bar. |
| `expanded` | `boolean` | `true` | Whether the card content is visible. Only meaningful when `collapsible` is `true`. Reflected to attribute. |

### Events

| Event Name | Detail | Description |
| --- | --- | --- |
| `pi-card-toggle` | `{ expanded: boolean }` | Fired when the card is expanded or collapsed by user interaction. Bubbles and is composed. |

### Slots

| Slot Name | Description |
| --- | --- |
| _(default)_ | Card body content. |
| `title` | Custom title content. Takes priority over the `cardTitle` property. |

### CSS Custom Properties

| Property | Default | Description |
| --- | --- | --- |
| `--pi-card-background` | `var(--pi-color-background-container-base, #2c3240)` | Card background color. |
| `--pi-card-border-radius` | `var(--pi-size-radius-lg, 8px)` | Card border radius. |
| `--pi-card-title-padding` | `var(--pi-size-spacing-sm) var(--pi-size-spacing-md)` | Title bar padding. |
| `--pi-card-title-line-height` | `1rem` | Title bar line height. |
| `--pi-card-icon-size` | `0.85em` | Title icon size. |
| `--pi-card-icon-color` | `currentColor` | Title icon color. |

## Accessibility

- Title bar has `role="button"` when collapsible.
- Supports `tabindex="0"` for keyboard focus when collapsible.
- `aria-expanded` reflects the expanded state.
- Responds to Enter and Space key presses.

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

## License

MIT
npm package: @polarityio/pi-external-link
Description: External link component that opens in a new tab with icon and tooltip
Latest version: 1.0.2

# Polarity Integration Component Library

## External Link Component

A styled link that opens in a new tab with an external link icon and customizable hover tooltip.

## Installation

```bash
npm install @polarityio/pi-external-link
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-external-link';
```

```html
<!-- Basic link (displays the URL as text) -->
<pi-external-link href="https://example.com"></pi-external-link>

<!-- Link with custom display text -->
<pi-external-link href="https://example.com" text="Visit Example"></pi-external-link>

<!-- Link without icon -->
<pi-external-link href="https://example.com" text="Example" no-icon></pi-external-link>

<!-- Link with custom tooltip -->
<pi-external-link href="https://example.com" text="Example" tooltip-text="Opens in a new tab"></pi-external-link>

<!-- Link without tooltip -->
<pi-external-link href="https://example.com" text="Example" no-tooltip></pi-external-link>
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `href` | `string` | `''` | The destination URL. Component renders nothing when empty. |
| `text` | `string` | `''` | Display text for the link. Falls back to `href` if empty. |
| `noIcon` | `boolean` | `false` | Hides the external-link icon when `true` |
| `tooltipText` | `string` | `''` | Custom tooltip text. Defaults to showing the `href` when empty. |
| `noTooltip` | `boolean` | `false` | Hides the tooltip entirely when `true` |

### Slots

| Slot Name | Description |
| --- | --- |
| `tooltip` | Custom tooltip content. Overrides both `tooltipText` and the default href tooltip. |

### CSS Custom Properties

| Property | Default | Description |
| --- | --- | --- |
| `--pi-external-link-icon-size` | `0.85em` | Size of the external-link icon |
| `--pi-external-link-icon-color` | `currentColor` | Color of the external-link icon |

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

## License

MIT
npm package: @polarityio/pi-key-value
Description: Key-value pair display component with date formatting and boolean value mapping
Latest version: 1.0.2

# Polarity Integration Component Library

## Key Value Component

Displays a key-value pair with optional date formatting and boolean value mapping, hiding itself when the value is empty unless a default value is provided.

## Installation

```bash
npm install @polarityio/pi-key-value
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-key-value';
```

```html
<!-- Basic key-value pair -->
<pi-key-value key="Status" value="Active"></pi-key-value>

<!-- With default value fallback -->
<pi-key-value key="Description" default-value="N/A"></pi-key-value>

<!-- Date formatting -->
<pi-key-value key="Created" value="2024-01-15T10:30:00Z" date></pi-key-value>

<!-- Custom date format in UTC -->
<pi-key-value key="Updated" value="2024-01-15T10:30:00Z" date-format="MM/dd/yyyy" utc></pi-key-value>

<!-- Boolean value mapping -->
<pi-key-value key="Enabled" value="true" truthy-value="Yes" falsy-value="No"></pi-key-value>
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `key` | `string` | `''` | The label displayed before the value |
| `value` | `string \| null \| undefined` | `undefined` | The value to display. Component is hidden when null/undefined/empty unless `defaultValue` is set |
| `defaultValue` | `string` | `''` | Fallback string when value is null, undefined, or empty |
| `date` | `boolean` | `false` | When true, formats value as a date using `yyyy-MM-dd HH:mm` |
| `dateFormat` | `string` | `''` | Custom date format string using [date-fns format syntax](https://date-fns.org/docs/format). Implies `date=true` |
| `utc` | `boolean` | `false` | When true, displays the date in UTC instead of local timezone |
| `truthyValue` | `string` | `''` | String to display when value is truthy |
| `falsyValue` | `string` | `''` | String to display when value is falsy (empty string, `"0"`, or `"false"`) |

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

## License

MIT
npm package: @polarityio/pi-object-table
Description: Component that renders JavaScript objects and arrays as styled key-value tables
Latest version: 1.0.2

# Polarity Integration Component Library

## Object Table Component

Renders a JavaScript object as a styled key-value table with support for nested objects and arrays.

## Installation

```bash
npm install @polarityio/pi-object-table
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-object-table';
```

```html
<pi-object-table></pi-object-table>
```

```javascript
// Set the object via JavaScript property binding
const table = document.querySelector('pi-object-table');
table.objectToRender = {
  name: 'John Smith',
  age: 40,
  hobbies: ['cooking', 'hiking'],
  address: {
    street: '456 Elm St',
    city: 'Nashville',
    state: 'TN'
  }
};
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `objectToRender` | `object` | `{}` | The object or array to display as a key-value table. Must be set via property binding (not an HTML attribute). Nested objects are flattened with dot notation and arrays use bracket notation. |

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

## License

MIT
npm package: @polarityio/pi-section-header
Description: Collapsible section header with title, item count, and expand/collapse toggle
Latest version: 1.0.2

# Polarity Integration Component Library

## Section Header Component

A collapsible section header with title, item count, and expand/collapse toggle.

## Installation

```bash
npm install @polarityio/pi-section-header
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-section-header';
```

```html
<!-- Basic section header -->
<pi-section-header title="Results">
  <p>Section content goes here</p>
</pi-section-header>

<!-- With item count and total -->
<pi-section-header title="Indicators" count="5" total="20">
  <ul>
    <li>Item 1</li>
    <li>Item 2</li>
  </ul>
</pi-section-header>

<!-- Initially collapsed, no collapse button -->
```

```javascript
html`
  <pi-section-header title="Details" is-collapsed ?show-collapse-button=${false}>
    <p>Hidden by default</p>
  </pi-section-header>
`;
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `title` | `string` | `''` | Section title text |
| `count` | `number \| undefined` | `undefined` | Number of items displayed in the header |
| `total` | `number \| undefined` | `undefined` | Total number of items |
| `isCollapsed` | `boolean` | `false` | Whether the section content is collapsed |
| `showCollapseButton` | `boolean` | `true` | Whether to show the collapse/expand toggle button |

The title is formatted based on `count` and `total`:
- Both provided: `"Title (count of total)"`
- Only `count`: `"Title (count)"`
- Neither: `"Title"`

### Events

| Event Name | Detail | Description |
| --- | --- | --- |
| `section-toggle` | `{ isCollapsed: boolean, title: string }` | Fired when the section is toggled. Only fires when `showCollapseButton` is `true`. |

### Slots

| Slot Name | Description |
| --- | --- |
| Default | Content displayed inside the collapsible section when expanded |

### CSS Custom Properties

| Property | Default | Description |
| --- | --- | --- |
| `--pi-section-header-icon-size` | `12px` | Size of the chevron icon |
| `--pi-section-header-icon-color` | `var(--pi-color-font-info)` | Color of the chevron icon |

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

## License

MIT
npm package: @polarityio/pi-show-more
Description: Content container that truncates to max lines with expand/collapse toggle
Latest version: 1.0.3

# Polarity Integration Component Library

## Show More Component

A content container that truncates to a maximum number of lines with a toggle button to expand and collapse.

## Installation

```bash
npm install @polarityio/pi-show-more
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-show-more';
```

```html
<!-- Basic usage with default 3 lines -->
<pi-show-more>
  <p>This is a long block of text that will be truncated after three lines
  with a "Show more" button to expand the full content.</p>
</pi-show-more>

<!-- Custom max lines and labels -->
<pi-show-more max-lines="5" show-more-label="Read more" show-less-label="Read less">
  <div>Long content here...</div>
</pi-show-more>
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `maxLines` | `number` | `3` | Maximum number of visible lines when collapsed |
| `expanded` | `boolean` | `false` | Whether the content is currently expanded |
| `showMoreLabel` | `string` | `'Show more'` | Label for the expand button |
| `showLessLabel` | `string` | `'Show less'` | Label for the collapse button |

### Events

| Event Name | Detail | Description |
| --- | --- | --- |
| `pi-show-more-toggle` | `{ expanded: boolean }` | Fired when the expand/collapse button is toggled. `detail.expanded` reflects the new state. |

### Slots

| Slot Name | Description |
| --- | --- |
| Default | Content to be truncated and expandable |

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

## License

MIT
npm package: @polarityio/pi-spinner
Description: Loading spinner with configurable size and optional label
Latest version: 1.0.2

# Polarity Integration Component Library

## Spinner Component

A loading spinner with configurable size and optional label.

## Installation

```bash
npm install @polarityio/pi-spinner
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-spinner';
```

```html
<!-- Basic spinner -->
<pi-spinner></pi-spinner>

<!-- Spinner with label and size -->
<pi-spinner size="md" label="Loading results..." label-position="after"></pi-spinner>

<!-- Large spinner with label before -->
<pi-spinner size="lg" label="Please wait" label-position="before"></pi-spinner>
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | `''` | Loading text displayed alongside the spinner |
| `labelPosition` | `'before' \| 'after'` | `'after'` | Position of the label relative to the spinner |
| `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'xs'` | Size of the spinner (xs=0.75rem, sm=0.875rem, md=1rem, lg=1.25rem, xl=1.5rem) |

### CSS Custom Properties

| Property | Default | Description |
| --- | --- | --- |
| `--pi-spinner-icon-color` | `currentColor` | Color of the spinner arc |

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

## License

MIT
npm package: @polarityio/pi-summary-tag
Description: Integration summary badge with colored acronym and tag text
Latest version: 1.0.3

# Polarity Integration Component Library

## Summary Tag Component

Displays an integration summary with a colored acronym badge and tag text.

## Installation

```bash
npm install @polarityio/pi-summary-tag
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-summary-tag';
```

```html
<!-- Basic summary tag -->
<pi-summary-tag acronym="VT" tag="VirusTotal"></pi-summary-tag>
```

```javascript
import { html } from 'lit';

// Summary tag with custom colors
html`
  <pi-summary-tag
    acronym="PA"
    tag="Palo Alto"
    .color=${{ background: '#2c5282', text: '#ffffff', textBold: 'rgba(255, 255, 255, 0.8)' }}
  ></pi-summary-tag>
`;
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `acronym` | `string` | `''` | The acronym text displayed in the colored badge |
| `tag` | `string` | `''` | The tag/label text displayed next to the acronym |
| `color` | `IPiTagColors \| undefined` | `undefined` | Custom color configuration object with `background`, `text`, and `textBold` properties |

The `IPiTagColors` interface:

```typescript
interface IPiTagColors {
  background: string; // Background color of the tag
  text: string;       // Text color for the tag text
  textBold: string;   // Text color for the acronym
}
```

### CSS Custom Properties

| Property | Default | Description |
| --- | --- | --- |
| `--pi-summary-tag-padding` | `0.25em 0.4em 0.25em 0.25em` | Padding for the summary tag container |
| `--pi-integration-color` | `var(--pi-integration-bg-green, #6aa543)` | Background color when no `color` prop is set |
| `--pi-integration-text-color` | `#ffffff` | Text color when no `color` prop is set |
| `--pi-integration-acronym-color` | `rgba(255, 255, 255, 0.8)` | Acronym text color when no `color` prop is set |

### CSS Parts

| Part Name | Description |
| --- | --- |
| `px-summary-tag` | The main container element |
| `px-summary-tag-acronym` | The acronym text area |
| `px-summary-tag-tag-text` | The tag/label text area |

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

Pre-built integration theme classes are available: `pi-integration-teal`, `pi-integration-purple`, `pi-integration-blue`, `pi-integration-red`, `pi-integration-green`, and `pi-integration-orange`.

## License

MIT
npm package: @polarityio/pi-tag
Description: Small label component with optional prefix and suffix icons
Latest version: 1.0.2

# Polarity Integration Component Library

## Tag Component

A small label component with optional prefix and suffix icons.

## Installation

```bash
npm install @polarityio/pi-tag
```

### Peer Dependencies

- [lit](https://lit.dev/) ^3.0.0

## Usage

```javascript
import '@polarityio/pi-tag';
```

```html
<!-- Basic tag -->
<pi-tag label="Malicious"></pi-tag>
```

```javascript
// Tag with icons (set via JavaScript property binding)
import { faShieldHalved } from '@fortawesome/free-solid-svg-icons';

const tag = document.querySelector('pi-tag');
tag.label = 'Secure';
tag.prefixIcon = faShieldHalved;
```

## API Reference

### Properties

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | `''` | The text content of the tag |
| `prefixIcon` | `IconDefinition \| undefined` | `undefined` | A FontAwesome `IconDefinition` displayed before the label (property only, not an HTML attribute) |
| `suffixIcon` | `IconDefinition \| undefined` | `undefined` | A FontAwesome `IconDefinition` displayed after the label (property only, not an HTML attribute) |

### CSS Custom Properties

| Property | Default | Description |
| --- | --- | --- |
| `--pi-tag-border-color` | `rgb(96, 100, 112)` | Border color of the tag |
| `--pi-tag-icon-size` | `0.85em` | Size of prefix/suffix icons |
| `--pi-tag-icon-color` | `currentColor` | Color of prefix/suffix icons |

## Theming

Customize the appearance using CSS custom properties. This component uses design tokens from `@polarityio/pi-shared` for consistent theming across the component library.

## License

MIT
npm package: @polaroid-vhs/npm-health
Description: CLI tool to analyze npm package health before you install it
Author: Polaroid
Latest version: 0.1.0

# npm-health

> 🏥 Check the health of an npm package before you install it

A simple CLI tool that analyzes npm packages and gives you a quick health score based on:
- How recently it was updated
- Number of dependencies
- License information
- Repository availability

## Why?

Before adding a new dependency to your project, you should know:
- Is this package still maintained?
- Does it have too many dependencies?
- Is it licensed properly?

`npm-health` gives you this information in seconds.

## Installation

```bash
npm install -g @polaroid-vhs/npm-health
```

## Usage

```bash
npm-health <package-name>
```

Example:

```bash
$ npm-health chalk

📦 Health Check: chalk

Latest version: 5.6.2
Last published: 157 days ago
Dependencies: 10
License: MIT
Repository: https://github.com/chalk/chalk

Health Score: 100/100

✅ Package looks healthy!
```

Example with deprecated package:

```bash
$ npm-health request

📦 Health Check: request

Latest version: 2.88.2
Last published: 2193 days ago
Dependencies: 40
License: Apache-2.0
Repository: https://github.com/request/request

Health Score: 45/100

⚠️  Consider alternatives or check the package carefully before using.
```

## Health Score

The health score (0-100) is calculated based on:

- **Last published** (-40 if >2 years, -20 if >1 year)
- **Dependencies** (-30 if >50, -15 if >20)
- **License** (-10 if missing)

Scores:
- **80-100**: Healthy package ✅
- **60-79**: Use with caution
- **<60**: Consider alternatives ⚠️

## API

You can also use it programmatically:

```javascript
import { checkPackage } from '@polaroid-vhs/npm-health';

const health = await checkPackage('chalk');
console.log(health);
// {
//   name: 'chalk',
//   version: '5.6.2',
//   daysSincePublish: 157,
//   dependencies: 10,
//   license: 'MIT',
//   repository: 'https://github.com/chalk/chalk',
//   description: 'Terminal string styling done right'
// }
```

## Development

```bash
# Install dependencies
npm install

# Run tests
npm test

# Test CLI locally
node src/cli.js <package-name>
```

## License

MIT © [Polaroid](https://github.com/polaroid-vhs)