@pacem/pacem-core 1.0.0-amaldi → 1.0.0-archimedes
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/README.md +54 -0
- package/dist/browser/pacem-core.js +1 -1
- package/dist/browser/pacem-core.min.js +1 -1
- package/dist/bundle/pacem-core.min.mjs +1 -1
- package/dist/bundle/pacem-core.mjs +1 -1
- package/dist/esm/adapter.js +1 -1
- package/dist/esm/command.js +1 -1
- package/dist/esm/comparers.js +1 -1
- package/dist/esm/converters.js +1 -1
- package/dist/esm/decorators-next.js +1 -1
- package/dist/esm/decorators.js +1 -1
- package/dist/esm/defaults.js +1 -1
- package/dist/esm/events.js +1 -1
- package/dist/esm/eventtarget.js +1 -1
- package/dist/esm/expression.js +1 -1
- package/dist/esm/index-animations.js +1 -1
- package/dist/esm/index-behaviors.js +1 -1
- package/dist/esm/index-components.js +1 -1
- package/dist/esm/index-iife.js +1 -1
- package/dist/esm/index-logging.js +1 -1
- package/dist/esm/index-net.js +1 -1
- package/dist/esm/index-root.js +1 -1
- package/dist/esm/index-ui.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/logger.js +1 -1
- package/dist/esm/prefix.js +1 -1
- package/dist/esm/promise.js +1 -1
- package/dist/esm/regex.js +1 -1
- package/dist/esm/storage.js +1 -1
- package/dist/esm/template.js +1 -1
- package/dist/esm/transforms.js +1 -1
- package/dist/esm/types.js +1 -1
- package/dist/esm/utils-customelement.js +1 -1
- package/dist/esm/utils-customevent.js +1 -1
- package/dist/esm/utils.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/@pacem/pacem-core)
|
|
2
|
+
[](https://github.com/pacem-it/pacem/blob/main/LICENSE)
|
|
3
|
+
|
|
4
|
+
# @pacem/pacem-core
|
|
5
|
+
|
|
6
|
+
The runtime core of the [Pacem JS](https://js.pacem.it) [CustomElements-v1](https://www.w3.org/TR/custom-elements/) ecosystem: the `@CustomElement`/`@Watch` decorators, the base element classes, property converters, the expression engine, the element prefix configuration, and ~40 foundational custom elements — proxies (event, style, template, meta, broadcast-channel, service-worker...), animations, drag/swipe/rotate/rescale behaviors, and data-binding primitives (`pacem-if`, `pacem-repeater`, `pacem-data`, `pacem-router`...) that every other `@pacem/pacem-*` package builds on.
|
|
7
|
+
|
|
8
|
+
Depends on [`@pacem/pacem-foundation`](https://www.npmjs.com/package/@pacem/pacem-foundation).
|
|
9
|
+
|
|
10
|
+
Part of the [Pacem JS](https://js.pacem.it) ecosystem. Install [`@pacem/pacem`](https://www.npmjs.com/package/@pacem/pacem) instead if you want every package bundled together.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npm install @pacem/pacem-core
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### As an ES module
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
import { Components, Behaviors, Animations, Net, Logging } from '@pacem/pacem-core';
|
|
24
|
+
import { CustomElement, Watch, PropertyConverters } from '@pacem/pacem-core';
|
|
25
|
+
|
|
26
|
+
@CustomElement({ tagName: 'my-element' })
|
|
27
|
+
class MyElement extends Components.PacemElement {
|
|
28
|
+
@Watch({ reflectBack: true, converter: PropertyConverters.String }) label: string;
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### In the browser, without a bundler
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<script src="node_modules/@pacem/pacem-foundation/dist/browser/pacem-foundation.min.js"></script>
|
|
36
|
+
<script src="node_modules/@pacem/pacem-core/dist/browser/pacem-core.min.js"></script>
|
|
37
|
+
|
|
38
|
+
<pacem-data id="v0" model="4"></pacem-data>
|
|
39
|
+
<pacem-if match="{{ #v0.model % 2 === 0 }}">
|
|
40
|
+
<pacem-text text="{{ #v0.model + ' is even.' }}"></pacem-text>
|
|
41
|
+
</pacem-if>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### TypeScript
|
|
45
|
+
|
|
46
|
+
Typings ship in `typings/index.d.ts` and are resolved automatically via the package's `exports` field — both for the ES module import style and for the ambient `Pacem` global used by the plain `<script>` include above.
|
|
47
|
+
|
|
48
|
+
## Custom elements
|
|
49
|
+
|
|
50
|
+
~40 elements, covering proxies, animations, behaviors, and data-binding primitives — see [`@pacem/pacem`](https://www.npmjs.com/package/@pacem/pacem)'s `dist/vscode.html-custom.json` for the full, up-to-date list with attributes and editor IntelliSense support.
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
[Apache-2.0](https://github.com/pacem-it/pacem/blob/main/LICENSE) © [Pacem](https://pacem.it)
|
package/dist/esm/adapter.js
CHANGED
package/dist/esm/command.js
CHANGED
package/dist/esm/comparers.js
CHANGED
package/dist/esm/converters.js
CHANGED
package/dist/esm/decorators.js
CHANGED
package/dist/esm/defaults.js
CHANGED
package/dist/esm/events.js
CHANGED
package/dist/esm/eventtarget.js
CHANGED
package/dist/esm/expression.js
CHANGED
package/dist/esm/index-iife.js
CHANGED
package/dist/esm/index-net.js
CHANGED
package/dist/esm/index-root.js
CHANGED
package/dist/esm/index-ui.js
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/logger.js
CHANGED
package/dist/esm/prefix.js
CHANGED
package/dist/esm/promise.js
CHANGED
package/dist/esm/regex.js
CHANGED
package/dist/esm/storage.js
CHANGED
package/dist/esm/template.js
CHANGED
package/dist/esm/transforms.js
CHANGED
package/dist/esm/types.js
CHANGED
package/dist/esm/utils.js
CHANGED