mosaic 1.0.16 → 1.0.18

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 (3) hide show
  1. package/package.json +6 -3
  2. package/DESIGN.md +0 -19
  3. package/SCRATCH.md +0 -58
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mosaic",
3
3
  "type": "module",
4
- "version": "1.0.16",
4
+ "version": "1.0.18",
5
5
  "description": "",
6
6
  "main": "src/index.js",
7
7
  "scripts": {
@@ -20,6 +20,9 @@
20
20
  "nodemon": "^2.0.20"
21
21
  },
22
22
  "bin": {
23
- "mosaic": "node src/index.js"
24
- }
23
+ "mosaic": "./src/index.js"
24
+ },
25
+ "files": [
26
+ "src/"
27
+ ]
25
28
  }
package/DESIGN.md DELETED
@@ -1,19 +0,0 @@
1
- # Design
2
-
3
- two types of components.
4
-
5
- those without js factory will not be defined but styles still loaded in the same way.
6
-
7
- this allows you to define components effectively as HTML/CSS partials whilst still using bindings from the root component, because you don't necessarily want everything to expose a public api down the tree, sometimes you just want to break things up a bit.
8
-
9
- ## component loading
10
-
11
- each folder has - an index.js which return the factory as default export - an index.html which has the template - (optional) and index.css file that contains component-specific styles
12
-
13
- we want...something like an entry module which will return { js, html, css } or { factory, template, styles } that we can then import mosaic once and define each component
14
-
15
- we can easily serve an entry module over an api endpoint for dev, but these entry modules also need to be written to disk as part of the build.
16
-
17
- possible approaches...
18
-
19
- 1. script that enumerates the components, loading the source code via the api endpoint, and then saves to disk. yea, why not.
package/SCRATCH.md DELETED
@@ -1,58 +0,0 @@
1
- ## By Feature
2
-
3
- - declarative data and event binding
4
-
5
- - functional state management
6
-
7
- - highly predictable and testable
8
- - integrated into the component model so that the same solution used for managing the state of a single component can also be used as a central "state container" for a larger tree of components
9
- - components can broadcast actions publicly or privately, making light work of component intercoms
10
-
11
- - Simple yet powerful CLI
12
-
13
- - build components and pages with plain .html, .css, and .js files
14
-
15
- - separation of concerns
16
-
17
- - declarative / logic-less templates
18
-
19
- - no javascript knowledge required to work on the template
20
- - can be expressed in pure HTML / no compiler necessary
21
-
22
- - sensible constraints
23
-
24
- ## By Goal
25
-
26
- > one of the nice qualities of the Mosaic framework design is that everything can be expressed using standard HTML, CSS, and JS without requiring any compilation or transpilation. of course, you can still use a transpiler if you specifically _want_ to use js that isn't part of the language yet, but it isn't required in any way.
27
-
28
- - The CLI allows you to get even closer to the metal by writing your components in plain .html, .css, and .js
29
-
30
- components/
31
- app/
32
- index.html
33
- index.css
34
- index.js
35
- header/
36
- index.html
37
- index.css
38
- index.js
39
- footer/
40
- index.html
41
- index.css
42
- index.js
43
-
44
- the CLI simply generates an entry module that defines a Mosaic component from the raw html, css, and js files.
45
-
46
- - With the CLI, components can be _active_ (control their own state) or _passive_ (have no state of their own). Think of Passive components like HTML includes, because sometimes you just want to reuse chunks of HTML and/or CSS without having to wire tens to hundreds of components together with props. When the CLI sees a component that has no .js file, it assumes this to be a _passive_ component and simply rolls it into the component that included it. the child and parent share the same scope meaning that all data values available in the parent are also available in the child without any prop wiring required.
47
-
48
- components/
49
- app/
50
- index.html
51
- index.css
52
- index.js
53
- header/
54
- index.html
55
- index.css
56
- footer/
57
- index.html
58
- index.css