Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pulpo/components

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pulpo/components - npm Package Compare versions

Comparing version 0.0.7 to 2.0.20-v0

dist/cjs/_commonjsHelpers-dcc4cf71.js

19

dist/cjs/components.cjs.js
'use strict';
const index = require('./index-2aa1967e.js');
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-fb542d2d.js');
/*
Stencil Client Patch Browser v2.3.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Browser v3.2.1 | MIT Licensed | https://stenciljs.com
*/
const patchBrowser = () => {
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('components.cjs.js', document.baseURI).href));
const opts = {};
if ( importMeta !== '') {
const opts = {};
// TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
if (importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;
// TODO(STENCIL-661): Remove code related to the dynamic import shim
// TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
}

@@ -18,3 +23,7 @@ return index.promiseResolve(opts);

patchBrowser().then(options => {
return index.bootstrapLazy([["pulpo-video.cjs",[[0,"pulpo-video",{"src":[1],"width":[2],"height":[2],"id":[32],"m3u8Url":[32],"mpdUrl":[32]}]]]], options);
return index.bootstrapLazy([["pulpo-embedded.cjs",[[0,"pulpo-embedded",{"src":[1],"title":[1],"embedded":[4],"article":[4],"preview":[4],"height":[2],"content":[32]}]]],["pulpo-checklist.cjs",[[2,"pulpo-checklist",{"taskId":[1,"task-id"],"value":[32],"setValue":[64]}]]],["pulpo-code.cjs",[[0,"pulpo-code",{"language":[1],"code":[32]}]]],["pulpo-datetime.cjs",[[0,"pulpo-datetime",{"value":[1],"mode":[1],"date":[32]}]]],["pulpo-mention.cjs",[[0,"pulpo-mention",{"username":[1],"name":[1],"preview":[4],"record":[32]}]]],["pulpo-vault.cjs",[[0,"pulpo-vault",{"value":[1],"decrypted":[32]}]]],["pulpo-file.cjs",[[0,"pulpo-file",{"src":[1],"name":[1],"embedded":[4],"preview":[4],"id":[32],"stage":[32],"pdfSrc":[32]}]]],["pulpo-content_2.cjs",[[0,"pulpo-content",{"id":[1],"title":[1],"embedded":[4],"showtitle":[4],"preview":[4],"slug":[32],"record":[32]}],[0,"pulpo-video",{"src":[1],"title":[1],"width":[2],"height":[2],"service":[32],"id":[32],"m3u8Url":[32],"mpdUrl":[32],"statusUrl":[32],"videoStatus":[32],"videoTranscodeProgress":[32],"videoTranscodeError":[32]}]]]], options);
});
exports.setNonce = index.setNonce;
//# sourceMappingURL=components.cjs.js.map
'use strict';
//# sourceMappingURL=index.cjs.js.map

@@ -5,6 +5,6 @@ 'use strict';

const index = require('./index-2aa1967e.js');
const index = require('./index-fb542d2d.js');
/*
Stencil Client Patch Esm v2.3.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Esm v3.2.1 | MIT Licensed | https://stenciljs.com
*/

@@ -18,6 +18,9 @@ const patchEsm = () => {

return patchEsm().then(() => {
return index.bootstrapLazy([["pulpo-video.cjs",[[0,"pulpo-video",{"src":[1],"width":[2],"height":[2],"id":[32],"m3u8Url":[32],"mpdUrl":[32]}]]]], options);
return index.bootstrapLazy([["pulpo-embedded.cjs",[[0,"pulpo-embedded",{"src":[1],"title":[1],"embedded":[4],"article":[4],"preview":[4],"height":[2],"content":[32]}]]],["pulpo-checklist.cjs",[[2,"pulpo-checklist",{"taskId":[1,"task-id"],"value":[32],"setValue":[64]}]]],["pulpo-code.cjs",[[0,"pulpo-code",{"language":[1],"code":[32]}]]],["pulpo-datetime.cjs",[[0,"pulpo-datetime",{"value":[1],"mode":[1],"date":[32]}]]],["pulpo-mention.cjs",[[0,"pulpo-mention",{"username":[1],"name":[1],"preview":[4],"record":[32]}]]],["pulpo-vault.cjs",[[0,"pulpo-vault",{"value":[1],"decrypted":[32]}]]],["pulpo-file.cjs",[[0,"pulpo-file",{"src":[1],"name":[1],"embedded":[4],"preview":[4],"id":[32],"stage":[32],"pdfSrc":[32]}]]],["pulpo-content_2.cjs",[[0,"pulpo-content",{"id":[1],"title":[1],"embedded":[4],"showtitle":[4],"preview":[4],"slug":[32],"record":[32]}],[0,"pulpo-video",{"src":[1],"title":[1],"width":[2],"height":[2],"service":[32],"id":[32],"m3u8Url":[32],"mpdUrl":[32],"statusUrl":[32],"videoStatus":[32],"videoTranscodeProgress":[32],"videoTranscodeError":[32]}]]]], options);
});
};
exports.setNonce = index.setNonce;
exports.defineCustomElements = defineCustomElements;
//# sourceMappingURL=loader.cjs.js.map
{
"entries": [
"./components/pulpo-checklist/pulpo-checklist.js",
"./components/pulpo-code/pulpo-code.js",
"./components/pulpo-content/pulpo-content.js",
"./components/pulpo-datetime/pulpo-datetime.js",
"./components/pulpo-embedded/pulpo-embedded.js",
"./components/pulpo-file/pulpo-file.js",
"./components/pulpo-mention/pulpo-mention.js",
"./components/pulpo-vault/pulpo-vault.js",
"./components/pulpo-video/pulpo-video.js"

@@ -7,4 +15,4 @@ ],

"name": "@stencil/core",
"version": "2.3.0",
"typescriptVersion": "4.0.5"
"version": "3.2.1",
"typescriptVersion": "4.9.5"
},

@@ -11,0 +19,0 @@ "collections": [],

@@ -1,123 +0,284 @@

import { Component, Element, Event, h, Prop, State } from '@stencil/core';
/* istanbul ignore file */
import { h } from '@stencil/core';
import getVideoId from 'get-video-id';
import videojs from 'video.js';
import 'videojs-contrib-quality-levels';
import 'videojs-http-source-selector';
import 'videojs-vjsdownload';
import NoSignal from './pulpo-video-no-signal.svg';
export class PulpoVideo {
constructor() {
this.src = undefined;
this.title = undefined;
this.width = undefined;
this.height = undefined;
this.service = undefined;
this.id = undefined;
this.m3u8Url = undefined;
this.mpdUrl = undefined;
this.statusUrl = undefined;
this.videoStatus = undefined;
this.videoTranscodeProgress = undefined;
this.videoTranscodeError = undefined;
}
componentWillLoad() {
// https://pr161.pulpo.services/storage/k0jizjPaKkbDwAUisl
const [endpoint, id] = this.src.split('/storage/');
this.id = id;
this.m3u8Url = endpoint + '/storage/.pulpo/videos/' + id + '.m3u8';
this.mpdUrl = endpoint + '/storage/.pulpo/videos/' + id + '.mpd';
var _a;
// https://cdn.pulpo.services/:stage/k0jizjPaKkbDwAUisl
if ((_a = this.src) === null || _a === void 0 ? void 0 : _a.startsWith('https://cdn.pulpo.services')) {
const parts = this.src.split('/');
const id = parts.pop();
const stage = parts.pop();
this.id = id;
this.service = 'pulpo';
this.m3u8Url = `https://cdn.pulpo.services/${stage}/.pulpo/videos/${id}.m3u8`;
this.mpdUrl = `https://cdn.pulpo.services/${stage}/.pulpo/videos/${id}.mpd`;
this.statusUrl = `https://${stage}.pulpo.services/video/${id}/status`;
this.checkPulpoVideoStatus().then();
}
else if (this.src) {
// youtube, vimeo, microsoft stream...
const { id, service } = getVideoId(this.src);
this.id = id;
this.service = service;
}
}
componentDidLoad() {
this.player = videojs(this.el.querySelector('video'), {
playbackRates: [0.5, 1, 1.5, 2],
fluid: true,
responsive: true,
preload: 'auto',
html5: {
nativeAudioTracks: false,
nativeVideoTracks: false,
vhs: {
overrideNative: true,
handleManifestRedirects: false,
enableLowInitialPlaylist: true
}
}
});
this.player.on('firstplay', event => {
this.played.emit(event);
});
async componentDidLoad() {
this.initializeVideoJs();
}
render() {
return (h("video", { id: this.id, class: "is-fullwidth video-js vjs-16-9 vjs-default-skin", width: this.width, height: this.height, controls: true },
h("source", { src: this.m3u8Url, type: "application/x-mpegURL" }),
h("source", { src: this.mpdUrl, type: "application/dash+xml" })));
if (this.service === 'pulpo')
return this.renderPulpoVideo();
if (this.service === 'youtube')
return this.renderYoutubeVideo();
if (this.service === 'vimeo')
return this.renderVimeoVideo();
if (this.service === 'microsoftstream')
return this.renderMicrosoftStreamVideo();
return this.renderInvalidVideoService();
}
disconnectedCallback() {
clearTimeout(this.timeout);
this.destroyVideoJs();
}
renderInvalidVideoService() {
return (h("small", { class: "has-text-danger has-background-light" }, "\u26A0\uFE0F", this.src, "\u26A0\uFE0F"));
}
renderYoutubeVideo() {
return (h("figure", { class: "image is-16by9 is-marginless" }, h("iframe", { class: "has-ratio", width: "640", height: "360", src: 'https://www.youtube.com/embed/' + this.id, frameBorder: "0", allowFullScreen: true })));
}
renderVimeoVideo() {
const isVimeoPrivateUrl = url => /https?:\/\/vimeo\.com\/(.*)+\/(.*)+$/.test(url);
const getVimeoPrivateHash = url => isVimeoPrivateUrl(url) ? url.split('/').pop() : null;
const vimeoPrivateHash = getVimeoPrivateHash(this.src);
const append = vimeoPrivateHash ? `${this.id}?h=${vimeoPrivateHash}` : this.id;
return (h("figure", { class: "image is-16by9 is-marginless" }, h("iframe", { class: "has-ratio", width: "640", height: "360", src: 'https://player.vimeo.com/video/' + append, frameBorder: "0", allowFullScreen: true })));
}
renderMicrosoftStreamVideo() {
return (h("figure", { class: "image is-16by9 is-marginless" }, h("iframe", { class: "has-ratio", width: "640", height: "360", src: 'https://web.microsoftstream.com/embed/video/' + this.id + '?autoplay=false&showinfo=true', frameBorder: "0", allowFullScreen: true })));
}
renderPulpoVideo() {
if (this.id) {
if (this.videoStatus === undefined || this.videoStatus === 'COMPLETE') {
return (h("figure", { class: "image is-16by9 is-marginless" }, h("video", { id: this.id, width: this.width, height: this.height, title: this.title, controls: true, class: "has-ratio video-js vjs-16-9 vjs-default-skin" }, h("source", { src: this.m3u8Url, type: "application/x-mpegURL" }), h("source", { src: this.mpdUrl, type: "application/dash+xml" }))));
}
if (this.videoStatus === 'SUBMITTED' || this.videoStatus === 'PROGRESSING') {
return (h("div", { class: "is-fullwidth vjs-16-9" }, h("img", { style: { width: '100%' }, src: NoSignal, alt: "no signal" }), h("small", null, "* transcoding ", this.videoTranscodeProgress ? this.videoTranscodeProgress + ' % ' : '...')));
}
if (this.videoStatus === 'ERROR') {
return (h("div", null, this.videoTranscodeError) //
);
}
}
}
async checkPulpoVideoStatus() {
try {
clearTimeout(this.timeout);
const response = await fetch(this.statusUrl, { method: 'GET' });
const { videoStatus = 'SUBMITTED', videoTranscodeProgress, videoTranscodeError } = await response.json();
const isOk = videoStatus === 'COMPLETE';
const wasNotOk = this.videoStatus !== undefined && this.videoStatus !== 'COMPLETE';
this.videoStatus = videoStatus;
this.videoTranscodeProgress = videoTranscodeProgress;
this.videoTranscodeError = videoTranscodeError;
if (!isOk) {
this.timeout = setTimeout(() => {
this.checkPulpoVideoStatus();
}, 2500);
}
if (isOk && wasNotOk) {
setTimeout(() => {
this.destroyVideoJs();
this.initializeVideoJs();
}, 100);
}
}
catch (_) {
}
}
;
initializeVideoJs() {
var _a;
if (this.player)
this.player.dispose();
return;
const htmlVideoElement = (_a = this.el) === null || _a === void 0 ? void 0 : _a.querySelector('video');
if (this.service === 'pulpo' && this.id && htmlVideoElement) {
/* istanbul ignore next: unreachable on tests */
this.player = videojs(htmlVideoElement, {
playbackRates: [0.5, 1, 1.5, 2],
fluid: true,
responsive: true,
preload: 'auto',
html5: {
nativeAudioTracks: false,
nativeVideoTracks: false,
vhs: {
overrideNative: true,
handleManifestRedirects: false,
enableLowInitialPlaylist: true,
useBandwidthFromLocalStorage: true,
useDevicePixelRatio: true
}
},
plugins: {
httpSourceSelector: {
default: 'high'
},
vjsdownload: {
beforeElement: 'playbackRateMenuButton',
textControl: 'Download video',
name: 'downloadButton',
downloadURL: this.src
}
}
});
this.player.httpSourceSelector();
/* istanbul ignore next: unreachable on tests */
this.player.one('play', event => {
this.videoPlayed.emit({ event, id: this.id, src: this.src });
});
this.player.on('downloadvideo', () => {
this.videoPlayed.emit({ event: 'download', id: this.id, src: this.src });
});
}
}
destroyVideoJs() {
var _a;
(_a = this.player) === null || _a === void 0 ? void 0 : _a.dispose();
this.player = null;
}
static get is() { return "pulpo-video"; }
static get originalStyleUrls() { return {
"$": ["./pulpo-video.scss"]
}; }
static get styleUrls() { return {
"$": ["pulpo-video.css"]
}; }
static get properties() { return {
"src": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
static get originalStyleUrls() {
return {
"$": ["./pulpo-video.scss"]
};
}
static get styleUrls() {
return {
"$": ["pulpo-video.css"]
};
}
static get properties() {
return {
"src": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "src",
"reflect": false
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
"title": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "title",
"reflect": false
},
"attribute": "src",
"reflect": false
},
"width": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
"width": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "width",
"reflect": false
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "width",
"reflect": false
},
"height": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "height",
"reflect": false
}
}; }
static get states() { return {
"id": {},
"m3u8Url": {},
"mpdUrl": {}
}; }
static get events() { return [{
"method": "played",
"name": "played",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
"height": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "height",
"reflect": false
}
}]; }
};
}
static get states() {
return {
"service": {},
"id": {},
"m3u8Url": {},
"mpdUrl": {},
"statusUrl": {},
"videoStatus": {},
"videoTranscodeProgress": {},
"videoTranscodeError": {}
};
}
static get events() {
return [{
"method": "videoPlayed",
"name": "videoPlayed",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}];
}
static get elementRef() { return "el"; }
}
//# sourceMappingURL=pulpo-video.js.map
export {};
//# sourceMappingURL=index.js.map

