@symbo.ls/preview 0.0.18 → 0.0.20

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/package.json CHANGED
@@ -2,18 +2,15 @@
2
2
  "name": "@symbo.ls/preview",
3
3
  "description": "",
4
4
  "author": "",
5
- "version": "0.0.18",
5
+ "version": "0.0.20",
6
6
  "repository": "https://github.com/rackai/editor",
7
7
  "main": "src/index.js",
8
8
  "scripts": {
9
- "map:copy": "mkdir dist && find dist/ \\( -name \"*.map\" \\) -exec cp {} ./map.json \\;",
10
9
  "link:all": "yarn link smbls domql css-in-props @symbo.ls/icons @symbo.ls/config @symbo.ls/components @symbo.ls/scratch @symbo.ls/playground @symbo.ls/utils @symbo.ls/init @symbo.ls/config-default @domql/router @domql/utils @domql/router",
11
10
  "prestart": "rm -rf .cache dist",
12
11
  "start": "parcel src/dev.html --port 1200 --no-cache",
13
- "start:protected": "npm run prestart && parcel index.html",
14
- "prebuild": "rm -rf dist",
15
- "build": "parcel build index.html",
16
- "build:protected": "parcel build index.html --no-source-maps --no-content-hash",
12
+ "prebuild": "rm -rf .cache dist",
13
+ "build": "parcel build src/dev.html",
17
14
  "reinstall": "rm -rf node_modules/@symbo.ls node_modules/@domql node_modules/domql node_modules/smbls dist yarn.lock .cache && yarn"
18
15
  },
19
16
  "targets": {
@@ -31,7 +28,7 @@
31
28
  "@symbo.ls/init": "latest",
32
29
  "@symbo.ls/scratch": "latest",
33
30
  "@symbo.ls/utils": "latest",
34
- "domql": "^1.5.0"
31
+ "domql": "^1.5.7"
35
32
  },
36
33
  "devDependencies": {
37
34
  "@babel/core": "^7.11.5",
package/index.html DELETED
@@ -1,22 +0,0 @@
1
- <html background="#000">
2
- <head>
3
- <title>Symbols Editor</title>
4
- <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
5
- <meta name="apple-mobile-web-app-capable" content="yes">
6
-
7
- <meta charset="UTF-8">
8
-
9
- <meta name="author" content="SymbolsApp">
10
- <meta name="keywords" content="UIkit, Design System, Platform, Javascript, CSS, Less, Sass, Component, React, Angular, Vue, Svelte, HTML, Haml, Jade, Bootstrap, Semantic UI, Material, ">
11
- <meta name="description" content="Introducing a highly customizable UI kit to decorate your app from scratch. Our space shares all the tools and supplies to design desired components. ">
12
-
13
- <meta name="apple-mobile-web-app-title" content="Symbols">
14
- <meta name="apple-mobile-web-app-capable" content="yes">
15
- <meta name="apple-mobile-web-app-status-bar-style" content="default">
16
-
17
- <link rel="manifest" href="./app.webmanifest" crossorigin="use-credentials">
18
- </head>
19
- <body>
20
- <script src="./protect-pwd.js"></script>
21
- </body>
22
- </html>
package/protect-pwd.js DELETED
@@ -1,65 +0,0 @@
1
- 'use strict'
2
-
3
- import './src/config'
4
-
5
- import DOM from 'domql'
6
- import App from './src/app'
7
- import { getCookie, setCookie } from 'domql/packages/cookie'
8
-
9
- const KEY = '9EC6CB2A5122F61B0A5E4211B6C1F8E5F3708E0276DA2F23159AE7987EE74298'
10
- const KEY2 = 'F6CC5B085B61387AC2C125BD1289137D02BC58A07AF9A766FA0DE45E0E5066F8'
11
-
12
- async function sha256 (message) {
13
- const msgBuffer = new TextEncoder('utf-8').encode(message)
14
- const hashBuffer = await window.crypto.subtle.digest('SHA-256', msgBuffer)
15
- const hashArray = Array.from(new Uint8Array(hashBuffer))
16
- const hashHex = hashArray.map(b => ('00' + b.toString(16)).slice(-2)).join('')
17
- return hashHex
18
- }
19
-
20
- const protect = {
21
- style: {
22
- position: 'absolute',
23
- left: '50%',
24
- top: '50%',
25
- width: '45%',
26
- minWidth: 300,
27
- transform: 'translate3d(-50%, -50%, 1px)',
28
- fontSize: 18,
29
- color: 'black',
30
- background: 'white',
31
- padding: 26
32
- },
33
-
34
- label: {
35
- tag: 'label',
36
- div: 'Password Protected',
37
- input: {
38
- tag: 'input',
39
- attr: { type: 'password', autofocus: true },
40
- style: {
41
- padding: 10,
42
- marginTop: 10,
43
- width: '100%'
44
- },
45
- on: {
46
- keyup: (event, element) => {
47
- var { node } = element
48
- var { value } = node
49
- sha256(value).then(hash => {
50
- var passph = hash.toUpperCase()
51
- if (passph === KEY || passph === KEY2) {
52
- setCookie('hash', passph, 3)
53
- protect.remove()
54
- DOM.create(App)
55
- }
56
- })
57
- }
58
- }
59
- }
60
- }
61
- }
62
-
63
- const hash = getCookie('hash')
64
- if (hash === KEY || hash === KEY2) DOM.create(App)
65
- else DOM.create(protect)