Skip to content

Commit

Permalink
feat(blockquote-base-meta): lit3
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarmarina committed Nov 18, 2023
1 parent 5d3a3dc commit b15cfab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/base/blockquote-base-meta/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Lit](https://img.shields.io/badge/lit-2.0.0-blue)
![Lit](https://img.shields.io/badge/lit-3.0.0-blue.svg)

`BlockquoteBaseMeta` is based on Polymer's `iron-meta`, and it is a generic class that you can use for sharing information across the DOM tree.
It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) pattern such that any instance of it has access to the shared information.
Expand Down
2 changes: 1 addition & 1 deletion packages/base/blockquote-base-meta/custom-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"declarations": [
{
"kind": "class",
"description": "![Lit](https://img.shields.io/badge/lit-2.0.0-blue)\n\n`BlockquoteBaseMeta` is based on Polymer's `iron-meta`, and it is a generic class that you can use for sharing information across the DOM tree.\nIt uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) pattern such that any instance of it has access to the shared information.\nYou can use `BlockquoteBaseMeta` to share whatever you want.\nThe `BlockquoteBaseMeta` instances contain your actual data. The only requirement is that you\ncreate them before you try to access them.\n\n`BlockquoteBaseMeta` uses [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map).\n\nMap is a collection of keyed data items, just like an Object.\nBut the main difference is that Map allows keys of any type.\n\n### Usage\n\n```js\nimport { BlockquoteBaseMeta } from '@blockquote-web-components/blockquote-base-meta';\n\n const myDefault = new BlockquoteBaseMeta({\n key: 'basic',\n value: 'foo/bar',\n });\n\nconsole.log(myDefault.value); // foo/bar\n```\n\n### Keys string - Object\n\n```js\nimport { BlockquoteBaseMeta } from '@blockquote-web-components/blockquote-base-meta';\n\n const myDefault = new BlockquoteBaseMeta({\n type: 'one',\n key: 'basic',\n value: 'foo/bar',\n });\n\n console.log(myDefault.objectList); // {basic: 'foo/bar'}\n```\n\n### Keys any type - Map\n\n```js\nimport { BlockquoteBaseMeta } from '@blockquote-web-components/blockquote-base-meta';\n\n const keyInfo = { id: 'dsfaskj0' };\n const myDefault = new BlockquoteBaseMeta({\n type: 'two',\n key: keyInfo,\n value: 'foo/bar',\n });\n\nconsole.log(myDefault.mapList); // {{ id: 'dsfaskj0' }: 'foo/bar'}\n```",
"description": "![Lit](https://img.shields.io/badge/lit-3.0.0-blue.svg)\n\n`BlockquoteBaseMeta` is based on Polymer's `iron-meta`, and it is a generic class that you can use for sharing information across the DOM tree.\nIt uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) pattern such that any instance of it has access to the shared information.\nYou can use `BlockquoteBaseMeta` to share whatever you want.\nThe `BlockquoteBaseMeta` instances contain your actual data. The only requirement is that you\ncreate them before you try to access them.\n\n`BlockquoteBaseMeta` uses [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map).\n\nMap is a collection of keyed data items, just like an Object.\nBut the main difference is that Map allows keys of any type.\n\n### Usage\n\n```js\nimport { BlockquoteBaseMeta } from '@blockquote-web-components/blockquote-base-meta';\n\n const myDefault = new BlockquoteBaseMeta({\n key: 'basic',\n value: 'foo/bar',\n });\n\nconsole.log(myDefault.value); // foo/bar\n```\n\n### Keys string - Object\n\n```js\nimport { BlockquoteBaseMeta } from '@blockquote-web-components/blockquote-base-meta';\n\n const myDefault = new BlockquoteBaseMeta({\n type: 'one',\n key: 'basic',\n value: 'foo/bar',\n });\n\n console.log(myDefault.objectList); // {basic: 'foo/bar'}\n```\n\n### Keys any type - Map\n\n```js\nimport { BlockquoteBaseMeta } from '@blockquote-web-components/blockquote-base-meta';\n\n const keyInfo = { id: 'dsfaskj0' };\n const myDefault = new BlockquoteBaseMeta({\n type: 'two',\n key: keyInfo,\n value: 'foo/bar',\n });\n\nconsole.log(myDefault.mapList); // {{ id: 'dsfaskj0' }: 'foo/bar'}\n```",
"name": "BlockquoteBaseMeta",
"members": [
{
Expand Down
3 changes: 2 additions & 1 deletion packages/base/blockquote-base-meta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
],
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"lit/no-classfield-shadowing": "off",
"lit/no-native-attributes": "off"
}
},
Expand All @@ -139,7 +140,7 @@
}
},
"dependencies": {
"lit": "^2.8.0"
"lit": "^3.1.0"
},
"devDependencies": {
"@blockquote-web-components/blockquote-base-common-dev-dependencies": "^1.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ window[BLOCKQUOTE] = blockquote;
// https://www.keithcirkel.co.uk/metaprogramming-in-es6-symbols/

/**
* ![Lit](https://img.shields.io/badge/lit-2.0.0-blue)
* ![Lit](https://img.shields.io/badge/lit-3.0.0-blue.svg)
*
* `BlockquoteBaseMeta` is based on Polymer's `iron-meta`, and it is a generic class that you can use for sharing information across the DOM tree.
* It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) pattern such that any instance of it has access to the shared information.
Expand Down

0 comments on commit b15cfab

Please sign in to comment.