playhtml 2.0.2 → 2.0.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.
Files changed (2) hide show
  1. package/README.md +6 -2
  2. package/package.json +6 -1
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # playhtml 🛝🌐
1
+ # <a href="https://playhtml.fun">playhtml</a> 🛝🌐 [![npm release](https://img.shields.io/npm/v/playhtml?color=%23ff980c)](https://www.npmjs.com/package/playhtml) [![Downloads](https://img.shields.io/npm/dm/playhtml)](https://www.npmjs.com/package/spencerc99/playhtml) [![Size](https://img.shields.io/bundlephobia/min/playhtml?color=%23c6e1ea)](https://www.npmjs.com/package/spencerc99/playhtml)
2
2
 
3
3
  _interactive, collaborative html elements with a single data attribute_
4
4
 
5
- playhtml is a library for magically creating collaborative interactive HTML elements that persist their state across sessions. For example, you can create a movable piece of HTML "furniture" by adding the `can-move` attribute:
5
+ playhtml is a fast, small (~300KB), and expressive library for magically creating collaborative interactive HTML elements that persist their state across sessions. For example, you can create a movable piece of HTML "furniture" by adding the `can-move` attribute:
6
6
 
7
7
  ```html
8
8
  <div id="couch" can-move style="font-size: 80px">🛋</div>
@@ -114,6 +114,10 @@ The only required properties are `defaultData`, `updateElement` and some kind of
114
114
 
115
115
  If you make something fun, please show me! This is designed as an open library for anyone to add on new interactions and capabilities, so we [welcome contributions](https://github.com/spencerc99/playhtml/blob/main/CONTRIBUTING.md) for new built-in capabilities.
116
116
 
117
+ ### Advanced
118
+
119
+ IDs are recommended on all elements to uniquely identify them. If you are applying the same capability to several elements, you can also use the `selector-id` attribute to specify a selector to the elements that distinguishes them. The ID will be the index of the element in that selector query.
120
+
117
121
  ## Plug-and-play Capabilities
118
122
 
119
123
  These capabilities are common ones that have been designed and created by the community. You should expect that they are relatively well-tested, and they simply build on top of the same API and constructs that `can-play` uses.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "playhtml",
3
3
  "title": "playhtml",
4
4
  "description": "Create interactive, collaborative html elements with a single attribute",
5
- "version": "2.0.2",
5
+ "version": "2.0.3",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "keywords": [
@@ -33,8 +33,13 @@
33
33
  ],
34
34
  "exports": {
35
35
  ".": {
36
+ "types": "./dist/main.d.ts",
36
37
  "import": "./dist/playhtml.es.js",
37
38
  "require": "./dist/playhtml.umd.js"
39
+ },
40
+ "./dist/style.css": {
41
+ "import": "./dist/style.css",
42
+ "require": "./dist/style.css"
38
43
  }
39
44
  },
40
45
  "scripts": {