@@ -1,1 +0,2 @@

import{p,b as r}from"./p-0c4e68ac.js";(()=>{const r=import.meta.url,e={};return""!==r&&(e.resourcesUrl=new URL(".",r).href),p(e)})().then((p=>r([["p-4608e83c",[[0,"pulpo-video",{src:[1],width:[2],height:[2],id:[32],m3u8Url:[32],mpdUrl:[32]}]]]],p)));
import{p as e,b as d}from"./p-98c0bac7.js";export{s as setNonce}from"./p-98c0bac7.js";const t=()=>{const d=import.meta.url;const t={};if(d!==""){t.resourcesUrl=new URL(".",d).href}return e(t)};t().then((e=>d([["p-32caeae6",[[0,"pulpo-embedded",{src:[1],title:[1],embedded:[4],article:[4],preview:[4],height:[2],content:[32]}]]],["p-a64bc69b",[[2,"pulpo-checklist",{taskId:[1,"task-id"],value:[32],setValue:[64]}]]],["p-9b30d8f9",[[0,"pulpo-code",{language:[1],code:[32]}]]],["p-d9968f06",[[0,"pulpo-datetime",{value:[1],mode:[1],date:[32]}]]],["p-d96b141c",[[0,"pulpo-mention",{username:[1],name:[1],preview:[4],record:[32]}]]],["p-d71edffc",[[0,"pulpo-vault",{value:[1],decrypted:[32]}]]],["p-5f991d7e",[[0,"pulpo-file",{src:[1],name:[1],embedded:[4],preview:[4],id:[32],stage:[32],pdfSrc:[32]}]]],["p-43d8dd71",[[0,"pulpo-content",{id:[1],title:[1],embedded:[4],showtitle:[4],preview:[4],slug:[32],record:[32]}],[0,"pulpo-video",{src:[1],title:[1],width:[2],height:[2],service:[32],id:[32],m3u8Url:[32],mpdUrl:[32],statusUrl:[32],videoStatus:[32],videoTranscodeProgress:[32],videoTranscodeError:[32]}]]]],e)));
//# sourceMappingURL=components.esm.js.map

