@internetarchive/ia-item-navigator 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. package/.github/workflows/ci.yml +4 -5
  2. package/.github/workflows/gh-pages-main.yml +39 -0
  3. package/.github/workflows/pr-preview.yml +38 -0
  4. package/demo/app-root.ts +13 -13
  5. package/dist/demo/app-root.d.ts +47 -47
  6. package/dist/demo/app-root.js +200 -199
  7. package/dist/demo/app-root.js.map +1 -1
  8. package/dist/index.d.ts +3 -3
  9. package/dist/index.js +3 -3
  10. package/dist/src/interfaces/custom-theater-interface.d.ts +20 -20
  11. package/dist/src/interfaces/custom-theater-interface.js +1 -1
  12. package/dist/src/interfaces/event-interfaces.d.ts +40 -40
  13. package/dist/src/interfaces/event-interfaces.js +1 -1
  14. package/dist/src/interfaces/menu-interfaces.d.ts +23 -22
  15. package/dist/src/interfaces/menu-interfaces.js +1 -1
  16. package/dist/src/interfaces/menu-interfaces.js.map +1 -1
  17. package/dist/src/item-navigator.d.ts +69 -69
  18. package/dist/src/item-navigator.js +259 -257
  19. package/dist/src/item-navigator.js.map +1 -1
  20. package/dist/src/loader.d.ts +9 -13
  21. package/dist/src/loader.js +35 -31
  22. package/dist/src/loader.js.map +1 -1
  23. package/dist/src/menu-slider/ia-menu-slider.d.ts +31 -30
  24. package/dist/src/menu-slider/ia-menu-slider.js +123 -124
  25. package/dist/src/menu-slider/ia-menu-slider.js.map +1 -1
  26. package/dist/src/menu-slider/menu-button.d.ts +19 -19
  27. package/dist/src/menu-slider/menu-button.js +75 -75
  28. package/dist/src/menu-slider/menu-button.js.map +1 -1
  29. package/dist/src/menu-slider/styles/menu-button.d.ts +2 -2
  30. package/dist/src/menu-slider/styles/menu-button.js +2 -2
  31. package/dist/src/menu-slider/styles/menu-slider.d.ts +2 -2
  32. package/dist/src/menu-slider/styles/menu-slider.js +5 -5
  33. package/dist/src/no-theater-available.d.ts +9 -9
  34. package/dist/src/no-theater-available.js +35 -35
  35. package/dist/src/no-theater-available.js.map +1 -1
  36. package/dist/test/ia-item-navigator.test.d.ts +1 -1
  37. package/dist/test/ia-item-navigator.test.js +296 -296
  38. package/dist/test/ia-item-navigator.test.js.map +1 -1
  39. package/dist/test/ia-stub.d.ts +22 -22
  40. package/dist/test/ia-stub.js +34 -34
  41. package/dist/test/no-theater-available.test.d.ts +1 -1
  42. package/dist/test/no-theater-available.test.js +22 -22
  43. package/dist/test/no-theater-available.test.js.map +1 -1
  44. package/dist/vite.config.d.ts +2 -0
  45. package/dist/vite.config.js +25 -0
  46. package/dist/vite.config.js.map +1 -0
  47. package/package.json +35 -21
  48. package/src/interfaces/menu-interfaces.ts +3 -1
  49. package/src/item-navigator.ts +9 -4
  50. package/src/loader.ts +5 -7
  51. package/src/menu-slider/ia-menu-slider.ts +17 -17
  52. package/src/menu-slider/menu-button.ts +3 -3
  53. package/src/no-theater-available.ts +1 -1
  54. package/test/ia-item-navigator.test.ts +24 -24
  55. package/test/no-theater-available.test.ts +2 -2
  56. package/tsconfig.json +2 -1
  57. package/vite.config.ts +25 -0
