cotomy 0.4.6 → 1.0.0
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 +4 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
**Cotomy** is a lightweight framework for managing form behavior and page controllers in web applications.
|
|
7
7
|
It is suitable for both SPAs (Single Page Applications) and traditional web apps requiring dynamic form operations.
|
|
8
8
|
|
|
9
|
-
⚠️ **Warning**: This project is in early development. APIs may change without notice until version 1.0.0.
|
|
10
|
-
|
|
11
|
-
|
|
12
9
|
To install Cotomy in your project, run the following command:
|
|
13
10
|
|
|
14
11
|
```bash
|
|
@@ -18,7 +15,8 @@ npm i cotomy
|
|
|
18
15
|
## Usage
|
|
19
16
|
|
|
20
17
|
Cotomy will continue to expand with more detailed usage instructions and code examples added to the README in the future.
|
|
21
|
-
For the latest updates, please check the official documentation or repository regularly.
|
|
18
|
+
For the latest updates, please check the official documentation or repository regularly.
|
|
19
|
+
Reference: https://cotomy.net/
|
|
22
20
|
|
|
23
21
|
## View Reference
|
|
24
22
|
|
|
@@ -38,8 +36,7 @@ The View layer provides thin wrappers around DOM elements and window events.
|
|
|
38
36
|
- Scoped CSS
|
|
39
37
|
- `scopeId: string` - Returns the value stored in the element's `data-cotomy-scopeid` attribute
|
|
40
38
|
- `[root]` placeholder in provided CSS is replaced by `[data-cotomy-scopeid="..."]`
|
|
41
|
-
- `[
|
|
42
|
-
- If neither `[root]` nor `[scope]` is present, `[root]` is treated as if it were prefixed automatically
|
|
39
|
+
- If no `[root]` is present, `[root]` is treated as if it were prefixed automatically
|
|
43
40
|
- Scoped CSS text is kept on the instance; if the `<style id="css-${scopeId}">` is missing when the element is attached, it will be re-generated automatically
|
|
44
41
|
- `stylable: boolean` - False for tags like `script`, `style`, `link`, `meta`
|
|
45
42
|
- Static helpers
|
|
@@ -146,7 +143,7 @@ npm test -- --run tests/view.spec.ts -t "throws when cloning an invalidated elem
|
|
|
146
143
|
npm test -- --run tests/view.spec.ts -t "compares document order with comesBefore/comesAfter"
|
|
147
144
|
```
|
|
148
145
|
|
|
149
|
-
普段は `npm test` で全体を実行できます。上記のコマンドでは `[root]
|
|
146
|
+
普段は `npm test` で全体を実行できます。上記のコマンドでは `[root]` 展開、スコープID共有のクローン挙動、インスタンス単位のイベント隔離、クローン後のスコープCSS再生成、移動フラグの除去、無効化要素のクローン拒否、DOM順序判定などをピンポイントで確認できます。
|
|
150
147
|
|
|
151
148
|
### CotomyMetaElement
|
|
152
149
|
|