@@ -1,11 +0,15 @@

import { p as promiseResolve, b as bootstrapLazy } from './index-d08dbbb2.js';
import { p as promiseResolve, b as bootstrapLazy } from './index-83435a02.js';
export { s as setNonce } from './index-83435a02.js';
/*
Stencil Client Patch Browser v2.3.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Browser v3.2.1 | MIT Licensed | https://stenciljs.com
*/
const patchBrowser = () => {
const importMeta = import.meta.url;
const opts = {};
if ( importMeta !== '') {
const opts = {};
// TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
if (importMeta !== '') {
opts.resourcesUrl = new URL('.', importMeta).href;
// TODO(STENCIL-661): Remove code related to the dynamic import shim
// TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
}

@@ -16,3 +20,5 @@ return promiseResolve(opts);

patchBrowser().then(options => {
return bootstrapLazy([["pulpo-video",[[0,"pulpo-video",{"src":[1],"width":[2],"height":[2],"id":[32],"m3u8Url":[32],"mpdUrl":[32]}]]]], options);
return bootstrapLazy([["pulpo-embedded",[[0,"pulpo-embedded",{"src":[1],"title":[1],"embedded":[4],"article":[4],"preview":[4],"height":[2],"content":[32]}]]],["pulpo-checklist",[[2,"pulpo-checklist",{"taskId":[1,"task-id"],"value":[32],"setValue":[64]}]]],["pulpo-code",[[0,"pulpo-code",{"language":[1],"code":[32]}]]],["pulpo-datetime",[[0,"pulpo-datetime",{"value":[1],"mode":[1],"date":[32]}]]],["pulpo-mention",[[0,"pulpo-mention",{"username":[1],"name":[1],"preview":[4],"record":[32]}]]],["pulpo-vault",[[0,"pulpo-vault",{"value":[1],"decrypted":[32]}]]],["pulpo-file",[[0,"pulpo-file",{"src":[1],"name":[1],"embedded":[4],"preview":[4],"id":[32],"stage":[32],"pdfSrc":[32]}]]],["pulpo-content_2",[[0,"pulpo-content",{"id":[1],"title":[1],"embedded":[4],"showtitle":[4],"preview":[4],"slug":[32],"record":[32]}],[0,"pulpo-video",{"src":[1],"title":[1],"width":[2],"height":[2],"service":[32],"id":[32],"m3u8Url":[32],"mpdUrl":[32],"statusUrl":[32],"videoStatus":[32],"videoTranscodeProgress":[32],"videoTranscodeError":[32]}]]]], options);
});
//# sourceMappingURL=components.js.map
//# sourceMappingURL=index.js.map

@@ -1,5 +0,6 @@

import { p as promiseResolve, b as bootstrapLazy } from './index-d08dbbb2.js';
import { p as promiseResolve, b as bootstrapLazy } from './index-83435a02.js';
export { s as setNonce } from './index-83435a02.js';
/*
Stencil Client Patch Esm v2.3.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Esm v3.2.1 | MIT Licensed | https://stenciljs.com
*/

@@ -13,3 +14,3 @@ const patchEsm = () => {

return patchEsm().then(() => {
return bootstrapLazy([["pulpo-video",[[0,"pulpo-video",{"src":[1],"width":[2],"height":[2],"id":[32],"m3u8Url":[32],"mpdUrl":[32]}]]]], options);
return bootstrapLazy([["pulpo-embedded",[[0,"pulpo-embedded",{"src":[1],"title":[1],"embedded":[4],"article":[4],"preview":[4],"height":[2],"content":[32]}]]],["pulpo-checklist",[[2,"pulpo-checklist",{"taskId":[1,"task-id"],"value":[32],"setValue":[64]}]]],["pulpo-code",[[0,"pulpo-code",{"language":[1],"code":[32]}]]],["pulpo-datetime",[[0,"pulpo-datetime",{"value":[1],"mode":[1],"date":[32]}]]],["pulpo-mention",[[0,"pulpo-mention",{"username":[1],"name":[1],"preview":[4],"record":[32]}]]],["pulpo-vault",[[0,"pulpo-vault",{"value":[1],"decrypted":[32]}]]],["pulpo-file",[[0,"pulpo-file",{"src":[1],"name":[1],"embedded":[4],"preview":[4],"id":[32],"stage":[32],"pdfSrc":[32]}]]],["pulpo-content_2",[[0,"pulpo-content",{"id":[1],"title":[1],"embedded":[4],"showtitle":[4],"preview":[4],"slug":[32],"record":[32]}],[0,"pulpo-video",{"src":[1],"title":[1],"width":[2],"height":[2],"service":[32],"id":[32],"m3u8Url":[32],"mpdUrl":[32],"statusUrl":[32],"videoStatus":[32],"videoTranscodeProgress":[32],"videoTranscodeError":[32]}]]]], options);
});

@@ -19,1 +20,3 @@ };

export { defineCustomElements };
//# sourceMappingURL=loader.js.map

@@ -1,1 +0,1 @@

var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);

@@ -11,3 +11,3 @@ export function applyPolyfills() {

function checkIfURLIsSupported() {
var checkIfURLIsSupported = function() {
try {

@@ -20,3 +20,3 @@ var u = new URL('b', 'http://a');

}
}
};

@@ -23,0 +23,0 @@ if (

@@ -1,2 +0,1 @@

export * from '../types/components';

@@ -14,1 +13,10 @@ export interface CustomElementsDefineOptions {

export declare function applyPolyfills(): Promise<void>;
/**
* Used to specify a nonce value that corresponds with an application's CSP.
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
* Alternatively, the nonce value can be set on a meta tag in the DOM head
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
* will result in the same behavior.
*/
export declare function setNonce(nonce: string): void;
{
"name": "components-loader",
"private": true,
"typings": "./index.d.ts",

@@ -4,0 +5,0 @@ "module": "./index.js",

@@ -8,10 +8,125 @@ /* eslint-disable */

import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
import { Record } from "@pulpo/sdk";
export { Record } from "@pulpo/sdk";
export namespace Components {
interface PulpoChecklist {
"setValue": (value: boolean) => Promise<void>;
"taskId": string;
}
interface PulpoCode {
"language": string;
}
interface PulpoContent {
"embedded": boolean;
"id": string;
"preview": boolean;
"showtitle": boolean;
"title": string;
}
interface PulpoDatetime {
"mode": 'date' | 'datetime' | 'time';
"value": string;
}
interface PulpoEmbedded {
"article": boolean;
"embedded": boolean;
"height": number;
"preview": boolean;
"src": string;
"title": string;
}
interface PulpoFile {
"embedded": boolean;
"name": string;
"preview": boolean;
"src": string;
}
interface PulpoMention {
"name": string;
"preview": boolean;
"username": string;
}
interface PulpoVault {
"value": string;
}
interface PulpoVideo {
"height": number;
"src": string;
"title": string;
"width": number;
}
}
export interface PulpoChecklistCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLPulpoChecklistElement;
}
export interface PulpoContentCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLPulpoContentElement;
}
export interface PulpoEmbeddedCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLPulpoEmbeddedElement;
}
export interface PulpoFileCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLPulpoFileElement;
}
export interface PulpoVaultCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLPulpoVaultElement;
}
export interface PulpoVideoCustomEvent<T> extends CustomEvent<T> {
detail: T;
target: HTMLPulpoVideoElement;
}
declare global {
interface HTMLPulpoChecklistElement extends Components.PulpoChecklist, HTMLStencilElement {
}
var HTMLPulpoChecklistElement: {
prototype: HTMLPulpoChecklistElement;
new (): HTMLPulpoChecklistElement;
};
interface HTMLPulpoCodeElement extends Components.PulpoCode, HTMLStencilElement {
}
var HTMLPulpoCodeElement: {
prototype: HTMLPulpoCodeElement;
new (): HTMLPulpoCodeElement;
};
interface HTMLPulpoContentElement extends Components.PulpoContent, HTMLStencilElement {
}
var HTMLPulpoContentElement: {
prototype: HTMLPulpoContentElement;
new (): HTMLPulpoContentElement;
};
interface HTMLPulpoDatetimeElement extends Components.PulpoDatetime, HTMLStencilElement {
}
var HTMLPulpoDatetimeElement: {
prototype: HTMLPulpoDatetimeElement;
new (): HTMLPulpoDatetimeElement;
};
interface HTMLPulpoEmbeddedElement extends Components.PulpoEmbedded, HTMLStencilElement {
}
var HTMLPulpoEmbeddedElement: {
prototype: HTMLPulpoEmbeddedElement;
new (): HTMLPulpoEmbeddedElement;
};
interface HTMLPulpoFileElement extends Components.PulpoFile, HTMLStencilElement {
}
var HTMLPulpoFileElement: {
prototype: HTMLPulpoFileElement;
new (): HTMLPulpoFileElement;
};
interface HTMLPulpoMentionElement extends Components.PulpoMention, HTMLStencilElement {
}
var HTMLPulpoMentionElement: {
prototype: HTMLPulpoMentionElement;
new (): HTMLPulpoMentionElement;
};
interface HTMLPulpoVaultElement extends Components.PulpoVault, HTMLStencilElement {
}
var HTMLPulpoVaultElement: {
prototype: HTMLPulpoVaultElement;
new (): HTMLPulpoVaultElement;
};
interface HTMLPulpoVideoElement extends Components.PulpoVideo, HTMLStencilElement {

@@ -24,2 +139,10 @@ }

interface HTMLElementTagNameMap {
"pulpo-checklist": HTMLPulpoChecklistElement;
"pulpo-code": HTMLPulpoCodeElement;
"pulpo-content": HTMLPulpoContentElement;
"pulpo-datetime": HTMLPulpoDatetimeElement;
"pulpo-embedded": HTMLPulpoEmbeddedElement;
"pulpo-file": HTMLPulpoFileElement;
"pulpo-mention": HTMLPulpoMentionElement;
"pulpo-vault": HTMLPulpoVaultElement;
"pulpo-video": HTMLPulpoVideoElement;

@@ -29,9 +152,64 @@ }

declare namespace LocalJSX {
interface PulpoChecklist {
"onChecked"?: (event: PulpoChecklistCustomEvent<Boolean>) => void;
"onIdGenerated"?: (event: PulpoChecklistCustomEvent<string>) => void;
"taskId"?: string;
}
interface PulpoCode {
"language"?: string;
}
interface PulpoContent {
"embedded"?: boolean;
"id"?: string;
"onRecordLoaded"?: (event: PulpoContentCustomEvent<Record>) => void;
"preview"?: boolean;
"showtitle"?: boolean;
"title"?: string;
}
interface PulpoDatetime {
"mode"?: 'date' | 'datetime' | 'time';
"value"?: string;
}
interface PulpoEmbedded {
"article"?: boolean;
"embedded"?: boolean;
"height"?: number;
"onClick"?: (event: PulpoEmbeddedCustomEvent<MouseEvent>) => void;
"preview"?: boolean;
"src"?: string;
"title"?: string;
}
interface PulpoFile {
"embedded"?: boolean;
"name"?: string;
"onClick"?: (event: PulpoFileCustomEvent<MouseEvent>) => void;
"preview"?: boolean;
"src"?: string;
}
interface PulpoMention {
"name"?: string;
"preview"?: boolean;
"username"?: string;
}
interface PulpoVault {
"onClick"?: (event: PulpoVaultCustomEvent<MouseEvent>) => void;
"onEncrypted"?: (event: PulpoVaultCustomEvent<any>) => void;
"value"?: string;
}
interface PulpoVideo {
"height"?: number;
"onPlayed"?: (event: CustomEvent<any>) => void;
"onVideoPlayed"?: (event: PulpoVideoCustomEvent<any>) => void;
"src"?: string;
"title"?: string;
"width"?: number;
}
interface IntrinsicElements {
"pulpo-checklist": PulpoChecklist;
"pulpo-code": PulpoCode;
"pulpo-content": PulpoContent;
"pulpo-datetime": PulpoDatetime;
"pulpo-embedded": PulpoEmbedded;
"pulpo-file": PulpoFile;
"pulpo-mention": PulpoMention;
"pulpo-vault": PulpoVault;
"pulpo-video": PulpoVideo;

@@ -44,2 +222,10 @@ }

interface IntrinsicElements {
"pulpo-checklist": LocalJSX.PulpoChecklist & JSXBase.HTMLAttributes<HTMLPulpoChecklistElement>;
"pulpo-code": LocalJSX.PulpoCode & JSXBase.HTMLAttributes<HTMLPulpoCodeElement>;
"pulpo-content": LocalJSX.PulpoContent & JSXBase.HTMLAttributes<HTMLPulpoContentElement>;
"pulpo-datetime": LocalJSX.PulpoDatetime & JSXBase.HTMLAttributes<HTMLPulpoDatetimeElement>;
"pulpo-embedded": LocalJSX.PulpoEmbedded & JSXBase.HTMLAttributes<HTMLPulpoEmbeddedElement>;
"pulpo-file": LocalJSX.PulpoFile & JSXBase.HTMLAttributes<HTMLPulpoFileElement>;
"pulpo-mention": LocalJSX.PulpoMention & JSXBase.HTMLAttributes<HTMLPulpoMentionElement>;
"pulpo-vault": LocalJSX.PulpoVault & JSXBase.HTMLAttributes<HTMLPulpoVaultElement>;
"pulpo-video": LocalJSX.PulpoVideo & JSXBase.HTMLAttributes<HTMLPulpoVideoElement>;

@@ -46,0 +232,0 @@ }

import { ComponentDidLoad, ComponentWillLoad, EventEmitter } from '../../stencil-public-runtime';
import 'videojs-contrib-quality-levels';
import 'videojs-http-source-selector';
import 'videojs-vjsdownload';
export declare class PulpoVideo implements ComponentWillLoad, ComponentDidLoad {
src: string;
title: string;
width: number;
height: number;
el: HTMLElement;
played: EventEmitter;
videoPlayed: EventEmitter;
service: string;
id: string;
m3u8Url: string;
mpdUrl: string;
statusUrl: string;
videoStatus: 'SUBMITTED' | 'PROGRESSING' | 'COMPLETE' | 'ERROR';
videoTranscodeProgress: string;
videoTranscodeError: string;
private player;
private timeout;
componentWillLoad(): void;
componentDidLoad(): void;
componentDidLoad(): Promise<void>;
render(): any;
disconnectedCallback(): void;
private renderInvalidVideoService;
private renderYoutubeVideo;
private renderVimeoVideo;
private renderMicrosoftStreamVideo;
private renderPulpoVideo;
private checkPulpoVideoStatus;
private initializeVideoJs;
private destroyVideoJs;
}

@@ -136,3 +136,3 @@ declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;

}
export declare type ListenTargetOptions = 'body' | 'document' | 'window';
export type ListenTargetOptions = 'body' | 'document' | 'window';
export interface StateDecorator {

@@ -218,4 +218,4 @@ (): PropertyDecorator;

export declare const Watch: WatchDecorator;
export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
/**

@@ -226,8 +226,20 @@ * `setMode()` is used for libraries which provide multiple "modes" for styles.

/**
* getMode
* `getMode()` is used for libraries which provide multiple "modes" for styles.
* @param ref a reference to the node to get styles for
* @returns the current mode or undefined, if not found
*/
export declare function getMode<T = string | undefined>(ref: any): T;
export declare function setPlatformHelpers(helpers: {
jmp?: (c: any) => any;
raf?: (c: any) => number;
ael?: (el: any, eventName: string, listener: any, options: any) => void;
rel?: (el: any, eventName: string, listener: any, options: any) => void;
ce?: (eventName: string, opts?: any) => any;
}): void;
/**
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
* if the path needs to be customized.
* @param path the path to use in calculating the asset path. this value will be
* used in conjunction with the base asset path
* @returns the base path
*/

@@ -245,9 +257,22 @@ export declare function getAssetPath(path: string): string;

* But do note that this configuration depends on how your script is bundled, or lack of
* bunding, and where your assets can be loaded from. Additionally custom bundling
* bundling, and where your assets can be loaded from. Additionally custom bundling
* will have to ensure the static assets are copied to its build directory.
* @param path the asset path to set
* @returns the set path
*/
export declare function setAssetPath(path: string): string;
/**
* getElement
* Used to specify a nonce value that corresponds with an application's
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
* @param nonce The value to be used for the nonce attribute.
*/
export declare function setNonce(nonce: string): void;
/**
* Retrieve a Stencil element for a given reference
* @param ref the ref to get the Stencil element for
* @returns a reference to the element
*/
export declare function getElement(ref: any): HTMLStencilElement;

@@ -257,3 +282,5 @@ /**

*
* Notice `forceUpdate()` is not syncronous and might perform the DOM render in the next frame.
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
*
* @param ref the node/element to force the re-render of
*/

@@ -263,2 +290,3 @@ export declare function forceUpdate(ref: any): void;

* getRenderingRef
* @returns the rendering ref
*/

@@ -274,2 +302,4 @@ export declare function getRenderingRef(): any;

* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
*
* @param task the DOM-write to schedule
*/

@@ -282,2 +312,4 @@ export declare function writeTask(task: RafCallback): void;

* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
*
* @param task the DOM-read to schedule
*/

@@ -421,4 +453,40 @@ export declare function readTask(task: RafCallback): void;

}
/**
* Utilities for working with functional Stencil components. An object
* conforming to this interface is passed by the Stencil runtime as the third
* argument to a functional component, allowing component authors to work with
* features like children.
*
* The children of a functional component will be passed as the second
* argument, so a functional component which uses these utils to transform its
* children might look like the following:
*
* ```ts
* export const AddClass: FunctionalComponent = (_, children, utils) => (
* utils.map(children, child => ({
* ...child,
* vattrs: {
* ...child.vattrs,
* class: `${child.vattrs.class} add-class`
* }
* }))
* );
* ```
*
* For more see the Stencil documentation, here:
* https://stenciljs.com/docs/functional-components
*/
export interface FunctionalUtilities {
/**
* Utility for reading the children of a functional component at runtime.
* Since the Stencil runtime uses a different interface for children it is
* not recommendeded to read the children directly, and is preferable to use
* this utility to, for instance, perform a side effect for each child.
*/
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
/**
* Utility for transforming the children of a functional component. Given an
* array of children and a callback this will return a list of the results of
* passing each child to the supplied callback.
*/
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];

@@ -429,2 +497,10 @@ }

}
/**
* A Child VDOM node
*
* This has most of the same properties as {@link VNode} but friendlier names
* (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
* order to provide a friendlier public interface for users of the
* {@link FunctionalUtilities}).
*/
export interface ChildNode {

@@ -476,2 +552,5 @@ vtag?: string | number | Function;

export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
/**
* A virtual DOM node
*/
export interface VNode {

@@ -673,3 +752,3 @@ $flags$: number;

}
interface SlotAttributes {
interface SlotAttributes extends JSXAttributes {
name?: string;

@@ -687,2 +766,3 @@ slot?: string;

target?: string;
referrerPolicy?: ReferrerPolicy;
}

@@ -828,4 +908,4 @@ interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {

alt?: string;
autoCapitalize?: any;
autocapitalize?: any;
autoCapitalize?: string;
autocapitalize?: string;
autoComplete?: string;

@@ -1154,4 +1234,4 @@ autocomplete?: string;

vocab?: string;
autoCapitalize?: any;
autocapitalize?: any;
autoCapitalize?: string;
autocapitalize?: string;
autoCorrect?: string;

@@ -1177,47 +1257,47 @@ autocorrect?: string;

interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
'class'?: string | {
class?: string | {
[className: string]: boolean;
};
'color'?: string;
'height'?: number | string;
'id'?: string;
'lang'?: string;
'max'?: number | string;
'media'?: string;
'method'?: string;
'min'?: number | string;
'name'?: string;
'style'?: {
color?: string;
height?: number | string;
id?: string;
lang?: string;
max?: number | string;
media?: string;
method?: string;
min?: number | string;
name?: string;
style?: {
[key: string]: string | undefined;
};
'target'?: string;
'type'?: string;
'width'?: number | string;
'role'?: string;
'tabindex'?: number;
target?: string;
type?: string;
width?: number | string;
role?: string;
tabindex?: number;
'accent-height'?: number | string;
'accumulate'?: 'none' | 'sum';
'additive'?: 'replace' | 'sum';
accumulate?: 'none' | 'sum';
additive?: 'replace' | 'sum';
'alignment-baseline'?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit';
'allowReorder'?: 'no' | 'yes';
'alphabetic'?: number | string;
'amplitude'?: number | string;
allowReorder?: 'no' | 'yes';
alphabetic?: number | string;
amplitude?: number | string;
'arabic-form'?: 'initial' | 'medial' | 'terminal' | 'isolated';
'ascent'?: number | string;
'attributeName'?: string;
'attributeType'?: string;
'autoReverse'?: number | string;
'azimuth'?: number | string;
'baseFrequency'?: number | string;
ascent?: number | string;
attributeName?: string;
attributeType?: string;
autoReverse?: number | string;
azimuth?: number | string;
baseFrequency?: number | string;
'baseline-shift'?: number | string;
'baseProfile'?: number | string;
'bbox'?: number | string;
'begin'?: number | string;
'bias'?: number | string;
'by'?: number | string;
'calcMode'?: number | string;
baseProfile?: number | string;
bbox?: number | string;
begin?: number | string;
bias?: number | string;
by?: number | string;
calcMode?: number | string;
'cap-height'?: number | string;
'clip'?: number | string;
clip?: number | string;
'clip-path'?: string;
'clipPathUnits'?: number | string;
clipPathUnits?: number | string;
'clip-rule'?: number | string;

@@ -1228,33 +1308,33 @@ 'color-interpolation'?: number | string;

'color-rendering'?: number | string;
'contentScriptType'?: number | string;
'contentStyleType'?: number | string;
'cursor'?: number | string;
'cx'?: number | string;
'cy'?: number | string;
'd'?: string;
'decelerate'?: number | string;
'descent'?: number | string;
'diffuseConstant'?: number | string;
'direction'?: number | string;
'display'?: number | string;
'divisor'?: number | string;
contentScriptType?: number | string;
contentStyleType?: number | string;
cursor?: number | string;
cx?: number | string;
cy?: number | string;
d?: string;
decelerate?: number | string;
descent?: number | string;
diffuseConstant?: number | string;
direction?: number | string;
display?: number | string;
divisor?: number | string;
'dominant-baseline'?: number | string;
'dur'?: number | string;
'dx'?: number | string;
'dy'?: number | string;
dur?: number | string;
dx?: number | string;
dy?: number | string;
'edge-mode'?: number | string;
'elevation'?: number | string;
elevation?: number | string;
'enable-background'?: number | string;
'end'?: number | string;
'exponent'?: number | string;
'externalResourcesRequired'?: number | string;
'fill'?: string;
end?: number | string;
exponent?: number | string;
externalResourcesRequired?: number | string;
fill?: string;
'fill-opacity'?: number | string;
'fill-rule'?: 'nonzero' | 'evenodd' | 'inherit';
'filter'?: string;
'filterRes'?: number | string;
'filterUnits'?: number | string;
filter?: string;
filterRes?: number | string;
filterUnits?: number | string;
'flood-color'?: number | string;
'flood-opacity'?: number | string;
'focusable'?: number | string;
focusable?: number | string;
'font-family'?: string;

@@ -1267,103 +1347,103 @@ 'font-size'?: number | string;

'font-weight'?: number | string;
'format'?: number | string;
'from'?: number | string;
'fx'?: number | string;
'fy'?: number | string;
'g1'?: number | string;
'g2'?: number | string;
format?: number | string;
from?: number | string;
fx?: number | string;
fy?: number | string;
g1?: number | string;
g2?: number | string;
'glyph-name'?: number | string;
'glyph-orientation-horizontal'?: number | string;
'glyph-orientation-vertical'?: number | string;
'glyphRef'?: number | string;
'gradientTransform'?: string;
'gradientUnits'?: string;
'hanging'?: number | string;
glyphRef?: number | string;
gradientTransform?: string;
gradientUnits?: string;
hanging?: number | string;
'horiz-adv-x'?: number | string;
'horiz-origin-x'?: number | string;
'href'?: string;
'ideographic'?: number | string;
href?: string;
ideographic?: number | string;
'image-rendering'?: number | string;
'in2'?: number | string;
'in'?: string;
'intercept'?: number | string;
'k1'?: number | string;
'k2'?: number | string;
'k3'?: number | string;
'k4'?: number | string;
'k'?: number | string;
'kernelMatrix'?: number | string;
'kernelUnitLength'?: number | string;
'kerning'?: number | string;
'keyPoints'?: number | string;
'keySplines'?: number | string;
'keyTimes'?: number | string;
'lengthAdjust'?: number | string;
in2?: number | string;
in?: string;
intercept?: number | string;
k1?: number | string;
k2?: number | string;
k3?: number | string;
k4?: number | string;
k?: number | string;
kernelMatrix?: number | string;
kernelUnitLength?: number | string;
kerning?: number | string;
keyPoints?: number | string;
keySplines?: number | string;
keyTimes?: number | string;
lengthAdjust?: number | string;
'letter-spacing'?: number | string;
'lighting-color'?: number | string;
'limitingConeAngle'?: number | string;
'local'?: number | string;
limitingConeAngle?: number | string;
local?: number | string;
'marker-end'?: string;
'markerHeight'?: number | string;
markerHeight?: number | string;
'marker-mid'?: string;
'marker-start'?: string;
'markerUnits'?: number | string;
'markerWidth'?: number | string;
'mask'?: string;
'maskContentUnits'?: number | string;
'maskUnits'?: number | string;
'mathematical'?: number | string;
'mode'?: number | string;
'numOctaves'?: number | string;
'offset'?: number | string;
'opacity'?: number | string;
'operator'?: number | string;
'order'?: number | string;
'orient'?: number | string;
'orientation'?: number | string;
'origin'?: number | string;
'overflow'?: number | string;
markerUnits?: number | string;
markerWidth?: number | string;
mask?: string;
maskContentUnits?: number | string;
maskUnits?: number | string;
mathematical?: number | string;
mode?: number | string;
numOctaves?: number | string;
offset?: number | string;
opacity?: number | string;
operator?: number | string;
order?: number | string;
orient?: number | string;
orientation?: number | string;
origin?: number | string;
overflow?: number | string;
'overline-position'?: number | string;
'overline-thickness'?: number | string;
'paint-order'?: number | string;
'panose1'?: number | string;
'pathLength'?: number | string;
'patternContentUnits'?: string;
'patternTransform'?: number | string;
'patternUnits'?: string;
panose1?: number | string;
pathLength?: number | string;
patternContentUnits?: string;
patternTransform?: number | string;
patternUnits?: string;
'pointer-events'?: number | string;
'points'?: string;
'pointsAtX'?: number | string;
'pointsAtY'?: number | string;
'pointsAtZ'?: number | string;
'preserveAlpha'?: number | string;
'preserveAspectRatio'?: string;
'primitiveUnits'?: number | string;
'r'?: number | string;
'radius'?: number | string;
'refX'?: number | string;
'refY'?: number | string;
points?: string;
pointsAtX?: number | string;
pointsAtY?: number | string;
pointsAtZ?: number | string;
preserveAlpha?: number | string;
preserveAspectRatio?: string;
primitiveUnits?: number | string;
r?: number | string;
radius?: number | string;
refX?: number | string;
refY?: number | string;
'rendering-intent'?: number | string;
'repeatCount'?: number | string;
'repeatDur'?: number | string;
'requiredextensions'?: number | string;
'requiredFeatures'?: number | string;
'restart'?: number | string;
'result'?: string;
'rotate'?: number | string;
'rx'?: number | string;
'ry'?: number | string;
'scale'?: number | string;
'seed'?: number | string;
repeatCount?: number | string;
repeatDur?: number | string;
requiredextensions?: number | string;
requiredFeatures?: number | string;
restart?: number | string;
result?: string;
rotate?: number | string;
rx?: number | string;
ry?: number | string;
scale?: number | string;
seed?: number | string;
'shape-rendering'?: number | string;
'slope'?: number | string;
'spacing'?: number | string;
'specularConstant'?: number | string;
'specularExponent'?: number | string;
'speed'?: number | string;
'spreadMethod'?: string;
'startOffset'?: number | string;
'stdDeviation'?: number | string;
'stemh'?: number | string;
'stemv'?: number | string;
'stitchTiles'?: number | string;
slope?: number | string;
spacing?: number | string;
specularConstant?: number | string;
specularExponent?: number | string;
speed?: number | string;
spreadMethod?: string;
startOffset?: number | string;
stdDeviation?: number | string;
stemh?: number | string;
stemv?: number | string;
stitchTiles?: number | string;
'stop-color'?: string;

@@ -1373,4 +1453,4 @@ 'stop-opacity'?: number | string;

'strikethrough-thickness'?: number | string;
'string'?: number | string;
'stroke'?: string;
string?: number | string;
stroke?: string;
'stroke-dasharray'?: string | number;

@@ -1383,18 +1463,18 @@ 'stroke-dashoffset'?: string | number;

'stroke-width'?: number | string;
'surfaceScale'?: number | string;
'systemLanguage'?: number | string;
'tableValues'?: number | string;
'targetX'?: number | string;
'targetY'?: number | string;
surfaceScale?: number | string;
systemLanguage?: number | string;
tableValues?: number | string;
targetX?: number | string;
targetY?: number | string;
'text-anchor'?: string;
'text-decoration'?: number | string;
'textLength'?: number | string;
textLength?: number | string;
'text-rendering'?: number | string;
'to'?: number | string;
'transform'?: string;
'u1'?: number | string;
'u2'?: number | string;
to?: number | string;
transform?: string;
u1?: number | string;
u2?: number | string;
'underline-position'?: number | string;
'underline-thickness'?: number | string;
'unicode'?: number | string;
unicode?: number | string;
'unicode-bidi'?: number | string;

@@ -1404,5 +1484,5 @@ 'unicode-range'?: number | string;

'v-alphabetic'?: number | string;
'values'?: string;
values?: string;
'vector-effect'?: number | string;
'version'?: string;
version?: string;
'vert-adv-y'?: number | string;

@@ -1413,35 +1493,33 @@ 'vert-origin-x'?: number | string;

'v-ideographic'?: number | string;
'viewBox'?: string;
'viewTarget'?: number | string;
'visibility'?: number | string;
viewBox?: string;
viewTarget?: number | string;
visibility?: number | string;
'v-mathematical'?: number | string;
'widths'?: number | string;
widths?: number | string;
'word-spacing'?: number | string;
'writing-mode'?: number | string;
'x1'?: number | string;
'x2'?: number | string;
'x'?: number | string;
x1?: number | string;
x2?: number | string;
x?: number | string;
'x-channel-selector'?: string;
'x-height'?: number | string;
'xlinkActuate'?: string;
'xlinkArcrole'?: string;
'xlinkHref'?: string;
'xlinkRole'?: string;
'xlinkShow'?: string;
'xlinkTitle'?: string;
'xlinkType'?: string;
'xmlBase'?: string;
'xmlLang'?: string;
'xmlns'?: string;
'xmlSpace'?: string;
'y1'?: number | string;
'y2'?: number | string;
'y'?: number | string;
'yChannelSelector'?: string;
'z'?: number | string;
'zoomAndPan'?: string;
xlinkActuate?: string;
xlinkArcrole?: string;
xlinkHref?: string;
xlinkRole?: string;
xlinkShow?: string;
xlinkTitle?: string;
xlinkType?: string;
xmlBase?: string;
xmlLang?: string;
xmlns?: string;
xmlSpace?: string;
y1?: number | string;
y2?: number | string;
y?: number | string;
yChannelSelector?: string;
z?: number | string;
zoomAndPan?: string;
}
interface DOMAttributes<T = Element> {
key?: string | number;
ref?: (elm?: T) => void;
interface DOMAttributes<T> extends JSXAttributes<T> {
slot?: string;

@@ -1456,14 +1534,14 @@ part?: string;

onPasteCapture?: (event: ClipboardEvent) => void;
onCompositionEnd?: (event: CompositionEvent) => void;
onCompositionEndCapture?: (event: CompositionEvent) => void;
onCompositionStart?: (event: CompositionEvent) => void;
onCompositionStartCapture?: (event: CompositionEvent) => void;
onCompositionUpdate?: (event: CompositionEvent) => void;
onCompositionUpdateCapture?: (event: CompositionEvent) => void;
onCompositionend?: (event: CompositionEvent) => void;
onCompositionendCapture?: (event: CompositionEvent) => void;
onCompositionstart?: (event: CompositionEvent) => void;
onCompositionstartCapture?: (event: CompositionEvent) => void;
onCompositionupdate?: (event: CompositionEvent) => void;
onCompositionupdateCapture?: (event: CompositionEvent) => void;
onFocus?: (event: FocusEvent) => void;
onFocusCapture?: (event: FocusEvent) => void;
onFocusIn?: (event: FocusEvent) => void;
onFocusInCapture?: (event: FocusEvent) => void;
onFocusOut?: (event: FocusEvent) => void;
onFocusOutCapture?: (event: FocusEvent) => void;
onFocusin?: (event: FocusEvent) => void;
onFocusinCapture?: (event: FocusEvent) => void;
onFocusout?: (event: FocusEvent) => void;
onFocusoutCapture?: (event: FocusEvent) => void;
onBlur?: (event: FocusEvent) => void;

@@ -1473,4 +1551,4 @@ onBlurCapture?: (event: FocusEvent) => void;

onChangeCapture?: (event: Event) => void;
onInput?: (event: Event) => void;
onInputCapture?: (event: Event) => void;
onInput?: (event: InputEvent) => void;
onInputCapture?: (event: InputEvent) => void;
onReset?: (event: Event) => void;

@@ -1569,2 +1647,6 @@ onResetCapture?: (event: Event) => void;

}
export interface JSXAttributes<T = Element> {
key?: string | number;
ref?: (elm?: T) => void;
}
export interface CustomElementsDefineOptions {

@@ -1571,0 +1653,0 @@ exclude?: string[];

{
"name": "@pulpo/components",
"version": "0.0.7",
"version": "2.0.20-v0",
"main": "dist/index.cjs.js",

@@ -16,15 +16,31 @@ "module": "dist/index.js",

"scripts": {
"package": "stencil build",
"package": "stencil build --docs --ci",
"postpackage": "yarn static:clean && yarn static:copy",
"static:clean": "rm -rf ../app/static/components || true",
"static:copy": "cp -vr dist/components ../app/static/",
"build": "stencil build --docs",
"start": "stencil build --dev --watch --serve",
"test": "stencil test --spec --e2e",
"test.watch": "stencil test --spec --e2e --watchAll",
"test": "TZ=UTC stencil test --spec --e2e",
"test.watch": "TZ=UTC stencil test --spec --e2e --watchAll",
"generate": "stencil generate"
},
"dependencies": {
"@stencil/core": "^2.0.1",
"video.js": "^7.10.2",
"videojs-contrib-quality-levels": "^2.0.9"
"@stencil/core": "3.2.1",
"get-video-id": "^3.6.4",
"lowlight": "^1.20.0",
"rehype-stringify": "^9.0.2",
"unified": "^10.1.2",
"video.js": "^7.21.4",
"videojs-contrib-quality-levels": "^2.2.1",
"videojs-http-source-selector": "^1.1.6",
"videojs-vjsdownload": "^1.0.4"
},
"devDependencies": {
"@jest/core": "^27.5.1",
"@types/puppeteer": "^7.0.4",
"jest-config": "^27.5.1",
"jest-runner": "^27.5.1",
"puppeteer": "^19.7.2"
},
"license": "MIT"
}
![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)
# Stencil Component Starter
# Quick development process
This is a starter project for building a standalone Web Component using Stencil.
Start stencil serve in watch mode by running the following command on components folder
Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
# Stencil
Stencil is a compiler for building fast web apps using Web Components.
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
## Getting Started
To start building a new web component using Stencil, clone this repo to a new directory:
```bash
git clone https://github.com/ionic-team/stencil-component-starter.git my-component
cd my-component
git remote rm origin
```sh
yarn start
```
and run:
This will start a local server running on port 3334 that will refresh the bundle on each change, now you need to got to
app `nuxt.config.ts` file and replace the line
```bash
npm install
npm start
```ts
{ src: `components/components.esm.js?_=${Date.now()}`, type: 'module', rel: 'preload' }
```
To build the component for production, run:
with
```bash
npm run build
```
```ts
{ src: 'http://localhost:3333/dist/components/components.esm.js, type: 'module', rel: 'preload' }
To run the unit tests for the components, run:
```bash
npm test
```
Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
## Naming Components
When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix `ion`.
## Using this component
There are three strategies we recommend for using web components built with Stencil.
The first step for all three of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
### Script tag
- Put a script tag similar to this `<script src='https://unpkg.com/my-component@0.0.1/dist/my-component.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
### Node Modules
- Run `npm install my-component --save`
- Put a script tag similar to this `<script src='node_modules/my-component/dist/my-component.esm.js'></script>` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
### In a stencil-starter app
- Run `npm install my-component --save`
- Add an import to the npm packages `import my-component;`
- Then you can use the element anywhere in your template, JSX, html etc
This will tell nuxt to include the components build from the stencil watch server, now each change you do will automatically
rebuild and if you refresh the page on the application it will reload the changes.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc