open-index/open-npm huggingface dataset:
npm package: @sherrylinks/slinks-core
Description: Core logic for SherryLinks adapters, context, observers, and wallet interactions
Author: Sherry Labs
Latest version: 0.11.33-beta

# @sherrylinks/slinks-core

[![npm version](https://badge.fury.io/js/%40sherrylinks%2Fslinks-core.svg)](https://badge.fury.io/js/%40sherrylinks%2Fslinks-core)

Core logic for SherryLinks adapters, context, observers, and wallet interactions.

## Overview

This package provides the foundational building blocks for the SherryLinks ecosystem. It includes:

- Core type definitions and interfaces (e.g., `SherryAdapter`).
- Trigger Directory logic for fetching and validating Trigger endpoints.
- Error handling classes (`SherryError`, `TriggerError`, etc.).
- Utility functions for formatting, proxifying URLs, and constants.
- Base classes and logic potentially used by platform observers.

This package is primarily intended as an internal dependency for `@sherrylinks/slinks` and `@sherrylinks/slinks-extension`, but some utilities might be useful independently.

## Installation

While typically installed as a dependency of `@sherrylinks/slinks`, you can install it directly if needed:

```bash
npm install @sherrylinks/slinks-core
# or
yarn add @sherrylinks/slinks-core
# or
pnpm add @sherrylinks/slinks-core
```

## Usage

Direct usage is less common, as most functionality is exposed through the `@sherrylinks/slinks` package. However, you might import types or specific utilities:

```typescript
import { TriggerDirectory, API_REPOSITORY_URL, SherryError } from '@sherrylinks/slinks-core';

// Example: Using the directory
const directory = new TriggerDirectory(API_REPOSITORY_URL);
await directory.refresh();
const securityState = directory.lookup('https://app.sherry.social');

// Example: Using error types
try {
  // ... some operation
} catch (error) {
  if (error instanceof SherryError) {
    console.error('SherryLinks Core Error:', error.message);
  }
}
```

## Key Exports

- `TriggerDirectory`: Class for managing and querying Trigger sources.
- `SherryError`, `TriggerError`, `ValidationError`, etc.: Custom error classes.
- `API_REPOSITORY_URL`, `PROXY_URL`: Constant URLs.
- Utility functions (e.g., `proxifyUrl`, `formatAddress`).
- Core types and interfaces.

## License

MIT
npm package: @shervin/core
Description: VideoAmp's Component library
Author: VideoAmp
Latest version: 0.0.3-alpha.0

# PreAmp Core

PreAmp Core in VideoAmp's component library.

## File structure

```bash
core/
  components/
    componentGroup/              #holds all related components
      singleComponent/           #single component
        examples/                #example use cases
        subComponents/           #child components used only by this component
        component.md             #documentation
        component.tsx            #component definition
        component.spec.tsx       #tests
```

## Adding components

-   Component definition
    -   include the description in a comment above the component definition
    -   component should be a named export, not default
-   Props
    -   named with this format `[ComponentName]Props`
    -   include the descriptions in a comment above each prop
-   Examples
    -   include enough examples to show off all use cases for this component
-   Tests
    -   TBD
-   SubComponents
    -   subComponents used only this component should live in `/subComponents`. If a child component is used in multiple places, then it should be pulled out as a stand alone component
-   Types
    -   include only prop interfaces in component definition file
    -   put all other types in `core/types/` for reuse

### Example Component.tsx file

```tsx
import React from 'react';

interface ComponentProps {
    /** Description of first prop */
    propOne: string;
    /** Description of the second prop */
    propTwo: boolean
}

/**
 * This is a description of Component.
 */
export const Component: React.SFC<ComponentProps> = (
    props: ComponentProps
): React.ReactElement<any> => {
    ...
};
```

## How to publish

TODO

## Using in another project

import multiple components at once from `@shervin/core`

```js
import { Button, Card, TextField } from '@shervin/core';
```