@behold/widget 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BeholdWidget-d9atp5vg.js +1 -0
- package/dist/BeholdWidget.d.ts +37 -0
- package/dist/BeholdWidget.d.ts.map +1 -0
- package/dist/BeholdWidget.js +1 -0
- package/dist/GalleryWall-lxkCZ_CS.js +1 -0
- package/dist/Grid-Qff6mfYu.js +1 -0
- package/dist/Grid-SMtz915h.js +1 -0
- package/dist/PopoverGallery-pjXCeSIt.js +1 -0
- package/dist/elements/AlbumPost.d.ts +16 -0
- package/dist/elements/AlbumPost.d.ts.map +1 -0
- package/dist/elements/BaseElement.d.ts +120 -0
- package/dist/elements/BaseElement.d.ts.map +1 -0
- package/dist/elements/BasePost.d.ts +35 -0
- package/dist/elements/BasePost.d.ts.map +1 -0
- package/dist/elements/BaseWidget.d.ts +28 -0
- package/dist/elements/BaseWidget.d.ts.map +1 -0
- package/dist/elements/Image.d.ts +36 -0
- package/dist/elements/Image.d.ts.map +1 -0
- package/dist/elements/ImagePost.d.ts +16 -0
- package/dist/elements/ImagePost.d.ts.map +1 -0
- package/dist/elements/PopoverGallery.d.ts +69 -0
- package/dist/elements/PopoverGallery.d.ts.map +1 -0
- package/dist/elements/PopoverGallerySlide.d.ts +60 -0
- package/dist/elements/PopoverGallerySlide.d.ts.map +1 -0
- package/dist/elements/PopoverSlideAlbum.d.ts +56 -0
- package/dist/elements/PopoverSlideAlbum.d.ts.map +1 -0
- package/dist/elements/PopoverSlideVideo.d.ts +42 -0
- package/dist/elements/PopoverSlideVideo.d.ts.map +1 -0
- package/dist/elements/Video.d.ts +49 -0
- package/dist/elements/Video.d.ts.map +1 -0
- package/dist/elements/VideoPost.d.ts +20 -0
- package/dist/elements/VideoPost.d.ts.map +1 -0
- package/dist/lib/RGBStringToHSLArray.d.ts +2 -0
- package/dist/lib/RGBStringToHSLArray.d.ts.map +1 -0
- package/dist/lib/createElement.d.ts +13 -0
- package/dist/lib/createElement.d.ts.map +1 -0
- package/dist/lib/getLoadingColorString.d.ts +2 -0
- package/dist/lib/getLoadingColorString.d.ts.map +1 -0
- package/dist/lib/getMedianHSL.d.ts +2 -0
- package/dist/lib/getMedianHSL.d.ts.map +1 -0
- package/dist/lib/hurdyGurdy.d.ts +75 -0
- package/dist/lib/hurdyGurdy.d.ts.map +1 -0
- package/dist/lib/popoverScroller.d.ts +26 -0
- package/dist/lib/popoverScroller.d.ts.map +1 -0
- package/dist/lib/trapFocus.d.ts +8 -0
- package/dist/lib/trapFocus.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +72 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/widgets/GalleryWall.d.ts +65 -0
- package/dist/widgets/GalleryWall.d.ts.map +1 -0
- package/dist/widgets/Grid.d.ts +63 -0
- package/dist/widgets/Grid.d.ts.map +1 -0
- package/package.json +53 -0
- package/readme.md +13 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
import Base from '../elements/BaseWidget.js';
|
2
|
+
import type PopoverGallery from '../elements/PopoverGallery.js';
|
3
|
+
import type BasePost from '../elements/BasePost.js';
|
4
|
+
export default class Grid extends Base {
|
5
|
+
label: string;
|
6
|
+
widgetSettings: WidgetSettings;
|
7
|
+
feedMetadata: FeedMetadata;
|
8
|
+
posts: Posts;
|
9
|
+
containerEl: HTMLElement;
|
10
|
+
postEls: Array<BasePost>;
|
11
|
+
popoverGalleryEl: PopoverGallery;
|
12
|
+
appliedBreakpoint: Breakpoint;
|
13
|
+
medianPaletteHSL: Array<string>;
|
14
|
+
setupIsComplete: boolean;
|
15
|
+
currentFocusIndex: number;
|
16
|
+
popupGallery: Function;
|
17
|
+
constructor();
|
18
|
+
handlePropChange({ changedProp }: {
|
19
|
+
changedProp: any;
|
20
|
+
}): void;
|
21
|
+
handlePostsChange(): void;
|
22
|
+
handleSettingsChange(): void;
|
23
|
+
handleMetadataChange(): void;
|
24
|
+
setup(): void;
|
25
|
+
/**
|
26
|
+
* Enable popup carousel
|
27
|
+
*/
|
28
|
+
enablePopoverGallery(): Promise<void>;
|
29
|
+
handleResize(entry: ResizeObserverEntry): void;
|
30
|
+
/**
|
31
|
+
* Handle prev post focus
|
32
|
+
*/
|
33
|
+
handleFocusPreviousPost(): void;
|
34
|
+
/**
|
35
|
+
* Handle next post focus
|
36
|
+
*/
|
37
|
+
handleFocusNextPost(): void;
|
38
|
+
/**
|
39
|
+
* Handle post click
|
40
|
+
*/
|
41
|
+
handlePostClick(post: BasePost): void;
|
42
|
+
renderPosts(breakpoint: Breakpoint): void;
|
43
|
+
getMatchingBreakpoint(width: number, breakpoints: Breakpoints): {
|
44
|
+
width: string;
|
45
|
+
numPosts: number;
|
46
|
+
borderRadius: string;
|
47
|
+
numColumns: number;
|
48
|
+
gap: {
|
49
|
+
[key: string]: string;
|
50
|
+
};
|
51
|
+
galleryWallLayout: string[];
|
52
|
+
galleryWallNamedLayout: string;
|
53
|
+
};
|
54
|
+
renderBreakpoint(breakpoint: Breakpoint, forceRender?: boolean): void;
|
55
|
+
createPostEls(breakpoint: Breakpoint): Array<BasePost>;
|
56
|
+
static register(name?: string): string;
|
57
|
+
}
|
58
|
+
declare global {
|
59
|
+
interface HTMLElementTagNameMap {
|
60
|
+
'behold-grid': Grid;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
//# sourceMappingURL=Grid.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/widgets/Grid.ts"],"names":[],"mappings":"AAGA,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAK5C,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AAMnD,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,IAAI;IACpC,KAAK,SAAS;IAGd,cAAc,EAAE,cAAc,CAAkB;IAChD,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,KAAK,CAAA;IAGZ,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IACxB,gBAAgB,EAAE,cAAc,CAAA;IAChC,iBAAiB,EAAE,UAAU,CAAA;IAC7B,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,eAAe,EAAE,OAAO,CAAQ;IAChC,iBAAiB,EAAE,MAAM,CAAO;IAChC,YAAY,EAAE,QAAQ,CAAA;;IA+CtB,gBAAgB,CAAC,EAAE,WAAW,EAAE;;KAAA;IAwBhC,iBAAiB;IAYjB,oBAAoB;IAoBpB,oBAAoB;IASpB,KAAK;IA4BL;;OAEG;IACG,oBAAoB;IAoB1B,YAAY,CAAC,KAAK,EAAE,mBAAmB;IAUvC;;OAEG;IACH,uBAAuB;IAYvB;;OAEG;IACH,mBAAmB;IAenB;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,QAAQ;IAO9B,WAAW,CAAC,UAAU,EAAE,UAAU;IAYlC,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW;;;;;;;;;;;IAkB7D,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,GAAE,OAAe;IAgErE,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC;IAyCtD,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAgB,GAAG,MAAM;CAM9C;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,IAAI,CAAA;KACpB;CACF"}
|
package/package.json
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
{
|
2
|
+
"name": "@behold/widget",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"author": "Griffin Johnston",
|
5
|
+
"license": "None",
|
6
|
+
"keywords": [
|
7
|
+
"behold",
|
8
|
+
"instagram",
|
9
|
+
"custom elements",
|
10
|
+
"web components"
|
11
|
+
],
|
12
|
+
"type": "module",
|
13
|
+
"main": "dist/index.js",
|
14
|
+
"module": "dist/index.js",
|
15
|
+
"sideEffects": false,
|
16
|
+
"types": "./dist/BeholdWidget.d.ts",
|
17
|
+
"exports": {
|
18
|
+
".": "./dist/BeholdWidget.js"
|
19
|
+
},
|
20
|
+
"files": [
|
21
|
+
"dist"
|
22
|
+
],
|
23
|
+
"browserslist": [
|
24
|
+
"defaults"
|
25
|
+
],
|
26
|
+
"homepage": "https://behold.so",
|
27
|
+
"bugs": {
|
28
|
+
"url": "https://behold.so"
|
29
|
+
},
|
30
|
+
"scripts": {
|
31
|
+
"start": "npm run build && npm run demo",
|
32
|
+
"build:setup": "rm -rf dist",
|
33
|
+
"build:rollup": "npx rollup -c rollup.config.js",
|
34
|
+
"build": "npm run build:setup && npm run build:rollup",
|
35
|
+
"demo": "cp -r src/demo dist && http-server dist",
|
36
|
+
"test": "npx tsc --noEmit && node --loader tsx --test tests/*.test.ts"
|
37
|
+
},
|
38
|
+
"devDependencies": {
|
39
|
+
"@rollup/plugin-dynamic-import-vars": "^2.1.2",
|
40
|
+
"@rollup/plugin-terser": "^0.4.4",
|
41
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
42
|
+
"cpy": "^10.1.0",
|
43
|
+
"http-server": "^14.1.1",
|
44
|
+
"postcss": "^8.4.31",
|
45
|
+
"prettier": "3.0.3",
|
46
|
+
"rollup": "^4.9.0",
|
47
|
+
"rollup-plugin-postcss": "^4.0.2",
|
48
|
+
"rollup-plugin-svg": "^2.0.0",
|
49
|
+
"sass": "^1.69.0",
|
50
|
+
"tslib": "^2.6.2",
|
51
|
+
"typescript": "^5.3.3"
|
52
|
+
}
|
53
|
+
}
|
package/readme.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
<div align="center">
|
2
|
+
<a href="https://uiball.com/ldrs">
|
3
|
+
<picture>
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="thumbnail-dark.png">
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="thumbnail-light.png">
|
6
|
+
<img src="thumbnail-dark.png" alt="U-I Ball LDRS"
|
7
|
+
width="100%"
|
8
|
+
height="auto">
|
9
|
+
</picture>
|
10
|
+
</a>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
# Behold Widgets
|