@pacem/pacem 1.0.0-bessel → 1.0.0-binet
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/dist/browser/pacem-2d.js +149 -2
- package/dist/browser/pacem-2d.js.map +1 -1
- package/dist/browser/pacem-2d.min.js +1 -1
- package/dist/browser/pacem-3d.js +646 -2
- package/dist/browser/pacem-3d.js.map +1 -1
- package/dist/browser/pacem-3d.min.js +1 -1
- package/dist/browser/pacem-charts.js +21 -1
- package/dist/browser/pacem-charts.js.map +1 -1
- package/dist/browser/pacem-charts.min.js +1 -1
- package/dist/browser/pacem-cms.js +118 -3
- package/dist/browser/pacem-cms.js.map +1 -1
- package/dist/browser/pacem-cms.min.js +1 -1
- package/dist/browser/pacem-core.js +870 -9
- package/dist/browser/pacem-core.js.map +1 -1
- package/dist/browser/pacem-core.min.js +2 -2
- package/dist/browser/pacem-foundation.js +296 -1
- package/dist/browser/pacem-foundation.js.map +1 -1
- package/dist/browser/pacem-foundation.min.js +1 -1
- package/dist/browser/pacem-fx.js +18 -1
- package/dist/browser/pacem-fx.js.map +1 -1
- package/dist/browser/pacem-fx.min.js +1 -1
- package/dist/browser/pacem-logging.js +15 -1
- package/dist/browser/pacem-logging.js.map +1 -1
- package/dist/browser/pacem-logging.min.js +1 -1
- package/dist/browser/pacem-maps.js +97 -1
- package/dist/browser/pacem-maps.js.map +1 -1
- package/dist/browser/pacem-maps.min.js +1 -1
- package/dist/browser/pacem-media.js +14 -1
- package/dist/browser/pacem-media.js.map +1 -1
- package/dist/browser/pacem-media.min.js +1 -1
- package/dist/browser/pacem-networking.js +22 -1
- package/dist/browser/pacem-networking.js.map +1 -1
- package/dist/browser/pacem-networking.min.js +1 -1
- package/dist/browser/pacem-numerical.js +360 -1
- package/dist/browser/pacem-numerical.js.map +1 -1
- package/dist/browser/pacem-numerical.min.js +1 -1
- package/dist/browser/pacem-plus.js +195 -4
- package/dist/browser/pacem-plus.js.map +1 -1
- package/dist/browser/pacem-plus.min.js +1 -1
- package/dist/browser/pacem-scaffolding.js +420 -38
- package/dist/browser/pacem-scaffolding.js.map +1 -1
- package/dist/browser/pacem-scaffolding.min.js +2 -2
- package/dist/browser/pacem-ui.js +143 -19
- package/dist/browser/pacem-ui.js.map +1 -1
- package/dist/browser/pacem-ui.min.js +2 -2
- package/dist/bundle/pacem.min.mjs +147 -147
- package/dist/bundle/pacem.mjs +2905 -1417
- package/dist/bundle/pacem.mjs.map +3 -3
- package/dist/docs/pacem-2d.json +11549 -0
- package/dist/docs/pacem-3d.json +29096 -0
- package/dist/docs/pacem-charts.json +4244 -0
- package/dist/docs/pacem-cms.json +9325 -0
- package/dist/docs/pacem-core.json +40109 -0
- package/dist/docs/pacem-foundation.json +8941 -0
- package/dist/docs/pacem-fx.json +3121 -0
- package/dist/docs/pacem-logging.json +941 -0
- package/dist/docs/pacem-maps.json +17387 -0
- package/dist/docs/pacem-media.json +1203 -0
- package/dist/docs/pacem-networking.json +1798 -0
- package/dist/docs/pacem-numerical.json +13706 -0
- package/dist/docs/pacem-plus.json +8468 -0
- package/dist/docs/pacem-scaffolding.json +34788 -0
- package/dist/docs/pacem-ui.json +18628 -0
- package/dist/typings/index.d.ts +4109 -31
- package/dist/vscode.html-custom.json +1303 -741
- package/package.json +4 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @pacem/pacem v1.0.0-
|
|
2
|
+
* @pacem/pacem v1.0.0-binet (https://js.pacem.it)
|
|
3
3
|
* Pacem (https://pacem.it)
|
|
4
4
|
* Licensed under Apache-2.0
|
|
5
5
|
*/
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14
14
|
};
|
|
15
15
|
//namespace Pacem.Components.Media {
|
|
16
|
+
/** Wraps a native `HTMLAudioElement`, exposing playback control and its readiness/lifecycle as reactive properties and events. */
|
|
16
17
|
let PacemAudioElement = class PacemAudioElement extends pacemCore.PacemEventTarget {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
@@ -62,6 +63,10 @@
|
|
|
62
63
|
a.removeEventListener('canplay', this._canPlayHandler, false);
|
|
63
64
|
super.disconnectedCallback();
|
|
64
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Starts (or resumes) playback of the underlying `<audio>` element, dispatching a `start` event on success or an `error` event on failure.
|
|
68
|
+
* @returns A promise that resolves once playback has started, or rejects with `'disabled'` if the element is disabled.
|
|
69
|
+
*/
|
|
65
70
|
play() {
|
|
66
71
|
// sudden exit when disabled
|
|
67
72
|
if (this.disabled) {
|
|
@@ -73,9 +78,11 @@
|
|
|
73
78
|
this.dispatchEvent(new CustomEvent('error', { detail: e }));
|
|
74
79
|
});
|
|
75
80
|
}
|
|
81
|
+
/** Pauses playback. */
|
|
76
82
|
pause() {
|
|
77
83
|
this.#audio.pause();
|
|
78
84
|
}
|
|
85
|
+
/** Reloads the underlying `<audio>` element, resetting its playback state. */
|
|
79
86
|
reset() {
|
|
80
87
|
this.#audio.load();
|
|
81
88
|
}
|
|
@@ -127,6 +134,7 @@
|
|
|
127
134
|
}
|
|
128
135
|
return 'captureStream' in obj && typeof obj['captureStream'] === 'function';
|
|
129
136
|
}
|
|
137
|
+
/** Wraps the native `MediaRecorder` API, capturing audio/video from a canvas, media element or media stream into a `Blob`. */
|
|
130
138
|
let PacemMediaRecorderElement = class PacemMediaRecorderElement extends pacemCore.PacemEventTarget {
|
|
131
139
|
constructor() {
|
|
132
140
|
super(...arguments);
|
|
@@ -207,29 +215,34 @@
|
|
|
207
215
|
this.#recorder = null;
|
|
208
216
|
}
|
|
209
217
|
}
|
|
218
|
+
/** Concatenates the buffered data chunks recorded so far into a single `Blob` and assigns it to `output`, clearing the buffer. */
|
|
210
219
|
flush() {
|
|
211
220
|
const blob = new Blob(this.#chunks, { 'type': this.mimeType || DEFAULT_MIMETYPE });
|
|
212
221
|
this.#chunks = [];
|
|
213
222
|
this.output = blob;
|
|
214
223
|
}
|
|
224
|
+
/** Starts recording, if the underlying recorder is currently inactive. */
|
|
215
225
|
start() {
|
|
216
226
|
const r = this.#recorder;
|
|
217
227
|
if (!pacemCore.Utils.isNull(r) && r.state === 'inactive') {
|
|
218
228
|
r.start();
|
|
219
229
|
}
|
|
220
230
|
}
|
|
231
|
+
/** Stops recording, if the underlying recorder is not already inactive. */
|
|
221
232
|
stop() {
|
|
222
233
|
const r = this.#recorder;
|
|
223
234
|
if (!pacemCore.Utils.isNull(r) && r.state !== 'inactive') {
|
|
224
235
|
r.stop();
|
|
225
236
|
}
|
|
226
237
|
}
|
|
238
|
+
/** Resumes a paused recording. */
|
|
227
239
|
resume() {
|
|
228
240
|
const r = this.#recorder;
|
|
229
241
|
if (!pacemCore.Utils.isNull(r) && r.state === 'paused') {
|
|
230
242
|
r.start();
|
|
231
243
|
}
|
|
232
244
|
}
|
|
245
|
+
/** Pauses an ongoing recording. */
|
|
233
246
|
pause() {
|
|
234
247
|
const r = this.#recorder;
|
|
235
248
|
if (!pacemCore.Utils.isNull(r) && r.state !== 'paused') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pacem-media.js","sources":["../esm/audio.js","../esm/media-recorder.js","../esm/index-iife.js"],"sourcesContent":["var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { P, CustomElement, PacemEventTarget, Watch, PropertyConverters } from '@pacem/pacem-core';\n//namespace Pacem.Components.Media {\nlet PacemAudioElement = class PacemAudioElement extends PacemEventTarget {\n constructor() {\n super(...arguments);\n this._endedHandler = (e) => {\n this.dispatchEvent(new Event('end'));\n };\n this._canPlayHandler = (e) => {\n this.#canPlay = true;\n this._autoplay();\n };\n this._canPlayThroughHandler = (e) => {\n this.#canPlayThrough = true;\n this._autoplay();\n };\n }\n // TODO: structure a proper MediaElement hierarchy (share logic with a future VideoElement)\n /** @readonly */\n // @Watch({ converter: PropertyConverters.Boolean }) duration: number;\n #audio;\n #canPlay;\n #canPlayThrough;\n connectedCallback() {\n super.connectedCallback();\n const a = this.#audio = new Audio();\n a.addEventListener('canplay', this._canPlayHandler, false);\n a.addEventListener('ended', this._endedHandler, false);\n a.addEventListener('canplaythrough', this._canPlayThroughHandler, false);\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n if (!first) {\n switch (name) {\n case 'src':\n this._init();\n break;\n }\n }\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n this._init();\n }\n disconnectedCallback() {\n const a = this.#audio;\n a.removeEventListener('ended', this._endedHandler, false);\n a.removeEventListener('canplaythrough', this._canPlayThroughHandler, false);\n a.removeEventListener('canplay', this._canPlayHandler, false);\n super.disconnectedCallback();\n }\n play() {\n // sudden exit when disabled\n if (this.disabled) {\n return Promise.reject('disabled');\n }\n return this.#audio.play().then(_ => {\n this.dispatchEvent(new Event('start'));\n }, e => {\n this.dispatchEvent(new CustomEvent('error', { detail: e }));\n });\n }\n pause() {\n this.#audio.pause();\n }\n reset() {\n this.#audio.load();\n }\n get _canPlay() {\n return this.stream && this.#canPlay || this.#canPlayThrough;\n }\n _autoplay() {\n if (this.autoplay) {\n if (this._canPlay) {\n this.play();\n }\n }\n }\n _init(src = this.src) {\n const audio = this.#audio;\n this.#canPlay =\n this.#canPlayThrough = false;\n audio.src = src;\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemAudioElement.prototype, \"src\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Boolean })\n], PacemAudioElement.prototype, \"stream\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Boolean })\n], PacemAudioElement.prototype, \"autoplay\", void 0);\nPacemAudioElement = __decorate([\n CustomElement({ tagName: P + '-audio' })\n], PacemAudioElement);\nexport { PacemAudioElement };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { P, CustomElement, PacemEventTarget, Watch, PropertyConverters, Utils } from '@pacem/pacem-core';\n//namespace Pacem.Components.Media {\nconst DEFAULT_FPS = 25;\nconst DEFAULT_MIMETYPE = \"video/mp4\";\nconst DEFAULT_AUDIO_BITS_PER_SEC = 128000;\nconst DEFAULT_VIDEO_BITS_PER_SEC = 2500000;\nconst MEDIA_RECORDER_EVENTS = [\"start\", \"stop\", \"dataavailable\", \"pause\", \"resume\", \"error\", \"warning\"];\nfunction isStream(obj) {\n if (obj instanceof HTMLCanvasElement) {\n return true;\n }\n return 'captureStream' in obj && typeof obj['captureStream'] === 'function';\n}\nlet PacemMediaRecorderElement = class PacemMediaRecorderElement extends PacemEventTarget {\n constructor() {\n super(...arguments);\n this._recorderLifecycleHandler = (evt) => {\n this.state = this.#recorder.state;\n switch (evt.type) {\n case 'start':\n this.output = null;\n break;\n case 'stop':\n this.flush();\n break;\n case 'dataavailable':\n var evtb = evt;\n this.#chunks.push(evtb.data);\n break;\n }\n };\n this.#recorder = null;\n this.#chunks = [];\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n this._setupMediaRecorder();\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n if (!first) {\n switch (name) {\n case 'source':\n case 'fps':\n case 'mimeType':\n case 'audioBitsPerSecond':\n case 'videoBitsPerSecond':\n this._setupMediaRecorder();\n break;\n }\n }\n }\n disconnectedCallback() {\n this._closeMediaRecorder();\n super.disconnectedCallback();\n }\n #recorder;\n #chunks;\n _setupMediaRecorder(stream = this.source, options = {\n mimeType: this.mimeType || DEFAULT_MIMETYPE,\n audioBitsPerSecond: this.audioBitsPerSecond ?? DEFAULT_AUDIO_BITS_PER_SEC,\n videoBitsPerSecond: this.videoBitsPerSecond ?? DEFAULT_VIDEO_BITS_PER_SEC\n }) {\n this._closeMediaRecorder();\n if (!Utils.isNull(stream)) {\n if (isStream(stream)) {\n const fps = this.fps || DEFAULT_FPS;\n stream = stream.captureStream(fps);\n }\n try {\n this.#recorder = new MediaRecorder(stream, options);\n }\n catch (e) {\n console.error(e);\n }\n const r = this.#recorder;\n MEDIA_RECORDER_EVENTS.forEach(e => {\n r.addEventListener(e, this._recorderLifecycleHandler, false);\n });\n }\n }\n _closeMediaRecorder() {\n const r = this.#recorder;\n if (!Utils.isNull(r)) {\n if (r.state !== 'inactive') {\n r.stop();\n }\n MEDIA_RECORDER_EVENTS.forEach(e => {\n r.removeEventListener(e, this._recorderLifecycleHandler, false);\n });\n this.#recorder = null;\n }\n }\n flush() {\n const blob = new Blob(this.#chunks, { 'type': this.mimeType || DEFAULT_MIMETYPE });\n this.#chunks = [];\n this.output = blob;\n }\n start() {\n const r = this.#recorder;\n if (!Utils.isNull(r) && r.state === 'inactive') {\n r.start();\n }\n }\n stop() {\n const r = this.#recorder;\n if (!Utils.isNull(r) && r.state !== 'inactive') {\n r.stop();\n }\n }\n resume() {\n const r = this.#recorder;\n if (!Utils.isNull(r) && r.state === 'paused') {\n r.start();\n }\n }\n pause() {\n const r = this.#recorder;\n if (!Utils.isNull(r) && r.state !== 'paused') {\n r.pause();\n }\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Element })\n], PacemMediaRecorderElement.prototype, \"source\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Number })\n], PacemMediaRecorderElement.prototype, \"fps\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemMediaRecorderElement.prototype, \"mimeType\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Number })\n], PacemMediaRecorderElement.prototype, \"audioBitsPerSecond\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Number })\n], PacemMediaRecorderElement.prototype, \"videoBitsPerSecond\", void 0);\n__decorate([\n Watch({ converter: PropertyConverters.String })\n], PacemMediaRecorderElement.prototype, \"state\", void 0);\n__decorate([\n Watch()\n], PacemMediaRecorderElement.prototype, \"output\", void 0);\nPacemMediaRecorderElement = __decorate([\n CustomElement({ tagName: P + '-media-recorder' })\n], PacemMediaRecorderElement);\nexport { PacemMediaRecorderElement };\n","import { DeepMerger } from '@pacem/pacem-foundation';\nimport * as Output from './index';\nDeepMerger.merge(Output);\n"],"names":["__decorate","this","PacemEventTarget","Watch","PropertyConverters","CustomElement","P","Utils","DeepMerger"],"mappings":";;;IAAA,IAAIA,YAAU,GAAG,CAACC,SAAI,IAAIA,SAAI,CAAC,UAAU,KAAK,UAAU,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IACvF,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;IAChI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;IAClI,SAAS,KAAK,IAAI,CAAC,GAAG,UAA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AAE,yBAAyB,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;IACzD,yBAAyB,GAAG,UAAU,CAAC;IACvC,IAAIE,uBAAa,CAAC,EAAE,OAAO,EAAEC,WAAC,GAAG,iBAAiB,EAAE;IACpD,CAAC,EAAE,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;ACtJ7BE,8BAAU,CAAC,KAAK,CAAC,MAAM,CAAC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pacem-media.js","sources":["../esm/audio.js","../esm/media-recorder.js","../esm/index-iife.js"],"sourcesContent":["var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { P, CustomElement, PacemEventTarget, Watch, PropertyConverters } from '@pacem/pacem-core';\n//namespace Pacem.Components.Media {\n/** Wraps a native `HTMLAudioElement`, exposing playback control and its readiness/lifecycle as reactive properties and events. */\nlet PacemAudioElement = class PacemAudioElement extends PacemEventTarget {\n constructor() {\n super(...arguments);\n this._endedHandler = (e) => {\n this.dispatchEvent(new Event('end'));\n };\n this._canPlayHandler = (e) => {\n this.#canPlay = true;\n this._autoplay();\n };\n this._canPlayThroughHandler = (e) => {\n this.#canPlayThrough = true;\n this._autoplay();\n };\n }\n // TODO: structure a proper MediaElement hierarchy (share logic with a future VideoElement)\n /** @readonly */\n // @Watch({ converter: PropertyConverters.Boolean }) duration: number;\n #audio;\n #canPlay;\n #canPlayThrough;\n connectedCallback() {\n super.connectedCallback();\n const a = this.#audio = new Audio();\n a.addEventListener('canplay', this._canPlayHandler, false);\n a.addEventListener('ended', this._endedHandler, false);\n a.addEventListener('canplaythrough', this._canPlayThroughHandler, false);\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n if (!first) {\n switch (name) {\n case 'src':\n this._init();\n break;\n }\n }\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n this._init();\n }\n disconnectedCallback() {\n const a = this.#audio;\n a.removeEventListener('ended', this._endedHandler, false);\n a.removeEventListener('canplaythrough', this._canPlayThroughHandler, false);\n a.removeEventListener('canplay', this._canPlayHandler, false);\n super.disconnectedCallback();\n }\n /**\n * Starts (or resumes) playback of the underlying `<audio>` element, dispatching a `start` event on success or an `error` event on failure.\n * @returns A promise that resolves once playback has started, or rejects with `'disabled'` if the element is disabled.\n */\n play() {\n // sudden exit when disabled\n if (this.disabled) {\n return Promise.reject('disabled');\n }\n return this.#audio.play().then(_ => {\n this.dispatchEvent(new Event('start'));\n }, e => {\n this.dispatchEvent(new CustomEvent('error', { detail: e }));\n });\n }\n /** Pauses playback. */\n pause() {\n this.#audio.pause();\n }\n /** Reloads the underlying `<audio>` element, resetting its playback state. */\n reset() {\n this.#audio.load();\n }\n get _canPlay() {\n return this.stream && this.#canPlay || this.#canPlayThrough;\n }\n _autoplay() {\n if (this.autoplay) {\n if (this._canPlay) {\n this.play();\n }\n }\n }\n _init(src = this.src) {\n const audio = this.#audio;\n this.#canPlay =\n this.#canPlayThrough = false;\n audio.src = src;\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemAudioElement.prototype, \"src\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Boolean })\n], PacemAudioElement.prototype, \"stream\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Boolean })\n], PacemAudioElement.prototype, \"autoplay\", void 0);\nPacemAudioElement = __decorate([\n CustomElement({ tagName: P + '-audio' })\n], PacemAudioElement);\nexport { PacemAudioElement };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { P, CustomElement, PacemEventTarget, Watch, PropertyConverters, Utils } from '@pacem/pacem-core';\n//namespace Pacem.Components.Media {\nconst DEFAULT_FPS = 25;\nconst DEFAULT_MIMETYPE = \"video/mp4\";\nconst DEFAULT_AUDIO_BITS_PER_SEC = 128000;\nconst DEFAULT_VIDEO_BITS_PER_SEC = 2500000;\nconst MEDIA_RECORDER_EVENTS = [\"start\", \"stop\", \"dataavailable\", \"pause\", \"resume\", \"error\", \"warning\"];\nfunction isStream(obj) {\n if (obj instanceof HTMLCanvasElement) {\n return true;\n }\n return 'captureStream' in obj && typeof obj['captureStream'] === 'function';\n}\n/** Wraps the native `MediaRecorder` API, capturing audio/video from a canvas, media element or media stream into a `Blob`. */\nlet PacemMediaRecorderElement = class PacemMediaRecorderElement extends PacemEventTarget {\n constructor() {\n super(...arguments);\n this._recorderLifecycleHandler = (evt) => {\n this.state = this.#recorder.state;\n switch (evt.type) {\n case 'start':\n this.output = null;\n break;\n case 'stop':\n this.flush();\n break;\n case 'dataavailable':\n var evtb = evt;\n this.#chunks.push(evtb.data);\n break;\n }\n };\n this.#recorder = null;\n this.#chunks = [];\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n this._setupMediaRecorder();\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n if (!first) {\n switch (name) {\n case 'source':\n case 'fps':\n case 'mimeType':\n case 'audioBitsPerSecond':\n case 'videoBitsPerSecond':\n this._setupMediaRecorder();\n break;\n }\n }\n }\n disconnectedCallback() {\n this._closeMediaRecorder();\n super.disconnectedCallback();\n }\n #recorder;\n #chunks;\n _setupMediaRecorder(stream = this.source, options = {\n mimeType: this.mimeType || DEFAULT_MIMETYPE,\n audioBitsPerSecond: this.audioBitsPerSecond ?? DEFAULT_AUDIO_BITS_PER_SEC,\n videoBitsPerSecond: this.videoBitsPerSecond ?? DEFAULT_VIDEO_BITS_PER_SEC\n }) {\n this._closeMediaRecorder();\n if (!Utils.isNull(stream)) {\n if (isStream(stream)) {\n const fps = this.fps || DEFAULT_FPS;\n stream = stream.captureStream(fps);\n }\n try {\n this.#recorder = new MediaRecorder(stream, options);\n }\n catch (e) {\n console.error(e);\n }\n const r = this.#recorder;\n MEDIA_RECORDER_EVENTS.forEach(e => {\n r.addEventListener(e, this._recorderLifecycleHandler, false);\n });\n }\n }\n _closeMediaRecorder() {\n const r = this.#recorder;\n if (!Utils.isNull(r)) {\n if (r.state !== 'inactive') {\n r.stop();\n }\n MEDIA_RECORDER_EVENTS.forEach(e => {\n r.removeEventListener(e, this._recorderLifecycleHandler, false);\n });\n this.#recorder = null;\n }\n }\n /** Concatenates the buffered data chunks recorded so far into a single `Blob` and assigns it to `output`, clearing the buffer. */\n flush() {\n const blob = new Blob(this.#chunks, { 'type': this.mimeType || DEFAULT_MIMETYPE });\n this.#chunks = [];\n this.output = blob;\n }\n /** Starts recording, if the underlying recorder is currently inactive. */\n start() {\n const r = this.#recorder;\n if (!Utils.isNull(r) && r.state === 'inactive') {\n r.start();\n }\n }\n /** Stops recording, if the underlying recorder is not already inactive. */\n stop() {\n const r = this.#recorder;\n if (!Utils.isNull(r) && r.state !== 'inactive') {\n r.stop();\n }\n }\n /** Resumes a paused recording. */\n resume() {\n const r = this.#recorder;\n if (!Utils.isNull(r) && r.state === 'paused') {\n r.start();\n }\n }\n /** Pauses an ongoing recording. */\n pause() {\n const r = this.#recorder;\n if (!Utils.isNull(r) && r.state !== 'paused') {\n r.pause();\n }\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Element })\n], PacemMediaRecorderElement.prototype, \"source\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Number })\n], PacemMediaRecorderElement.prototype, \"fps\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemMediaRecorderElement.prototype, \"mimeType\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Number })\n], PacemMediaRecorderElement.prototype, \"audioBitsPerSecond\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Number })\n], PacemMediaRecorderElement.prototype, \"videoBitsPerSecond\", void 0);\n__decorate([\n Watch({ converter: PropertyConverters.String })\n], PacemMediaRecorderElement.prototype, \"state\", void 0);\n__decorate([\n Watch()\n], PacemMediaRecorderElement.prototype, \"output\", void 0);\nPacemMediaRecorderElement = __decorate([\n CustomElement({ tagName: P + '-media-recorder' })\n], PacemMediaRecorderElement);\nexport { PacemMediaRecorderElement };\n","import { DeepMerger } from '@pacem/pacem-foundation';\nimport * as Output from './index';\nDeepMerger.merge(Output);\n"],"names":["__decorate","this","PacemEventTarget","Watch","PropertyConverters","CustomElement","P","Utils","DeepMerger"],"mappings":";;;IAAA,IAAIA,YAAU,GAAG,CAACC,SAAI,IAAIA,SAAI,CAAC,UAAU,KAAK,UAAU,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IACvF,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;IAChI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;IAClI,SAAS,KAAK,IAAI,C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EAAE,OAAO,EAAE,MAAM,CAAC;IACxD,UAAU,CAAC;IACX,IAAID,eAAK;IACT,CAAC,EAAE,yBAAyB,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC;IACzD,yBAAyB,GAAG,UAAU,CAAC;IACvC,IAAIE,uBAAa,CAAC,EAAE,OAAO,EAAEC,WAAC,GAAG,iBAAiB,EAAE;IACpD,CAAC,EAAE,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;AC5J7BE,8BAAU,CAAC,KAAK,CAAC,MAAM,CAAC;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @pacem/pacem v1.0.0-
|
|
2
|
+
* @pacem/pacem v1.0.0-binet (https://js.pacem.it)
|
|
3
3
|
* Pacem (https://pacem.it)
|
|
4
4
|
* Licensed under Apache-2.0
|
|
5
5
|
*/
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
//namespace Pacem.Components.Networking {
|
|
16
16
|
const API_JS = 'https://cdn.jsdelivr.net/npm/@microsoft/signalr@10.0.0/dist/browser/signalr.min.js'; // 'https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/10.0.0/signalr.min.js'
|
|
17
17
|
const consts = { API_JS };
|
|
18
|
+
/** Subscribes to a hub method (or stream) exposed by the ancestor {@link PacemHubProxyElement}, dispatching a `receive` event for every incoming message. */
|
|
18
19
|
let PacemHubListenerElement = class PacemHubListenerElement extends pacemCore.Components.PacemItemElement {
|
|
19
20
|
constructor() {
|
|
20
21
|
super(...arguments);
|
|
@@ -142,28 +143,44 @@
|
|
|
142
143
|
PacemHubListenerElement = __decorate$1([
|
|
143
144
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-hub-listener' })
|
|
144
145
|
], PacemHubListenerElement);
|
|
146
|
+
/** Wraps a SignalR hub connection, dispatching its connection state and exposing `invoke`/`send` to registered {@link PacemHubListenerElement} children. */
|
|
145
147
|
let PacemHubProxyElement = class PacemHubProxyElement extends pacemCore.Components.PacemItemsContainerElement {
|
|
148
|
+
/** @inheritdoc */
|
|
146
149
|
validate(item) {
|
|
147
150
|
return item instanceof PacemHubListenerElement;
|
|
148
151
|
}
|
|
152
|
+
/** @readonly Gets the underlying `signalR.HubConnection` instance, if connected. */
|
|
149
153
|
get connection() {
|
|
150
154
|
return this._hub;
|
|
151
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Invokes a hub method and waits for a result from the server.
|
|
158
|
+
* @param method Name of the hub method to invoke
|
|
159
|
+
* @param args Arguments to pass to the hub method
|
|
160
|
+
* @returns A promise that resolves with the server response
|
|
161
|
+
*/
|
|
152
162
|
invoke(method, ...args) {
|
|
153
163
|
if (this.connected) {
|
|
154
164
|
return this._hub.invoke.apply(this._hub, arguments);
|
|
155
165
|
}
|
|
156
166
|
throw 'Hub is not connected. Cannot call `invoke` method.';
|
|
157
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Invokes a hub method without waiting for a result from the server.
|
|
170
|
+
* @param method Name of the hub method to invoke
|
|
171
|
+
* @param args Arguments to pass to the hub method
|
|
172
|
+
*/
|
|
158
173
|
send(method, ...args) {
|
|
159
174
|
if (this.connected) {
|
|
160
175
|
return this._hub.send(method, ...args);
|
|
161
176
|
}
|
|
162
177
|
throw 'Hub is not connected. Cannot call `send` method.';
|
|
163
178
|
}
|
|
179
|
+
/** (Re)establishes the hub connection. */
|
|
164
180
|
start() {
|
|
165
181
|
return this._resetProxy();
|
|
166
182
|
}
|
|
183
|
+
/** Closes the hub connection, if connected. */
|
|
167
184
|
async stop() {
|
|
168
185
|
if (this.connected) {
|
|
169
186
|
await this._hub.stop();
|
|
@@ -244,6 +261,7 @@
|
|
|
244
261
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
245
262
|
};
|
|
246
263
|
//namespace Pacem.Components.Networking {
|
|
264
|
+
/** Subscribes to a named event exposed by the ancestor {@link PacemServerSentEventsProxyElement}'s `EventSource`, dispatching a `receive` event for every incoming message. */
|
|
247
265
|
let PacemServerSentEventsListenerElement = class PacemServerSentEventsListenerElement extends pacemCore.Components.PacemItemElement {
|
|
248
266
|
constructor() {
|
|
249
267
|
super(...arguments);
|
|
@@ -331,6 +349,7 @@
|
|
|
331
349
|
PacemServerSentEventsListenerElement = __decorate([
|
|
332
350
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-sse-listener' })
|
|
333
351
|
], PacemServerSentEventsListenerElement);
|
|
352
|
+
/** Wraps a browser `EventSource`, opening a Server-Sent Events connection and dispatching its connection state to registered {@link PacemServerSentEventsListenerElement} children. */
|
|
334
353
|
let PacemServerSentEventsProxyElement = class PacemServerSentEventsProxyElement extends pacemCore.Components.PacemItemsContainerElement {
|
|
335
354
|
constructor() {
|
|
336
355
|
super(...arguments);
|
|
@@ -345,6 +364,7 @@
|
|
|
345
364
|
this.dispatchEvent(new CustomEvent('receive', { detail: e.data }));
|
|
346
365
|
};
|
|
347
366
|
}
|
|
367
|
+
/** @inheritdoc */
|
|
348
368
|
validate(item) {
|
|
349
369
|
return item instanceof PacemServerSentEventsListenerElement;
|
|
350
370
|
}
|
|
@@ -378,6 +398,7 @@
|
|
|
378
398
|
evtSource.onerror = this._errorHandler;
|
|
379
399
|
}
|
|
380
400
|
}
|
|
401
|
+
/** @readonly Gets the underlying `EventSource` instance, if connected. */
|
|
381
402
|
get eventSource() {
|
|
382
403
|
return this.#evtSource;
|
|
383
404
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pacem-networking.js","sources":["../esm/hub-proxy.js","../esm/sse-proxy.js","../esm/index-iife.js"],"sourcesContent":["var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { P, CustomElement, Watch, PropertyConverters, Utils, PropertyChangeEventName, CustomElementUtils, Components } from '@pacem/pacem-core';\n//namespace Pacem.Components.Networking {\nconst API_JS = 'https://cdn.jsdelivr.net/npm/@microsoft/signalr@10.0.0/dist/browser/signalr.min.js'; // 'https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/10.0.0/signalr.min.js'\nconst consts = { API_JS };\nlet PacemHubListenerElement = class PacemHubListenerElement extends Components.PacemItemElement {\n constructor() {\n super(...arguments);\n this._receiveHandler = (...args) => {\n this.dispatchEvent(new CustomEvent('receive', { detail: Array.from(args) }));\n };\n this._completeHandler = () => {\n this.dispatchEvent(new Event('complete'));\n };\n this._errorHandler = (error) => {\n this.dispatchEvent(new CustomEvent('error', { detail: error }));\n };\n this._connectedHandler = (e) => {\n if (e.detail.propertyName === 'connected' && e.detail.currentValue === true) {\n this._start();\n }\n };\n }\n #streamSubscription;\n get _isConnected() {\n return this.container instanceof PacemHubProxyElement && this.container.connected || false;\n }\n get _connection() {\n return this.container instanceof PacemHubProxyElement && this.container.connection || null;\n }\n /** Start listening, if not disabled. */\n start() {\n if (!this.disabled) {\n this._start();\n }\n }\n /** Stop listening. */\n stop() {\n this._stop();\n }\n _stop(method = this.method, isStreaming = this.stream) {\n if (!this._isConnected) {\n return;\n }\n const conn = this._connection;\n if (!Utils.isNullOrEmpty(method)) {\n if (!isStreaming) {\n conn.off(method, this._receiveHandler);\n }\n else {\n this.#streamSubscription?.dispose();\n }\n }\n }\n _start(method = this.method, isStreaming = this.stream) {\n if (!this._isConnected) {\n return;\n }\n const conn = this._connection;\n if (!Utils.isNullOrEmpty(method)) {\n if (!isStreaming) {\n conn.on(method, this._receiveHandler);\n }\n else {\n const args = this.arguments || [];\n const streamResult = signalR.HubConnection.prototype.stream.apply(conn, [method].concat(args));\n this.#streamSubscription = streamResult.subscribe({\n next: this._receiveHandler,\n complete: this._completeHandler,\n error: this._errorHandler\n });\n }\n }\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n const container = this.container;\n if (!Utils.isNull(container)) {\n container.addEventListener(PropertyChangeEventName, this._connectedHandler, false);\n }\n this.start();\n }\n disconnectedCallback() {\n const container = this.container;\n if (!Utils.isNull(container)) {\n container.removeEventListener(PropertyChangeEventName, this._connectedHandler, false);\n }\n super.disconnectedCallback();\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n switch (name) {\n case 'arguments':\n this._stop();\n this._start();\n break;\n case 'method':\n if (!Utils.isNullOrEmpty(old)) {\n this._stop(old, this.stream);\n }\n if (!Utils.isNullOrEmpty(val)) {\n this._start(val, this.stream);\n }\n break;\n case 'stream':\n const m = this.method;\n if (!Utils.isNullOrEmpty(m)) {\n this._stop(m, old);\n this._start(m, val);\n }\n break;\n case 'disabled':\n if (!Utils.isNullOrEmpty(this.method)) {\n let toggle = val ? this._stop : this._start;\n toggle();\n }\n break;\n }\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemHubListenerElement.prototype, \"method\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Boolean })\n], PacemHubListenerElement.prototype, \"stream\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Json })\n], PacemHubListenerElement.prototype, \"arguments\", void 0);\nPacemHubListenerElement = __decorate([\n CustomElement({ tagName: P + '-hub-listener' })\n], PacemHubListenerElement);\nexport { PacemHubListenerElement };\nlet PacemHubProxyElement = class PacemHubProxyElement extends Components.PacemItemsContainerElement {\n validate(item) {\n return item instanceof PacemHubListenerElement;\n }\n get connection() {\n return this._hub;\n }\n invoke(method, ...args) {\n if (this.connected) {\n return this._hub.invoke.apply(this._hub, arguments);\n }\n throw 'Hub is not connected. Cannot call `invoke` method.';\n }\n send(method, ...args) {\n if (this.connected) {\n return this._hub.send(method, ...args);\n }\n throw 'Hub is not connected. Cannot call `send` method.';\n }\n start() {\n return this._resetProxy();\n }\n async stop() {\n if (this.connected) {\n await this._hub.stop();\n }\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n //\n if (first) {\n return;\n }\n if (name === 'url' || name === 'disabled' || name === 'accesstoken') {\n this._resetProxy();\n }\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n this.start();\n }\n disconnectedCallback() {\n // this will (likely) never complete, being an asynchrounous call...\n // TODO: think about it.\n this.stop();\n super.disconnectedCallback();\n }\n async _resetProxy() {\n if (!Utils.isNull(this._hub)) {\n await this._hub.stop();\n //this.connected = false;\n }\n this._setupProxy();\n }\n async _initialize() {\n if ('signalR' in window) {\n // already available, skip import\n return;\n }\n await CustomElementUtils.importjs(consts.API_JS);\n }\n async _setupProxy() {\n const listeners = this.items || [];\n if (!this.disabled && !Utils.isNullOrEmpty(this.url)) {\n await this._initialize();\n const connBuilder = new signalR.HubConnectionBuilder();\n connBuilder.withUrl(this.url, {\n accessTokenFactory: () => this.accesstoken\n });\n const h = this._hub = connBuilder.build();\n h.onclose(() => {\n for (var item of listeners) {\n item.stop();\n }\n this.connected = false;\n this._hub = null;\n });\n await h.start();\n this.connected = true;\n }\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemHubProxyElement.prototype, \"url\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemHubProxyElement.prototype, \"accesstoken\", void 0);\n__decorate([\n Watch({ converter: PropertyConverters.Boolean })\n], PacemHubProxyElement.prototype, \"connected\", void 0);\nPacemHubProxyElement = __decorate([\n CustomElement({ tagName: P + '-hub-proxy' })\n], PacemHubProxyElement);\nexport { PacemHubProxyElement };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { P, CustomElement, Watch, PropertyConverters, Utils, PropertyChangeEventName, Debounce, Components } from '@pacem/pacem-core';\n//namespace Pacem.Components.Networking {\nlet PacemServerSentEventsListenerElement = class PacemServerSentEventsListenerElement extends Components.PacemItemElement {\n constructor() {\n super(...arguments);\n this._receiveHandler = (e) => {\n this.dispatchEvent(new CustomEvent('receive', { detail: e.data }));\n };\n this._connectedHandler = (e) => {\n if (e.detail.propertyName === 'connected' && e.detail.currentValue === true) {\n this._start();\n }\n };\n }\n get _isConnected() {\n return this.container instanceof PacemServerSentEventsProxyElement && this.container.connected || false;\n }\n get _connection() {\n return this.container instanceof PacemServerSentEventsProxyElement && this.container.eventSource || null;\n }\n _stop(method = this.method) {\n if (!this._isConnected) {\n return;\n }\n const conn = this._connection;\n if (!Utils.isNullOrEmpty(method)) {\n conn.removeEventListener(method, this._receiveHandler);\n }\n }\n _start(method = this.method) {\n if (!this._isConnected) {\n return;\n }\n const conn = this._connection;\n if (!Utils.isNullOrEmpty(method)) {\n conn.addEventListener(method, this._receiveHandler);\n }\n }\n /** Start listening, if not disabled. */\n start() {\n if (!this.disabled) {\n this._start();\n }\n }\n /** Stop listening. */\n stop() {\n this._stop();\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n const container = this.container;\n if (!Utils.isNull(container)) {\n container.addEventListener(PropertyChangeEventName, this._connectedHandler, false);\n }\n this.start();\n }\n disconnectedCallback() {\n const container = this.container;\n if (!Utils.isNull(container)) {\n container.removeEventListener(PropertyChangeEventName, this._connectedHandler, false);\n }\n super.disconnectedCallback();\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n switch (name) {\n case 'method':\n if (!Utils.isNullOrEmpty(old)) {\n this._stop(old);\n }\n if (!Utils.isNullOrEmpty(val)) {\n this._start(val);\n }\n break;\n case 'disabled':\n if (!Utils.isNullOrEmpty(this.method)) {\n let toggle = val ? this._stop : this._start;\n toggle();\n }\n break;\n }\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemServerSentEventsListenerElement.prototype, \"method\", void 0);\nPacemServerSentEventsListenerElement = __decorate([\n CustomElement({ tagName: P + '-sse-listener' })\n], PacemServerSentEventsListenerElement);\nexport { PacemServerSentEventsListenerElement };\nlet PacemServerSentEventsProxyElement = class PacemServerSentEventsProxyElement extends Components.PacemItemsContainerElement {\n constructor() {\n super(...arguments);\n this._connectHandler = (_) => {\n this.connected = true;\n this.#evtSource.onmessage = this._receiveHandler;\n };\n this._errorHandler = (_) => {\n this.connected = false;\n };\n this._receiveHandler = (e) => {\n this.dispatchEvent(new CustomEvent('receive', { detail: e.data }));\n };\n }\n validate(item) {\n return item instanceof PacemServerSentEventsListenerElement;\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n this._start();\n }\n disconnectedCallback() {\n this._stop();\n super.disconnectedCallback();\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n //\n if (first) {\n return;\n }\n if (name === 'url' || name === 'disabled') {\n this._restart();\n }\n }\n #evtSource;\n _restart() {\n this._stop();\n this._start();\n }\n _start(url = this.url) {\n if (!Utils.isNullOrEmpty(url) && !this.disabled) {\n const evtSource = this.#evtSource = new EventSource(url);\n evtSource.onopen = this._connectHandler;\n evtSource.onerror = this._errorHandler;\n }\n }\n get eventSource() {\n return this.#evtSource;\n }\n _stop() {\n const listeners = this.items || [];\n for (var item of listeners) {\n item.stop();\n }\n const evtSource = this.#evtSource;\n if (!Utils.isNull(evtSource)) {\n evtSource.onopen = null;\n evtSource.onerror = null;\n evtSource.onmessage = null;\n evtSource.close();\n }\n this.connected = false;\n this.#evtSource = null;\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemServerSentEventsProxyElement.prototype, \"url\", void 0);\n__decorate([\n Watch({ converter: PropertyConverters.Boolean })\n], PacemServerSentEventsProxyElement.prototype, \"connected\", void 0);\n__decorate([\n Debounce(true)\n], PacemServerSentEventsProxyElement.prototype, \"_restart\", null);\nPacemServerSentEventsProxyElement = __decorate([\n CustomElement({ tagName: P + '-sse-proxy' })\n], PacemServerSentEventsProxyElement);\nexport { PacemServerSentEventsProxyElement };\n","import { DeepMerger } from '@pacem/pacem-foundation';\nimport * as Output from './index';\nDeepMerger.merge(Output);\n"],"names":["__decorate","this","Components","Utils","PropertyChangeEventName","Watch","PropertyConverters","CustomElement","P","CustomElementUtils","Debounce","DeepMerger"],"mappings":";;;IAAA,IAAIA,YAAU,GAAG,CAACC,SAAI,IAAIA,SAAI,CAAC,UAAU,KAAK,UAAU,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE;IACvF,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;IAChI,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;IAClI,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAA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ACA,eAAK,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;IACtC,YAAY,SAAS,CAAC,MAAM,GAAG,IAAI;IACnC,YAAY,SAAS,CAAC,OAAO,GAAG,IAAI;IACpC,YAAY,SAAS,CAAC,SAAS,GAAG,IAAI;IACtC,YAAY,SAAS,CAAC,KAAK,EAAE;IAC7B,QAAQ;IACR,QAAQ,IAAI,CAAC,SAAS,GAAG,KAAK;IAC9B,QAAQ,IAAI,CAAC,UAAU,GAAG,IAAI;IAC9B,IAAI;IACJ,CAAC;IACD,UAAU,CAAC;IACX,IAAIE,eAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAEC,4BAAkB,CAAC,MAAM,EAAE;IAC/D,CAAC,EAAE,iCAAiC,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;IAC9D,UAAU,CAAC;IACX,IAAID,eAAK,CAAC,EAAE,SAAS,EAAEC,4BAAkB,CAAC,OAAO,EAAE;IACnD,CAAC,EAAE,iCAAiC,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC;IACpE,UAAU,CAAC;IACX,IAAII,kBAAQ,CAAC,IAAI;IACjB,CAAC,EAAE,iCAAiC,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC;IACjE,iCAAiC,GAAG,UAAU,CAAC;IAC/C,IAAIH,uBAAa,CAAC,EAAE,OAAO,EAAEC,WAAC,GAAG,YAAY,EAAE;IAC/C,CAAC,EAAE,iCAAiC,CAAC;;;;;;;;;;;;;;;;;;;;AC3KrCG,8BAAU,CAAC,KAAK,CAAC,MAAM,CAAC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"pacem-networking.js","sources":["../esm/hub-proxy.js","../esm/sse-proxy.js","../esm/index-iife.js"],"sourcesContent":["var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { P, CustomElement, Watch, PropertyConverters, Utils, PropertyChangeEventName, CustomElementUtils, Components } from '@pacem/pacem-core';\n//namespace Pacem.Components.Networking {\nconst API_JS = 'https://cdn.jsdelivr.net/npm/@microsoft/signalr@10.0.0/dist/browser/signalr.min.js'; // 'https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/10.0.0/signalr.min.js'\nconst consts = { API_JS };\n/** Subscribes to a hub method (or stream) exposed by the ancestor {@link PacemHubProxyElement}, dispatching a `receive` event for every incoming message. */\nlet PacemHubListenerElement = class PacemHubListenerElement extends Components.PacemItemElement {\n constructor() {\n super(...arguments);\n this._receiveHandler = (...args) => {\n this.dispatchEvent(new CustomEvent('receive', { detail: Array.from(args) }));\n };\n this._completeHandler = () => {\n this.dispatchEvent(new Event('complete'));\n };\n this._errorHandler = (error) => {\n this.dispatchEvent(new CustomEvent('error', { detail: error }));\n };\n this._connectedHandler = (e) => {\n if (e.detail.propertyName === 'connected' && e.detail.currentValue === true) {\n this._start();\n }\n };\n }\n #streamSubscription;\n get _isConnected() {\n return this.container instanceof PacemHubProxyElement && this.container.connected || false;\n }\n get _connection() {\n return this.container instanceof PacemHubProxyElement && this.container.connection || null;\n }\n /** Start listening, if not disabled. */\n start() {\n if (!this.disabled) {\n this._start();\n }\n }\n /** Stop listening. */\n stop() {\n this._stop();\n }\n _stop(method = this.method, isStreaming = this.stream) {\n if (!this._isConnected) {\n return;\n }\n const conn = this._connection;\n if (!Utils.isNullOrEmpty(method)) {\n if (!isStreaming) {\n conn.off(method, this._receiveHandler);\n }\n else {\n this.#streamSubscription?.dispose();\n }\n }\n }\n _start(method = this.method, isStreaming = this.stream) {\n if (!this._isConnected) {\n return;\n }\n const conn = this._connection;\n if (!Utils.isNullOrEmpty(method)) {\n if (!isStreaming) {\n conn.on(method, this._receiveHandler);\n }\n else {\n const args = this.arguments || [];\n const streamResult = signalR.HubConnection.prototype.stream.apply(conn, [method].concat(args));\n this.#streamSubscription = streamResult.subscribe({\n next: this._receiveHandler,\n complete: this._completeHandler,\n error: this._errorHandler\n });\n }\n }\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n const container = this.container;\n if (!Utils.isNull(container)) {\n container.addEventListener(PropertyChangeEventName, this._connectedHandler, false);\n }\n this.start();\n }\n disconnectedCallback() {\n const container = this.container;\n if (!Utils.isNull(container)) {\n container.removeEventListener(PropertyChangeEventName, this._connectedHandler, false);\n }\n super.disconnectedCallback();\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n switch (name) {\n case 'arguments':\n this._stop();\n this._start();\n break;\n case 'method':\n if (!Utils.isNullOrEmpty(old)) {\n this._stop(old, this.stream);\n }\n if (!Utils.isNullOrEmpty(val)) {\n this._start(val, this.stream);\n }\n break;\n case 'stream':\n const m = this.method;\n if (!Utils.isNullOrEmpty(m)) {\n this._stop(m, old);\n this._start(m, val);\n }\n break;\n case 'disabled':\n if (!Utils.isNullOrEmpty(this.method)) {\n let toggle = val ? this._stop : this._start;\n toggle();\n }\n break;\n }\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemHubListenerElement.prototype, \"method\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Boolean })\n], PacemHubListenerElement.prototype, \"stream\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.Json })\n], PacemHubListenerElement.prototype, \"arguments\", void 0);\nPacemHubListenerElement = __decorate([\n CustomElement({ tagName: P + '-hub-listener' })\n], PacemHubListenerElement);\nexport { PacemHubListenerElement };\n/** Wraps a SignalR hub connection, dispatching its connection state and exposing `invoke`/`send` to registered {@link PacemHubListenerElement} children. */\nlet PacemHubProxyElement = class PacemHubProxyElement extends Components.PacemItemsContainerElement {\n /** @inheritdoc */\n validate(item) {\n return item instanceof PacemHubListenerElement;\n }\n /** @readonly Gets the underlying `signalR.HubConnection` instance, if connected. */\n get connection() {\n return this._hub;\n }\n /**\n * Invokes a hub method and waits for a result from the server.\n * @param method Name of the hub method to invoke\n * @param args Arguments to pass to the hub method\n * @returns A promise that resolves with the server response\n */\n invoke(method, ...args) {\n if (this.connected) {\n return this._hub.invoke.apply(this._hub, arguments);\n }\n throw 'Hub is not connected. Cannot call `invoke` method.';\n }\n /**\n * Invokes a hub method without waiting for a result from the server.\n * @param method Name of the hub method to invoke\n * @param args Arguments to pass to the hub method\n */\n send(method, ...args) {\n if (this.connected) {\n return this._hub.send(method, ...args);\n }\n throw 'Hub is not connected. Cannot call `send` method.';\n }\n /** (Re)establishes the hub connection. */\n start() {\n return this._resetProxy();\n }\n /** Closes the hub connection, if connected. */\n async stop() {\n if (this.connected) {\n await this._hub.stop();\n }\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n //\n if (first) {\n return;\n }\n if (name === 'url' || name === 'disabled' || name === 'accesstoken') {\n this._resetProxy();\n }\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n this.start();\n }\n disconnectedCallback() {\n // this will (likely) never complete, being an asynchrounous call...\n // TODO: think about it.\n this.stop();\n super.disconnectedCallback();\n }\n async _resetProxy() {\n if (!Utils.isNull(this._hub)) {\n await this._hub.stop();\n //this.connected = false;\n }\n this._setupProxy();\n }\n async _initialize() {\n if ('signalR' in window) {\n // already available, skip import\n return;\n }\n await CustomElementUtils.importjs(consts.API_JS);\n }\n async _setupProxy() {\n const listeners = this.items || [];\n if (!this.disabled && !Utils.isNullOrEmpty(this.url)) {\n await this._initialize();\n const connBuilder = new signalR.HubConnectionBuilder();\n connBuilder.withUrl(this.url, {\n accessTokenFactory: () => this.accesstoken\n });\n const h = this._hub = connBuilder.build();\n h.onclose(() => {\n for (var item of listeners) {\n item.stop();\n }\n this.connected = false;\n this._hub = null;\n });\n await h.start();\n this.connected = true;\n }\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemHubProxyElement.prototype, \"url\", void 0);\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemHubProxyElement.prototype, \"accesstoken\", void 0);\n__decorate([\n Watch({ converter: PropertyConverters.Boolean })\n], PacemHubProxyElement.prototype, \"connected\", void 0);\nPacemHubProxyElement = __decorate([\n CustomElement({ tagName: P + '-hub-proxy' })\n], PacemHubProxyElement);\nexport { PacemHubProxyElement };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { P, CustomElement, Watch, PropertyConverters, Utils, PropertyChangeEventName, Debounce, Components } from '@pacem/pacem-core';\n//namespace Pacem.Components.Networking {\n/** Subscribes to a named event exposed by the ancestor {@link PacemServerSentEventsProxyElement}'s `EventSource`, dispatching a `receive` event for every incoming message. */\nlet PacemServerSentEventsListenerElement = class PacemServerSentEventsListenerElement extends Components.PacemItemElement {\n constructor() {\n super(...arguments);\n this._receiveHandler = (e) => {\n this.dispatchEvent(new CustomEvent('receive', { detail: e.data }));\n };\n this._connectedHandler = (e) => {\n if (e.detail.propertyName === 'connected' && e.detail.currentValue === true) {\n this._start();\n }\n };\n }\n get _isConnected() {\n return this.container instanceof PacemServerSentEventsProxyElement && this.container.connected || false;\n }\n get _connection() {\n return this.container instanceof PacemServerSentEventsProxyElement && this.container.eventSource || null;\n }\n _stop(method = this.method) {\n if (!this._isConnected) {\n return;\n }\n const conn = this._connection;\n if (!Utils.isNullOrEmpty(method)) {\n conn.removeEventListener(method, this._receiveHandler);\n }\n }\n _start(method = this.method) {\n if (!this._isConnected) {\n return;\n }\n const conn = this._connection;\n if (!Utils.isNullOrEmpty(method)) {\n conn.addEventListener(method, this._receiveHandler);\n }\n }\n /** Start listening, if not disabled. */\n start() {\n if (!this.disabled) {\n this._start();\n }\n }\n /** Stop listening. */\n stop() {\n this._stop();\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n const container = this.container;\n if (!Utils.isNull(container)) {\n container.addEventListener(PropertyChangeEventName, this._connectedHandler, false);\n }\n this.start();\n }\n disconnectedCallback() {\n const container = this.container;\n if (!Utils.isNull(container)) {\n container.removeEventListener(PropertyChangeEventName, this._connectedHandler, false);\n }\n super.disconnectedCallback();\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n switch (name) {\n case 'method':\n if (!Utils.isNullOrEmpty(old)) {\n this._stop(old);\n }\n if (!Utils.isNullOrEmpty(val)) {\n this._start(val);\n }\n break;\n case 'disabled':\n if (!Utils.isNullOrEmpty(this.method)) {\n let toggle = val ? this._stop : this._start;\n toggle();\n }\n break;\n }\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemServerSentEventsListenerElement.prototype, \"method\", void 0);\nPacemServerSentEventsListenerElement = __decorate([\n CustomElement({ tagName: P + '-sse-listener' })\n], PacemServerSentEventsListenerElement);\nexport { PacemServerSentEventsListenerElement };\n/** Wraps a browser `EventSource`, opening a Server-Sent Events connection and dispatching its connection state to registered {@link PacemServerSentEventsListenerElement} children. */\nlet PacemServerSentEventsProxyElement = class PacemServerSentEventsProxyElement extends Components.PacemItemsContainerElement {\n constructor() {\n super(...arguments);\n this._connectHandler = (_) => {\n this.connected = true;\n this.#evtSource.onmessage = this._receiveHandler;\n };\n this._errorHandler = (_) => {\n this.connected = false;\n };\n this._receiveHandler = (e) => {\n this.dispatchEvent(new CustomEvent('receive', { detail: e.data }));\n };\n }\n /** @inheritdoc */\n validate(item) {\n return item instanceof PacemServerSentEventsListenerElement;\n }\n viewActivatedCallback() {\n super.viewActivatedCallback();\n this._start();\n }\n disconnectedCallback() {\n this._stop();\n super.disconnectedCallback();\n }\n propertyChangedCallback(name, old, val, first) {\n super.propertyChangedCallback(name, old, val, first);\n //\n if (first) {\n return;\n }\n if (name === 'url' || name === 'disabled') {\n this._restart();\n }\n }\n #evtSource;\n _restart() {\n this._stop();\n this._start();\n }\n _start(url = this.url) {\n if (!Utils.isNullOrEmpty(url) && !this.disabled) {\n const evtSource = this.#evtSource = new EventSource(url);\n evtSource.onopen = this._connectHandler;\n evtSource.onerror = this._errorHandler;\n }\n }\n /** @readonly Gets the underlying `EventSource` instance, if connected. */\n get eventSource() {\n return this.#evtSource;\n }\n _stop() {\n const listeners = this.items || [];\n for (var item of listeners) {\n item.stop();\n }\n const evtSource = this.#evtSource;\n if (!Utils.isNull(evtSource)) {\n evtSource.onopen = null;\n evtSource.onerror = null;\n evtSource.onmessage = null;\n evtSource.close();\n }\n this.connected = false;\n this.#evtSource = null;\n }\n};\n__decorate([\n Watch({ emit: false, converter: PropertyConverters.String })\n], PacemServerSentEventsProxyElement.prototype, \"url\", void 0);\n__decorate([\n Watch({ converter: PropertyConverters.Boolean })\n], PacemServerSentEventsProxyElement.prototype, \"connected\", void 0);\n__decorate([\n Debounce(true)\n], PacemServerSentEventsProxyElement.prototype, \"_restart\", null);\nPacemServerSentEventsProxyElement = __decorate([\n CustomElement({ tagName: P + '-sse-proxy' })\n], PacemServerSentEventsProxyElement);\nexport { PacemServerSentEventsProxyElement };\n","import { DeepMerger } from '@pacem/pacem-foundation';\nimport * as Output from './index';\nDeepMerger.merge(Output);\n"],"names":["__decorate","this","Components","Utils","PropertyChangeEventName","Watch","PropertyConverters","CustomElement","P","CustomElementUtils","Debounce","DeepMerger"],"mappings":";;;IAAA,IAAIA,YAAU,GAAG,CAACC,SAAI,IAAIA,SAAI,CAAC,UAAU,KAAK,UA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