mashlib 1.7.22-d2585911 → 1.7.22-e4fa1929
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 +19 -19
- package/dist/mashlib.js +2 -2
- package/dist/mashlib.js.map +1 -1
- package/dist/mashlib.min.js +1 -1
- package/dist/mashlib.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Check out [SolidOS Pod](https://solidos.solidcommunity.net/Team/docs/solidos.htm
|
|
|
39
39
|
|
|
40
40
|
# Documentation
|
|
41
41
|
|
|
42
|
-
## Different
|
|
42
|
+
## Different implemnetations
|
|
43
43
|
|
|
44
44
|
### SolidOS Databrowser Webapp
|
|
45
45
|
|
|
@@ -47,13 +47,13 @@ The `static/browse.html` page is compiled one to one into the `dist` (output) fo
|
|
|
47
47
|
|
|
48
48
|
You can see and try out a SolidOS Databrowser Webapp deployment at <https://solid.github.io/mashlib/dist/browse.html>.
|
|
49
49
|
|
|
50
|
-
`browse.html`serves as a perfect example for Solid WebID authentication and for making use of mashlib functions and variables.
|
|
50
|
+
`browse.html`serves as a perfect example for Solid WebID authentication and for making use of mashlib functions and variables.
|
|
51
51
|
|
|
52
52
|
### SolidOS Databrowser Frontend
|
|
53
53
|
|
|
54
|
-
The `src/databrowser.html`page is compiled into the SolidOS Databrowser Frontend which is displayed for each WebID on [solidcommunity.net](https://solidcommunity.net/). This is the case because the [solidcommunity.net](https://solidcommunity.net/) Solid Server is configured with SolidOS as its
|
|
54
|
+
The `src/databrowser.html`page is compiled into the SolidOS Databrowser Frontend which is displayed for each WebID on [solidcommunity.net](https://solidcommunity.net/). This is the case because the [solidcommunity.net](https://solidcommunity.net/) Solid Server is configured with SolidOS as its front-end.
|
|
55
55
|
|
|
56
|
-
More information about the SolidOS
|
|
56
|
+
More information about the SolidOS Front-end and how to use it visit the [User Guide](https://github.com/solid/userguide).
|
|
57
57
|
|
|
58
58
|
### SolidOS Data-Kitchen
|
|
59
59
|
|
|
@@ -61,29 +61,29 @@ SolidOS Data-Kitchen uses `mashlib.js`as a direct import in its source code. Vis
|
|
|
61
61
|
|
|
62
62
|
## Mashlib global variables and funtions
|
|
63
63
|
|
|
64
|
-
If one wants to use mashlib as a direct import (as a package dependency or script import) one needs to know how they
|
|
64
|
+
If one wants to use mashlib as a direct import (as a package dependency or script import), one needs to know how they make global variables and functions available.
|
|
65
65
|
|
|
66
|
-
The availability of these global variables depends on how the sub-modules are imported and exported
|
|
66
|
+
The availability of these global variables depends on how the sub-modules are imported and exported and on where the variables are instantiated. For a basic theoretical read, please see [this resource](https://www.javatpoint.com/javascript-global-variable).
|
|
67
67
|
|
|
68
|
-
What does `global` mean in mashlib? We mean the `global object` which depends on different environments. In mashlib, for now, we use the `window`context which means these variables will not work in non-window contexts such as Node.js environments
|
|
68
|
+
What does `global` mean in mashlib? We mean the `global object` which depends on different environments. In mashlib, for now, we use the `window` context which means these variables will not work if directly used in non-window contexts such as `Node.js` environments. (This does not mean you cannot use mashlib in `Node.js` environments; just import it through `npm`). At some point, we will switch this to the [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis).
|
|
69
69
|
|
|
70
|
-
Next we list the most important window context/global variables and which sub-repos are
|
|
70
|
+
Next we list the most important window context/global variables and which sub-repos they are exported from:
|
|
71
71
|
|
|
72
|
-
- [**solid-logic**](https://github.com/solid/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L29) exports among others: solidLogicSingleton, authn, authSession, store, chat, profile
|
|
73
|
-
- [**pane-registry**](https://github.com/solid/pane-registry) is exported entirely through the pane-registry variable
|
|
74
|
-
- [**solid-ui**](https://github.com/solid/solid-ui/blob/c5a8888d6cb61363bc0445be007e3c96de593338/src/index.ts#L79) exports among others: authn, store, rdf, dom under the UI variable
|
|
75
|
-
- [**solid-panes**](https://github.com/solid/solid-panes/blob/033f48f8987364cb131455b13e8b0637da95a5ab/src/index.ts#L53) exports getOutliner and the entire solid-ui through the UI variable, and solid-panes itself can be used through the `panes` variable
|
|
72
|
+
- [**solid-logic**](https://github.com/solid/solid-logic/blob/f606b31382a416ee6188930c3ca05cb4ae73cbda/src/index.ts#L29) exports among others: solidLogicSingleton, authn, authSession, store, chat, profile
|
|
73
|
+
- [**pane-registry**](https://github.com/solid/pane-registry) is exported entirely through the pane-registry variable
|
|
74
|
+
- [**solid-ui**](https://github.com/solid/solid-ui/blob/c5a8888d6cb61363bc0445be007e3c96de593338/src/index.ts#L79) exports among others: authn, store, rdf, dom under the UI variable
|
|
75
|
+
- [**solid-panes**](https://github.com/solid/solid-panes/blob/033f48f8987364cb131455b13e8b0637da95a5ab/src/index.ts#L53) exports getOutliner and the entire solid-ui through the UI variable, and solid-panes itself can be used through the `panes` variable
|
|
76
76
|
|
|
77
77
|
For backward compatibility reasons, there are now different ways to make use of the same variables from mashlib. For example:
|
|
78
78
|
|
|
79
|
-
- to make use of the UI (solid-ui) one can use `UI` or `panes.UI
|
|
80
|
-
- authentication session, part of solid-logic, can be called as `authSession` or `UI.authn.authSession` or `panes.UI.authn.authSession
|
|
81
|
-
- the store (from solid-logic) can be used as `store` or `UI.store` or `panes.UI.store
|
|
79
|
+
- to make use of the UI (solid-ui) one can use `UI` or `panes.UI`
|
|
80
|
+
- authentication session, part of solid-logic, can be called as `authSession` or `UI.authn.authSession` or `panes.UI.authn.authSession`
|
|
81
|
+
- the store (from solid-logic) can be used as `store` or `UI.store` or `panes.UI.store`
|
|
82
82
|
- rdflib is entirely acessible as `UI.rdf` or `panes.UI.rdf`
|
|
83
83
|
- the currentUser function is called as `authn.currentUser()` or `UI.auth.currentUser()` or `panes.UI.authn.currentUser()`
|
|
84
|
-
-
|
|
84
|
+
- to make use of the login pop-up, one needs to call the `UI.login.loginStatusBox` function
|
|
85
85
|
|
|
86
|
-
You can see
|
|
86
|
+
You can see example usage in the [SolidOS Databrowser Webapp code](https://github.com/solid/mashlib/blob/main/static/browse.html#L11).
|
|
87
87
|
|
|
88
88
|
## The databrowser hack: upgrading your browser
|
|
89
89
|
|
|
@@ -99,6 +99,6 @@ How does the data browser work?
|
|
|
99
99
|
1. The server supplies the actual data of the to-do list or whatever it was.
|
|
100
100
|
1. The `mashlib.js` code provides an editable visualization on the data.
|
|
101
101
|
|
|
102
|
-
The mashlib part of SolidOS Databrowser Frontend is *read-write
|
|
102
|
+
The mashlib part of SolidOS Databrowser Frontend is *read-write;* that is, the user is allowed to edit data and create new things. It is *live,* in that often the databrowser subscribed (using a websocket) for any changes which other users make, so users' screens are synchronized.
|
|
103
103
|
|
|
104
|
-
A major limitation of
|
|
104
|
+
A major limitation of this data browser hack is that current web browsers are made to distrust any code loaded from one domain that uses data from another domain. This makes it hard, strangely complicated, and sometimes impossible to do some things.
|
package/dist/mashlib.js
CHANGED
|
@@ -149178,8 +149178,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
149178
149178
|
"use strict";
|
|
149179
149179
|
__webpack_require__.r(__webpack_exports__);
|
|
149180
149180
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
149181
|
-
buildTime: '2022-03-
|
|
149182
|
-
commit: '
|
|
149181
|
+
buildTime: '2022-03-03T14:17:26Z',
|
|
149182
|
+
commit: 'e4fa19299cff5bae6f65eced0de8e6bc9d4d4907',
|
|
149183
149183
|
npmInfo: {
|
|
149184
149184
|
mashlib: '1.7.22',
|
|
149185
149185
|
npm: '6.14.16',
|