@@ -1,22 +1,23 @@
1
- import { TemplateResult } from 'lit';
2
- import { MetadataResponse } from '@internetarchive/search-service';
3
- export declare type MenuId = string;
4
- export interface MenuShortcutInterface {
5
- icon: TemplateResult;
6
- id: MenuId;
7
- }
8
- export interface MenuDetailsInterface extends MenuShortcutInterface {
9
- label: string;
10
- menuDetails?: TemplateResult;
11
- selected?: boolean;
12
- followable?: boolean;
13
- href?: string;
14
- }
15
- export interface MenuProviderBaseConfigInterface {
16
- item: MetadataResponse;
17
- baseHost: string;
18
- subPrefix: string;
19
- updated?: any;
20
- }
21
- export interface MenuProviderInterface extends MenuProviderBaseConfigInterface, MenuDetailsInterface, MenuShortcutInterface {
22
- }
1
+ import { TemplateResult } from 'lit';
2
+ import { MetadataResponse } from '@internetarchive/search-service';
3
+ export type MenuId = string;
4
+ export interface MenuShortcutInterface {
5
+ icon: TemplateResult;
6
+ id: MenuId;
7
+ }
8
+ export interface MenuDetailsInterface extends MenuShortcutInterface {
9
+ label: string;
10
+ menuDetails?: TemplateResult;
11
+ selected?: boolean;
12
+ followable?: boolean;
13
+ href?: string;
14
+ }
15
+ export interface MenuProviderBaseConfigInterface {
16
+ item: MetadataResponse;
17
+ baseHost: string;
18
+ subPrefix: string;
19
+ updated?: any;
20
+ }
21
+ export interface MenuProviderInterface extends MenuProviderBaseConfigInterface, MenuDetailsInterface, MenuShortcutInterface {
22
+ actionButton: TemplateResult;
23
+ }
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=menu-interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/menu-interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { TemplateResult } from 'lit';\nimport { MetadataResponse } from '@internetarchive/search-service';\n\nexport type MenuId = string;\nexport interface MenuShortcutInterface {\n icon: TemplateResult;\n id: MenuId;\n}\n\nexport interface MenuDetailsInterface extends MenuShortcutInterface {\n label: string;\n menuDetails?: TemplateResult;\n selected?: boolean;\n followable?: boolean;\n href?: string;\n}\n\nexport interface MenuProviderBaseConfigInterface {\n item: MetadataResponse;\n baseHost: string;\n subPrefix: string;\n updated?: any;\n}\nexport interface MenuProviderInterface\n extends MenuProviderBaseConfigInterface,\n MenuDetailsInterface,\n MenuShortcutInterface {}\n"]}
1
+ {"version":3,"file":"menu-interfaces.js","sourceRoot":"","sources":["../../../src/interfaces/menu-interfaces.ts"],"names":[],"mappings":"","sourcesContent":["import { TemplateResult } from 'lit';\nimport { MetadataResponse } from '@internetarchive/search-service';\n\nexport type MenuId = string;\nexport interface MenuShortcutInterface {\n icon: TemplateResult;\n id: MenuId;\n}\n\nexport interface MenuDetailsInterface extends MenuShortcutInterface {\n label: string;\n menuDetails?: TemplateResult;\n selected?: boolean;\n followable?: boolean;\n href?: string;\n}\n\nexport interface MenuProviderBaseConfigInterface {\n item: MetadataResponse;\n baseHost: string;\n subPrefix: string;\n updated?: any;\n}\nexport interface MenuProviderInterface\n extends MenuProviderBaseConfigInterface,\n MenuDetailsInterface,\n MenuShortcutInterface {\n actionButton: TemplateResult;\n}\n"]}
@@ -1,69 +1,69 @@
1
- import { LitElement, PropertyValues, CSSResult, TemplateResult, nothing } from 'lit';
2
- import { MetadataResponse } from '@internetarchive/search-service';
3
- import { SharedResizeObserver, SharedResizeObserverResizeHandlerInterface } from '@internetarchive/shared-resize-observer';
4
- import { ModalManager } from '@internetarchive/modal-manager';
5
- import '@internetarchive/icon-ellipses/icon-ellipses';
6
- import './menu-slider/ia-menu-slider';
7
- import './loader';
8
- import { ToggleSideMenuOpenEvent, ToggleSidePanelOpenEvent, SetSideMenuContentsEvent, SetSideMenuShortcutsEvent, loadingStateUpdatedEvent, ManageFullscreenEvent } from './interfaces/event-interfaces';
9
- import { MenuProviderInterface, MenuShortcutInterface, MenuId } from './interfaces/menu-interfaces';
10
- import './no-theater-available';
11
- export declare class ItemNavigator extends LitElement implements SharedResizeObserverResizeHandlerInterface {
12
- item?: MetadataResponse;
13
- viewAvailable: Boolean;
14
- baseHost: string;
15
- signedIn: boolean;
16
- menuContents: MenuProviderInterface[];
17
- menuShortcuts: MenuShortcutInterface[];
18
- viewportInFullscreen: boolean | null;
19
- menuOpened: boolean;
20
- openMenu?: MenuId;
21
- modal?: ModalManager;
22
- sharedObserver?: SharedResizeObserver;
23
- loaded: true | null;
24
- openMenuState: 'overlay' | 'shift';
25
- private frame;
26
- private headerSlot;
27
- private mainSlot;
28
- disconnectedCallback(): void;
29
- updated(changed: PropertyValues): void;
30
- /** Shared observer */
31
- handleResize(entry: ResizeObserverEntry): void;
32
- private setResizeObserver;
33
- private removeResizeObserver;
34
- get resizeObserverConfig(): {
35
- handler: SharedResizeObserverResizeHandlerInterface;
36
- target: Element;
37
- };
38
- /** End shared observer */
39
- get loaderTitle(): "" | "Internet Archive";
40
- get loadingArea(): TemplateResult<1>;
41
- slotChange(e: Event, type: 'header' | 'main'): void;
42
- render(): TemplateResult;
43
- get noTheaterView(): TemplateResult<1>;
44
- get renderViewport(): TemplateResult | typeof nothing;
45
- loadingStateUpdated(e: loadingStateUpdatedEvent): void;
46
- /** Fullscreen Management */
47
- manageViewportFullscreen(e: ManageFullscreenEvent): void;
48
- /** End Fullscreen Management */
49
- /** Side menu */
50
- get shouldRenderMenu(): boolean;
51
- toggleMenu(): void;
52
- closeMenu(): void;
53
- setOpenMenu(e: ToggleSidePanelOpenEvent): void;
54
- setMenuContents(e: SetSideMenuContentsEvent): void;
55
- setMenuShortcuts(e: SetSideMenuShortcutsEvent): void;
56
- /** Toggles Side Menu & Sets viewable subpanel */
57
- manageSideMenuEvents(e: ToggleSideMenuOpenEvent): void;
58
- get menuToggleButton(): TemplateResult<1>;
59
- get selectedMenuId(): MenuId | '';
60
- get renderSideMenu(): TemplateResult;
61
- /** End Side menu */
62
- /** Menu Shortcuts */
63
- openShortcut(selectedMenuId?: MenuId): void;
64
- get shortcuts(): TemplateResult;
65
- /** End Menu Shortcuts */
66
- /** Misc Render */
67
- get menuClass(): string;
68
- static get styles(): CSSResult;
69
- }
1
+ import { LitElement, PropertyValues, CSSResult, TemplateResult, nothing } from 'lit';
2
+ import { MetadataResponse } from '@internetarchive/search-service';
3
+ import { SharedResizeObserver, SharedResizeObserverResizeHandlerInterface } from '@internetarchive/shared-resize-observer';
4
+ import { ModalManager } from '@internetarchive/modal-manager';
5
+ import '@internetarchive/icon-ellipses/icon-ellipses';
6
+ import './menu-slider/ia-menu-slider';
7
+ import './loader';
8
+ import { ToggleSideMenuOpenEvent, ToggleSidePanelOpenEvent, SetSideMenuContentsEvent, SetSideMenuShortcutsEvent, loadingStateUpdatedEvent, ManageFullscreenEvent } from './interfaces/event-interfaces';
9
+ import { MenuProviderInterface, MenuShortcutInterface, MenuId } from './interfaces/menu-interfaces';
10
+ import './no-theater-available';
11
+ export declare class ItemNavigator extends LitElement implements SharedResizeObserverResizeHandlerInterface {
12
+ item?: MetadataResponse;
13
+ viewAvailable: Boolean;
14
+ baseHost: string;
15
+ signedIn: boolean;
16
+ menuContents: MenuProviderInterface[];
17
+ menuShortcuts: MenuShortcutInterface[];
18
+ viewportInFullscreen: boolean | null;
19
+ menuOpened: boolean;
20
+ openMenu?: MenuId;
21
+ modal?: ModalManager;
22
+ sharedObserver?: SharedResizeObserver;
23
+ loaded: true | null;
24
+ openMenuState: 'overlay' | 'shift';
25
+ private frame;
26
+ private headerSlot;
27
+ private mainSlot;
28
+ disconnectedCallback(): void;
29
+ updated(changed: PropertyValues): void;
30
+ /** Shared observer */
31
+ handleResize(entry: ResizeObserverEntry): void;
32
+ private setResizeObserver;
33
+ private removeResizeObserver;
34
+ get resizeObserverConfig(): {
35
+ handler: SharedResizeObserverResizeHandlerInterface;
36
+ target: Element;
37
+ };
38
+ /** End shared observer */
39
+ get loaderTitle(): "" | "Internet Archive";
40
+ get loadingArea(): TemplateResult<1>;
41
+ slotChange(e: Event, type: 'header' | 'main'): void;
42
+ render(): TemplateResult;
43
+ get noTheaterView(): TemplateResult<1>;
44
+ get renderViewport(): TemplateResult | typeof nothing;
45
+ loadingStateUpdated(e: loadingStateUpdatedEvent): void;
46
+ /** Fullscreen Management */
47
+ manageViewportFullscreen(e: ManageFullscreenEvent): void;
48
+ /** End Fullscreen Management */
49
+ /** Side menu */
50
+ get shouldRenderMenu(): boolean;
51
+ toggleMenu(): void;
52
+ closeMenu(): void;
53
+ setOpenMenu(e: ToggleSidePanelOpenEvent): void;
54
+ setMenuContents(e: SetSideMenuContentsEvent): void;
55
+ setMenuShortcuts(e: SetSideMenuShortcutsEvent): void;
56
+ /** Toggles Side Menu & Sets viewable subpanel */
57
+ manageSideMenuEvents(e: ToggleSideMenuOpenEvent): void;
58
+ get menuToggleButton(): TemplateResult<1>;
59
+ get selectedMenuId(): MenuId | '';
60
+ get renderSideMenu(): TemplateResult;
61
+ /** End Side menu */
62
+ /** Menu Shortcuts */
63
+ openShortcut(selectedMenuId?: MenuId): void;
64
+ get shortcuts(): TemplateResult;
65
+ /** End Menu Shortcuts */
66
+ /** Misc Render */
67
+ get menuClass(): string;
68
+ static get styles(): CSSResult;
69
+ }