Skip to content

Commit 5d8d662

Browse files
authored
rename package (#16)
1 parent 348b133 commit 5d8d662

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# @koddsson/context-protocol
1+
# @open-wc/context-protocol
22

33
A Lit compatible implementation of the [context-protocol community protocol](https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md).
44

55
## Installation
66

77
```sh
8-
npm install --save @koddsson/context-protocol
8+
npm install --save @open-wc/context-protocol
99
```
1010

1111
## Usage
1212

1313
A component that implements the ProviderMixin will become a _Provider_ of data and a component that implements the ConsumerMixin will become a _Consumer_ of data.
1414

1515
```ts
16-
import { ProviderMixin } from "@koddsson/context-protocol";
16+
import { ProviderMixin } from "@open-wc/context-protocol";
1717

1818
export class ProviderElement extends ProviderMixin(HTMLElement) {
1919
// Set any data contexts here.
@@ -26,15 +26,15 @@ export class ProviderElement extends ProviderMixin(HTMLElement) {
2626
async connectedCallback() {
2727
// It's also possible to provide context at any point using `updateContext`.
2828

29-
const response = await fetch('/api/messages/');
29+
const response = await fetch("/api/messages/");
3030
const data = await response.json();
31-
this.updateContext('number-of-unread-messages', data.unreadCount);
31+
this.updateContext("number-of-unread-messages", data.unreadCount);
3232
}
3333
}
3434
```
3535

3636
```ts
37-
import { ConsumerMixin } from "@koddsson/context-protocol";
37+
import { ConsumerMixin } from "@open-wc/context-protocol";
3838

3939
export class ConsumerElement extends ConsumerMixin(HTMLElement) {
4040
contexts = {
@@ -46,7 +46,7 @@ export class ConsumerElement extends ConsumerMixin(HTMLElement) {
4646

4747
connectedCallback() {
4848
// It's also possible to get any context on demand without subscribing.
49-
this.textContent = this.getContext('number-of-unread-messages');
49+
this.textContent = this.getContext("number-of-unread-messages");
5050
}
5151
}
5252
```

jsr.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@koddsson/context-protocol",
3-
"version": "0.0.2",
2+
"name": "@open-wc/context-protocol",
3+
"version": "0.0.3",
44
"exports": "./index.ts"
55
}

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@koddsson/context-protocol",
2+
"name": "@open-wc/context-protocol",
33
"version": "0.0.3",
44
"description": "A Lit compatible implementation of the context-protocol community protocol",
55
"type": "module",

0 commit comments

Comments
 (0)