@popgrids/embed 0.0.1 → 0.0.2
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/AGENTS.md +141 -0
- package/LICENSE +21 -0
- package/README.md +60 -1
- package/dist/components/base-element.d.ts +33 -0
- package/dist/components/base-element.d.ts.map +1 -0
- package/dist/components/pop-auth-panel.d.ts +14 -0
- package/dist/components/pop-auth-panel.d.ts.map +1 -0
- package/dist/components/pop-comment-avatar.d.ts +16 -0
- package/dist/components/pop-comment-avatar.d.ts.map +1 -0
- package/dist/components/pop-comment-bar.d.ts +14 -0
- package/dist/components/pop-comment-bar.d.ts.map +1 -0
- package/dist/components/pop-comment-icon.d.ts +33 -0
- package/dist/components/pop-comment-icon.d.ts.map +1 -0
- package/dist/components/pop-comment-input.d.ts +19 -0
- package/dist/components/pop-comment-input.d.ts.map +1 -0
- package/dist/components/pop-comment-thread.d.ts +14 -0
- package/dist/components/pop-comment-thread.d.ts.map +1 -0
- package/dist/components/pop-comment.d.ts +32 -0
- package/dist/components/pop-comment.d.ts.map +1 -0
- package/dist/components/pop-feed.d.ts +17 -0
- package/dist/components/pop-feed.d.ts.map +1 -0
- package/dist/components/pop-grid.d.ts +12 -0
- package/dist/components/pop-grid.d.ts.map +1 -0
- package/dist/components/pop-widget.d.ts +13 -0
- package/dist/components/pop-widget.d.ts.map +1 -0
- package/dist/embed.js +2240 -0
- package/dist/embed.js.map +1 -0
- package/dist/helpers/author.d.ts +2 -0
- package/dist/helpers/author.d.ts.map +1 -0
- package/dist/helpers/color.d.ts +7 -0
- package/dist/helpers/color.d.ts.map +1 -0
- package/dist/helpers/theme.d.ts +3 -0
- package/dist/helpers/theme.d.ts.map +1 -0
- package/dist/helpers/time.d.ts +2 -0
- package/dist/helpers/time.d.ts.map +1 -0
- package/dist/index.cjs +1135 -741
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -989
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1246 -1045
- package/dist/index.js.map +1 -1
- package/dist/lib/popup-auth.d.ts +22 -0
- package/dist/lib/popup-auth.d.ts.map +1 -0
- package/dist/store/auth-store.d.ts +8 -0
- package/dist/store/auth-store.d.ts.map +1 -0
- package/dist/store/grid-store.d.ts +45 -0
- package/dist/store/grid-store.d.ts.map +1 -0
- package/dist/store/registry.d.ts +5 -0
- package/dist/store/registry.d.ts.map +1 -0
- package/dist/types/models.d.ts +47 -0
- package/dist/types/models.d.ts.map +1 -0
- package/package.json +55 -45
- package/dist/apple-IX52EWYN.png +0 -0
- package/dist/google-Q3MFTU5A.png +0 -0
- package/dist/index.d.cts +0 -989
- package/dist/swirling-ovals-ZDTHSA3L.gif +0 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Project Instructions (popgrids-embed)
|
|
2
|
+
|
|
3
|
+
This project contains the embeddable Web Component discussion widget for PopGrids. It is a lightweight, self-contained client-side bundle designed to be embedded on third-party websites.
|
|
4
|
+
|
|
5
|
+
## Technology Stack & Setup
|
|
6
|
+
|
|
7
|
+
- **Core**: Vanilla Web Components (Shadow DOM) written in TypeScript.
|
|
8
|
+
- **State Management**: `@preact/signals-core` for reactive signals and computed values.
|
|
9
|
+
- **Styling**: Vanilla CSS. Imported inline using Vite's `?inline` parameter and compiled into adopted style sheets.
|
|
10
|
+
- *Note*: **Do not use Tailwind CSS** in this repository. All components use scoped shadow DOM styles.
|
|
11
|
+
- **Positioning**: `@floating-ui/dom` for positioning the feed popup relative to the widget trigger.
|
|
12
|
+
- **Realtime**: WebSockets connection for live comment delivery.
|
|
13
|
+
- **Build System**: Vite.
|
|
14
|
+
- `vite.config.ts` builds the library version.
|
|
15
|
+
- `vite.embed.config.ts` builds the single self-contained embeddable JS script.
|
|
16
|
+
|
|
17
|
+
## Core Development Commands
|
|
18
|
+
|
|
19
|
+
- `pnpm run dev` — Watch-builds both library and embed scripts.
|
|
20
|
+
- `pnpm run build` — Clean and build both targets (`dist/`).
|
|
21
|
+
- `pnpm run demo:dev` — Launches concurrently the dev watch compiler and a live-reload server (`live-server`) on port 5500.
|
|
22
|
+
|
|
23
|
+
## Component Conventions
|
|
24
|
+
|
|
25
|
+
All UI components must inherit from the `BaseElement` abstract class ([base-element.ts](./src/components/base-element.ts)) which automates rendering, event binding, and reactive effects.
|
|
26
|
+
|
|
27
|
+
### Component Structure Example
|
|
28
|
+
|
|
29
|
+
When creating or modifying components, follow this structure:
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { BaseElement, createSheet } from "./base-element.js";
|
|
33
|
+
|
|
34
|
+
const localSheet = createSheet(/* css */ `
|
|
35
|
+
:host {
|
|
36
|
+
display: block;
|
|
37
|
+
}
|
|
38
|
+
.my-element {
|
|
39
|
+
color: var(--pop-foreground);
|
|
40
|
+
}
|
|
41
|
+
`);
|
|
42
|
+
|
|
43
|
+
export class PopMyComponent extends BaseElement {
|
|
44
|
+
protected get styleSheets() {
|
|
45
|
+
return [localSheet];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Bind shadow DOM events automatically
|
|
49
|
+
protected events = {
|
|
50
|
+
click: "onClick",
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
protected onClick(event: MouseEvent) {
|
|
54
|
+
// Event handling
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Subscribe to signals inside setupEffects
|
|
58
|
+
protected setupEffects() {
|
|
59
|
+
this.addEffect(() => {
|
|
60
|
+
// Access preact signals here; component will re-evaluate on change.
|
|
61
|
+
// Call render() or update DOM nodes manually.
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
protected getTemplate(): string {
|
|
66
|
+
return /* html */ `
|
|
67
|
+
<div class="my-element">Hello World</div>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Define the custom element safely
|
|
73
|
+
if (!customElements.get("pop-my-component")) {
|
|
74
|
+
customElements.define("pop-my-component", PopMyComponent);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Store Resolution & Context Consumption
|
|
79
|
+
|
|
80
|
+
We propagate state using a custom context pattern instead of passing props manually through elements.
|
|
81
|
+
|
|
82
|
+
- The root `<pop-grid>` component registers its `GridStore` in the registry during `connectedCallback()`: `registerStore(this, store)`.
|
|
83
|
+
- Nested components retrieve the active store using the `@consume(StoreClass)` property decorator. This automatically traverses up the DOM tree and shadow root hosts to inject the registered store instance:
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import { consume } from "../store/registry.js";
|
|
87
|
+
import { GridStore } from "../store/grid-store.js";
|
|
88
|
+
|
|
89
|
+
export class PopMyComponent extends BaseElement {
|
|
90
|
+
@consume(GridStore) gridStore!: GridStore;
|
|
91
|
+
|
|
92
|
+
protected setupEffects() {
|
|
93
|
+
this.addEffect(() => {
|
|
94
|
+
// Access reactive signals directly:
|
|
95
|
+
console.log(this.gridStore.replyingTo.value);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- **Context-Bound Stores vs. Global Singletons**:
|
|
102
|
+
- Context-bound stores (like `GridStore`) vary per widget instance and must be resolved using `@consume(StoreClass)`.
|
|
103
|
+
- Global singletons (like `auth-store` signals) are imported directly (e.g., `import { currentUser } from "../store/auth-store.js"`) and accessed statically.
|
|
104
|
+
|
|
105
|
+
### Memory & Subscription Management
|
|
106
|
+
|
|
107
|
+
- **Do not use `effect(...)` directly** inside components. Instead, always use `this.addEffect(() => { ... })` within `setupEffects()`.
|
|
108
|
+
- `BaseElement` tracks the disposables registered via `addEffect` and cleans them up automatically inside `disconnectedCallback()`.
|
|
109
|
+
- Use the provided helper methods on `BaseElement` to interact with the Shadow DOM safely:
|
|
110
|
+
- `this.getElement<T>(selector)`
|
|
111
|
+
- `this.setText(selector, text)`
|
|
112
|
+
- `this.setAttr(selector, attr, value)`
|
|
113
|
+
- `this.toggleClass(selector, className, force)`
|
|
114
|
+
- `this.hideElement(selector, shouldHide, useDisplayNone)`
|
|
115
|
+
|
|
116
|
+
## Styling & Design System Conventions
|
|
117
|
+
|
|
118
|
+
- **Design System Variables**: Prefer CSS custom properties from [base.css](./src/styles/base.css) (such as `--pop-foreground`, `--pop-background`, `--pop-ring`, and `--pop-radius-xs`) over hardcoded hex codes or ad-hoc custom properties.
|
|
119
|
+
- **Dynamic Color Transparencies**: Use the CSS native `color-mix()` function (e.g. `color-mix(in srgb, var(--pop-foreground) 10%, transparent)`) to create alpha/transparency overlays. This ensures that transparency ratios dynamically adapt when switching between light and dark modes without requiring duplicate CSS overrides.
|
|
120
|
+
|
|
121
|
+
## Releasing
|
|
122
|
+
|
|
123
|
+
This package publishes to npm as [`@popgrids/embed`](https://www.npmjs.com/package/@popgrids/embed)
|
|
124
|
+
using [Changesets](https://github.com/changesets/changesets). Same flow as `popgrids-ui`.
|
|
125
|
+
|
|
126
|
+
- **Every change that affects the published output** needs a changeset: `pnpm changeset`, pick the
|
|
127
|
+
bump (patch/minor/major), write a one-line summary. Commit the generated file in `.changeset/`.
|
|
128
|
+
- **On merge to `main`**, `.github/workflows/release.yml` runs: if pending changesets exist it runs
|
|
129
|
+
`changeset version` (bumps `package.json` + writes `CHANGELOG.md`), commits `chore: version
|
|
130
|
+
packages`, then `changeset publish` builds (`prepublishOnly` → `typecheck` + `build`) and publishes.
|
|
131
|
+
- **Auth is npm OIDC trusted publishing** — no `NPM_TOKEN`. The workflow needs `id-token: write` and
|
|
132
|
+
a trusted publisher configured on npmjs.com for this package (repo `popgrids/popgrids-embed`,
|
|
133
|
+
workflow `release.yml`).
|
|
134
|
+
- `.github/workflows/ci.yml` typechecks + builds every PR.
|
|
135
|
+
- The published package ships both entries: `.` (the library, deps external) and `./embed` /
|
|
136
|
+
`dist/embed.js` (the self-contained CDN bundle, also the `unpkg`/`jsdelivr` target).
|
|
137
|
+
|
|
138
|
+
## Plan Mode
|
|
139
|
+
|
|
140
|
+
- Make the plan extremely concise. Sacrifice grammar for the sake of concision.
|
|
141
|
+
- At the end of each plan, give me a list of unresolved questions to answer, if any.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © PopGrids
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @popgrids/embed
|
|
2
|
+
|
|
3
|
+
The embeddable [PopGrids](https://popgrids.io) discussion widget — a lightweight, self-contained
|
|
4
|
+
vanilla Web Component (Shadow DOM) you drop onto any page to add a context-aware comment thread.
|
|
5
|
+
|
|
6
|
+
> **AI agents:** see [AGENTS.md](./AGENTS.md) for setup, component conventions, and the release process.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pnpm add @popgrids/embed
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
### Bundler
|
|
17
|
+
|
|
18
|
+
Import the package once (it registers the custom elements as a side effect), then use the
|
|
19
|
+
`<pop-grid>` element anywhere in your markup:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import "@popgrids/embed";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<pop-grid
|
|
27
|
+
data-key="pk_your_public_key"
|
|
28
|
+
data-api-url="https://api.popgrids.io"
|
|
29
|
+
data-id="article-hero"
|
|
30
|
+
></pop-grid>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
TypeScript model types are exported from the package root:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import type { AuthUser, Comment, CommentAuthor, Grid } from "@popgrids/embed";
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Script tag / CDN
|
|
40
|
+
|
|
41
|
+
The `./embed` subpath is a single self-contained bundle with every dependency inlined — nothing else
|
|
42
|
+
to load:
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<script type="module" src="https://unpkg.com/@popgrids/embed/dist/embed.js"></script>
|
|
46
|
+
|
|
47
|
+
<pop-grid data-key="pk_your_public_key" data-api-url="https://api.popgrids.io"></pop-grid>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## `<pop-grid>` attributes
|
|
51
|
+
|
|
52
|
+
| Attribute | Required | Description |
|
|
53
|
+
| -------------- | -------- | ------------------------------------------------------------------------------- |
|
|
54
|
+
| `data-key` | yes | Your grid's public key (`pk_…`). |
|
|
55
|
+
| `data-api-url` | yes | Base URL of the PopGrids API. |
|
|
56
|
+
| `data-id` | no | Names the thread. Same `data-id` = same discussion across pages. Defaults to the page's canonical URL. |
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
MIT
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare function createSheet(cssText: string): CSSStyleSheet;
|
|
2
|
+
export declare const sharedBaseSheet: CSSStyleSheet;
|
|
3
|
+
export declare const btnSheet: CSSStyleSheet;
|
|
4
|
+
export declare const masksSheet: CSSStyleSheet;
|
|
5
|
+
export declare abstract class BaseElement extends HTMLElement implements EventListenerObject {
|
|
6
|
+
protected baseStyleSheets: CSSStyleSheet[];
|
|
7
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
8
|
+
private _hasRendered;
|
|
9
|
+
private _disposables;
|
|
10
|
+
constructor();
|
|
11
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
12
|
+
/**
|
|
13
|
+
* Use this instead of calling effect() directly to ensure
|
|
14
|
+
* automatic cleanup when the component disconnects.
|
|
15
|
+
*/
|
|
16
|
+
protected addEffect(callback: () => void): void;
|
|
17
|
+
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
19
|
+
protected events: Record<string, string>;
|
|
20
|
+
private _bindEvents;
|
|
21
|
+
handleEvent(event: Event): void;
|
|
22
|
+
protected emit<T = unknown>(eventName: string, options?: CustomEventInit<T>): void;
|
|
23
|
+
protected abstract getTemplate(): string;
|
|
24
|
+
protected get styles(): CSSStyleSheet[];
|
|
25
|
+
protected setupEffects(): void;
|
|
26
|
+
protected render(): void;
|
|
27
|
+
protected hideElement(selector: string, shouldHide: boolean, useDisplayNone?: boolean): void;
|
|
28
|
+
protected setText(selector: string, text: string | number): void;
|
|
29
|
+
protected setAttr(selector: string, attr: string, value: string | null): void;
|
|
30
|
+
protected toggleClass(selector: string, className: string, force?: boolean): void;
|
|
31
|
+
protected getElement<T extends Element = HTMLElement>(selector: string): T | null;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=base-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-element.d.ts","sourceRoot":"","sources":["../../src/components/base-element.ts"],"names":[],"mappings":"AAMA,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAI1D;AAED,eAAO,MAAM,eAAe,eAA0B,CAAC;AACvD,eAAO,MAAM,QAAQ,eAAyB,CAAC;AAC/C,eAAO,MAAM,UAAU,eAA2B,CAAC;AAInD,8BAAsB,WAAY,SAAQ,WAAY,YAAW,mBAAmB;IAClF,SAAS,CAAC,eAAe,EAAE,aAAa,EAAE,CAA2C;IACrF,SAAS,KAAK,WAAW,IAAI,aAAa,EAAE,CAE3C;IAED,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,YAAY,CAAyB;;IAU7C,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAcvF;;;OAGG;IACH,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI;IAIxC,iBAAiB;IASjB,oBAAoB;IAOpB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAE9C,OAAO,CAAC,WAAW;IAUnB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAQ/B,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,eAAe,CAAC,CAAC,CAAM;IAW/E,SAAS,CAAC,QAAQ,CAAC,WAAW,IAAI,MAAM;IAExC,SAAS,KAAK,MAAM,IAAI,aAAa,EAAE,CAEtC;IAED,SAAS,CAAC,YAAY,IAAI,IAAI;IAE9B,SAAS,CAAC,MAAM;IAMhB,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,UAAO;IAkBlF,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAOzD,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAWtE,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;IAO1E,SAAS,CAAC,UAAU,CAAC,CAAC,SAAS,OAAO,GAAG,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;CAGlF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GridStore } from '../store/grid-store.js';
|
|
2
|
+
import { BaseElement } from './base-element.js';
|
|
3
|
+
export declare class PopAuthPanel extends BaseElement {
|
|
4
|
+
gridStore: GridStore;
|
|
5
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
6
|
+
protected events: {
|
|
7
|
+
click: string;
|
|
8
|
+
};
|
|
9
|
+
protected onClick(event: MouseEvent): void;
|
|
10
|
+
protected setupEffects(): void;
|
|
11
|
+
private handleJoin;
|
|
12
|
+
protected getTemplate(): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=pop-auth-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-auth-panel.d.ts","sourceRoot":"","sources":["../../src/components/pop-auth-panel.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAiG7D,qBAAa,YAAa,SAAQ,WAAW;IACvB,SAAS,EAAG,SAAS,CAAC;IAE1C,SAAS,KAAK,WAAW,oBAExB;IAED,SAAS,CAAC,MAAM;;MAEd;IAEF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU;IAKnC,SAAS,CAAC,YAAY;YAwBR,UAAU;IAKxB,SAAS,CAAC,WAAW,IAAI,MAAM;CAYhC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseElement } from './base-element.js';
|
|
2
|
+
export declare class PopCommentAvatar extends BaseElement {
|
|
3
|
+
private _backgroundColor;
|
|
4
|
+
constructor();
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
onSizeChanged(): void;
|
|
7
|
+
onDataColorKeyChanged(): void;
|
|
8
|
+
onDeletedChanged(): void;
|
|
9
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
10
|
+
get size(): string;
|
|
11
|
+
set size(value: string);
|
|
12
|
+
get deleted(): boolean;
|
|
13
|
+
set deleted(value: boolean);
|
|
14
|
+
protected getTemplate(): string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=pop-comment-avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-comment-avatar.d.ts","sourceRoot":"","sources":["../../src/components/pop-comment-avatar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAqG7D,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,OAAO,CAAC,gBAAgB,CAAS;;IAOjC,MAAM,KAAK,kBAAkB,aAE5B;IAED,aAAa;IAIb,qBAAqB;IAIrB,gBAAgB;IAIhB,SAAS,KAAK,WAAW,oBAExB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAMzB;IAED,SAAS,CAAC,WAAW,IAAI,MAAM;CA6BhC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GridStore } from '../store/grid-store.js';
|
|
2
|
+
import { BaseElement } from './base-element.js';
|
|
3
|
+
export declare class PopCommentBar extends BaseElement {
|
|
4
|
+
gridStore: GridStore;
|
|
5
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
6
|
+
protected events: {
|
|
7
|
+
click: string;
|
|
8
|
+
};
|
|
9
|
+
protected onClick(event: MouseEvent): void;
|
|
10
|
+
protected setupEffects(): void;
|
|
11
|
+
private handleSend;
|
|
12
|
+
protected getTemplate(): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=pop-comment-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-comment-bar.d.ts","sourceRoot":"","sources":["../../src/components/pop-comment-bar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AA8H7D,qBAAa,aAAc,SAAQ,WAAW;IACxB,SAAS,EAAG,SAAS,CAAC;IAE1C,SAAS,KAAK,WAAW,oBAExB;IAED,SAAS,CAAC,MAAM;;MAEd;IAEF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU;IAKnC,SAAS,CAAC,YAAY;YA8ER,UAAU;IA0BxB,SAAS,CAAC,WAAW,IAAI,MAAM;CAgBhC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseElement } from './base-element.js';
|
|
2
|
+
export declare class PopCommentIcon extends BaseElement {
|
|
3
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
4
|
+
static get observedAttributes(): string[];
|
|
5
|
+
onCounterChanged(): void;
|
|
6
|
+
onIconUrlChanged(): void;
|
|
7
|
+
onSizeChanged(): void;
|
|
8
|
+
onThemeChanged(): void;
|
|
9
|
+
onVariantChanged(): void;
|
|
10
|
+
onTypeChanged(): void;
|
|
11
|
+
onDisabledChanged(): void;
|
|
12
|
+
get counter(): number;
|
|
13
|
+
set counter(value: number);
|
|
14
|
+
get iconUrl(): string | undefined;
|
|
15
|
+
set iconUrl(value: string | undefined);
|
|
16
|
+
get size(): string;
|
|
17
|
+
set size(value: string);
|
|
18
|
+
get theme(): "brand" | "neutral";
|
|
19
|
+
set theme(value: "brand" | "neutral");
|
|
20
|
+
get variant(): "add" | "close" | "filter" | "more" | "send" | "cancel";
|
|
21
|
+
set variant(value: "add" | "close" | "filter" | "more" | "send" | "cancel");
|
|
22
|
+
get type(): "button" | "submit" | "reset" | "menu";
|
|
23
|
+
set type(value: "button" | "submit" | "reset" | "menu");
|
|
24
|
+
get disabled(): boolean;
|
|
25
|
+
set disabled(value: boolean);
|
|
26
|
+
protected events: {
|
|
27
|
+
click: string;
|
|
28
|
+
};
|
|
29
|
+
protected onClick(event: Event): void;
|
|
30
|
+
get icon(): string;
|
|
31
|
+
protected getTemplate(): string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=pop-comment-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-comment-icon.d.ts","sourceRoot":"","sources":["../../src/components/pop-comment-icon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AA+Q7D,qBAAa,cAAe,SAAQ,WAAW;IAC7C,SAAS,KAAK,WAAW,oBAExB;IAED,MAAM,KAAK,kBAAkB,aAE5B;IAED,gBAAgB;IAIhB,gBAAgB;IAIhB,aAAa;IAIb,cAAc;IAId,gBAAgB;IAIhB,aAAa;IAIb,iBAAiB;IAIjB,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,EAExB;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAEhC;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAMpC;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,IAAI,KAAK,IAAI,OAAO,GAAG,SAAS,CAE/B;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,EAEnC;IAED,IAAI,OAAO,IAAI,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAErE;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,EAEzE;IAED,IAAI,IAAI,IAAI,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAEjD;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,EAErD;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAM1B;IAED,SAAS,CAAC,MAAM;;MAEd;IAEF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK;IAS9B,IAAI,IAAI,IAAI,MAAM,CA0FjB;IAED,SAAS,CAAC,WAAW,IAAI,MAAM;CA8BhC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GridStore } from '../store/grid-store.js';
|
|
2
|
+
import { BaseElement } from './base-element.js';
|
|
3
|
+
export declare class PopCommentInput extends BaseElement {
|
|
4
|
+
gridStore: GridStore;
|
|
5
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
6
|
+
protected events: {
|
|
7
|
+
input: string;
|
|
8
|
+
keydown: string;
|
|
9
|
+
};
|
|
10
|
+
protected onInput(event: Event): void;
|
|
11
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
12
|
+
getValue(): string;
|
|
13
|
+
setValue(val: string): void;
|
|
14
|
+
clear(): void;
|
|
15
|
+
focus(): void;
|
|
16
|
+
protected setupEffects(): void;
|
|
17
|
+
protected getTemplate(): string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=pop-comment-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-comment-input.d.ts","sourceRoot":"","sources":["../../src/components/pop-comment-input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAiC7D,qBAAa,eAAgB,SAAQ,WAAW;IAC1B,SAAS,EAAG,SAAS,CAAC;IAE1C,SAAS,KAAK,WAAW,oBAExB;IAED,SAAS,CAAC,MAAM;;;MAGd;IAEF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK;IAM9B,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,aAAa;IAUxC,QAAQ,IAAI,MAAM;IAIlB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAS3B,KAAK,IAAI,IAAI;IAQb,KAAK,IAAI,IAAI;IAIb,SAAS,CAAC,YAAY;IAgBtB,SAAS,CAAC,WAAW,IAAI,MAAM;CAKhC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GridStore } from '../store/grid-store.js';
|
|
2
|
+
import { BaseElement } from './base-element.js';
|
|
3
|
+
export declare class PopCommentThread extends BaseElement {
|
|
4
|
+
gridStore: GridStore;
|
|
5
|
+
private _showAll;
|
|
6
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
7
|
+
protected events: {
|
|
8
|
+
click: string;
|
|
9
|
+
};
|
|
10
|
+
protected onClick(event: MouseEvent): void;
|
|
11
|
+
protected setupEffects(): void;
|
|
12
|
+
protected getTemplate(): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=pop-comment-thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-comment-thread.d.ts","sourceRoot":"","sources":["../../src/components/pop-comment-thread.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AA+D7D,qBAAa,gBAAiB,SAAQ,WAAW;IAC3B,SAAS,EAAG,SAAS,CAAC;IAE1C,OAAO,CAAC,QAAQ,CAAS;IAEzB,SAAS,KAAK,WAAW,oBAExB;IAED,SAAS,CAAC,MAAM;;MAEd;IAEF,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU;IAMnC,SAAS,CAAC,YAAY;IAgBtB,SAAS,CAAC,WAAW,IAAI,MAAM;CAsChC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GridStore } from '../store/grid-store.js';
|
|
2
|
+
import { BaseElement } from './base-element.js';
|
|
3
|
+
export declare class PopComment extends BaseElement {
|
|
4
|
+
gridStore: GridStore;
|
|
5
|
+
static get observedAttributes(): string[];
|
|
6
|
+
onDataSizeChanged(): void;
|
|
7
|
+
onCommentIdChanged(): void;
|
|
8
|
+
get size(): "sm" | "lg";
|
|
9
|
+
get commentAvatarSize(): "xs" | "sm";
|
|
10
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
11
|
+
protected events: {
|
|
12
|
+
click: string;
|
|
13
|
+
};
|
|
14
|
+
private _expanded;
|
|
15
|
+
private _dropdownOpen;
|
|
16
|
+
private _floatingCleanup?;
|
|
17
|
+
private _onOutsideClick;
|
|
18
|
+
private toggleDropdown;
|
|
19
|
+
private openDropdown;
|
|
20
|
+
private closeDropdown;
|
|
21
|
+
private deleteComment;
|
|
22
|
+
private flagComment;
|
|
23
|
+
protected onClick(event: Event): void;
|
|
24
|
+
private expandText;
|
|
25
|
+
private _timeUpdateTimer;
|
|
26
|
+
disconnectedCallback(): void;
|
|
27
|
+
private startTimeUpdates;
|
|
28
|
+
private stopTimeUpdates;
|
|
29
|
+
protected setupEffects(): void;
|
|
30
|
+
protected getTemplate(): string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=pop-comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-comment.d.ts","sourceRoot":"","sources":["../../src/components/pop-comment.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAyS7D,qBAAa,UAAW,SAAQ,WAAW;IACrB,SAAS,EAAG,SAAS,CAAC;IAE1C,MAAM,KAAK,kBAAkB,aAE5B;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,IAAI,IAAI,IAAI,IAAI,GAAG,IAAI,CAEtB;IAED,IAAI,iBAAiB,IAAI,IAAI,GAAG,IAAI,CAEnC;IAED,SAAS,KAAK,WAAW,oBAExB;IAED,SAAS,CAAC,MAAM;;MAEd;IAEF,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,gBAAgB,CAAC,CAAa;IAEtC,OAAO,CAAC,eAAe,CAQrB;IAEF,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,YAAY;IA2BpB,OAAO,CAAC,aAAa;YAaP,aAAa;YASb,WAAW;IAYzB,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK;IAoD9B,OAAO,CAAC,UAAU;IA4BlB,OAAO,CAAC,gBAAgB,CAA8C;IAEtE,oBAAoB;IAMpB,OAAO,CAAC,gBAAgB;IA0CxB,OAAO,CAAC,eAAe;IAOvB,SAAS,CAAC,YAAY;IA8BtB,SAAS,CAAC,WAAW,IAAI,MAAM;CAoHhC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GridStore } from '../store/grid-store.js';
|
|
2
|
+
import { BaseElement } from './base-element.js';
|
|
3
|
+
export declare class PopFeed extends BaseElement {
|
|
4
|
+
gridStore: GridStore;
|
|
5
|
+
private _footerChild;
|
|
6
|
+
private _wasOpen;
|
|
7
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
8
|
+
connectedCallback(): void;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
handleEvent(event: Event): void;
|
|
11
|
+
private onOutsideClick;
|
|
12
|
+
private onKeyDown;
|
|
13
|
+
protected setupEffects(): void;
|
|
14
|
+
private update;
|
|
15
|
+
protected getTemplate(): string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=pop-feed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-feed.d.ts","sourceRoot":"","sources":["../../src/components/pop-feed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAyH7D,qBAAa,OAAQ,SAAQ,WAAW;IAClB,SAAS,EAAG,SAAS,CAAC;IAE1C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,QAAQ,CAAS;IAEzB,SAAS,KAAK,WAAW,oBAExB;IAED,iBAAiB;IAMjB,oBAAoB;IAMpB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAc/B,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,SAAS;IAKjB,SAAS,CAAC,YAAY;IAatB,OAAO,CAAC,MAAM;IA8Cd,SAAS,CAAC,WAAW,IAAI,MAAM;CAUhC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseElement } from './base-element.js';
|
|
2
|
+
export declare class PopGrid extends BaseElement {
|
|
3
|
+
private _initialized;
|
|
4
|
+
private _floatingCleanup?;
|
|
5
|
+
private _store;
|
|
6
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
7
|
+
connectedCallback(): void;
|
|
8
|
+
disconnectedCallback(): void;
|
|
9
|
+
protected setupEffects(): void;
|
|
10
|
+
protected getTemplate(): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=pop-grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-grid.d.ts","sourceRoot":"","sources":["../../src/components/pop-grid.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AA4B7D,qBAAa,OAAQ,SAAQ,WAAW;IACtC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,gBAAgB,CAAC,CAAa;IACtC,OAAO,CAAC,MAAM,CAAa;IAE3B,SAAS,KAAK,WAAW,oBAExB;IAED,iBAAiB;IAiCjB,oBAAoB;IAOpB,SAAS,CAAC,YAAY;IAuFtB,SAAS,CAAC,WAAW,IAAI,MAAM;CAQhC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GridStore } from '../store/grid-store.js';
|
|
2
|
+
import { BaseElement } from './base-element.js';
|
|
3
|
+
export declare class PopWidget extends BaseElement {
|
|
4
|
+
gridStore: GridStore;
|
|
5
|
+
protected get styleSheets(): CSSStyleSheet[];
|
|
6
|
+
protected events: {
|
|
7
|
+
click: string;
|
|
8
|
+
};
|
|
9
|
+
protected onClick(): void;
|
|
10
|
+
protected setupEffects(): void;
|
|
11
|
+
protected getTemplate(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=pop-widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pop-widget.d.ts","sourceRoot":"","sources":["../../src/components/pop-widget.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAyI7D,qBAAa,SAAU,SAAQ,WAAW;IACpB,SAAS,EAAG,SAAS,CAAC;IAE1C,SAAS,KAAK,WAAW,oBAExB;IAED,SAAS,CAAC,MAAM;;MAEd;IAEF,SAAS,CAAC,OAAO;IAQjB,SAAS,CAAC,YAAY;IAmBtB,SAAS,CAAC,WAAW,IAAI,MAAM;CA2ChC"}
|