@cocreate/state 1.18.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.
@@ -0,0 +1,97 @@
1
+ # Contributing to CoCreate-pass
2
+
3
+ This project is work of [many contributors](https://github.com/CoCreate-app/CoCreate-pass/graphs/contributors).
4
+ You're encouraged to submit [pull requests](https://github.com/CoCreate-app/CoCreate-pass/pulls),
5
+ [propose features and discuss issues](https://github.com/CoCreate-app/CoCreate-pass/issues).
6
+
7
+ In the examples below, substitute your Github username for `contributor` in URLs.
8
+
9
+ ## Fork the Project
10
+
11
+ Fork the [project on Github](https://github.com/CoCreate-app/CoCreate-pass) and check out your copy.
12
+
13
+ ```
14
+ git pass https://github.com/contributor/CoCreate-pass.git
15
+ cd CoCreate-pass
16
+ git remote add upstream https://github.com/CoCreate-app/CoCreate-pass.git
17
+ ```
18
+
19
+ ## Create a Topic Branch
20
+
21
+ Make sure your fork is up-to-date and create a topic branch for your feature or bug fix on dev branch.
22
+
23
+ ```
24
+ git checkout dev
25
+ git pull upstream dev
26
+ git checkout -b my-feature-branch
27
+ ```
28
+
29
+ ## Write Tests
30
+
31
+ Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build.
32
+
33
+ We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
34
+
35
+ ## Write Code
36
+
37
+ Implement your feature or bug fix.
38
+
39
+ ## Write Documentation
40
+
41
+ Document any external behavior in the [README](README.md).
42
+
43
+ ## Commit Changes
44
+
45
+ Make sure git knows your name and email address:
46
+
47
+ ```
48
+ git config --global user.name "Your Name"
49
+ git config --global user.email "contributor@example.com"
50
+ ```
51
+
52
+ We use [semantic-release](https://github.com/semantic-release/semantic-release) as process to generate changelog
53
+ and to release. Write meaningful commits according to
54
+ [Commit Message Formats](https://github.com/semantic-release/semantic-release#commit-message-format) is important.
55
+
56
+ ```
57
+ git add ...
58
+ git commit -am "commit-type(optional topic): a meaningful message"
59
+ ```
60
+
61
+ Here is an example of the release type that should be done based on a [semantic-release](https://github.com/semantic-release/semantic-release):
62
+
63
+ | Commit message | Release type |
64
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
65
+ | `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
66
+ | `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
67
+ | `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
68
+
69
+
70
+ ## Push
71
+
72
+ ```
73
+ git push origin my-feature-branch
74
+ ```
75
+
76
+ ## Make a Pull Request
77
+
78
+ Go to [https://github.com/CoCreate-app/CoCreate-pass](https://github.com/CoCreate-app/CoCreate-pass) and select your feature branch.
79
+ Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
80
+
81
+ ## Rebase
82
+
83
+ If you've been working on a change for a while, rebase with upstream/dev.
84
+
85
+ ```
86
+ git fetch upstream
87
+ git rebase upstream/dev
88
+ git push origin my-feature-branch -f
89
+ ```
90
+
91
+ ## Be Patient
92
+
93
+ It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang in there!
94
+
95
+ ## Thank You
96
+
97
+ Please do know that we really appreciate and value your time and work. We love you, really.
@@ -0,0 +1,23 @@
1
+ module.exports = {
2
+ "organization_id": "",
3
+ "key": "",
4
+ "host": "",
5
+ "sources": [
6
+ {
7
+ "array": "files",
8
+ "object": {
9
+ "_id": "602069863c260207bf49cab2",
10
+ "name": "index.html",
11
+ "path": "/docs/state",
12
+ "pathname": "/docs/state/index.html",
13
+ "src": "{{./docs/index.html}}",
14
+ "host": [
15
+ "*"
16
+ ],
17
+ "directory": "state",
18
+ "content-type": "{{content-type}}",
19
+ "public": "true"
20
+ }
21
+ }
22
+ ]
23
+ };
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 CoCreate LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # CoCreate-pass
2
+
3
+ Data attributes which can be used for components in CoCreate framework combined as a group of attributes that dynamically change attributes & fetch custom data. Take it for a spin in our [playground!](https://cocreate.app/docs/pass)
4
+
5
+ ![minified](https://img.badgesize.io/https://cdn.cocreate.app/pass/latest/CoCreate-pass.min.js?style=flat-square&label=minified&color=orange)
6
+ ![gzip](https://img.badgesize.io/https://cdn.cocreate.app/pass/latest/CoCreate-pass.min.js?compression=gzip&style=flat-square&label=gzip&color=yellow)
7
+ ![brotli](https://img.badgesize.io/https://cdn.cocreate.app/pass/latest/CoCreate-pass.min.js?compression=brotli&style=flat-square&label=brotli)
8
+ ![GitHub latest release](https://img.shields.io/github/v/release/CoCreate-app/CoCreate-pass?style=flat-square)
9
+ ![License](https://img.shields.io/github/license/CoCreate-app/CoCreate-pass?style=flat-square)
10
+ ![Hiring](https://img.shields.io/static/v1?style=flat-square&label=&message=Hiring&color=blueviolet)
11
+
12
+ ![CoCreate-pass](https://cdn.cocreate.app/docs/CoCreate-pass.gif)
13
+
14
+ ## [Docs & Demo](https://cocreate.app/docs/pass)
15
+
16
+ For a complete guide and working demo refer to the [doumentation](https://cocreate.app/docs/pass)
17
+
18
+ ## CDN
19
+
20
+ ```html
21
+ <script src="https://cdn.cocreate.app/pass/latest/CoCreate-pass.min.js"></script>
22
+ ```
23
+
24
+ ```html
25
+ <script src="https://cdn.cocreate.app/pass/latest/CoCreate-pass.min.css"></script>
26
+ ```
27
+
28
+ ## NPM
29
+
30
+ ```shell
31
+ $ npm i @cocreate/pass
32
+ ```
33
+
34
+ ## yarn
35
+
36
+ ```shell
37
+ $ yarn install @cocreate/pass
38
+ ```
39
+
40
+ # Table of Contents
41
+
42
+ - [Table of Contents](#table-of-contents)
43
+ - [Announcements](#announcements)
44
+ - [Roadmap](#roadmap)
45
+ - [How to Contribute](#how-to-contribute)
46
+ - [About](#about)
47
+ - [License](#license)
48
+
49
+ <a name="announcements"></a>
50
+
51
+ # Announcements
52
+
53
+ All updates to this library are documented in our [CHANGELOG](https://github.com/CoCreate-app/CoCreate-pass/blob/master/CHANGELOG.md) and [releases](https://github.com/CoCreate-app/CoCreate-pass/releases). You may also subscribe to email for releases and breaking changes.
54
+
55
+ <a name="roadmap"></a>
56
+
57
+ # Roadmap
58
+
59
+ If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/CoCreate-app/CoCreate-pass/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-pass/pulls). We would love to hear your feedback.
60
+
61
+ <a name="about"></a>
62
+
63
+ # About
64
+
65
+ CoCreate-pass is guided and supported by the CoCreate Developer Experience Team.
66
+
67
+ Please Email the Developer Experience Team [here](mailto:develop@cocreate.app) in case of any queries.
68
+
69
+ CoCreate-pass is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.
70
+
71
+ <a name="contribute"></a>
72
+
73
+ # How to Contribute
74
+
75
+ We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreate-app/CoCreate-pass/blob/master/CONTRIBUTING.md) guide for details.
76
+
77
+ We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/CoCreate-app/CoCreate-pass/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-pass/pulls) or merely upvote or comment on existing issues or pull requests.
78
+
79
+ We appreciate your continued support, thank you!
80
+
81
+
82
+ <a name="license"></a>
83
+ # License
84
+
85
+ [The MIT License (MIT)](https://github.com/CoCreate-app/CoCreate-pass/blob/master/LICENSE)
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>State | CoCreateJS</title>
5
+ <link
6
+ rel="icon"
7
+ type="image/png"
8
+ sizes="32x32"
9
+ href="../assets/favicon.ico" />
10
+ <link rel="manifest" href="/manifest.webmanifest" />
11
+ </head>
12
+ <body style="padding: 20px">
13
+ <button>
14
+ <a
15
+ actions="state"
16
+ state-value="something from other db"
17
+ state_to="testing">
18
+ state value
19
+ </a>
20
+ </button>
21
+
22
+ <!--<script src="../dist/CoCreate-state.js"></script>-->
23
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,188 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>state | CoCreateJS</title>
5
+
6
+ <!-- CoCreate Favicon -->
7
+ <link
8
+ rel="icon"
9
+ type="image/png"
10
+ sizes="32x32"
11
+ href="../assets/favicon.ico" />
12
+ <!-- CoCreate CSS CDN -->
13
+ <link
14
+ rel="stylesheet"
15
+ href="https://cdn.cocreate.app/state/latest/CoCreate-state.min.css"
16
+ type="text/css" />
17
+ <link rel="manifest" href="/manifest.webmanifest" />
18
+ </head>
19
+ <body style="padding: 20px">
20
+ <!-- windows -->
21
+ <button
22
+ actions="state, openModal"
23
+ modal-src="./documentation"
24
+ state-array="modules"
25
+ state-object=""
26
+ state_to="me1234"
27
+ modal-width="600px"
28
+ modal-height="100%"
29
+ modal-color="#333">
30
+ Window test.1
31
+ </button>
32
+ <button
33
+ actions="state, openModal"
34
+ modal-src="render.html"
35
+ state-array="module_activity"
36
+ state-object="5cd910dd30f02f16b3385821"
37
+ state_to="me1234"
38
+ modal-height="100%"
39
+ modal-color="red"
40
+ modal-x="20"
41
+ modal-y="40">
42
+ Window test.2
43
+ </button>
44
+ <!--Page-->
45
+ <button>
46
+ <a
47
+ href="render.html"
48
+ target=""
49
+ state-array="module_activity"
50
+ state-object="5d8aa1cfa37aee309596d6c6"
51
+ state_to="me1234"
52
+ >Page test.1.html
53
+ <div
54
+ state_to="me12345"
55
+ state-array="modules"
56
+ state-object="5d8aa2fca37aee309596d6c8"></div>
57
+ </a>
58
+ </button>
59
+ ----
60
+ <button>
61
+ <a
62
+ href="CoCreate-kanban/simple-test.html"
63
+ state-array="module_activity"
64
+ state-key="stage"
65
+ state_to="stage"
66
+ >Fetch name</a
67
+ >
68
+ </button>
69
+
70
+ <button>
71
+ <a
72
+ href="CoCreate-kanban/kanban.html"
73
+ state-array="module_activity"
74
+ state-filter-value="5e6d79f9d8cdbe53927a0443"
75
+ state-filter-key
76
+ state_to="fetch_value"
77
+ >Simple Test</a
78
+ >
79
+ </button>
80
+
81
+ <button>
82
+ <a
83
+ href="https://server.cocreate.app/CoCreate-attributes/CoCreate-attibutes.html"
84
+ target="_blank"
85
+ state-array="modules"
86
+ state-object="5ebc16fc8917bc59483a7e3b"
87
+ state_to="1234"
88
+ >empty target</a
89
+ >
90
+ </button>
91
+
92
+ <button>
93
+ <a
94
+ href="CoCreate-attributes/CoCreate-attibutes.html"
95
+ actions="01, 02"
96
+ target="_blank"
97
+ state-array="modules"
98
+ state-object="5ebc16fc8917bc59483a7e3b"
99
+ state_to="1234"
100
+ >_blank</a
101
+ >
102
+ </button>
103
+ <button>
104
+ <a
105
+ href="CoCreate-attributes/CoCreate-attibutes.html"
106
+ target="_blank"
107
+ state-array="modules"
108
+ state-object="5d8aa2fca37aee309596d6c8"
109
+ state_to="1234"
110
+ >_window</a
111
+ >
112
+ </button>
113
+ <button>
114
+ <a
115
+ href="target.html"
116
+ target="_self"
117
+ state-array="modules"
118
+ state-object="5d8aa2fca37aee309596d6c8"
119
+ state_to="me1234"
120
+ >_self</a
121
+ >
122
+ </button>
123
+ ----
124
+ <button>
125
+ <a
126
+ href="html_block.html"
127
+ state-array="modules"
128
+ state-object="5cf995e8ac959a2bd93356fb"
129
+ state_to="me1234"
130
+ >Page HTML BLOCK</a
131
+ >
132
+ </button>
133
+ <button>
134
+ <a
135
+ actions="state, openModal"
136
+ modal-src="html_block.html"
137
+ state-array="modules"
138
+ state-object="5cf995e8ac959a2bd93356fb"
139
+ state_to="me1234"
140
+ >Modal HTML BLOCK</a
141
+ >
142
+ </button>
143
+
144
+ <button>
145
+ <a
146
+ href="CoCreate-builder/index.html"
147
+ state-array="test1_array"
148
+ state_to="me1234"
149
+ >test page builder.html</a
150
+ >
151
+ </button>
152
+ <button>
153
+ <a
154
+ actions="state, openModal"
155
+ modal-src="builder.html"
156
+ state-array="modules"
157
+ state-object="5cf995e8ac959a2bd93356fb"
158
+ state_to="me1234"
159
+ >modal builder.html</a
160
+ >
161
+ </button>
162
+
163
+ <button>
164
+ <a
165
+ actions="state, openModal"
166
+ modal-src="module_datatable.html"
167
+ state-array="modules"
168
+ state-object="5cf995e8ac959a2bd93356fb"
169
+ state_to="me1234"
170
+ >modal datatable</a
171
+ >
172
+ </button>
173
+
174
+ <button>
175
+ <a
176
+ actions="state, openModal"
177
+ modal-src="index.html"
178
+ state_to="me1234"
179
+ >index.html</a
180
+ >
181
+ </button>
182
+
183
+ <div id="modal-viewport"></div>
184
+
185
+ <!--<script src="../dist/CoCreate-state.js"></script>-->
186
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
187
+ </body>
188
+ </html>
@@ -0,0 +1,49 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>State prefix | CoCreateJS</title>
5
+
6
+ <!-- CoCreate Favicon -->
7
+ <link
8
+ rel="icon"
9
+ type="image/png"
10
+ sizes="32x32"
11
+ href="../assets/favicon.ico" />
12
+ <!-- CoCreate CSS CDN -->
13
+ <link
14
+ rel="stylesheet"
15
+ href="https://cdn.cocreate.app/state/latest/CoCreate-state.min.css"
16
+ type="text/css" />
17
+ <link rel="manifest" href="/manifest.webmanifest" />
18
+ </head>
19
+ <body>
20
+ <!-- windows -->
21
+ <button>
22
+ <a
23
+ actions="state"
24
+ state-array="modules"
25
+ state-object="123"
26
+ state_to="me1234"
27
+ >test.1</a
28
+ >
29
+ </button>
30
+ <button
31
+ actions="state"
32
+ state-array="modules"
33
+ state-object="123"
34
+ state_to="me1234">
35
+ test.1
36
+ </button>
37
+
38
+ <h1
39
+ array="module_activities"
40
+ object="5edda7608d5c7a7d656edecd"
41
+ key="name"
42
+ state_id="me1234"></h1>
43
+
44
+ <div id="modal-viewport"></div>
45
+
46
+ <!--CoCreateJS CDN-->
47
+ <script src="https://cdn.cocreate.app/state/latest/CoCreate-state.min.js"></script>
48
+ </body>
49
+ </html>
@@ -0,0 +1,49 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <body class="padding:5px">
4
+ <form
5
+ array="test"
6
+ realtime="false"
7
+ object=""
8
+ class="margin-bottom:75px">
9
+ <textarea
10
+ class="floating-label"
11
+ state_to="test1"
12
+ key="test1"
13
+ placeholder="State to test 1"></textarea>
14
+
15
+ <textarea
16
+ class="floating-label"
17
+ state_to="test2"
18
+ key="test2"
19
+ placeholder="State to Test 2"></textarea>
20
+
21
+ <button
22
+ actions="stateValue"
23
+ class="position:relative bg-blue grow-hover border-radius:50% width:40px height:40px">
24
+ <i class="far fa-save color:white"></i>
25
+ </button>
26
+ </form>
27
+
28
+ <form
29
+ array="test"
30
+ realtime="false"
31
+ object=""
32
+ class="margin-bottom:75px">
33
+ <textarea
34
+ class="floating-label"
35
+ state_id="test1"
36
+ key="test1"
37
+ placeholder="Test 2"></textarea>
38
+
39
+ <textarea
40
+ class="floating-label"
41
+ state_id="test2"
42
+ key="test2"
43
+ placeholder="Test 2"></textarea>
44
+ </form>
45
+
46
+ <!--<script src="https://CoCreate.app/dist/CoCreate.js"></script>-->
47
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
48
+ </body>
49
+ </html>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <body class="padding:5px">
4
+ <input state_id="test" state-overwrite />
5
+ <a actions="state" state-value="hello" state_to="test"
6
+ >Click to state: hello</a
7
+ >
8
+ <a actions="state" state-value="goodbye" state_to="test"
9
+ >Click to state: goodbye</a
10
+ >
11
+
12
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
13
+ </body>
14
+ </html>
@@ -0,0 +1,65 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>State Value | CoCreateJS</title>
5
+ <link
6
+ rel="icon"
7
+ type="image/png"
8
+ sizes="32x32"
9
+ href="../assets/favicon.ico" />
10
+ <link rel="manifest" href="/manifest.webmanifest" />
11
+ </head>
12
+
13
+ <body>
14
+ <div id="modal-viewport" hidden></div>
15
+
16
+ <div class="padding:10px" content_id="content">
17
+ <form
18
+ array="test"
19
+ realtime="false"
20
+ object=""
21
+ class="margin-bottom:75px">
22
+ <textarea
23
+ class="floating-label"
24
+ state-value
25
+ state_to="test1"
26
+ key="test1"
27
+ placeholder="State to test 1"></textarea>
28
+
29
+ <textarea
30
+ class="floating-label"
31
+ state-value
32
+ state_to="test2"
33
+ key="test2"
34
+ placeholder="State to Test 2"></textarea>
35
+
36
+ <button
37
+ actions="state"
38
+ class="position:relative bg-blue grow-hover border-radius:50% width:40px height:40px">
39
+ <i class="far fa-save color:white"></i>
40
+ </button>
41
+ </form>
42
+
43
+ <form
44
+ array="test"
45
+ realtime="false"
46
+ object=""
47
+ class="margin-bottom:75px">
48
+ <textarea
49
+ class="floating-label"
50
+ state_id="test1"
51
+ key="test1"
52
+ placeholder="Test 2"></textarea>
53
+
54
+ <textarea
55
+ class="floating-label"
56
+ state_id="test2"
57
+ key="test2"
58
+ placeholder="Test 2"></textarea>
59
+ </form>
60
+ </div>
61
+
62
+ <!--<script src="../dist/CoCreate-state.js"></script>-->
63
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
64
+ </body>
65
+ </html>
package/demo/test.html ADDED
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>State | CoCreateJS</title>
5
+ <link
6
+ rel="icon"
7
+ type="image/png"
8
+ sizes="32x32"
9
+ href="../assets/favicon.ico" />
10
+ <link rel="manifest" href="/manifest.webmanifest" />
11
+ </head>
12
+ <body style="padding: 20px">
13
+ <textarea state_id="testing" value></textarea>
14
+ <p state_id="testing" value></p>
15
+ <iframe src="./iframe.html"></iframe>
16
+
17
+ <!--<script src="../dist/CoCreate-state.js"></script>-->
18
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
19
+ </body>
20
+ </html>