@fluid-topics/ft-reader-topic-context 0.3.22 → 0.3.23
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
color: ${r.textColor};
|
|
5
5
|
background-color: ${r.colorSurface};
|
|
6
6
|
}
|
|
7
|
-
`;var i=function(t,e,o,s){for(var r,c=arguments.length,i=c<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s,n=t.length-1;n>=0;n--)(r=t[n])&&(i=(c<3?r(i):c>3?r(e,o,i):r(e,o))||i);return c>3&&i&&Object.defineProperty(e,o,i),i};class n extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}
|
|
7
|
+
`;var i=function(t,e,o,s){for(var r,c=arguments.length,i=c<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s,n=t.length-1;n>=0;n--)(r=t[n])&&(i=(c<3?r(i):c>3?r(e,o,i):r(e,o))||i);return c>3&&i&&Object.defineProperty(e,o,i),i};class n extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class a extends(function(t){class e extends t{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new n)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return i([s.state()],e.prototype,"stateManager",void 0),e}(e.FtLitElementRedux)){}var d=function(t,e,o,s){for(var r,c=arguments.length,i=c<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s,n=t.length-1;n>=0;n--)(r=t[n])&&(i=(c<3?r(i):c>3?r(e,o,i):r(e,o))||i);return c>3&&i&&Object.defineProperty(e,o,i),i};class l extends a{constructor(){super(...arguments),this.registeredComponents=[]}render(){return o.html`
|
|
8
8
|
<article id=${this.tocId}>
|
|
9
9
|
<slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
|
|
10
10
|
</article>
|
|
@@ -83,14 +83,14 @@ var rt,nt;class at extends S{constructor(){super(...arguments),this.renderOption
|
|
|
83
83
|
-webkit-hyphens: auto;
|
|
84
84
|
hyphens: auto
|
|
85
85
|
}
|
|
86
|
-
`;navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(dt=null===(ut=window.safari)||void 0===ut?void 0:ut.pushNotification)||void 0===dt||dt.toString());const
|
|
86
|
+
`;class vt extends ft{get store(){return this.internalStore}set store(t){this.internalStore=t,this.store&&this.setupStore()}updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,i)=>{this[i]=e(t,this)}))}setupStore(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()})),this.onStoreAvailable(),this.requestUpdate()}onStoreAvailable(){}connectedCallback(){super.connectedCallback(),this.store&&this.setupStore()}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}}navigator.vendor&&navigator.vendor.match(/apple/i)||(null===(dt=null===(ut=window.safari)||void 0===ut?void 0:ut.pushNotification)||void 0===dt||dt.toString());const bt={textColor:lt.create("--ft-reader-topic-context-text-color","COLOR","#000000"),colorSurface:lt.external(ht.colorSurface,"Design system")},yt=d`
|
|
87
87
|
.ft-reader-topic-context {
|
|
88
88
|
box-sizing: border-box;
|
|
89
|
-
color: ${
|
|
90
|
-
background-color: ${
|
|
89
|
+
color: ${bt.textColor};
|
|
90
|
+
background-color: ${bt.colorSurface};
|
|
91
91
|
}
|
|
92
|
-
`;var
|
|
92
|
+
`;var mt=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class xt extends Event{constructor(){super("register-ft-reader-component",{bubbles:!0,composed:!0})}}class gt extends(function(t){class e extends t{setReaderStateManager(t){this.stateManager=t,this.store=t.store}get service(){var t;return null===(t=this.stateManager)||void 0===t?void 0:t.service}connectedCallback(){super.connectedCallback(),setTimeout((()=>this.dispatchEvent(new xt)),10)}disconnectedCallback(){super.disconnectedCallback(),this.store=void 0,this.stateManager=void 0}}return mt([o()],e.prototype,"stateManager",void 0),e}(vt)){}var wt,Ot=function(t,e,i,s){for(var o,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s,a=t.length-1;a>=0;a--)(o=t[a])&&(n=(r<3?o(n):r>3?o(e,i,n):o(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};class St extends gt{constructor(){super(...arguments),this.registeredComponents=[]}render(){return H`
|
|
93
93
|
<article id=${this.tocId}>
|
|
94
94
|
<slot @register-ft-reader-topic-component=${this.registerComponent}></slot>
|
|
95
95
|
</article>
|
|
96
|
-
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode}updated(t){super.updated(t),["tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}
|
|
96
|
+
`}registerComponent(t){t.stopPropagation();const e=t.composedPath()[0];this.register(e)}register(t){this.registeredComponents.push(t),t.tocNode=this.tocNode}updated(t){super.updated(t),["tocId","stateManager"].some((e=>t.has(e)))&&this.setTocNode(),t.has("tocNode")&&this.registeredComponents.forEach((t=>t.tocNode=this.tocNode))}async setTocNode(){var t;this.tocNode=this.tocId?await(null===(t=this.service)||void 0===t?void 0:t.getTocNode(this.tocId)):void 0}disconnectedCallback(){super.disconnectedCallback(),this.registeredComponents=[]}}St.styles=yt,Ot([s()],St.prototype,"tocId",void 0),Ot([o()],St.prototype,"tocNode",void 0),(wt="ft-reader-topic-context",t=>{window.customElements.get(wt)||window.customElements.define(wt,t)})(St),t.FtReaderTopicContext=St,t.FtReaderTopicContextCssVariables=bt,t.styles=yt,Object.defineProperty(t,"i",{value:!0})}({});
|
package/build/registration.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FtReaderTocNode } from "@fluid-topics/ft-reader-context/build/store/model";
|
|
2
2
|
import { FtLitElementRedux } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
|
|
3
4
|
export declare class RegisterReaderTopicComponentEvent extends Event {
|
|
4
5
|
constructor();
|
|
5
6
|
}
|
|
@@ -8,6 +9,8 @@ export declare type FtReaderTopicComponentInterface = {
|
|
|
8
9
|
};
|
|
9
10
|
declare type Constructor<T> = new (...args: any[]) => T;
|
|
10
11
|
export declare function toFtReaderTopicComponent<T extends Constructor<FtLitElementRedux>>(ReduxClass: T): T & Constructor<FtReaderTopicComponentInterface>;
|
|
11
|
-
|
|
12
|
+
declare const FtReaderTopicComponent_base: typeof FtReaderComponent & Constructor<FtReaderTopicComponentInterface>;
|
|
13
|
+
export declare class FtReaderTopicComponent extends FtReaderTopicComponent_base {
|
|
14
|
+
}
|
|
12
15
|
export {};
|
|
13
16
|
//# sourceMappingURL=registration.d.ts.map
|
package/build/registration.js
CHANGED
|
@@ -23,5 +23,6 @@ export function toFtReaderTopicComponent(ReduxClass) {
|
|
|
23
23
|
], FtReaderTopicComponentClass.prototype, "tocNode", void 0);
|
|
24
24
|
return FtReaderTopicComponentClass;
|
|
25
25
|
}
|
|
26
|
-
export
|
|
26
|
+
export class FtReaderTopicComponent extends toFtReaderTopicComponent(FtReaderComponent) {
|
|
27
|
+
}
|
|
27
28
|
//# sourceMappingURL=registration.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-topic-context",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.23",
|
|
4
4
|
"description": "Context block for integrated reader topic components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "0.3.23",
|
|
23
23
|
"lit": "2.2.8"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "7fb0bb52d064423f63bfd9c36c5454d65aa890d6"
|
|
26
26
|
}
|