From 1d02c2dd3a36eecefb6c18f9252b0bf5dcdb5fa0 Mon Sep 17 00:00:00 2001 From: Isaac Visintainer Date: Fri, 19 Jul 2019 15:03:54 -0700 Subject: [PATCH 1/2] removed unicode spaces --- apps/publish/src/js/components/lib/comments.js | 8 ++++---- apps/publish/src/js/components/pubs.js | 4 ++-- apps/publish/src/js/components/subs.js | 6 +++--- apps/publish/tile/tile.js | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/publish/src/js/components/lib/comments.js b/apps/publish/src/js/components/lib/comments.js index 872c034cb..b2359188f 100644 --- a/apps/publish/src/js/components/lib/comments.js +++ b/apps/publish/src/js/components/lib/comments.js @@ -72,9 +72,9 @@ export class Comments extends Component { return (

- {this.props.comments.length} + {this.props.comments.length} - Comments + Comments

@@ -97,9 +97,9 @@ export class Comments extends Component { return (

- {this.props.comments.length} + {this.props.comments.length} - Comments + Comments

diff --git a/apps/publish/src/js/components/pubs.js b/apps/publish/src/js/components/pubs.js index 082947cd9..2851c6cac 100644 --- a/apps/publish/src/js/components/pubs.js +++ b/apps/publish/src/js/components/pubs.js @@ -61,7 +61,7 @@ export class Pubs extends Component {

-  {data.title} + {data.title}

@@ -91,7 +91,7 @@ export class Pubs extends Component {

-  Title + Title

Host diff --git a/apps/publish/src/js/components/subs.js b/apps/publish/src/js/components/subs.js index 8a62df98b..cacd3949b 100644 --- a/apps/publish/src/js/components/subs.js +++ b/apps/publish/src/js/components/subs.js @@ -111,7 +111,7 @@ export class Subs extends Component {

-  {data.title} + {data.title}

@@ -135,7 +135,7 @@ export class Subs extends Component {
 •  - Invite to + Invite to {data.title} @@ -179,7 +179,7 @@ export class Subs extends Component {

-  Title + Title

Host diff --git a/apps/publish/tile/tile.js b/apps/publish/tile/tile.js index 06127da57..a7fa6b7f3 100644 --- a/apps/publish/tile/tile.js +++ b/apps/publish/tile/tile.js @@ -17,8 +17,8 @@ export default class PublishTile extends Component { : "Invites" info.push(

- {this.props.data.invites}  - {text} + {this.props.data.invites} + {text}

); } @@ -28,8 +28,8 @@ export default class PublishTile extends Component { : "New Posts" info.push(

- {this.props.data.new}  - {text} + {this.props.data.new} + {text}

); } From 45bbd36076d664e5e92e5a9b9c42f5b377eed8f0 Mon Sep 17 00:00:00 2001 From: Isaac Visintainer Date: Fri, 19 Jul 2019 15:24:04 -0700 Subject: [PATCH 2/2] fixed sigils --- apps/publish/package-lock.json | 510 ++++++------------ apps/publish/package.json | 3 +- .../src/js/components/lib/icons/sigil.js | 19 +- apps/publish/src/js/lib/object-extensions.js | 9 - apps/publish/src/js/lib/report-keys.js | 35 -- apps/publish/src/js/lib/util.js | 353 ------------ apps/publish/src/js/services.js | 43 -- apps/publish/src/js/vendor/sigils-1.2.5.js | 1 - 8 files changed, 184 insertions(+), 789 deletions(-) delete mode 100644 apps/publish/src/js/lib/object-extensions.js delete mode 100644 apps/publish/src/js/lib/report-keys.js delete mode 100644 apps/publish/src/js/lib/util.js delete mode 100644 apps/publish/src/js/services.js delete mode 100644 apps/publish/src/js/vendor/sigils-1.2.5.js diff --git a/apps/publish/package-lock.json b/apps/publish/package-lock.json index e7afd794d..87a34c201 100644 --- a/apps/publish/package-lock.json +++ b/apps/publish/package-lock.json @@ -101,7 +101,7 @@ }, "ansi-colors": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, "requires": { @@ -236,12 +236,6 @@ "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", "dev": true }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, "array-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", @@ -314,12 +308,6 @@ } } }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", @@ -483,12 +471,6 @@ } } }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", @@ -553,7 +535,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -590,7 +572,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { @@ -1027,7 +1009,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { @@ -1040,7 +1022,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { @@ -1073,7 +1055,7 @@ }, "css-color-names": { "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", "dev": true }, @@ -1261,12 +1243,6 @@ "type": "^1.0.1" } }, - "dateformat": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz", - "integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=", - "dev": true - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1289,11 +1265,30 @@ "dev": true }, "deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, + "deep-rename-keys": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/deep-rename-keys/-/deep-rename-keys-0.2.1.tgz", + "integrity": "sha1-7eeFN9emaivmFRfir5Vtf1ij8dg=", + "requires": { + "kind-of": "^3.0.2", + "rename-keys": "^1.1.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "default-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", @@ -1409,7 +1404,7 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { @@ -1463,35 +1458,6 @@ "is-obj": "^1.0.0" } }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "requires": { - "readable-stream": "~1.1.9" - }, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -1663,6 +1629,11 @@ "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", "dev": true }, + "eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha1-teEHm1n7XhuidxwKmTvgYKWMmbo=" + }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", @@ -2500,7 +2471,7 @@ "dependencies": { "readable-stream": { "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { @@ -2512,7 +2483,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true } @@ -2527,8 +2498,7 @@ "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "glob": { "version": "7.1.4", @@ -2739,25 +2709,35 @@ } }, "gulp-cssimport": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/gulp-cssimport/-/gulp-cssimport-6.0.1.tgz", - "integrity": "sha512-czRve6HMVHEFAOq+h/DUHOWixyABynQCE+EZn9v9Yp4LRYluFCfNnniALVg/G0P4aEm2EVjWdbyUYVK+n1WhmQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/gulp-cssimport/-/gulp-cssimport-7.0.0.tgz", + "integrity": "sha512-ulnmFwJTY+i6f2b5sN4ePzCotwWKx8I68rwdBu7fRtVAj6QE+X0L2mUhUoXDcDBt4LVnOYhWtFBH3ETXGxDzTg==", "dev": true, "requires": { "collect-stream": "^1.2.1", - "deep-extend": "^0.5.0", - "gulp-util": "*", + "deep-extend": "^0.6.0", "http-https": "^1.0.0", "lodash.trim": "^4.5.1", "lookup-path": "^0.3.1", - "magic-string": "^0.22.4", + "magic-string": "^0.25.1", "minimatch": "^3.0.4", "pify": "^3.0.0", + "plugin-error": "^0.1.2", "strip-bom": "^3.0.0", "through2": "^2.0.3", + "vinyl": "^2.2.0", "vinyl-sourcemaps-apply": "^0.2.1" }, "dependencies": { + "magic-string": { + "version": "0.25.3", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", + "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -2844,100 +2824,6 @@ } } }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "requires": { - "array-differ": "^1.0.0", - "array-uniq": "^1.0.2", - "beeper": "^1.0.0", - "chalk": "^1.0.0", - "dateformat": "^2.0.0", - "fancy-log": "^1.1.0", - "gulplog": "^1.0.0", - "has-gulplog": "^0.1.0", - "lodash._reescape": "^3.0.0", - "lodash._reevaluate": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.template": "^3.0.0", - "minimist": "^1.1.0", - "multipipe": "^0.1.2", - "object-assign": "^3.0.0", - "replace-ext": "0.0.1", - "through2": "^2.0.0", - "vinyl": "^0.5.0" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true, - "requires": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - } - } - } - }, "gulplog": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", @@ -2956,30 +2842,12 @@ "function-bind": "^1.1.1" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, "has-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", @@ -3197,7 +3065,7 @@ }, "is": { "version": "0.2.7", - "resolved": "https://registry.npmjs.org/is/-/is-0.2.7.tgz", + "resolved": "http://registry.npmjs.org/is/-/is-0.2.7.tgz", "integrity": "sha1-OzSixI81mXLzUEKEkZOucmS2NWI=", "dev": true }, @@ -3255,8 +3123,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { "version": "1.1.4", @@ -3407,7 +3274,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, "requires": { "isobject": "^3.0.1" } @@ -3501,8 +3367,7 @@ "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "js-tokens": { "version": "4.0.0", @@ -3539,7 +3404,7 @@ }, "kind-of": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", "dev": true }, @@ -3593,7 +3458,7 @@ "dependencies": { "readable-stream": { "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { @@ -3605,7 +3470,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true } @@ -3645,13 +3510,13 @@ }, "level-fix-range": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/level-fix-range/-/level-fix-range-1.0.2.tgz", "integrity": "sha1-vxW5Fa422EcMgh6IPd95zRZCCCg=", "dev": true }, "level-hooks": { "version": "4.5.0", - "resolved": "https://registry.npmjs.org/level-hooks/-/level-hooks-4.5.0.tgz", + "resolved": "http://registry.npmjs.org/level-hooks/-/level-hooks-4.5.0.tgz", "integrity": "sha1-G5rmGSKTDzMF0aYfxNg8gQLA3ZM=", "dev": true, "requires": { @@ -3703,7 +3568,7 @@ }, "level-peek": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/level-peek/-/level-peek-1.0.6.tgz", + "resolved": "http://registry.npmjs.org/level-peek/-/level-peek-1.0.6.tgz", "integrity": "sha1-vsUccqgu5GTTNkNMfIdsP8vM538=", "dev": true, "requires": { @@ -3712,7 +3577,7 @@ }, "level-sublevel": { "version": "5.2.3", - "resolved": "https://registry.npmjs.org/level-sublevel/-/level-sublevel-5.2.3.tgz", + "resolved": "http://registry.npmjs.org/level-sublevel/-/level-sublevel-5.2.3.tgz", "integrity": "sha1-dEwSxy0ucr543eO5tc2E1iGRQTo=", "dev": true, "requires": { @@ -3724,7 +3589,7 @@ "dependencies": { "level-fix-range": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/level-fix-range/-/level-fix-range-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/level-fix-range/-/level-fix-range-2.0.0.tgz", "integrity": "sha1-xBfWIVlEIVGhnZojZ4aPFyTC1Ug=", "dev": true, "requires": { @@ -3814,137 +3679,18 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==" }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", "dev": true }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true, - "requires": { - "lodash._root": "^3.0.0" - } - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash._basetostring": "^3.0.0", - "lodash._basevalues": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0", - "lodash.keys": "^3.0.0", - "lodash.restparam": "^3.0.0", - "lodash.templatesettings": "^3.0.0" - } - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.escape": "^3.0.0" - } - }, "lodash.trim": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/lodash.trim/-/lodash.trim-4.5.1.tgz", @@ -4019,7 +3765,7 @@ }, "magic-string": { "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", + "resolved": "http://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", "dev": true, "requires": { @@ -4234,7 +3980,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -4257,15 +4003,6 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true, - "requires": { - "duplexer2": "0.0.2" - } - }, "mute-stdout": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", @@ -4344,7 +4081,7 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, @@ -4579,6 +4316,56 @@ "integrity": "sha1-Y+cWKmjvvrniE1iNWOmJ0eXEUws=", "dev": true }, + "omit-deep": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/omit-deep/-/omit-deep-0.3.0.tgz", + "integrity": "sha1-IcivNJm8rdKWUaIyy8rLxSRF6+w=", + "requires": { + "is-plain-object": "^2.0.1", + "unset-value": "^0.1.1" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "unset-value": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-0.1.2.tgz", + "integrity": "sha1-UGgQuGfyfCpabpsEgzYx9t5Y0xA=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + } + } + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4676,7 +4463,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -4740,7 +4527,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, @@ -5160,7 +4947,7 @@ }, "pretty-hrtime": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, @@ -5455,6 +5242,11 @@ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, + "rename-keys": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/rename-keys/-/rename-keys-1.2.0.tgz", + "integrity": "sha512-U7XpAktpbSgHTRSNRrjKSrjYkZKuhUukfoBlXWXUExCAqhzh1TU3BDRAfJmarcl5voKS+pbKU9MvyLWKZ4UEEg==" + }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", @@ -5695,7 +5487,7 @@ }, "safe-regex": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { @@ -5763,7 +5555,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -6069,7 +5861,7 @@ }, "string-range": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz", + "resolved": "http://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz", "integrity": "sha1-qJPtNH5yKZvIO++78qaSqNI51d0=", "dev": true }, @@ -6095,7 +5887,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { @@ -6188,6 +5980,16 @@ "util.promisify": "~1.0.0" } }, + "svgson": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/svgson/-/svgson-4.0.0.tgz", + "integrity": "sha512-4xmo8f7IREKzSimfKLxdFmffWn8ngstS6EYC8Hqoo4twyzLxc1BETdSBz++wx8k9s8EH8hLNi+VoH+7T2pkIgw==", + "requires": { + "deep-rename-keys": "^0.2.1", + "omit-deep": "0.3.0", + "xml-reader": "2.4.3" + } + }, "terser": { "version": "3.17.0", "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz", @@ -6378,6 +6180,11 @@ "through2": "^2.0.3" } }, + "transformation-matrix": { + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/transformation-matrix/-/transformation-matrix-1.15.3.tgz", + "integrity": "sha512-ThJH58GNFKhCw3gIoOtwf3tNwuYjbyEeiGdeq4mNMYWdJctnI896KUqn6PVt7jmNVepqa1bcKQtnMB1HtjsDMA==" + }, "type": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz", @@ -6537,6 +6344,16 @@ "lodash": "^4.17.11" } }, + "urbit-sigil-js": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/urbit-sigil-js/-/urbit-sigil-js-1.3.2.tgz", + "integrity": "sha512-cYmytvhsqYFo1HQSsfsjahJ6/DOW06ZAYEPOQD/OHKfeis3veVBZNOuM5PpAskDb5n68aVq1Xhx2oKno/TZ+LQ==", + "requires": { + "react": "^16.8.6", + "svgson": "^4.0.0", + "transformation-matrix": "^1.14.0" + } + }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -6703,7 +6520,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, "requires": { @@ -6717,6 +6534,23 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, + "xml-lexer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/xml-lexer/-/xml-lexer-0.2.2.tgz", + "integrity": "sha1-UYGTpKozTVj8fSSLVJB5uJkH4EY=", + "requires": { + "eventemitter3": "^2.0.0" + } + }, + "xml-reader": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/xml-reader/-/xml-reader-2.4.3.tgz", + "integrity": "sha1-n4EMr3xCWlqvuEixxFEDyecddTA=", + "requires": { + "eventemitter3": "^2.0.0", + "xml-lexer": "^0.2.2" + } + }, "xtend": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.2.0.tgz", diff --git a/apps/publish/package.json b/apps/publish/package.json index 4f68bfe5c..59364e8f8 100644 --- a/apps/publish/package.json +++ b/apps/publish/package.json @@ -36,7 +36,8 @@ "react-custom-scrollbars": "^4.2.1", "react-dom": "^16.8.6", "react-router-dom": "^5.0.0", - "urbit-ob": "^3.1.1" + "urbit-ob": "^3.1.1", + "urbit-sigil-js": "^1.3.2" }, "resolutions": { "natives": "1.1.3" diff --git a/apps/publish/src/js/components/lib/icons/sigil.js b/apps/publish/src/js/components/lib/icons/sigil.js index d9d1ce2f8..bd5f3ca43 100644 --- a/apps/publish/src/js/components/lib/icons/sigil.js +++ b/apps/publish/src/js/components/lib/icons/sigil.js @@ -1,21 +1,22 @@ import React, { Component } from 'react'; -import { sealDict } from '/components/lib/seal-dict'; - +import { sigil, reactRenderer } from 'urbit-sigil-js'; + export class Sigil extends Component { - constructor(props) { - super(props); - } - render() { - let prefix = this.props.prefix ? JSON.parse(this.props.prefix) : false; + const { props } = this; return (
+ style={{ flexBasis: 35, padding: 4 }}> { - sealDict.getSeal(this.props.ship.slice(1), this.props.size, prefix) + sigil({ + patp: props.ship, + renderer: reactRenderer, + size: props.size, + colors: ['black', 'white'], + }) }
); diff --git a/apps/publish/src/js/lib/object-extensions.js b/apps/publish/src/js/lib/object-extensions.js deleted file mode 100644 index beb26e822..000000000 --- a/apps/publish/src/js/lib/object-extensions.js +++ /dev/null @@ -1,9 +0,0 @@ -Object.arrayify = (obj) => { - let ret = []; - Object.keys(obj).forEach((key) => { - ret.push({key, value: obj[key]}); - }) - - return ret; -} - diff --git a/apps/publish/src/js/lib/report-keys.js b/apps/publish/src/js/lib/report-keys.js deleted file mode 100644 index a2c761c01..000000000 --- a/apps/publish/src/js/lib/report-keys.js +++ /dev/null @@ -1,35 +0,0 @@ -export const REPORT_KEYS = [ - 'landscape.prize', - // /circle//grams - // call automatically on inbox - // call automatically on /urbit-meta - // call automatically on any DM circles created - 'circle.gram', - 'circle.nes', - // /circle//config-l - // used for loading inbox config - 'circle.cos.loc', - // /circle//config-r - // used for loading inbox's sources' configs - 'circle.cos.rem', - // /circle//config-l - // used for fora topic creation....maybe? let me check - - 'circle.config', - 'circle.config.dif.full', - // /circle//config-l - // used for subscription / unsubscription - 'circle.config.dif.source', - // /circles, required for initialization - 'circles', - - // frontend specific, no server calls - 'menu.toggle', - 'config.ext', - 'inbox.sources-loaded', - 'circle.read', - 'dm.new', - 'dm.clear', -]; - - diff --git a/apps/publish/src/js/lib/util.js b/apps/publish/src/js/lib/util.js deleted file mode 100644 index 50c02e43a..000000000 --- a/apps/publish/src/js/lib/util.js +++ /dev/null @@ -1,353 +0,0 @@ -import _ from 'lodash'; -import urbitOb from 'urbit-ob'; -import classnames from 'classnames'; - -export const AGGREGATOR_COLL = "c"; -export const AGGREGATOR_INBOX = "aggregator-inbox"; -export const AGGREGATOR_NAMES = [AGGREGATOR_INBOX, AGGREGATOR_COLL]; - -export function capitalize(str) { - return `${str[0].toUpperCase()}${str.substr(1)}`; -} - -// takes a galactic (urbit) time and converts to 8601 -export function esoo(str) { - - var dubb = function(num) { - return num < 10 ? '0' + parseInt(num) : parseInt(num); - } - - const p = /\~(\d\d\d\d).(\d\d?).(\d\d?)..(\d\d?).(\d\d?).(\d\d?)/.exec(str); - - if (p) { - return `${p[1]}-${dubb(p[2])}-${dubb(p[3])}T${dubb(p[4])}:${dubb(p[5])}:${dubb(p[6])}Z` - } - return false; - -} - -// check if hostname follows ship.*.urbit.org scheme -export function isProxyHosted(hostName) { - const r = /([a-z,-]+)\.(.+\.)?urbit\.org/.exec(hostName); - if (r && urbitOb.isValidPatp(r[1])) { - return true; - } - return false; -} - -export function getQueryParams() { - if (window.location.search !== "") { - return JSON.parse('{"' + decodeURI(window.location.search.substr(1).replace(/&/g, "\",\"").replace(/=/g,"\":\"")) + '"}'); - } else { - return {}; - } -} - -export function isAggregator(station) { - let cir = station.split("/")[1] - return AGGREGATOR_NAMES.includes(cir); -} - -/* - Goes from: - 1531943107869 // "javascript unix time" - To: - "48711y 2w 5d 11m 9s" // "stringified time increments" -*/ - -export function secToString(secs) { - if (secs <= 0) { - return 'Completed'; - } - secs = Math.floor(secs) - var min = 60; - var hour = 60 * min; - var day = 24 * hour; - var week = 7 * day; - var year = 52 * week; - var fy = function(s) { - if (s < year) { - return ['', s]; - } else { - return [Math.floor(s / year) + 'y', s % year]; - } - } - var fw = function(tup) { - var str = tup[0]; - var sec = tup[1]; - if (sec < week) { - return [str, sec]; - } else { - return [str + ' ' + Math.floor(sec / week) + 'w', sec % week]; - } - } - var fd = function(tup) { - var str = tup[0]; - var sec = tup[1]; - if (sec < day) { - return [str, sec]; - } else { - return [str + ' ' + Math.floor(sec / day) + 'd', sec % day]; - } - } - var fh = function(tup) { - var str = tup[0]; - var sec = tup[1]; - if (sec < hour) { - return [str, sec]; - } else { - return [str + ' ' + Math.floor(sec / hour) + 'h', sec % hour]; - } - } - var fm = function(tup) { - var str = tup[0]; - var sec = tup[1]; - if (sec < min) { - return [str, sec]; - } else { - return [str + ' ' + Math.floor(sec / min) + 'm', sec % min]; - } - } - var fs = function(tup) { - var str = tup[0]; - var sec = tup[1]; - return str + ' ' + sec + 's'; - } - return fs(fm(fh(fd(fw(fy(secs)))))).trim(); -} - -export function uuid() { - let str = "0v" - str += Math.ceil(Math.random()*8)+"." - for (var i = 0; i < 5; i++) { - let _str = Math.ceil(Math.random()*10000000).toString(32); - _str = ("00000"+_str).substr(-5,5); - str += _str+"."; - } - - return str.slice(0,-1); -} - -export function isPatTa(str) { - const r = /^[a-z,0-9,\-,\.,_,~]+$/.exec(str) - return !!r; -} - -export function isValidStation(st) { - let tokens = st.split("/") - - if (tokens.length !== 2) return false; - - return urbitOb.isValidPatp(tokens[0]) && isPatTa(tokens[1]); -} - - -/* - Goes from: - ~2018.7.17..23.15.09..5be5 // urbit @da - To: - (javascript Date object) -*/ -export function daToDate(st) { - var dub = function(n) { - return parseInt(n) < 10 ? "0" + parseInt(n) : n.toString(); - }; - var da = st.split('..'); - var bigEnd = da[0].split('.'); - var lilEnd = da[1].split('.'); - var ds = `${bigEnd[0].slice(1)}-${dub(bigEnd[1])}-${dub(bigEnd[2])}T${dub(lilEnd[0])}:${dub(lilEnd[1])}:${dub(lilEnd[2])}Z`; - return new Date(ds); -} - -/* - Goes from: - (javascript Date object) - To: - ~2018.7.17..23.15.09..5be5 // urbit @da -*/ - -export function dateToDa(d, mil) { -  var fil = function(n) { -    return n >= 10 ? n : "0" + n; -  }; -  return ( -    `~${d.getUTCFullYear()}.` + -    `${(d.getUTCMonth() + 1)}.` + -    `${fil(d.getUTCDate())}..` + -    `${fil(d.getUTCHours())}.` + -    `${fil(d.getUTCMinutes())}.` + -    `${fil(d.getUTCSeconds())}` + - `${mil ? "..0000" : ""}` -  ); -} - - // ascending for clarity -// export function sortSrc(circleArray, topic=false){ -// let sc = circleArray.map((c) => util.parseCollCircle(c)).filter((pc) => typeof pc != 'undefined' && typeof pc.top == 'undefined'); -// return sc.map((src) => src.coll).sort((a, b) => util.daToDate(a) - util.daToDate(b)); -// } - -export function arrayEqual(a, b) { - if (a === b) return true; - if (a == null || b == null) return false; - if (a.length != b.length) return false; - - // If you don't care about the order of the elements inside - // the array, you should sort both arrays here. - - for (var i = 0; i < a.length; ++i) { - if (a[i] !== b[i]) return false; - } - return true; -} - -function deSig(ship) { - return ship.replace('~', ''); -} - -// use urbit.org proxy if it's not on our ship -export function foreignUrl(shipName, own, urlFrag) { - if (deSig(shipName) != deSig(own)) { - return `http://${deSig(shipName)}.urbit.org${urlFrag}` - } else { - return urlFrag - } -} - -// shorten comet names -export function prettyShip(ship) { - const sp = ship.split('-'); - return [sp.length == 9 ? `${sp[0]}_${sp[8]}`: ship, ship[0] === '~' ? `/~profile/${ship}` : `/~profile/~${ship}`]; -} - -export function profileUrl(ship) { - return `/~landscape/profile/~${ship}`; -} - -export function isDMStation(station) { - let host = station.split('/')[0].substr(1); - let circle = station.split('/')[1]; - - return ( - station.indexOf('.') !== -1 && - circle.indexOf(host) !== -1 - ); -} - -export function isRootCollection(station) { - return station.split("/")[1] === "c"; -} - -// maybe do fancier stuff later -export function isUrl(string) { - const r = /^http|^www|\.com$/.exec(string) - if (r) { - return true - } - else { - return false - } -} - -export function getMessageContent(msg) { - let ret; - - const MESSAGE_TYPES = { - 'sep.app.sep.fat.sep.lin.msg': 'app', - 'sep.app.sep.lin.msg': 'app', - 'sep.app.sep.inv': (msg) => { - let sta = msg.sep.app.sep.inv.cir; - let [hos, cir] = sta.split('/'); - - return { - type: 'inv', - msg: msg, - content: { - nom: msg.sep.app.app, - sta: sta, - hos: hos, - inv: msg.sep.app.sep.inv.inv - } - } - }, - 'sep.inv': (msg) => { - let sta = msg.sep.inv.cir; - let [hos, cir] = sta.split('/'); - - return { - type: 'inv', - msg: msg, - content: { - nom: cir, - inv: msg.sep.inv.inv, - hos, - sta, - cir - } - } - }, - 'sep.fat': (msg) => { - let type = msg.sep.fat.tac.text; - let station = msg.aud[0]; - let jason = JSON.parse(msg.sep.fat.sep.lin.msg); - let content = (type.includes('collection')) ? null : jason.content; - let par = jason.path.slice(0, -1); - - return { - type: msg.sep.fat.tac.text, - msg: msg, - contentType: jason.type, - content: content, - snip: jason.snip, - author: jason.author, - host: jason.host, - date: jason.date, - path: jason.path, - postTitle: jason.name, - postUrl: `/~landscape/collections/${jason.host}/${jason.path.slice(2).join('/')}`, - } - }, - 'sep.lin.msg': 'lin', - 'sep.ire.sep.lin': (msg) => { - return { - type: "lin", - msg: msg, - content: msg.sep.ire.sep.lin.msg, - replyUid: msg.sep.ire.top - } - }, - 'sep.ire': 'ire', - 'sep.url': 'url', - 'sep.exp': (msg) => { - return { - type: "exp", - msg: msg, - content: msg.sep.exp.exp, - res: msg.sep.exp.res.join('\n') - } - }, - } - - Object.arrayify(MESSAGE_TYPES).some(({key, value}) => { - if (_.has(msg, key)) { - if (typeof value === "string") { - ret = { - type: value, - msg: msg, - content: _.get(msg, key) - } - } else if (typeof value === "function") { - ret = value(msg); - } - return true; - } - }); - - if (typeof ret === "undefined") { - ret = {type: "unknown"}; - } - - return ret; -} - -window.getMessageContent = getMessageContent; diff --git a/apps/publish/src/js/services.js b/apps/publish/src/js/services.js deleted file mode 100644 index f9f81bdcc..000000000 --- a/apps/publish/src/js/services.js +++ /dev/null @@ -1,43 +0,0 @@ -import { isDMStation } from '/lib/util'; -import { warehouse } from '/warehouse'; -import { api } from '/api'; - -export function getStationDetails(station) { - let host = station.split("/")[0].substr(1); - let config = warehouse.store.configs[station]; - - let ret = { - type: "none", - station: station, - host: host, - cir: station.split("/")[1], - }; - - let circleParts = ret.cir.split("-"); - - if (ret.cir === "c") { - ret.type = "aggregator"; - } else if (isDMStation(station)) { - ret.type = "stream-dm"; - } else { - ret.type = "stream-chat"; - } - - switch (ret.type) { - case "stream-chat": - ret.stationUrl = `/~chat/${station}`; - ret.stationTitle = ret.cir; - break; - case "stream-dm": - ret.stationTitle = ret.cir - .split(".") - .filter((mem) => mem !== api.authTokens.ship) - .map((mem) => `~${mem}`) - .join(", ");; - ret.stationUrl = `/~landscape/stream?station=${station}`; - break; - } - - return ret; -} - diff --git a/apps/publish/src/js/vendor/sigils-1.2.5.js b/apps/publish/src/js/vendor/sigils-1.2.5.js deleted file mode 100644 index cd4881b54..000000000 --- a/apps/publish/src/js/vendor/sigils-1.2.5.js +++ /dev/null @@ -1 +0,0 @@ -function _AwaitValue(a){this.wrapped=a}function _AsyncGenerator(a){function t(a,t){return new Promise(function(r,d){var c={key:a,arg:t,resolve:r,reject:d,next:null};s?s=s.next=c:(b=s=c,e(a,t))})}function e(t,b){try{var s=a[t](b),d=s.value,c=d instanceof _AwaitValue;Promise.resolve(c?d.wrapped:d).then(function(a){if(c)return void e("next",a);r(s.done?"return":"normal",a)},function(a){e("throw",a)})}catch(a){r("throw",a)}}function r(a,t){switch(a){case"return":b.resolve({value:t,done:!0});break;case"throw":b.reject(t);break;default:b.resolve({value:t,done:!1})}(b=b.next)?e(b.key,b.arg):s=null}var b,s;this._invoke=t,"function"!=typeof a.return&&(this.return=void 0)}function _defineProperty(a,t,e){return t in a?Object.defineProperty(a,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):a[t]=e,a}function _objectSpread(a){for(var t=1;t-1}function listCacheSet(a,t){var e=this.__data__,r=_assocIndexOf(e,a);return r<0?(++this.size,e.push([a,t])):e[r][1]=t,this}function ListCache(a){var t=-1,e=null==a?0:a.length;for(this.clear();++t-1&&a%1==0&&a-1&&a%1==0&&a<=MAX_SAFE_INTEGER$1}function baseIsTypedArray(a){return isObjectLike_1(a)&&isLength_1(a.length)&&!!typedArrayTags[_baseGetTag(a)]}function baseUnary(a){return function(t){return a(t)}}function arrayLikeKeys(a,t){var e=isArray_1(a),r=!e&&isArguments_1(a),b=!e&&!r&&isBuffer_1(a),s=!e&&!r&&!b&&isTypedArray_1(a),d=e||r||b||s,c=d?_baseTimes(a.length,String):[],o=c.length;for(var n in a)!t&&!hasOwnProperty$5.call(a,n)||d&&("length"==n||b&&("offset"==n||"parent"==n)||s&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||_isIndex(n,o))||c.push(n);return c}function isPrototype(a){var t=a&&a.constructor;return a===("function"==typeof t&&t.prototype||objectProto$9)}function overArg(a,t){return function(e){return a(t(e))}}function baseKeys(a){if(!_isPrototype(a))return _nativeKeys(a);var t=[];for(var e in Object(a))hasOwnProperty$7.call(a,e)&&"constructor"!=e&&t.push(e);return t}function isArrayLike(a){return null!=a&&isLength_1(a.length)&&!isFunction_1(a)}function keys(a){return isArrayLike_1(a)?_arrayLikeKeys(a):_baseKeys(a)}function baseAssign(a,t){return a&&_copyObject(t,keys_1(t),a)}function nativeKeysIn(a){var t=[];if(null!=a)for(var e in Object(a))t.push(e);return t}function baseKeysIn(a){if(!isObject_1(a))return _nativeKeysIn(a);var t=_isPrototype(a),e=[];for(var r in a)("constructor"!=r||!t&&hasOwnProperty$8.call(a,r))&&e.push(r);return e}function keysIn$1(a){return isArrayLike_1(a)?_arrayLikeKeys(a,!0):_baseKeysIn(a)}function baseAssignIn(a,t){return a&&_copyObject(t,keysIn_1(t),a)}function copyArray(a,t){var e=-1,r=a.length;for(t||(t=Array(r));++e1&&void 0!==arguments[1]?arguments[1]:0}}function _toConsumableArray$1(a){if(Array.isArray(a)){for(var t=0,e=Array(a.length);t1&&void 0!==arguments[1]?arguments[1]:void 0;return isUndefined$1(t)&&(t=a),{a:a,c:0,e:0,b:0,d:t,f:0}}function toSVG(a){return toString$2(a)}function toString$2(a){return"matrix("+a.a+","+a.b+","+a.c+","+a.d+","+a.e+","+a.f+")"}function setCacheAdd(a){return this.__data__.set(a,HASH_UNDEFINED$2),this}function setCacheHas(a){return this.__data__.has(a)}function SetCache(a){var t=-1,e=null==a?0:a.length;for(this.__data__=new _MapCache;++tc))return!1;var n=s.get(a);if(n&&s.get(t))return n==t;var i=-1,f=!0,l=e&COMPARE_UNORDERED_FLAG$1?new _SetCache:void 0;for(s.set(a,t),s.set(t,a);++ir&&console.warn("sigil-js: margin cannot be larger than sigil size");var b=isNotMarginMode(e),s=b?.08*r:e,d=r-2*s,c=b||t>1?d/2:d,o={le:t,mm:b,tw:r,sw:c,rm:s,rp:c/128*2},n={1:[{x:dc(o),y:dc(o)}],2:[{x:d1(o),y:dc(o)},{x:d2(o),y:dc(o)}],4:[{x:d1(o),y:d1(o)},{x:d2(o),y:d1(o)},{x:d1(o),y:d2(o)},{x:d2(o),y:d2(o)}]};return _objectSpread({},o,{scale:o.sw/128,grid:n[t]})},isNotMarginMode=function(a){return"auto"===a||void 0===a},dc=function(a){var t=a.le,e=a.mm,r=a.tw,b=a.sw,s=a.rm;return t>1||!0===e?r-1.5*b-s:s},d1=function(a){a.tw,a.sw;return a.rm-a.rp/2},d2=function(a){return a.tw-a.sw-a.rm+a.rp/2},CW=[["#fff","#000000"]],prism=function(a,t){return t[0]},dyes=function(a,t,e){return isUndefined_1$1(e)?(e=isUndefined_1$1(t)?CW[0]:prism(t,CW),wash(a,e)):wash(a,e)},applyColor=function(a,t){return"FG"===a?t[0]:"BG"===a?t[1]:"TC"===a?t[2]:"NC"===a?"grey":last(t)},applyStyleAttrs=function(a,t){var e=a.fill;return{fill:applyColor(e,t)}},wash=function a(t,e){var r=get_1$1(t,["meta","style"],!1),b=get_1$1(t,"children",[]),s=get_1$1(t,"attr",{});return _objectSpread({},t,{attr:!1!==r?_objectSpread({},s,applyStyleAttrs(r,e)):_objectSpread({},s),children:b.map(function(t){return a(t,e)})})},HASH_UNDEFINED$2="__lodash_hash_undefined__",_setCacheAdd=setCacheAdd,_setCacheHas=setCacheHas;SetCache.prototype.add=SetCache.prototype.push=_setCacheAdd,SetCache.prototype.has=_setCacheHas;var _SetCache=SetCache,_arraySome=arraySome,_cacheHas=cacheHas,COMPARE_PARTIAL_FLAG$2=1,COMPARE_UNORDERED_FLAG$1=2,_equalArrays=equalArrays,_mapToArray=mapToArray,_setToArray=setToArray,COMPARE_PARTIAL_FLAG$3=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",mapTag$5="[object Map]",numberTag$3="[object Number]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$4="[object String]",symbolTag$3="[object Symbol]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",symbolProto$2=_Symbol?_Symbol.prototype:void 0,symbolValueOf$1=symbolProto$2?symbolProto$2.valueOf:void 0,_equalByTag=equalByTag,COMPARE_PARTIAL_FLAG$4=1,objectProto$14=Object.prototype,hasOwnProperty$11=objectProto$14.hasOwnProperty,_equalObjects=equalObjects,COMPARE_PARTIAL_FLAG$1=1,argsTag$3="[object Arguments]",arrayTag$2="[object Array]",objectTag$3="[object Object]",objectProto$13=Object.prototype,hasOwnProperty$10=objectProto$13.hasOwnProperty,_baseIsEqualDeep=baseIsEqualDeep,_baseIsEqual=baseIsEqual,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2,_baseIsMatch=baseIsMatch,_isStrictComparable=isStrictComparable,_getMatchData=getMatchData,_matchesStrictComparable=matchesStrictComparable,_baseMatches=baseMatches,_baseHasIn=baseHasIn,_hasPath=hasPath,hasIn_1=hasIn,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2,_baseMatchesProperty=baseMatchesProperty,identity_1=identity$1,_baseProperty=baseProperty,_basePropertyDeep=basePropertyDeep,property_1=property,_baseIteratee=baseIteratee,_createBaseFor=createBaseFor,baseFor=_createBaseFor(),_baseFor=baseFor,_baseForOwn=baseForOwn,_createBaseEach=createBaseEach,baseEach=_createBaseEach(_baseForOwn),_baseEach=baseEach,_baseMap=baseMap,map_1=map,appendChildNodes=function(a,t){return map_1(get_1$1(a,"children",[]),function(a){return SVGComponents[a.tag](a)}).forEach(function(a){t.appendChild(a)}),t},createChildNode=function(a,t){var e=document.createElement(t);return Object.keys(a.attr).forEach(function(t){e.setAttribute(t,a.attr[t])}),appendChildNodes(a,e)},SVGComponents={svg:function(a){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("version","1.1"),t.setAttribute("xlmns","http://www.w3.org/2000/svg"),Object.keys(a.attr).forEach(function(e){t.setAttribute(e,a.attr[e])}),appendChildNodes(a,t)},circle:function(a){return createChildNode(a,"circle")},rect:function(a){return createChildNode(a,"rect")},path:function(a){return createChildNode(a,"path")},g:function(a){return createChildNode(a,"g")},polygon:function(a){return createChildNode(a,"polygon")},line:function(a){return createChildNode(a,"line")},polyline:function(a){return createChildNode(a,"polyline")}},p2s=function(a){if(void 0!==a)return Object.entries(a).reduce(function(a,t){var e=_slicedToArray(t,2),r=e[0],b=e[1];return"".concat(a).concat(c2k(r),"='").concat(b,"' ")},"")},c2k=function(a){return a.replace(/(^[A-Z])/,function(a){return _slicedToArray(a,1)[0].toLowerCase()}).replace(/([A-Z])/g,function(a){var t=_slicedToArray(a,1)[0];return"-".concat(t.toLowerCase())})},recurse=function(a){return get_1$1(a,"children",[]).reduce(function(a,t){return"".concat(a," ").concat(PlainSVGStringRenderer[t.tag](t))},"")},PlainSVGStringRenderer={svg:function(a){return"\n ").concat(recurse(a),"\n ")},circle:function(a){return"\n ").concat(recurse(a),"\n ")},rect:function(a){return"\n ").concat(recurse(a),"\n ")},path:function(a){return"\n ").concat(recurse(a),"\n ")},g:function(a){return"\n ").concat(recurse(a),"\n ")},polygon:function(a){return"\n ").concat(recurse(a),"\n ")},line:function(a){return"\n ").concat(recurse(a),"\n ")},polyline:function(a){return"\n ").concat(recurse(a),"\n ")}};export{pour,_pour,SVGComponents,PlainSVGStringRenderer};