@blockquote-web-components/blockquote-controller-context-meta 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockquote-web-components/blockquote-controller-context-meta",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Webcomponent blockquote-controller-context-meta following open-wc recommendations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lit",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"prettier": {
|
|
69
|
-
"arrowParens": "avoid",
|
|
70
69
|
"bracketSameLine": true,
|
|
70
|
+
"bracketSpacing": false,
|
|
71
71
|
"htmlWhitespaceSensitivity": "ignore",
|
|
72
72
|
"printWidth": 100,
|
|
73
73
|
"singleQuote": true,
|
|
74
|
-
"trailingComma": "
|
|
74
|
+
"trailingComma": "es5",
|
|
75
75
|
"overrides": [
|
|
76
76
|
{
|
|
77
77
|
"files": "*.{scss,css}",
|
|
@@ -97,11 +97,11 @@
|
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.9.1",
|
|
100
|
-
"@blockquote-web-components/blockquote-base-embedded-webview": "^1.11.
|
|
100
|
+
"@blockquote-web-components/blockquote-base-embedded-webview": "^1.11.2"
|
|
101
101
|
},
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
105
|
"customElements": "custom-elements.json",
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "0d8e9582b65cca369553640cc72d2ca93f2c0a61"
|
|
107
107
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {LitElement, html, css} from 'lit';
|
|
2
2
|
import {
|
|
3
3
|
BlockquoteControllerContextMeta,
|
|
4
4
|
contextMetaSymbol,
|
|
@@ -132,9 +132,7 @@ export class BaseContextMetaElement extends LitElement {
|
|
|
132
132
|
*/
|
|
133
133
|
initOrGetContextProvider(contextOrOptions = contextMetaSymbol) {
|
|
134
134
|
const ctx =
|
|
135
|
-
contextOrOptions?.context !== undefined
|
|
136
|
-
? { ...contextOrOptions }
|
|
137
|
-
: { context: contextOrOptions };
|
|
135
|
+
contextOrOptions?.context !== undefined ? {...contextOrOptions} : {context: contextOrOptions};
|
|
138
136
|
|
|
139
137
|
if (!this.#controllerBaseContextMeta) {
|
|
140
138
|
this.#controllerBaseContextMeta = new BlockquoteControllerContextMeta(this, ctx);
|
|
@@ -144,7 +142,7 @@ export class BaseContextMetaElement extends LitElement {
|
|
|
144
142
|
|
|
145
143
|
connectedCallback() {
|
|
146
144
|
super.connectedCallback?.();
|
|
147
|
-
Object.assign(this, {
|
|
145
|
+
Object.assign(this, {role: this.role ?? 'presentation'});
|
|
148
146
|
}
|
|
149
147
|
|
|
150
148
|
render() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {createContext, ContextProvider, ContextConsumer} from '@lit/context';
|
|
2
2
|
|
|
3
3
|
export const contextMetaSymbol = 'context-meta-symbol';
|
|
4
4
|
/**
|
|
@@ -111,7 +111,7 @@ class ContextMeta {
|
|
|
111
111
|
* callback?: (value: import('@lit/context').ContextType<*>, dispose?: () => void) => void
|
|
112
112
|
* }} arg - The arguments for the constructor.
|
|
113
113
|
*/
|
|
114
|
-
constructor(host, {
|
|
114
|
+
constructor(host, {context = contextMetaSymbol, initialValue, callback}) {
|
|
115
115
|
this.context = createContext(Symbol.for(context));
|
|
116
116
|
this.initialValue = initialValue;
|
|
117
117
|
this.callback = callback;
|
|
@@ -142,4 +142,4 @@ class ContextMeta {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
export {
|
|
145
|
+
export {ContextMeta as BlockquoteControllerContextMeta};
|
package/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export {BlockquoteControllerContextMeta} from './BlockquoteControllerContextMeta.js';
|
|
2
|
+
export {BaseContextMetaElement} from './BaseContextMetaElement.js';
|