@spectrum-web-components/overlay 1.1.0-beta.8 → 1.1.0
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/package.json +7 -7
- package/overlay-trigger.d.ts +0 -6
- package/overlay-trigger.dev.js +0 -5
- package/overlay-trigger.dev.js.map +0 -7
- package/overlay-trigger.js +0 -2
- package/overlay-trigger.js.map +0 -7
- package/sp-overlay.d.ts +0 -6
- package/sp-overlay.dev.js +0 -5
- package/sp-overlay.dev.js.map +0 -7
- package/sp-overlay.js +0 -2
- package/sp-overlay.js.map +0 -7
- package/src/AbstractOverlay.d.ts +0 -72
- package/src/AbstractOverlay.dev.js +0 -234
- package/src/AbstractOverlay.dev.js.map +0 -7
- package/src/AbstractOverlay.js +0 -2
- package/src/AbstractOverlay.js.map +0 -7
- package/src/ClickController.d.ts +0 -14
- package/src/ClickController.dev.js +0 -42
- package/src/ClickController.dev.js.map +0 -7
- package/src/ClickController.js +0 -2
- package/src/ClickController.js.map +0 -7
- package/src/HoverController.d.ts +0 -20
- package/src/HoverController.dev.js +0 -153
- package/src/HoverController.dev.js.map +0 -7
- package/src/HoverController.js +0 -2
- package/src/HoverController.js.map +0 -7
- package/src/InteractionController.d.ts +0 -38
- package/src/InteractionController.dev.js +0 -90
- package/src/InteractionController.dev.js.map +0 -7
- package/src/InteractionController.js +0 -2
- package/src/InteractionController.js.map +0 -7
- package/src/LongpressController.d.ts +0 -21
- package/src/LongpressController.dev.js +0 -156
- package/src/LongpressController.dev.js.map +0 -7
- package/src/LongpressController.js +0 -2
- package/src/LongpressController.js.map +0 -7
- package/src/Overlay.d.ts +0 -134
- package/src/Overlay.dev.js +0 -534
- package/src/Overlay.dev.js.map +0 -7
- package/src/Overlay.js +0 -33
- package/src/Overlay.js.map +0 -7
- package/src/OverlayDialog.d.ts +0 -4
- package/src/OverlayDialog.dev.js +0 -139
- package/src/OverlayDialog.dev.js.map +0 -7
- package/src/OverlayDialog.js +0 -2
- package/src/OverlayDialog.js.map +0 -7
- package/src/OverlayNoPopover.d.ts +0 -4
- package/src/OverlayNoPopover.dev.js +0 -117
- package/src/OverlayNoPopover.dev.js.map +0 -7
- package/src/OverlayNoPopover.js +0 -2
- package/src/OverlayNoPopover.js.map +0 -7
- package/src/OverlayPopover.d.ts +0 -4
- package/src/OverlayPopover.dev.js +0 -199
- package/src/OverlayPopover.dev.js.map +0 -7
- package/src/OverlayPopover.js +0 -2
- package/src/OverlayPopover.js.map +0 -7
- package/src/OverlayStack.d.ts +0 -44
- package/src/OverlayStack.dev.js +0 -160
- package/src/OverlayStack.dev.js.map +0 -7
- package/src/OverlayStack.js +0 -2
- package/src/OverlayStack.js.map +0 -7
- package/src/OverlayTrigger.d.ts +0 -52
- package/src/OverlayTrigger.dev.js +0 -243
- package/src/OverlayTrigger.dev.js.map +0 -7
- package/src/OverlayTrigger.js +0 -57
- package/src/OverlayTrigger.js.map +0 -7
- package/src/PlacementController.d.ts +0 -40
- package/src/PlacementController.dev.js +0 -212
- package/src/PlacementController.dev.js.map +0 -7
- package/src/PlacementController.js +0 -2
- package/src/PlacementController.js.map +0 -7
- package/src/VirtualTrigger.d.ts +0 -7
- package/src/VirtualTrigger.dev.js +0 -32
- package/src/VirtualTrigger.dev.js.map +0 -7
- package/src/VirtualTrigger.js +0 -2
- package/src/VirtualTrigger.js.map +0 -7
- package/src/events.d.ts +0 -23
- package/src/events.dev.js +0 -39
- package/src/events.dev.js.map +0 -7
- package/src/events.js +0 -2
- package/src/events.js.map +0 -7
- package/src/fullSizePlugin.d.ts +0 -12
- package/src/fullSizePlugin.dev.js +0 -39
- package/src/fullSizePlugin.dev.js.map +0 -7
- package/src/fullSizePlugin.js +0 -2
- package/src/fullSizePlugin.js.map +0 -7
- package/src/index.d.ts +0 -6
- package/src/index.dev.js +0 -8
- package/src/index.dev.js.map +0 -7
- package/src/index.js +0 -2
- package/src/index.js.map +0 -7
- package/src/loader.d.ts +0 -4
- package/src/loader.dev.js +0 -11
- package/src/loader.dev.js.map +0 -7
- package/src/loader.js +0 -2
- package/src/loader.js.map +0 -7
- package/src/overlay-events.d.ts +0 -11
- package/src/overlay-events.dev.js +0 -8
- package/src/overlay-events.dev.js.map +0 -7
- package/src/overlay-events.js +0 -2
- package/src/overlay-events.js.map +0 -7
- package/src/overlay-timer.d.ts +0 -22
- package/src/overlay-timer.dev.js +0 -72
- package/src/overlay-timer.dev.js.map +0 -7
- package/src/overlay-timer.js +0 -2
- package/src/overlay-timer.js.map +0 -7
- package/src/overlay-trigger-directive.d.ts +0 -26
- package/src/overlay-trigger-directive.dev.js +0 -87
- package/src/overlay-trigger-directive.dev.js.map +0 -7
- package/src/overlay-trigger-directive.js +0 -2
- package/src/overlay-trigger-directive.js.map +0 -7
- package/src/overlay-trigger.css.d.ts +0 -2
- package/src/overlay-trigger.css.dev.js +0 -7
- package/src/overlay-trigger.css.dev.js.map +0 -7
- package/src/overlay-trigger.css.js +0 -4
- package/src/overlay-trigger.css.js.map +0 -7
- package/src/overlay-types.d.ts +0 -50
- package/src/overlay-types.dev.js +0 -3
- package/src/overlay-types.dev.js.map +0 -7
- package/src/overlay-types.js +0 -2
- package/src/overlay-types.js.map +0 -7
- package/src/overlay.css.d.ts +0 -2
- package/src/overlay.css.dev.js +0 -7
- package/src/overlay.css.dev.js.map +0 -7
- package/src/overlay.css.js +0 -4
- package/src/overlay.css.js.map +0 -7
- package/src/slottable-request-directive.d.ts +0 -17
- package/src/slottable-request-directive.dev.js +0 -66
- package/src/slottable-request-directive.dev.js.map +0 -7
- package/src/slottable-request-directive.js +0 -2
- package/src/slottable-request-directive.js.map +0 -7
- package/src/slottable-request-event.d.ts +0 -12
- package/src/slottable-request-event.dev.js +0 -28
- package/src/slottable-request-event.dev.js.map +0 -7
- package/src/slottable-request-event.js +0 -2
- package/src/slottable-request-event.js.map +0 -7
- package/src/strategies.d.ts +0 -8
- package/src/strategies.dev.js +0 -10
- package/src/strategies.dev.js.map +0 -7
- package/src/strategies.js +0 -2
- package/src/strategies.js.map +0 -7
- package/stories/index.js +0 -40
- package/stories/index.js.map +0 -7
- package/stories/overlay-directive.stories.js +0 -324
- package/stories/overlay-directive.stories.js.map +0 -7
- package/stories/overlay-element.stories.js +0 -675
- package/stories/overlay-element.stories.js.map +0 -7
- package/stories/overlay-story-components.js +0 -338
- package/stories/overlay-story-components.js.map +0 -7
- package/stories/overlay.stories.js +0 -1397
- package/stories/overlay.stories.js.map +0 -7
- package/sync/overlay-trigger.d.ts +0 -6
- package/sync/overlay-trigger.dev.js +0 -6
- package/sync/overlay-trigger.dev.js.map +0 -7
- package/sync/overlay-trigger.js +0 -2
- package/sync/overlay-trigger.js.map +0 -7
- package/test/benchmark/basic-test.js +0 -40
- package/test/benchmark/basic-test.js.map +0 -7
- package/test/benchmark/directive-test.js +0 -43
- package/test/benchmark/directive-test.js.map +0 -7
- package/test/benchmark/element-test.js +0 -40
- package/test/benchmark/element-test.js.map +0 -7
- package/test/benchmark/lazy-test.js +0 -47
- package/test/benchmark/lazy-test.js.map +0 -7
- package/test/index.js +0 -605
- package/test/index.js.map +0 -7
- package/test/overlay-directive.test-vrt.js +0 -5
- package/test/overlay-directive.test-vrt.js.map +0 -7
- package/test/overlay-directive.test.js +0 -162
- package/test/overlay-directive.test.js.map +0 -7
- package/test/overlay-element.test-vrt.js +0 -5
- package/test/overlay-element.test-vrt.js.map +0 -7
- package/test/overlay-element.test.js +0 -936
- package/test/overlay-element.test.js.map +0 -7
- package/test/overlay-lifecycle.test.js +0 -139
- package/test/overlay-lifecycle.test.js.map +0 -7
- package/test/overlay-memory.test.js +0 -10
- package/test/overlay-memory.test.js.map +0 -7
- package/test/overlay-timer.test.js +0 -118
- package/test/overlay-timer.test.js.map +0 -7
- package/test/overlay-trigger-click.test.js +0 -164
- package/test/overlay-trigger-click.test.js.map +0 -7
- package/test/overlay-trigger-directive.test.js +0 -75
- package/test/overlay-trigger-directive.test.js.map +0 -7
- package/test/overlay-trigger-extended.test.js +0 -235
- package/test/overlay-trigger-extended.test.js.map +0 -7
- package/test/overlay-trigger-hover-click.test.js +0 -225
- package/test/overlay-trigger-hover-click.test.js.map +0 -7
- package/test/overlay-trigger-hover.test.js +0 -308
- package/test/overlay-trigger-hover.test.js.map +0 -7
- package/test/overlay-trigger-longpress.test.js +0 -549
- package/test/overlay-trigger-longpress.test.js.map +0 -7
- package/test/overlay-trigger-sync.test.js +0 -5
- package/test/overlay-trigger-sync.test.js.map +0 -7
- package/test/overlay-trigger.test.js +0 -5
- package/test/overlay-trigger.test.js.map +0 -7
- package/test/overlay-update.test.js +0 -28
- package/test/overlay-update.test.js.map +0 -7
- package/test/overlay-v1.test.js +0 -569
- package/test/overlay-v1.test.js.map +0 -7
- package/test/overlay.test-vrt.js +0 -5
- package/test/overlay.test-vrt.js.map +0 -7
- package/test/overlay.test.js +0 -776
- package/test/overlay.test.js.map +0 -7
package/src/overlay-timer.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay-timer.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nconst DEFAULT_WARMUP = 1000;\nconst DEFAULT_COOLDOWN = 1000;\n\n/**\n * A timer to help with implementation of warnup/cooldown behavior as described here:\n * https://spectrum.adobe.com/page/tooltip/#Immediate-or-delayed-appearance\n */\nexport class OverlayTimer {\n private warmUpDelay = DEFAULT_WARMUP;\n private coolDownDelay = DEFAULT_COOLDOWN;\n\n private isWarm = false;\n private cooldownTimeout?: number;\n\n private component?: HTMLElement;\n private timeout = 0;\n private promise?: Promise<boolean>;\n private resolve?: (cancelled: boolean) => void;\n\n constructor(\n options: { warmUpDelay?: number; coolDownDelay?: number } = {}\n ) {\n Object.assign(this, options);\n }\n\n public async openTimer(component: HTMLElement): Promise<boolean> {\n this.cancelCooldownTimer();\n\n if (!this.component || component !== this.component) {\n if (this.component) {\n this.close(this.component);\n this.cancelCooldownTimer();\n }\n this.component = component;\n\n if (this.isWarm) {\n return false;\n }\n\n this.promise = new Promise((resolve) => {\n this.resolve = resolve;\n this.timeout = window.setTimeout(() => {\n if (this.resolve) {\n this.resolve(false);\n this.isWarm = true;\n }\n }, this.warmUpDelay);\n });\n return this.promise;\n } else if (this.promise) {\n return this.promise;\n /* c8 ignore next 4 */\n } else {\n // This should never happen\n throw new Error('Inconsistent state');\n }\n }\n\n public close(component: HTMLElement): void {\n if (this.component && this.component === component) {\n this.resetCooldownTimer();\n if (this.timeout > 0) {\n clearTimeout(this.timeout);\n this.timeout = 0;\n }\n if (this.resolve) {\n this.resolve(true);\n delete this.resolve;\n }\n delete this.promise;\n delete this.component;\n }\n }\n\n private resetCooldownTimer(): void {\n if (this.isWarm) {\n if (this.cooldownTimeout) {\n window.clearTimeout(this.cooldownTimeout);\n }\n this.cooldownTimeout = window.setTimeout(() => {\n this.isWarm = false;\n delete this.cooldownTimeout;\n }, this.coolDownDelay);\n }\n }\n\n private cancelCooldownTimer(): void {\n if (this.cooldownTimeout) {\n window.clearTimeout(this.cooldownTimeout);\n }\n delete this.cooldownTimeout;\n }\n}\n"],
|
|
5
|
-
"mappings": "aAYA,MAAMA,EAAiB,IACjBC,EAAmB,IAMlB,aAAM,YAAa,CAYtB,YACIC,EAA4D,CAAC,EAC/D,CAbF,KAAQ,YAAc,IACtB,KAAQ,cAAgB,IAExB,KAAQ,OAAS,GAIjB,KAAQ,QAAU,EAOd,OAAO,OAAO,KAAMA,CAAO,CAC/B,CAEA,MAAa,UAAUC,EAA0C,CAG7D,GAFA,KAAK,oBAAoB,EAErB,CAAC,KAAK,WAAaA,IAAc,KAAK,UAOtC,OANI,KAAK,YACL,KAAK,MAAM,KAAK,SAAS,EACzB,KAAK,oBAAoB,GAE7B,KAAK,UAAYA,EAEb,KAAK,OACE,IAGX,KAAK,QAAU,IAAI,QAASC,GAAY,CACpC,KAAK,QAAUA,EACf,KAAK,QAAU,OAAO,WAAW,IAAM,CAC/B,KAAK,UACL,KAAK,QAAQ,EAAK,EAClB,KAAK,OAAS,GAEtB,EAAG,KAAK,WAAW,CACvB,CAAC,EACM,KAAK,SACT,GAAI,KAAK,QACZ,OAAO,KAAK,QAIZ,MAAM,IAAI,MAAM,oBAAoB,CAE5C,CAEO,MAAMD,EAA8B,CACnC,KAAK,WAAa,KAAK,YAAcA,IACrC,KAAK,mBAAmB,EACpB,KAAK,QAAU,IACf,aAAa,KAAK,OAAO,EACzB,KAAK,QAAU,GAEf,KAAK,UACL,KAAK,QAAQ,EAAI,EACjB,OAAO,KAAK,SAEhB,OAAO,KAAK,QACZ,OAAO,KAAK,UAEpB,CAEQ,oBAA2B,CAC3B,KAAK,SACD,KAAK,iBACL,OAAO,aAAa,KAAK,eAAe,EAE5C,KAAK,gBAAkB,OAAO,WAAW,IAAM,CAC3C,KAAK,OAAS,GACd,OAAO,KAAK,eAChB,EAAG,KAAK,aAAa,EAE7B,CAEQ,qBAA4B,CAC5B,KAAK,iBACL,OAAO,aAAa,KAAK,eAAe,EAE5C,OAAO,KAAK,eAChB,CACJ",
|
|
6
|
-
"names": ["DEFAULT_WARMUP", "DEFAULT_COOLDOWN", "options", "component", "resolve"]
|
|
7
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type ElementPart, type TemplateResult } from '@spectrum-web-components/base';
|
|
2
|
-
import type { OverlayOptions, TriggerInteraction } from './overlay-types.js';
|
|
3
|
-
import { type SlottableRequestEvent } from './slottable-request-event.js';
|
|
4
|
-
import { SlottableRequestDirective } from './slottable-request-directive.js';
|
|
5
|
-
export type InsertionOptions = {
|
|
6
|
-
el: HTMLElement | (() => HTMLElement);
|
|
7
|
-
where: InsertPosition;
|
|
8
|
-
};
|
|
9
|
-
export type OverlayTriggerOptions = {
|
|
10
|
-
open?: boolean;
|
|
11
|
-
triggerInteraction: TriggerInteraction;
|
|
12
|
-
overlayOptions: OverlayOptions;
|
|
13
|
-
insertionOptions?: InsertionOptions;
|
|
14
|
-
};
|
|
15
|
-
export declare class OverlayTriggerDirective extends SlottableRequestDirective {
|
|
16
|
-
private host?;
|
|
17
|
-
private overlay;
|
|
18
|
-
private strategy;
|
|
19
|
-
protected defaultOptions: OverlayTriggerOptions;
|
|
20
|
-
protected options: OverlayOptions;
|
|
21
|
-
protected insertionOptions?: InsertionOptions;
|
|
22
|
-
render(_template: () => TemplateResult, _options?: Partial<OverlayTriggerOptions>): unknown;
|
|
23
|
-
update(part: ElementPart, [template, options]: Parameters<this['render']>): void;
|
|
24
|
-
handleSlottableRequest(event: SlottableRequestEvent): void;
|
|
25
|
-
}
|
|
26
|
-
export declare const trigger: (_template: () => TemplateResult, _options?: Partial<OverlayTriggerOptions> | undefined) => import("lit-html/directive.js").DirectiveResult<typeof OverlayTriggerDirective>;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import {
|
|
3
|
-
nothing,
|
|
4
|
-
render
|
|
5
|
-
} from "@spectrum-web-components/base";
|
|
6
|
-
import { directive } from "@spectrum-web-components/base/src/async-directive.js";
|
|
7
|
-
import { strategies } from "./strategies.dev.js";
|
|
8
|
-
import {
|
|
9
|
-
removeSlottableRequest
|
|
10
|
-
} from "./slottable-request-event.dev.js";
|
|
11
|
-
import { SlottableRequestDirective } from "./slottable-request-directive.dev.js";
|
|
12
|
-
import { AbstractOverlay } from "./AbstractOverlay.dev.js";
|
|
13
|
-
import { InteractionTypes } from "./InteractionController.dev.js";
|
|
14
|
-
export class OverlayTriggerDirective extends SlottableRequestDirective {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.defaultOptions = {
|
|
18
|
-
triggerInteraction: "click",
|
|
19
|
-
overlayOptions: {
|
|
20
|
-
type: "auto",
|
|
21
|
-
offset: 0
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
this.options = {
|
|
25
|
-
...this.defaultOptions.overlayOptions
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
/* c8 ignore next 9 */
|
|
29
|
-
render(_template, _options) {
|
|
30
|
-
return nothing;
|
|
31
|
-
}
|
|
32
|
-
update(part, [template, options]) {
|
|
33
|
-
var _a, _b, _c, _d;
|
|
34
|
-
this.options = {
|
|
35
|
-
...this.defaultOptions.overlayOptions,
|
|
36
|
-
...options == null ? void 0 : options.overlayOptions
|
|
37
|
-
};
|
|
38
|
-
this.insertionOptions = options == null ? void 0 : options.insertionOptions;
|
|
39
|
-
this.template = template;
|
|
40
|
-
this.host = (_a = part.options) == null ? void 0 : _a.host;
|
|
41
|
-
let newTarget = false;
|
|
42
|
-
const triggerInteraction = (options == null ? void 0 : options.triggerInteraction) || this.defaultOptions.triggerInteraction;
|
|
43
|
-
const newStrategy = InteractionTypes[(_b = this.strategy) == null ? void 0 : _b.type] !== triggerInteraction;
|
|
44
|
-
if (this.target !== part.element) {
|
|
45
|
-
this.target = part.element;
|
|
46
|
-
newTarget = true;
|
|
47
|
-
}
|
|
48
|
-
if (newTarget || newStrategy) {
|
|
49
|
-
(_c = this.strategy) == null ? void 0 : _c.abort();
|
|
50
|
-
this.strategy = new strategies[triggerInteraction](this.target, {
|
|
51
|
-
isPersistent: true,
|
|
52
|
-
handleOverlayReady: (overlay) => {
|
|
53
|
-
this.listenerHost = this.overlay = overlay;
|
|
54
|
-
this.init();
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
this.strategy.open = (_d = options == null ? void 0 : options.open) != null ? _d : false;
|
|
59
|
-
}
|
|
60
|
-
handleSlottableRequest(event) {
|
|
61
|
-
var _a, _b;
|
|
62
|
-
if (event.target !== event.currentTarget) return;
|
|
63
|
-
const willRemoveSlottable = event.data === removeSlottableRequest;
|
|
64
|
-
const options = {};
|
|
65
|
-
if (this.host) {
|
|
66
|
-
options.host = this.host;
|
|
67
|
-
}
|
|
68
|
-
render(
|
|
69
|
-
willRemoveSlottable ? void 0 : this.template(),
|
|
70
|
-
this.overlay,
|
|
71
|
-
options
|
|
72
|
-
);
|
|
73
|
-
if (willRemoveSlottable) {
|
|
74
|
-
this.overlay.remove();
|
|
75
|
-
} else {
|
|
76
|
-
AbstractOverlay.applyOptions(this.overlay, {
|
|
77
|
-
...this.options,
|
|
78
|
-
trigger: this.target
|
|
79
|
-
});
|
|
80
|
-
const insertionEl = typeof ((_a = this.insertionOptions) == null ? void 0 : _a.el) === "function" ? this.insertionOptions.el() : ((_b = this.insertionOptions) == null ? void 0 : _b.el) || this.target;
|
|
81
|
-
const { where = "afterend" } = this.insertionOptions || {};
|
|
82
|
-
insertionEl.insertAdjacentElement(where, this.overlay);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
export const trigger = directive(OverlayTriggerDirective);
|
|
87
|
-
//# sourceMappingURL=overlay-trigger-directive.dev.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay-trigger-directive.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n type ElementPart,\n nothing,\n render,\n type RenderOptions,\n type TemplateResult,\n} from '@spectrum-web-components/base';\nimport { directive } from '@spectrum-web-components/base/src/async-directive.js';\nimport { strategies } from './strategies.dev.js'\nimport type { OverlayOptions, TriggerInteraction } from './overlay-types.dev.js'\nimport type { ClickController } from './ClickController.dev.js'\nimport type { HoverController } from './HoverController.dev.js'\nimport type { LongpressController } from './LongpressController.dev.js'\nimport {\n removeSlottableRequest,\n type SlottableRequestEvent,\n} from './slottable-request-event.dev.js'\nimport { SlottableRequestDirective } from './slottable-request-directive.dev.js'\nimport { AbstractOverlay } from './AbstractOverlay.dev.js'\nimport { InteractionTypes } from './InteractionController.dev.js'\n\nexport type InsertionOptions = {\n el: HTMLElement | (() => HTMLElement);\n where: InsertPosition;\n};\n\nexport type OverlayTriggerOptions = {\n open?: boolean;\n triggerInteraction: TriggerInteraction;\n overlayOptions: OverlayOptions;\n insertionOptions?: InsertionOptions;\n};\n\nexport class OverlayTriggerDirective extends SlottableRequestDirective {\n private host?: object;\n private overlay!: AbstractOverlay;\n private strategy!: ClickController | HoverController | LongpressController;\n\n protected defaultOptions: OverlayTriggerOptions = {\n triggerInteraction: 'click',\n overlayOptions: {\n type: 'auto',\n offset: 0,\n },\n };\n protected options: OverlayOptions = {\n ...this.defaultOptions.overlayOptions,\n };\n protected insertionOptions?: InsertionOptions;\n\n /* c8 ignore next 9 */\n override render(\n _template: () => TemplateResult,\n _options?: Partial<OverlayTriggerOptions>\n ): unknown {\n // render function here just defines the interface to the update call later\n // we don't have anything to render since this is intended to be an ElementPart directive\n // so will be used on an element and is not itself rendered\n return nothing;\n }\n\n override update(\n part: ElementPart,\n [template, options]: Parameters<this['render']>\n ): void {\n this.options = {\n ...this.defaultOptions.overlayOptions,\n ...options?.overlayOptions,\n };\n this.insertionOptions = options?.insertionOptions;\n this.template = template;\n this.host = part.options?.host;\n let newTarget = false;\n const triggerInteraction = (options?.triggerInteraction ||\n this.defaultOptions.triggerInteraction) as TriggerInteraction;\n const newStrategy =\n InteractionTypes[this.strategy?.type] !== triggerInteraction;\n if (this.target !== part.element) {\n this.target = part.element as HTMLElement;\n newTarget = true;\n }\n if (newTarget || newStrategy) {\n this.strategy?.abort();\n this.strategy = new strategies[\n triggerInteraction as TriggerInteraction\n ](this.target, {\n isPersistent: true,\n handleOverlayReady: (overlay: AbstractOverlay) => {\n this.listenerHost = this.overlay = overlay;\n this.init();\n },\n });\n }\n this.strategy.open = options?.open ?? false;\n }\n\n override handleSlottableRequest(event: SlottableRequestEvent): void {\n /* c8 ignore next 1 */\n if (event.target !== event.currentTarget) return;\n\n const willRemoveSlottable = event.data === removeSlottableRequest;\n const options = {} as RenderOptions;\n if (this.host) {\n options.host = this.host;\n }\n render(\n willRemoveSlottable ? undefined : this.template(),\n this.overlay,\n options\n );\n\n if (willRemoveSlottable) {\n this.overlay.remove();\n } else {\n AbstractOverlay.applyOptions(this.overlay, {\n ...this.options,\n trigger: this.target,\n });\n const insertionEl =\n typeof this.insertionOptions?.el === 'function'\n ? this.insertionOptions.el()\n : this.insertionOptions?.el || this.target;\n const { where = 'afterend' } = this.insertionOptions || {};\n insertionEl.insertAdjacentElement(where, this.overlay);\n }\n }\n}\n\nexport const trigger = directive(OverlayTriggerDirective);\n"],
|
|
5
|
-
"mappings": ";AAWA;AAAA,EAEI;AAAA,EACA;AAAA,OAGG;AACP,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAK3B;AAAA,EACI;AAAA,OAEG;AACP,SAAS,iCAAiC;AAC1C,SAAS,uBAAuB;AAChC,SAAS,wBAAwB;AAc1B,aAAM,gCAAgC,0BAA0B;AAAA,EAAhE;AAAA;AAKH,SAAU,iBAAwC;AAAA,MAC9C,oBAAoB;AAAA,MACpB,gBAAgB;AAAA,QACZ,MAAM;AAAA,QACN,QAAQ;AAAA,MACZ;AAAA,IACJ;AACA,SAAU,UAA0B;AAAA,MAChC,GAAG,KAAK,eAAe;AAAA,IAC3B;AAAA;AAAA;AAAA,EAIS,OACL,WACA,UACO;AAIP,WAAO;AAAA,EACX;AAAA,EAES,OACL,MACA,CAAC,UAAU,OAAO,GACd;AA3EZ;AA4EQ,SAAK,UAAU;AAAA,MACX,GAAG,KAAK,eAAe;AAAA,MACvB,GAAG,mCAAS;AAAA,IAChB;AACA,SAAK,mBAAmB,mCAAS;AACjC,SAAK,WAAW;AAChB,SAAK,QAAO,UAAK,YAAL,mBAAc;AAC1B,QAAI,YAAY;AAChB,UAAM,sBAAsB,mCAAS,uBACjC,KAAK,eAAe;AACxB,UAAM,cACF,kBAAiB,UAAK,aAAL,mBAAe,IAAI,MAAM;AAC9C,QAAI,KAAK,WAAW,KAAK,SAAS;AAC9B,WAAK,SAAS,KAAK;AACnB,kBAAY;AAAA,IAChB;AACA,QAAI,aAAa,aAAa;AAC1B,iBAAK,aAAL,mBAAe;AACf,WAAK,WAAW,IAAI,WAChB,kBACJ,EAAE,KAAK,QAAQ;AAAA,QACX,cAAc;AAAA,QACd,oBAAoB,CAAC,YAA6B;AAC9C,eAAK,eAAe,KAAK,UAAU;AACnC,eAAK,KAAK;AAAA,QACd;AAAA,MACJ,CAAC;AAAA,IACL;AACA,SAAK,SAAS,QAAO,wCAAS,SAAT,YAAiB;AAAA,EAC1C;AAAA,EAES,uBAAuB,OAAoC;AA3GxE;AA6GQ,QAAI,MAAM,WAAW,MAAM,cAAe;AAE1C,UAAM,sBAAsB,MAAM,SAAS;AAC3C,UAAM,UAAU,CAAC;AACjB,QAAI,KAAK,MAAM;AACX,cAAQ,OAAO,KAAK;AAAA,IACxB;AACA;AAAA,MACI,sBAAsB,SAAY,KAAK,SAAS;AAAA,MAChD,KAAK;AAAA,MACL;AAAA,IACJ;AAEA,QAAI,qBAAqB;AACrB,WAAK,QAAQ,OAAO;AAAA,IACxB,OAAO;AACH,sBAAgB,aAAa,KAAK,SAAS;AAAA,QACvC,GAAG,KAAK;AAAA,QACR,SAAS,KAAK;AAAA,MAClB,CAAC;AACD,YAAM,cACF,SAAO,UAAK,qBAAL,mBAAuB,QAAO,aAC/B,KAAK,iBAAiB,GAAG,MACzB,UAAK,qBAAL,mBAAuB,OAAM,KAAK;AAC5C,YAAM,EAAE,QAAQ,WAAW,IAAI,KAAK,oBAAoB,CAAC;AACzD,kBAAY,sBAAsB,OAAO,KAAK,OAAO;AAAA,IACzD;AAAA,EACJ;AACJ;AAEO,aAAM,UAAU,UAAU,uBAAuB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";import{nothing as y,render as h}from"@spectrum-web-components/base";import{directive as v}from"@spectrum-web-components/base/src/async-directive.js";import{strategies as O}from"./strategies.js";import{removeSlottableRequest as m}from"./slottable-request-event.js";import{SlottableRequestDirective as c}from"./slottable-request-directive.js";import{AbstractOverlay as d}from"./AbstractOverlay.js";import{InteractionTypes as f}from"./InteractionController.js";export class OverlayTriggerDirective extends c{constructor(){super(...arguments);this.defaultOptions={triggerInteraction:"click",overlayOptions:{type:"auto",offset:0}};this.options={...this.defaultOptions.overlayOptions}}render(e,r){return y}update(e,[r,t]){var n,l,a,p;this.options={...this.defaultOptions.overlayOptions,...t==null?void 0:t.overlayOptions},this.insertionOptions=t==null?void 0:t.insertionOptions,this.template=r,this.host=(n=e.options)==null?void 0:n.host;let i=!1;const o=(t==null?void 0:t.triggerInteraction)||this.defaultOptions.triggerInteraction,s=f[(l=this.strategy)==null?void 0:l.type]!==o;this.target!==e.element&&(this.target=e.element,i=!0),(i||s)&&((a=this.strategy)==null||a.abort(),this.strategy=new O[o](this.target,{isPersistent:!0,handleOverlayReady:g=>{this.listenerHost=this.overlay=g,this.init()}})),this.strategy.open=(p=t==null?void 0:t.open)!=null?p:!1}handleSlottableRequest(e){var i,o;if(e.target!==e.currentTarget)return;const r=e.data===m,t={};if(this.host&&(t.host=this.host),h(r?void 0:this.template(),this.overlay,t),r)this.overlay.remove();else{d.applyOptions(this.overlay,{...this.options,trigger:this.target});const s=typeof((i=this.insertionOptions)==null?void 0:i.el)=="function"?this.insertionOptions.el():((o=this.insertionOptions)==null?void 0:o.el)||this.target,{where:n="afterend"}=this.insertionOptions||{};s.insertAdjacentElement(n,this.overlay)}}}export const trigger=v(OverlayTriggerDirective);
|
|
2
|
-
//# sourceMappingURL=overlay-trigger-directive.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay-trigger-directive.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n type ElementPart,\n nothing,\n render,\n type RenderOptions,\n type TemplateResult,\n} from '@spectrum-web-components/base';\nimport { directive } from '@spectrum-web-components/base/src/async-directive.js';\nimport { strategies } from './strategies.js';\nimport type { OverlayOptions, TriggerInteraction } from './overlay-types.js';\nimport type { ClickController } from './ClickController.js';\nimport type { HoverController } from './HoverController.js';\nimport type { LongpressController } from './LongpressController.js';\nimport {\n removeSlottableRequest,\n type SlottableRequestEvent,\n} from './slottable-request-event.js';\nimport { SlottableRequestDirective } from './slottable-request-directive.js';\nimport { AbstractOverlay } from './AbstractOverlay.js';\nimport { InteractionTypes } from './InteractionController.js';\n\nexport type InsertionOptions = {\n el: HTMLElement | (() => HTMLElement);\n where: InsertPosition;\n};\n\nexport type OverlayTriggerOptions = {\n open?: boolean;\n triggerInteraction: TriggerInteraction;\n overlayOptions: OverlayOptions;\n insertionOptions?: InsertionOptions;\n};\n\nexport class OverlayTriggerDirective extends SlottableRequestDirective {\n private host?: object;\n private overlay!: AbstractOverlay;\n private strategy!: ClickController | HoverController | LongpressController;\n\n protected defaultOptions: OverlayTriggerOptions = {\n triggerInteraction: 'click',\n overlayOptions: {\n type: 'auto',\n offset: 0,\n },\n };\n protected options: OverlayOptions = {\n ...this.defaultOptions.overlayOptions,\n };\n protected insertionOptions?: InsertionOptions;\n\n /* c8 ignore next 9 */\n override render(\n _template: () => TemplateResult,\n _options?: Partial<OverlayTriggerOptions>\n ): unknown {\n // render function here just defines the interface to the update call later\n // we don't have anything to render since this is intended to be an ElementPart directive\n // so will be used on an element and is not itself rendered\n return nothing;\n }\n\n override update(\n part: ElementPart,\n [template, options]: Parameters<this['render']>\n ): void {\n this.options = {\n ...this.defaultOptions.overlayOptions,\n ...options?.overlayOptions,\n };\n this.insertionOptions = options?.insertionOptions;\n this.template = template;\n this.host = part.options?.host;\n let newTarget = false;\n const triggerInteraction = (options?.triggerInteraction ||\n this.defaultOptions.triggerInteraction) as TriggerInteraction;\n const newStrategy =\n InteractionTypes[this.strategy?.type] !== triggerInteraction;\n if (this.target !== part.element) {\n this.target = part.element as HTMLElement;\n newTarget = true;\n }\n if (newTarget || newStrategy) {\n this.strategy?.abort();\n this.strategy = new strategies[\n triggerInteraction as TriggerInteraction\n ](this.target, {\n isPersistent: true,\n handleOverlayReady: (overlay: AbstractOverlay) => {\n this.listenerHost = this.overlay = overlay;\n this.init();\n },\n });\n }\n this.strategy.open = options?.open ?? false;\n }\n\n override handleSlottableRequest(event: SlottableRequestEvent): void {\n /* c8 ignore next 1 */\n if (event.target !== event.currentTarget) return;\n\n const willRemoveSlottable = event.data === removeSlottableRequest;\n const options = {} as RenderOptions;\n if (this.host) {\n options.host = this.host;\n }\n render(\n willRemoveSlottable ? undefined : this.template(),\n this.overlay,\n options\n );\n\n if (willRemoveSlottable) {\n this.overlay.remove();\n } else {\n AbstractOverlay.applyOptions(this.overlay, {\n ...this.options,\n trigger: this.target,\n });\n const insertionEl =\n typeof this.insertionOptions?.el === 'function'\n ? this.insertionOptions.el()\n : this.insertionOptions?.el || this.target;\n const { where = 'afterend' } = this.insertionOptions || {};\n insertionEl.insertAdjacentElement(where, this.overlay);\n }\n }\n}\n\nexport const trigger = directive(OverlayTriggerDirective);\n"],
|
|
5
|
-
"mappings": "aAWA,OAEI,WAAAA,EACA,UAAAC,MAGG,gCACP,OAAS,aAAAC,MAAiB,uDAC1B,OAAS,cAAAC,MAAkB,kBAK3B,OACI,0BAAAC,MAEG,+BACP,OAAS,6BAAAC,MAAiC,mCAC1C,OAAS,mBAAAC,MAAuB,uBAChC,OAAS,oBAAAC,MAAwB,6BAc1B,aAAM,gCAAgCF,CAA0B,CAAhE,kCAKH,KAAU,eAAwC,CAC9C,mBAAoB,QACpB,eAAgB,CACZ,KAAM,OACN,OAAQ,CACZ,CACJ,EACA,KAAU,QAA0B,CAChC,GAAG,KAAK,eAAe,cAC3B,EAIS,OACLG,EACAC,EACO,CAIP,OAAOT,CACX,CAES,OACLU,EACA,CAACC,EAAUC,CAAO,EACd,CA3EZ,IAAAC,EAAAC,EAAAC,EAAAC,EA4EQ,KAAK,QAAU,CACX,GAAG,KAAK,eAAe,eACvB,GAAGJ,GAAA,YAAAA,EAAS,cAChB,EACA,KAAK,iBAAmBA,GAAA,YAAAA,EAAS,iBACjC,KAAK,SAAWD,EAChB,KAAK,MAAOE,EAAAH,EAAK,UAAL,YAAAG,EAAc,KAC1B,IAAII,EAAY,GAChB,MAAMC,GAAsBN,GAAA,YAAAA,EAAS,qBACjC,KAAK,eAAe,mBAClBO,EACFZ,GAAiBO,EAAA,KAAK,WAAL,YAAAA,EAAe,IAAI,IAAMI,EAC1C,KAAK,SAAWR,EAAK,UACrB,KAAK,OAASA,EAAK,QACnBO,EAAY,KAEZA,GAAaE,MACbJ,EAAA,KAAK,WAAL,MAAAA,EAAe,QACf,KAAK,SAAW,IAAIZ,EAChBe,CACJ,EAAE,KAAK,OAAQ,CACX,aAAc,GACd,mBAAqBE,GAA6B,CAC9C,KAAK,aAAe,KAAK,QAAUA,EACnC,KAAK,KAAK,CACd,CACJ,CAAC,GAEL,KAAK,SAAS,MAAOJ,EAAAJ,GAAA,YAAAA,EAAS,OAAT,KAAAI,EAAiB,EAC1C,CAES,uBAAuBK,EAAoC,CA3GxE,IAAAR,EAAAC,EA6GQ,GAAIO,EAAM,SAAWA,EAAM,cAAe,OAE1C,MAAMC,EAAsBD,EAAM,OAASjB,EACrCQ,EAAU,CAAC,EAUjB,GATI,KAAK,OACLA,EAAQ,KAAO,KAAK,MAExBX,EACIqB,EAAsB,OAAY,KAAK,SAAS,EAChD,KAAK,QACLV,CACJ,EAEIU,EACA,KAAK,QAAQ,OAAO,MACjB,CACHhB,EAAgB,aAAa,KAAK,QAAS,CACvC,GAAG,KAAK,QACR,QAAS,KAAK,MAClB,CAAC,EACD,MAAMiB,EACF,QAAOV,EAAA,KAAK,mBAAL,YAAAA,EAAuB,KAAO,WAC/B,KAAK,iBAAiB,GAAG,IACzBC,EAAA,KAAK,mBAAL,YAAAA,EAAuB,KAAM,KAAK,OACtC,CAAE,MAAAU,EAAQ,UAAW,EAAI,KAAK,kBAAoB,CAAC,EACzDD,EAAY,sBAAsBC,EAAO,KAAK,OAAO,CACzD,CACJ,CACJ,CAEO,aAAM,QAAUtB,EAAU,uBAAuB",
|
|
6
|
-
"names": ["nothing", "render", "directive", "strategies", "removeSlottableRequest", "SlottableRequestDirective", "AbstractOverlay", "InteractionTypes", "_template", "_options", "part", "template", "options", "_a", "_b", "_c", "_d", "newTarget", "triggerInteraction", "newStrategy", "overlay", "event", "willRemoveSlottable", "insertionEl", "where"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { css } from "@spectrum-web-components/base";
|
|
3
|
-
const styles = css`
|
|
4
|
-
:host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}
|
|
5
|
-
`;
|
|
6
|
-
export default styles;
|
|
7
|
-
//# sourceMappingURL=overlay-trigger.css.dev.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay-trigger.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay-trigger.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host([disabled]) ::slotted([slot=trigger]){pointer-events:none}slot[name=longpress-describedby-descriptor]{display:none}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
|
-
"names": ["css", "styles"]
|
|
7
|
-
}
|
package/src/overlay-types.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { Placement } from '@floating-ui/dom';
|
|
2
|
-
import type { VirtualTrigger } from './VirtualTrigger.js';
|
|
3
|
-
export type Constructor<T = Record<string, unknown>> = {
|
|
4
|
-
new (...args: any[]): T;
|
|
5
|
-
prototype: T;
|
|
6
|
-
};
|
|
7
|
-
export { Placement };
|
|
8
|
-
export type OverlayTypes = 'auto' | 'hint' | 'manual' | 'modal' | 'page';
|
|
9
|
-
export type TriggerInteraction = 'click' | 'longpress' | 'hover';
|
|
10
|
-
export type TriggerInteractions = OverlayTypes;
|
|
11
|
-
export type TriggerInteractionsV1 = 'click' | 'longpress' | 'hover' | 'custom' | 'replace' | 'inline' | 'modal';
|
|
12
|
-
export type OverlayTriggerInteractions = Extract<TriggerInteractions, 'inline' | 'modal' | 'replace'>;
|
|
13
|
-
export interface OverlayOpenCloseDetail {
|
|
14
|
-
interaction: TriggerInteractions;
|
|
15
|
-
reason?: 'external-click';
|
|
16
|
-
}
|
|
17
|
-
export interface OverlayCloseReasonDetail {
|
|
18
|
-
reason?: 'external-click';
|
|
19
|
-
}
|
|
20
|
-
export type OverlayOptions = {
|
|
21
|
-
delayed?: boolean;
|
|
22
|
-
notImmediatelyClosable?: boolean;
|
|
23
|
-
offset?: number | [number, number];
|
|
24
|
-
placement?: Placement;
|
|
25
|
-
receivesFocus?: 'auto' | 'true' | 'false';
|
|
26
|
-
trigger?: HTMLElement | VirtualTrigger;
|
|
27
|
-
type?: 'modal' | 'page' | 'hint' | 'auto' | 'manual';
|
|
28
|
-
};
|
|
29
|
-
export type OverlayOptionsV1 = {
|
|
30
|
-
root?: HTMLElement;
|
|
31
|
-
delayed?: boolean;
|
|
32
|
-
placement?: Placement;
|
|
33
|
-
offset?: number;
|
|
34
|
-
receivesFocus?: 'true' | 'false' | 'auto';
|
|
35
|
-
notImmediatelyClosable?: boolean;
|
|
36
|
-
abortPromise?: Promise<boolean>;
|
|
37
|
-
virtualTrigger?: VirtualTrigger;
|
|
38
|
-
};
|
|
39
|
-
declare global {
|
|
40
|
-
interface GlobalEventHandlersEventMap {
|
|
41
|
-
'sp-opened': CustomEvent<OverlayOpenCloseDetail>;
|
|
42
|
-
'sp-closed': CustomEvent<OverlayOpenCloseDetail>;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export type OpenableElement = HTMLElement & {
|
|
46
|
-
open: boolean;
|
|
47
|
-
tipElement?: HTMLElement;
|
|
48
|
-
updateComplete?: Promise<void>;
|
|
49
|
-
};
|
|
50
|
-
export type OverlayState = 'closed' | 'opening' | 'opened' | 'closing';
|
package/src/overlay-types.dev.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay-types.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport type { Placement } from '@floating-ui/dom';\nimport type { VirtualTrigger } from './VirtualTrigger.dev.js'\n\nexport type Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport { Placement };\n\nexport type OverlayTypes = 'auto' | 'hint' | 'manual' | 'modal' | 'page';\n\nexport type TriggerInteraction = 'click' | 'longpress' | 'hover';\n\nexport type TriggerInteractions = OverlayTypes;\n\nexport type TriggerInteractionsV1 =\n | 'click'\n | 'longpress'\n | 'hover'\n | 'custom'\n | 'replace'\n | 'inline'\n | 'modal';\n\nexport type OverlayTriggerInteractions = Extract<\n TriggerInteractions,\n 'inline' | 'modal' | 'replace'\n>;\n\nexport interface OverlayOpenCloseDetail {\n interaction: TriggerInteractions;\n reason?: 'external-click';\n}\n\nexport interface OverlayCloseReasonDetail {\n reason?: 'external-click';\n}\n\nexport type OverlayOptions = {\n delayed?: boolean;\n notImmediatelyClosable?: boolean;\n offset?: number | [number, number]; // supporting multi-axis\n placement?: Placement;\n receivesFocus?: 'auto' | 'true' | 'false';\n trigger?: HTMLElement | VirtualTrigger;\n type?: 'modal' | 'page' | 'hint' | 'auto' | 'manual';\n};\n\nexport type OverlayOptionsV1 = {\n root?: HTMLElement;\n delayed?: boolean;\n placement?: Placement;\n offset?: number;\n receivesFocus?: 'true' | 'false' | 'auto';\n notImmediatelyClosable?: boolean;\n abortPromise?: Promise<boolean>;\n virtualTrigger?: VirtualTrigger;\n};\n\ndeclare global {\n interface GlobalEventHandlersEventMap {\n 'sp-opened': CustomEvent<OverlayOpenCloseDetail>;\n 'sp-closed': CustomEvent<OverlayOpenCloseDetail>;\n }\n}\n\nexport type OpenableElement = HTMLElement & {\n open: boolean;\n tipElement?: HTMLElement;\n updateComplete?: Promise<void>;\n};\n\nexport type OverlayState = 'closed' | 'opening' | 'opened' | 'closing';\n"],
|
|
5
|
-
"mappings": ";AAqBA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/overlay-types.js
DELETED
package/src/overlay-types.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay-types.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport type { Placement } from '@floating-ui/dom';\nimport type { VirtualTrigger } from './VirtualTrigger.js';\n\nexport type Constructor<T = Record<string, unknown>> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n new (...args: any[]): T;\n prototype: T;\n};\n\nexport { Placement };\n\nexport type OverlayTypes = 'auto' | 'hint' | 'manual' | 'modal' | 'page';\n\nexport type TriggerInteraction = 'click' | 'longpress' | 'hover';\n\nexport type TriggerInteractions = OverlayTypes;\n\nexport type TriggerInteractionsV1 =\n | 'click'\n | 'longpress'\n | 'hover'\n | 'custom'\n | 'replace'\n | 'inline'\n | 'modal';\n\nexport type OverlayTriggerInteractions = Extract<\n TriggerInteractions,\n 'inline' | 'modal' | 'replace'\n>;\n\nexport interface OverlayOpenCloseDetail {\n interaction: TriggerInteractions;\n reason?: 'external-click';\n}\n\nexport interface OverlayCloseReasonDetail {\n reason?: 'external-click';\n}\n\nexport type OverlayOptions = {\n delayed?: boolean;\n notImmediatelyClosable?: boolean;\n offset?: number | [number, number]; // supporting multi-axis\n placement?: Placement;\n receivesFocus?: 'auto' | 'true' | 'false';\n trigger?: HTMLElement | VirtualTrigger;\n type?: 'modal' | 'page' | 'hint' | 'auto' | 'manual';\n};\n\nexport type OverlayOptionsV1 = {\n root?: HTMLElement;\n delayed?: boolean;\n placement?: Placement;\n offset?: number;\n receivesFocus?: 'true' | 'false' | 'auto';\n notImmediatelyClosable?: boolean;\n abortPromise?: Promise<boolean>;\n virtualTrigger?: VirtualTrigger;\n};\n\ndeclare global {\n interface GlobalEventHandlersEventMap {\n 'sp-opened': CustomEvent<OverlayOpenCloseDetail>;\n 'sp-closed': CustomEvent<OverlayOpenCloseDetail>;\n }\n}\n\nexport type OpenableElement = HTMLElement & {\n open: boolean;\n tipElement?: HTMLElement;\n updateComplete?: Promise<void>;\n};\n\nexport type OverlayState = 'closed' | 'opening' | 'opened' | 'closing';\n"],
|
|
5
|
-
"mappings": "aAqBA",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/overlay.css.d.ts
DELETED
package/src/overlay.css.dev.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { css } from "@spectrum-web-components/base";
|
|
3
|
-
const styles = css`
|
|
4
|
-
:host{pointer-events:none;--swc-overlay-animation-distance:var(--spectrum-spacing-100);display:contents}:host(:has(>sp-tooltip)){--swc-overlay-animation-distance:var(--spectrum-tooltip-animation-distance)}.dialog{box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;--sp-overlay-open:true;background:0 0;border:0;margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--mod-popover-filter:var(--spectrum-popover-filter)}:host(:not([open])) .dialog{--sp-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:"";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(sp-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1*var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1*var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1*var(--swc-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1*var(--swc-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--mod-popover-filter:var(--spectrum-popover-filter)}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--mod-popover-filter:var(--spectrum-popover-filter)}}@supports (overlay:auto){.dialog{transition:all var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s)),translate 0s,display var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s));transition-behavior:allow-discrete;display:none}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--swc-overlay-z-index-base,1000) + var(--swc-overlay-open-count))}}
|
|
5
|
-
`;
|
|
6
|
-
export default styles;
|
|
7
|
-
//# sourceMappingURL=overlay.css.dev.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{pointer-events:none;--swc-overlay-animation-distance:var(--spectrum-spacing-100);display:contents}:host(:has(>sp-tooltip)){--swc-overlay-animation-distance:var(--spectrum-tooltip-animation-distance)}.dialog{box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;--sp-overlay-open:true;background:0 0;border:0;margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--mod-popover-filter:var(--spectrum-popover-filter)}:host(:not([open])) .dialog{--sp-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:\"\";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(sp-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1*var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1*var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1*var(--swc-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1*var(--swc-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--mod-popover-filter:var(--spectrum-popover-filter)}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--mod-popover-filter:var(--spectrum-popover-filter)}}@supports (overlay:auto){.dialog{transition:all var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s)),translate 0s,display var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s));transition-behavior:allow-discrete;display:none}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--swc-overlay-z-index-base,1000) + var(--swc-overlay-open-count))}}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": ";AAWA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/src/overlay.css.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";import{css as a}from"@spectrum-web-components/base";const o=a`
|
|
2
|
-
:host{pointer-events:none;--swc-overlay-animation-distance:var(--spectrum-spacing-100);display:contents}:host(:has(>sp-tooltip)){--swc-overlay-animation-distance:var(--spectrum-tooltip-animation-distance)}.dialog{box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;--sp-overlay-open:true;background:0 0;border:0;margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--mod-popover-filter:var(--spectrum-popover-filter)}:host(:not([open])) .dialog{--sp-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:"";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(sp-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1*var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1*var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1*var(--swc-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1*var(--swc-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--mod-popover-filter:var(--spectrum-popover-filter)}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--mod-popover-filter:var(--spectrum-popover-filter)}}@supports (overlay:auto){.dialog{transition:all var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s)),translate 0s,display var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s));transition-behavior:allow-discrete;display:none}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--swc-overlay-z-index-base,1000) + var(--swc-overlay-open-count))}}
|
|
3
|
-
`;export default o;
|
|
4
|
-
//# sourceMappingURL=overlay.css.js.map
|
package/src/overlay.css.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["overlay.css.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n :host{pointer-events:none;--swc-overlay-animation-distance:var(--spectrum-spacing-100);display:contents}:host(:has(>sp-tooltip)){--swc-overlay-animation-distance:var(--spectrum-tooltip-animation-distance)}.dialog{box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;--sp-overlay-open:true;background:0 0;border:0;margin:0;padding:0;display:flex;position:fixed;inset:0 auto auto 0;overflow:visible;opacity:1!important}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--mod-popover-filter:var(--spectrum-popover-filter)}:host(:not([open])) .dialog{--sp-overlay-open:false}.dialog::backdrop{display:none}.dialog:before{content:\"\";position:absolute;inset:-999em;pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(sp-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1*var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1*var(--swc-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--swc-overlay-animation-distance);margin-top:var(--swc-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--swc-overlay-animation-distance);margin-left:calc(-1*var(--swc-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--swc-overlay-animation-distance);margin-top:calc(-1*var(--swc-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--swc-overlay-animation-distance);margin-left:var(--swc-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--mod-popover-filter:var(--spectrum-popover-filter)}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--mod-popover-filter:var(--spectrum-popover-filter)}}@supports (overlay:auto){.dialog{transition:all var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s)),translate 0s,display var(--mod-overlay-animation-duration,var(--spectrum-animation-duration-100,.13s));transition-behavior:allow-discrete;display:none}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--swc-overlay-z-index-base,1000) + var(--swc-overlay-open-count))}}\n`;\nexport default styles;"],
|
|
5
|
-
"mappings": "aAWA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
|
-
"names": ["css", "styles"]
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ElementPart, TemplateResult } from '@spectrum-web-components/base';
|
|
2
|
-
import { AsyncDirective } from '@spectrum-web-components/base/src/async-directive.js';
|
|
3
|
-
import { SlottableRequestEvent } from './slottable-request-event.js';
|
|
4
|
-
export declare class SlottableRequestDirective extends AsyncDirective {
|
|
5
|
-
protected template: () => TemplateResult;
|
|
6
|
-
protected target: HTMLElement;
|
|
7
|
-
private renderBefore;
|
|
8
|
-
protected listenerHost: HTMLElement;
|
|
9
|
-
protected listeners: AbortController;
|
|
10
|
-
render(_template: () => TemplateResult): unknown;
|
|
11
|
-
update(part: ElementPart, [template]: Parameters<this['render']>): void;
|
|
12
|
-
handleSlottableRequest(event: SlottableRequestEvent): void;
|
|
13
|
-
init(): void;
|
|
14
|
-
disconnected(): void;
|
|
15
|
-
reconnected(): void;
|
|
16
|
-
}
|
|
17
|
-
export declare const slottableRequest: (_template: () => TemplateResult) => import("lit-html/directive.js").DirectiveResult<typeof SlottableRequestDirective>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import {
|
|
3
|
-
nothing,
|
|
4
|
-
render
|
|
5
|
-
} from "@spectrum-web-components/base";
|
|
6
|
-
import {
|
|
7
|
-
AsyncDirective,
|
|
8
|
-
directive
|
|
9
|
-
} from "@spectrum-web-components/base/src/async-directive.js";
|
|
10
|
-
import {
|
|
11
|
-
removeSlottableRequest
|
|
12
|
-
} from "./slottable-request-event.dev.js";
|
|
13
|
-
export class SlottableRequestDirective extends AsyncDirective {
|
|
14
|
-
/* c8 ignore next 9 */
|
|
15
|
-
render(_template) {
|
|
16
|
-
return nothing;
|
|
17
|
-
}
|
|
18
|
-
update(part, [template]) {
|
|
19
|
-
this.template = template;
|
|
20
|
-
if (this.target !== part.element) {
|
|
21
|
-
this.target = part.element;
|
|
22
|
-
this.renderBefore = this.target.children[0];
|
|
23
|
-
}
|
|
24
|
-
this.listenerHost = this.target;
|
|
25
|
-
this.init();
|
|
26
|
-
}
|
|
27
|
-
handleSlottableRequest(event) {
|
|
28
|
-
if (event.target !== event.currentTarget) return;
|
|
29
|
-
const willRemoveSlottable = event.data === removeSlottableRequest;
|
|
30
|
-
render(willRemoveSlottable ? void 0 : this.template(), this.target, {
|
|
31
|
-
renderBefore: this.renderBefore
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
init() {
|
|
35
|
-
var _a;
|
|
36
|
-
(_a = this.listeners) == null ? void 0 : _a.abort();
|
|
37
|
-
this.listeners = new AbortController();
|
|
38
|
-
const { signal } = this.listeners;
|
|
39
|
-
this.listenerHost.addEventListener(
|
|
40
|
-
"slottable-request",
|
|
41
|
-
(event) => this.handleSlottableRequest(event),
|
|
42
|
-
{ signal }
|
|
43
|
-
);
|
|
44
|
-
if (true) {
|
|
45
|
-
window.__swc.warn(
|
|
46
|
-
void 0,
|
|
47
|
-
`\u26A0\uFE0F WARNING \u26A0\uFE0F : The Overlay Trigger Directive is experimental and there is no guarantees behind its usage in an application!! Its API and presence within the library could be changed at anytime. See "sp-overlay" or "Overlay.open()" for a stable API for overlaying content on your application.`,
|
|
48
|
-
"https://opensource.adobe.com/spectrum-web-components/components/overlay",
|
|
49
|
-
{
|
|
50
|
-
level: "high",
|
|
51
|
-
type: "api"
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
disconnected() {
|
|
57
|
-
var _a;
|
|
58
|
-
(_a = this.listeners) == null ? void 0 : _a.abort();
|
|
59
|
-
}
|
|
60
|
-
/* c8 ignore next 3 */
|
|
61
|
-
reconnected() {
|
|
62
|
-
this.init();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
export const slottableRequest = directive(SlottableRequestDirective);
|
|
66
|
-
//# sourceMappingURL=slottable-request-directive.dev.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["slottable-request-directive.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n ElementPart,\n nothing,\n render,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n AsyncDirective,\n directive,\n} from '@spectrum-web-components/base/src/async-directive.js';\nimport {\n removeSlottableRequest,\n SlottableRequestEvent,\n} from './slottable-request-event.dev.js'\n\nexport class SlottableRequestDirective extends AsyncDirective {\n protected template!: () => TemplateResult;\n protected target!: HTMLElement;\n private renderBefore: HTMLElement | undefined;\n protected listenerHost!: HTMLElement;\n protected listeners!: AbortController;\n\n /* c8 ignore next 9 */\n render(_template: () => TemplateResult): unknown {\n // render function here just defines the interface to the update call later\n // we don't have anything to render since this is intended to be an ElementPart directive\n // so will be used on an element and is not itself rendered\n return nothing;\n }\n\n override update(\n part: ElementPart,\n [template]: Parameters<this['render']>\n ): void {\n this.template = template;\n if (this.target !== part.element) {\n this.target = part.element as HTMLElement;\n this.renderBefore = this.target.children[0] as HTMLElement;\n }\n this.listenerHost = this.target;\n this.init();\n }\n\n handleSlottableRequest(event: SlottableRequestEvent): void {\n /* c8 ignore next 1 */\n if (event.target !== event.currentTarget) return;\n\n const willRemoveSlottable = event.data === removeSlottableRequest;\n\n render(willRemoveSlottable ? undefined : this.template(), this.target, {\n renderBefore: this.renderBefore,\n });\n }\n\n init(): void {\n this.listeners?.abort();\n this.listeners = new AbortController();\n const { signal } = this.listeners;\n this.listenerHost.addEventListener(\n 'slottable-request',\n (event: Event) =>\n this.handleSlottableRequest(event as SlottableRequestEvent),\n { signal }\n );\n\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n undefined,\n `\u26A0\uFE0F WARNING \u26A0\uFE0F : The Overlay Trigger Directive is experimental and there is no guarantees behind its usage in an application!! Its API and presence within the library could be changed at anytime. See \"sp-overlay\" or \"Overlay.open()\" for a stable API for overlaying content on your application.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/overlay',\n {\n level: 'high',\n type: 'api',\n }\n );\n }\n }\n\n override disconnected(): void {\n this.listeners?.abort();\n }\n\n /* c8 ignore next 3 */\n override reconnected(): void {\n this.init();\n }\n}\n\nexport const slottableRequest = directive(SlottableRequestDirective);\n"],
|
|
5
|
-
"mappings": ";AAWA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP;AAAA,EACI;AAAA,EACA;AAAA,OACG;AACP;AAAA,EACI;AAAA,OAEG;AAEA,aAAM,kCAAkC,eAAe;AAAA;AAAA,EAQ1D,OAAO,WAA0C;AAI7C,WAAO;AAAA,EACX;AAAA,EAES,OACL,MACA,CAAC,QAAQ,GACL;AACJ,SAAK,WAAW;AAChB,QAAI,KAAK,WAAW,KAAK,SAAS;AAC9B,WAAK,SAAS,KAAK;AACnB,WAAK,eAAe,KAAK,OAAO,SAAS,CAAC;AAAA,IAC9C;AACA,SAAK,eAAe,KAAK;AACzB,SAAK,KAAK;AAAA,EACd;AAAA,EAEA,uBAAuB,OAAoC;AAEvD,QAAI,MAAM,WAAW,MAAM,cAAe;AAE1C,UAAM,sBAAsB,MAAM,SAAS;AAE3C,WAAO,sBAAsB,SAAY,KAAK,SAAS,GAAG,KAAK,QAAQ;AAAA,MACnE,cAAc,KAAK;AAAA,IACvB,CAAC;AAAA,EACL;AAAA,EAEA,OAAa;AAjEjB;AAkEQ,eAAK,cAAL,mBAAgB;AAChB,SAAK,YAAY,IAAI,gBAAgB;AACrC,UAAM,EAAE,OAAO,IAAI,KAAK;AACxB,SAAK,aAAa;AAAA,MACd;AAAA,MACA,CAAC,UACG,KAAK,uBAAuB,KAA8B;AAAA,MAC9D,EAAE,OAAO;AAAA,IACb;AAEA,QAAI,MAAoB;AACpB,aAAO,MAAM;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,UACI,OAAO;AAAA,UACP,MAAM;AAAA,QACV;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAAA,EAES,eAAqB;AAzFlC;AA0FQ,eAAK,cAAL,mBAAgB;AAAA,EACpB;AAAA;AAAA,EAGS,cAAoB;AACzB,SAAK,KAAK;AAAA,EACd;AACJ;AAEO,aAAM,mBAAmB,UAAU,yBAAyB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";import{nothing as n,render as i}from"@spectrum-web-components/base";import{AsyncDirective as s,directive as o}from"@spectrum-web-components/base/src/async-directive.js";import{removeSlottableRequest as l}from"./slottable-request-event.js";export class SlottableRequestDirective extends s{render(e){return n}update(e,[t]){this.template=t,this.target!==e.element&&(this.target=e.element,this.renderBefore=this.target.children[0]),this.listenerHost=this.target,this.init()}handleSlottableRequest(e){if(e.target!==e.currentTarget)return;const t=e.data===l;i(t?void 0:this.template(),this.target,{renderBefore:this.renderBefore})}init(){var t;(t=this.listeners)==null||t.abort(),this.listeners=new AbortController;const{signal:e}=this.listeners;this.listenerHost.addEventListener("slottable-request",r=>this.handleSlottableRequest(r),{signal:e})}disconnected(){var e;(e=this.listeners)==null||e.abort()}reconnected(){this.init()}}export const slottableRequest=o(SlottableRequestDirective);
|
|
2
|
-
//# sourceMappingURL=slottable-request-directive.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["slottable-request-directive.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n ElementPart,\n nothing,\n render,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport {\n AsyncDirective,\n directive,\n} from '@spectrum-web-components/base/src/async-directive.js';\nimport {\n removeSlottableRequest,\n SlottableRequestEvent,\n} from './slottable-request-event.js';\n\nexport class SlottableRequestDirective extends AsyncDirective {\n protected template!: () => TemplateResult;\n protected target!: HTMLElement;\n private renderBefore: HTMLElement | undefined;\n protected listenerHost!: HTMLElement;\n protected listeners!: AbortController;\n\n /* c8 ignore next 9 */\n render(_template: () => TemplateResult): unknown {\n // render function here just defines the interface to the update call later\n // we don't have anything to render since this is intended to be an ElementPart directive\n // so will be used on an element and is not itself rendered\n return nothing;\n }\n\n override update(\n part: ElementPart,\n [template]: Parameters<this['render']>\n ): void {\n this.template = template;\n if (this.target !== part.element) {\n this.target = part.element as HTMLElement;\n this.renderBefore = this.target.children[0] as HTMLElement;\n }\n this.listenerHost = this.target;\n this.init();\n }\n\n handleSlottableRequest(event: SlottableRequestEvent): void {\n /* c8 ignore next 1 */\n if (event.target !== event.currentTarget) return;\n\n const willRemoveSlottable = event.data === removeSlottableRequest;\n\n render(willRemoveSlottable ? undefined : this.template(), this.target, {\n renderBefore: this.renderBefore,\n });\n }\n\n init(): void {\n this.listeners?.abort();\n this.listeners = new AbortController();\n const { signal } = this.listeners;\n this.listenerHost.addEventListener(\n 'slottable-request',\n (event: Event) =>\n this.handleSlottableRequest(event as SlottableRequestEvent),\n { signal }\n );\n\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n undefined,\n `\u26A0\uFE0F WARNING \u26A0\uFE0F : The Overlay Trigger Directive is experimental and there is no guarantees behind its usage in an application!! Its API and presence within the library could be changed at anytime. See \"sp-overlay\" or \"Overlay.open()\" for a stable API for overlaying content on your application.`,\n 'https://opensource.adobe.com/spectrum-web-components/components/overlay',\n {\n level: 'high',\n type: 'api',\n }\n );\n }\n }\n\n override disconnected(): void {\n this.listeners?.abort();\n }\n\n /* c8 ignore next 3 */\n override reconnected(): void {\n this.init();\n }\n}\n\nexport const slottableRequest = directive(SlottableRequestDirective);\n"],
|
|
5
|
-
"mappings": "aAWA,OAEI,WAAAA,EACA,UAAAC,MAEG,gCACP,OACI,kBAAAC,EACA,aAAAC,MACG,uDACP,OACI,0BAAAC,MAEG,+BAEA,aAAM,kCAAkCF,CAAe,CAQ1D,OAAOG,EAA0C,CAI7C,OAAOL,CACX,CAES,OACLM,EACA,CAACC,CAAQ,EACL,CACJ,KAAK,SAAWA,EACZ,KAAK,SAAWD,EAAK,UACrB,KAAK,OAASA,EAAK,QACnB,KAAK,aAAe,KAAK,OAAO,SAAS,CAAC,GAE9C,KAAK,aAAe,KAAK,OACzB,KAAK,KAAK,CACd,CAEA,uBAAuBE,EAAoC,CAEvD,GAAIA,EAAM,SAAWA,EAAM,cAAe,OAE1C,MAAMC,EAAsBD,EAAM,OAASJ,EAE3CH,EAAOQ,EAAsB,OAAY,KAAK,SAAS,EAAG,KAAK,OAAQ,CACnE,aAAc,KAAK,YACvB,CAAC,CACL,CAEA,MAAa,CAjEjB,IAAAC,GAkEQA,EAAA,KAAK,YAAL,MAAAA,EAAgB,QAChB,KAAK,UAAY,IAAI,gBACrB,KAAM,CAAE,OAAAC,CAAO,EAAI,KAAK,UACxB,KAAK,aAAa,iBACd,oBACCH,GACG,KAAK,uBAAuBA,CAA8B,EAC9D,CAAE,OAAAG,CAAO,CACb,CAaJ,CAES,cAAqB,CAzFlC,IAAAD,GA0FQA,EAAA,KAAK,YAAL,MAAAA,EAAgB,OACpB,CAGS,aAAoB,CACzB,KAAK,KAAK,CACd,CACJ,CAEO,aAAM,iBAAmBP,EAAU,yBAAyB",
|
|
6
|
-
"names": ["nothing", "render", "AsyncDirective", "directive", "removeSlottableRequest", "_template", "part", "template", "event", "willRemoveSlottable", "_a", "signal"]
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare class SlottableRequestEvent extends Event {
|
|
2
|
-
readonly data: unknown;
|
|
3
|
-
readonly name: string;
|
|
4
|
-
readonly slotName: string;
|
|
5
|
-
constructor(name: string, data: unknown, key?: string);
|
|
6
|
-
}
|
|
7
|
-
export declare const removeSlottableRequest: unique symbol;
|
|
8
|
-
declare global {
|
|
9
|
-
interface GlobalEventHandlersEventMap {
|
|
10
|
-
'slottable-request': SlottableRequestEvent;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
export class SlottableRequestEvent extends Event {
|
|
3
|
-
constructor(name, data, key) {
|
|
4
|
-
super("slottable-request", {
|
|
5
|
-
bubbles: false,
|
|
6
|
-
cancelable: true,
|
|
7
|
-
composed: false
|
|
8
|
-
});
|
|
9
|
-
this.name = name;
|
|
10
|
-
this.data = data;
|
|
11
|
-
this.slotName = key !== void 0 ? `${name}.${key}` : name;
|
|
12
|
-
if (true) {
|
|
13
|
-
window.__swc.warn(
|
|
14
|
-
void 0,
|
|
15
|
-
`\u26A0\uFE0F WARNING \u26A0\uFE0F : \`slottable-request\` events are experimental and there is no guarantees behind usage of them in an application!! Their shape and presence within the library could be changed at anytime.
|
|
16
|
-
|
|
17
|
-
Learn more about the protocol these events are based on below:`,
|
|
18
|
-
"https://github.com/webcomponents-cg/community-protocols/pull/45",
|
|
19
|
-
{
|
|
20
|
-
level: "high",
|
|
21
|
-
type: "api"
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export const removeSlottableRequest = Symbol("remove-slottable-request");
|
|
28
|
-
//# sourceMappingURL=slottable-request-event.dev.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["slottable-request-event.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nexport class SlottableRequestEvent extends Event {\n readonly data: unknown;\n readonly name: string;\n readonly slotName: string;\n constructor(name: string, data: unknown, key?: string) {\n super('slottable-request', {\n bubbles: false,\n cancelable: true,\n composed: false,\n });\n this.name = name;\n this.data = data;\n this.slotName = key !== undefined ? `${name}.${key}` : name;\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n undefined,\n `\u26A0\uFE0F WARNING \u26A0\uFE0F : \\`slottable-request\\` events are experimental and there is no guarantees behind usage of them in an application!! Their shape and presence within the library could be changed at anytime.\n \nLearn more about the protocol these events are based on below:`,\n 'https://github.com/webcomponents-cg/community-protocols/pull/45',\n {\n level: 'high',\n type: 'api',\n }\n );\n }\n }\n}\n\nexport const removeSlottableRequest = Symbol('remove-slottable-request');\n\ndeclare global {\n interface GlobalEventHandlersEventMap {\n 'slottable-request': SlottableRequestEvent;\n }\n}\n"],
|
|
5
|
-
"mappings": ";AAWO,aAAM,8BAA8B,MAAM;AAAA,EAI7C,YAAY,MAAc,MAAe,KAAc;AACnD,UAAM,qBAAqB;AAAA,MACvB,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,UAAU;AAAA,IACd,CAAC;AACD,SAAK,OAAO;AACZ,SAAK,OAAO;AACZ,SAAK,WAAW,QAAQ,SAAY,GAAG,IAAI,IAAI,GAAG,KAAK;AACvD,QAAI,MAAoB;AACpB,aAAO,MAAM;AAAA,QACT;AAAA,QACA;AAAA;AAAA;AAAA,QAGA;AAAA,QACA;AAAA,UACI,OAAO;AAAA,UACP,MAAM;AAAA,QACV;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ;AAEO,aAAM,yBAAyB,OAAO,0BAA0B;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";export class SlottableRequestEvent extends Event{constructor(e,n,t){super("slottable-request",{bubbles:!1,cancelable:!0,composed:!1}),this.name=e,this.data=n,this.slotName=t!==void 0?`${e}.${t}`:e}}export const removeSlottableRequest=Symbol("remove-slottable-request");
|
|
2
|
-
//# sourceMappingURL=slottable-request-event.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["slottable-request-event.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nexport class SlottableRequestEvent extends Event {\n readonly data: unknown;\n readonly name: string;\n readonly slotName: string;\n constructor(name: string, data: unknown, key?: string) {\n super('slottable-request', {\n bubbles: false,\n cancelable: true,\n composed: false,\n });\n this.name = name;\n this.data = data;\n this.slotName = key !== undefined ? `${name}.${key}` : name;\n if (window.__swc.DEBUG) {\n window.__swc.warn(\n undefined,\n `\u26A0\uFE0F WARNING \u26A0\uFE0F : \\`slottable-request\\` events are experimental and there is no guarantees behind usage of them in an application!! Their shape and presence within the library could be changed at anytime.\n \nLearn more about the protocol these events are based on below:`,\n 'https://github.com/webcomponents-cg/community-protocols/pull/45',\n {\n level: 'high',\n type: 'api',\n }\n );\n }\n }\n}\n\nexport const removeSlottableRequest = Symbol('remove-slottable-request');\n\ndeclare global {\n interface GlobalEventHandlersEventMap {\n 'slottable-request': SlottableRequestEvent;\n }\n}\n"],
|
|
5
|
-
"mappings": "aAWO,aAAM,8BAA8B,KAAM,CAI7C,YAAYA,EAAcC,EAAeC,EAAc,CACnD,MAAM,oBAAqB,CACvB,QAAS,GACT,WAAY,GACZ,SAAU,EACd,CAAC,EACD,KAAK,KAAOF,EACZ,KAAK,KAAOC,EACZ,KAAK,SAAWC,IAAQ,OAAY,GAAGF,CAAI,IAAIE,CAAG,GAAKF,CAc3D,CACJ,CAEO,aAAM,uBAAyB,OAAO,0BAA0B",
|
|
6
|
-
"names": ["name", "data", "key"]
|
|
7
|
-
}
|
package/src/strategies.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ClickController } from './ClickController.js';
|
|
2
|
-
import { HoverController } from './HoverController.js';
|
|
3
|
-
import { LongpressController } from './LongpressController.js';
|
|
4
|
-
export declare const strategies: {
|
|
5
|
-
click: typeof ClickController;
|
|
6
|
-
longpress: typeof LongpressController;
|
|
7
|
-
hover: typeof HoverController;
|
|
8
|
-
};
|
package/src/strategies.dev.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
import { ClickController } from "./ClickController.dev.js";
|
|
3
|
-
import { HoverController } from "./HoverController.dev.js";
|
|
4
|
-
import { LongpressController } from "./LongpressController.dev.js";
|
|
5
|
-
export const strategies = {
|
|
6
|
-
click: ClickController,
|
|
7
|
-
longpress: LongpressController,
|
|
8
|
-
hover: HoverController
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=strategies.dev.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["strategies.ts"],
|
|
4
|
-
"sourcesContent": ["/*\nCopyright 2024 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport { ClickController } from './ClickController.dev.js'\nimport { HoverController } from './HoverController.dev.js'\nimport { LongpressController } from './LongpressController.dev.js'\n\nexport const strategies = {\n click: ClickController,\n longpress: LongpressController,\n hover: HoverController,\n};\n"],
|
|
5
|
-
"mappings": ";AAYA,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,2BAA2B;AAE7B,aAAM,aAAa;AAAA,EACtB,OAAO;AAAA,EACP,WAAW;AAAA,EACX,OAAO;AACX;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|