mirror of
https://github.com/enso-org/enso.git
synced 2024-12-25 02:03:14 +03:00
Bump Rust version to nightly-2021-06-17 (https://github.com/enso-org/ide/pull/1675)
Original commit: 8b971cd7cd
This commit is contained in:
parent
a085ab41a2
commit
69be61133c
10
gui/.github/workflows/gui-ci.yml
vendored
10
gui/.github/workflows/gui-ci.yml
vendored
@ -104,7 +104,7 @@ jobs:
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly-2021-05-12
|
||||
toolchain: nightly-2021-06-17
|
||||
override: true
|
||||
- name: Install Prettier
|
||||
run: npm install --save-dev --save-exact prettier
|
||||
@ -133,7 +133,7 @@ jobs:
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly-2021-05-12
|
||||
toolchain: nightly-2021-06-17
|
||||
override: true
|
||||
- name: Run tests (no WASM)
|
||||
run: node ./run test --no-wasm --skip-version-validation
|
||||
@ -154,7 +154,7 @@ jobs:
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly-2021-05-12
|
||||
toolchain: nightly-2021-06-17
|
||||
override: true
|
||||
- name: Install wasm-pack (macOS)
|
||||
env:
|
||||
@ -208,7 +208,7 @@ jobs:
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly-2021-05-12
|
||||
toolchain: nightly-2021-06-17
|
||||
override: true
|
||||
- name: Install wasm-pack (macOS)
|
||||
env:
|
||||
@ -285,7 +285,7 @@ jobs:
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly-2021-05-12
|
||||
toolchain: nightly-2021-06-17
|
||||
override: true
|
||||
- name: Install wasm-pack (macOS)
|
||||
env:
|
||||
|
475
gui/build/package-lock.json
generated
475
gui/build/package-lock.json
generated
@ -1,481 +1,8 @@
|
||||
{
|
||||
"name": "build-script",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "build-script",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"glob": "^7.1.6",
|
||||
"js-yaml": "4.0.0",
|
||||
"ncp": "^2.0.0",
|
||||
"semver": "7.3.4",
|
||||
"yargs": "^15.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "2.2.0",
|
||||
"prettier-plugin-toml": "0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@toml-tools/lexer": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@toml-tools/lexer/-/lexer-0.3.1.tgz",
|
||||
"integrity": "sha512-CCKHQb5OWpgFu47MQ2rcql4AnE9GaehNk/c1oJOyOBovED6XmdzQPXsvPSu+NJ9lToqJNoX+nLXQsB8WyQGdzQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chevrotain": "4.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@toml-tools/parser": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@toml-tools/parser/-/parser-0.3.1.tgz",
|
||||
"integrity": "sha512-vadwVx5TkgByt19dbp/rfIUKPkDdn5werANYvziiGK9wHlqPA0BWnvOloQw/dPDxF31+Ag0+zarXJpPDdRsPPg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@toml-tools/lexer": "^0.3.1",
|
||||
"chevrotain": "4.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/color-name": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
|
||||
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"dependencies": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/argparse": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
|
||||
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/camelcase": {
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
|
||||
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/chevrotain": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-4.1.1.tgz",
|
||||
"integrity": "sha512-NQky1HQyiAzxsxpq4Ppt47SYO2U3JLtmfs85QPf3kYSzGBjjp5AA8kqjH8hCjGFRpaQ781QOk1ragQIOkBgUTA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"regexp-to-ast": "0.3.5"
|
||||
}
|
||||
},
|
||||
"node_modules/cliui": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
|
||||
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
|
||||
"dependencies": {
|
||||
"string-width": "^4.2.0",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"wrap-ansi": "^6.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"node_modules/decamelize": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
||||
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
|
||||
},
|
||||
"node_modules/find-up": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
|
||||
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
|
||||
"dependencies": {
|
||||
"locate-path": "^5.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||
},
|
||||
"node_modules/get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||
"engines": {
|
||||
"node": "6.* || 8.* || >= 10.*"
|
||||
}
|
||||
},
|
||||
"node_modules/glob": {
|
||||
"version": "7.1.6",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz",
|
||||
"integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==",
|
||||
"dependencies": {
|
||||
"argparse": "^2.0.1"
|
||||
},
|
||||
"bin": {
|
||||
"js-yaml": "bin/js-yaml.js"
|
||||
}
|
||||
},
|
||||
"node_modules/locate-path": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
|
||||
"dependencies": {
|
||||
"p-locate": "^4.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/ncp": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz",
|
||||
"integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=",
|
||||
"bin": {
|
||||
"ncp": "bin/ncp"
|
||||
}
|
||||
},
|
||||
"node_modules/once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
|
||||
"integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
|
||||
"dependencies": {
|
||||
"p-try": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/p-locate": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
|
||||
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
|
||||
"dependencies": {
|
||||
"p-limit": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz",
|
||||
"integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier-plugin-toml": {
|
||||
"version": "0.3.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier-plugin-toml/-/prettier-plugin-toml-0.3.1.tgz",
|
||||
"integrity": "sha512-j47DEO/dN/acU1nSL/B7q4A4Z2SYJhpWPCLPkcmfAXIQC6A5GD6Ao/bi9HRHZ8ueIDOauqjuAQbnvRxLXMjazA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@toml-tools/parser": "^0.3.1",
|
||||
"prettier": "^1.16.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier-plugin-toml/node_modules/prettier": {
|
||||
"version": "1.19.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
|
||||
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/regexp-to-ast": {
|
||||
"version": "0.3.5",
|
||||
"resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.3.5.tgz",
|
||||
"integrity": "sha512-1CJygtdvsfNFwiyjaMLBWtg2tfEqx/jSZ8S6TV+GlNL8kiH8rb4cm5Pb7A/C2BpyM/fA8ZJEudlCwi/jvAY+Ow==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/require-main-filename": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.3.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
|
||||
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
|
||||
"integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/which-module": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
|
||||
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
|
||||
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.0.0",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"node_modules/y18n": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
|
||||
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
|
||||
},
|
||||
"node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "15.3.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.0.tgz",
|
||||
"integrity": "sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA==",
|
||||
"dependencies": {
|
||||
"cliui": "^6.0.0",
|
||||
"decamelize": "^1.2.0",
|
||||
"find-up": "^4.1.0",
|
||||
"get-caller-file": "^2.0.1",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^2.0.0",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^4.2.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^4.0.0",
|
||||
"yargs-parser": "^18.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs-parser": {
|
||||
"version": "18.1.3",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
|
||||
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
|
||||
"dependencies": {
|
||||
"camelcase": "^5.0.0",
|
||||
"decamelize": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@toml-tools/lexer": {
|
||||
"version": "0.3.1",
|
||||
|
@ -14,7 +14,7 @@ const yaml = require('js-yaml')
|
||||
// =================
|
||||
|
||||
const NODE_VERSION = '14.15.0'
|
||||
const RUST_VERSION = 'nightly-2021-05-12'
|
||||
const RUST_VERSION = read_rust_toolchain_version()
|
||||
const WASM_PACK_VERSION = '0.9.1'
|
||||
const FLAG_NO_CHANGELOG_NEEDED = '[ci no changelog needed]'
|
||||
const FLAG_FORCE_CI_BUILD = '[ci build]'
|
||||
@ -25,6 +25,10 @@ const FLAG_FORCE_CI_BUILD = '[ci build]'
|
||||
// === Utils ===
|
||||
// =============
|
||||
|
||||
function read_rust_toolchain_version() {
|
||||
return fss.readFileSync(paths.root + "/rust-toolchain").toString().trim()
|
||||
}
|
||||
|
||||
function job(platforms,name,steps,cfg) {
|
||||
if (!cfg) { cfg = {} }
|
||||
return {
|
||||
|
2
gui/run
2
gui/run
@ -19,7 +19,7 @@ async function init () {
|
||||
console.log("Checking versions of installed packages.")
|
||||
await cmd.check_version('node',node_lts_version)
|
||||
await cmd.check_version('npm',npm_lts_version)
|
||||
await cmd.check_version('rustc','1.54.0-nightly',{
|
||||
await cmd.check_version('rustc','1.55.0-nightly',{
|
||||
preprocess:(v)=>v.substring(6,20)
|
||||
})
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
nightly-2021-05-12
|
||||
nightly-2021-06-17
|
||||
|
@ -49,7 +49,7 @@ pub fn entry_point_complex_shape_system() {
|
||||
let world = World::new(&web::get_html_element_by_id("root").unwrap());
|
||||
let scene = world.scene();
|
||||
let camera = scene.camera().clone_ref();
|
||||
let navigator = Navigator::new(&scene,&camera);
|
||||
let navigator = Navigator::new(scene,&camera);
|
||||
let logger = Logger::new("ShapeView");
|
||||
|
||||
let theme_manager = theme::Manager::from(&scene.style_sheet);
|
||||
|
@ -85,7 +85,7 @@ pub fn entry_point_dom_symbols() {
|
||||
iter_to_change = 50;
|
||||
i = (i + 1) % 2;
|
||||
for (j, object) in css3d_objects.iter_mut().enumerate() {
|
||||
layers[(i + j) % 2].manage(&object);
|
||||
layers[(i + j) % 2].manage(object);
|
||||
}
|
||||
}
|
||||
iter_to_change -= 1;
|
||||
|
@ -140,7 +140,7 @@ pub fn entry_point_mouse_events() {
|
||||
|
||||
let scene = app.display.scene();
|
||||
let camera = scene.camera().clone_ref();
|
||||
let navigator = Navigator::new(&scene,&camera);
|
||||
let navigator = Navigator::new(scene,&camera);
|
||||
|
||||
std::mem::forget(shape);
|
||||
std::mem::forget(navigator);
|
||||
|
@ -64,7 +64,7 @@ fn init(app:&Application) {
|
||||
|
||||
// === Scroll Area ===
|
||||
|
||||
let scroll_area = ScrollArea::new(&app);
|
||||
let scroll_area = ScrollArea::new(app);
|
||||
app.display.add_child(&scroll_area);
|
||||
scroll_area.resize(Vector2(200.0,200.0));
|
||||
scroll_area.set_content_width(300.0);
|
||||
|
@ -43,7 +43,7 @@ pub fn entry_point_shape_system() {
|
||||
let world = World::new(&web::get_html_element_by_id("root").unwrap());
|
||||
let scene = world.scene();
|
||||
let camera = scene.camera().clone_ref();
|
||||
let navigator = Navigator::new(&scene,&camera);
|
||||
let navigator = Navigator::new(scene,&camera);
|
||||
let sprite_system = ShapeSystem::new(&world,&shape());
|
||||
let sprite = sprite_system.new_instance();
|
||||
sprite.size.set(Vector2::new(300.0, 300.0));
|
||||
|
@ -18,7 +18,7 @@ pub fn entry_point_sprite_system() {
|
||||
let world = World::new(&web::get_html_element_by_id("root").unwrap());
|
||||
let scene = world.scene();
|
||||
let camera = scene.camera().clone_ref();
|
||||
let navigator = Navigator::new(&scene,&camera);
|
||||
let navigator = Navigator::new(scene,&camera);
|
||||
let sprite_system = SpriteSystem::new(&world);
|
||||
|
||||
let sprite2 = sprite_system.new_instance();
|
||||
|
@ -24,7 +24,7 @@ pub fn entry_point_sprite_system_benchmark() {
|
||||
let world = World::new(&web::get_html_element_by_id("root").unwrap());
|
||||
let scene = world.scene();
|
||||
let camera = scene.camera().clone_ref();
|
||||
let navigator = Navigator::new(&scene,&camera);
|
||||
let navigator = Navigator::new(scene,&camera);
|
||||
let sprite_system = SpriteSystem::new(&world);
|
||||
|
||||
let sprite1 = sprite_system.new_instance();
|
||||
|
@ -77,7 +77,7 @@ impl<M:Model,F:Frp<M>> Component<M,F> {
|
||||
|
||||
impl<M: display::Object,F> display::Object for Component<M,F> {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.display_object()
|
||||
self.model.display_object()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ impl DropDownMenu {
|
||||
|
||||
// === Layouting ===
|
||||
|
||||
let menu_height = DEPRECATED_Animation::<f32>::new(&network);
|
||||
let menu_height = DEPRECATED_Animation::<f32>::new(network);
|
||||
|
||||
|
||||
eval menu_height.value ([model](height) {
|
||||
|
@ -263,9 +263,9 @@ impl ListView {
|
||||
let model = &self.model;
|
||||
let scene = app.display.scene();
|
||||
let mouse = &scene.mouse.frp;
|
||||
let view_y = DEPRECATED_Animation::<f32>::new(&network);
|
||||
let selection_y = DEPRECATED_Animation::<f32>::new(&network);
|
||||
let selection_height = DEPRECATED_Animation::<f32>::new(&network);
|
||||
let view_y = DEPRECATED_Animation::<f32>::new(network);
|
||||
let selection_y = DEPRECATED_Animation::<f32>::new(network);
|
||||
let selection_height = DEPRECATED_Animation::<f32>::new(network);
|
||||
|
||||
frp::extend!{ network
|
||||
|
||||
|
@ -446,7 +446,7 @@ impl List {
|
||||
debug!(logger, "Setting new model {model:?} for entry {id}; \
|
||||
old entry: {entry.id.get():?}.");
|
||||
match model {
|
||||
Some(model) => entry.set_model(id,&model),
|
||||
Some(model) => entry.set_model(id,model),
|
||||
None => {
|
||||
error!(logger, "Model provider didn't return model for id {id}.");
|
||||
entry.set_model(id,&default())
|
||||
|
@ -91,10 +91,10 @@ impl ScrollArea {
|
||||
let content = display::object::Instance::new(&logger);
|
||||
display_object.add_child(&content);
|
||||
|
||||
let h_scrollbar = Scrollbar::new(&app);
|
||||
let h_scrollbar = Scrollbar::new(app);
|
||||
display_object.add_child(&h_scrollbar);
|
||||
|
||||
let v_scrollbar = Scrollbar::new(&app);
|
||||
let v_scrollbar = Scrollbar::new(app);
|
||||
display_object.add_child(&v_scrollbar);
|
||||
v_scrollbar.set_rotation_z(-90.0_f32.to_radians());
|
||||
|
||||
|
@ -19,6 +19,8 @@ use crate::shadow;
|
||||
struct Background {
|
||||
pub width : Var<Pixels>,
|
||||
pub height : Var<Pixels>,
|
||||
#[allow(dead_code)]
|
||||
// This field is not used but should stay as part of the API for future use.
|
||||
pub corner_radius : Var<Pixels>,
|
||||
pub shape : AnyShape,
|
||||
}
|
||||
@ -129,7 +131,11 @@ pub mod track {
|
||||
/// Struct that contains the shape used to indicate an overflow (a triangle), and some metadata
|
||||
/// that can be used to place and align it.
|
||||
struct OverflowShape {
|
||||
#[allow(dead_code)]
|
||||
// This field is not used but should stay as part of the API for future use.
|
||||
pub width : Var<Pixels>,
|
||||
#[allow(dead_code)]
|
||||
// This field is not used but should stay as part of the API for future use.
|
||||
pub height : Var<Pixels>,
|
||||
pub shape : AnyShape
|
||||
}
|
||||
|
@ -74,10 +74,10 @@ pub fn from_shape_with_parameters_and_alpha
|
||||
let shadow = shadow.translate((parameters.offset_x.px(),parameters.offset_y.px()));
|
||||
|
||||
let base_color = Var::<color::Rgba>::from(parameters.base_color);
|
||||
let base_color = base_color.multiply_alpha(&alpha);
|
||||
let base_color = base_color.multiply_alpha(alpha);
|
||||
|
||||
let fading_color = Var::<color::Rgba>::from(parameters.fading);
|
||||
let fading_color = fading_color.multiply_alpha(&alpha);
|
||||
let fading_color = fading_color.multiply_alpha(alpha);
|
||||
|
||||
let shadow_color = color::gradient::Linear::<Var<color::LinearRgba>>
|
||||
::new(fading_color.into_linear(),base_color.into_linear());
|
||||
@ -95,7 +95,7 @@ pub fn add_to_dom_element(element:&DomSymbol, style:&StyleWatch,logger:&Logger)
|
||||
let blur = style.get_number(ensogl_theme::shadow::html::blur);
|
||||
let spread = style.get_number(ensogl_theme::shadow::html::spread);
|
||||
let shadow = format!("{}px {}px {}px {}px rgba(0,0,0,{})",off_x,off_y,blur,spread,alpha);
|
||||
element.dom().set_style_or_warn("box-shadow",shadow,&logger);
|
||||
element.dom().set_style_or_warn("box-shadow",shadow,logger);
|
||||
}
|
||||
|
||||
|
||||
|
@ -256,6 +256,6 @@ impl<Shape:ColorableShape+'static> ToggleButton<Shape>{
|
||||
|
||||
impl<T:display::Object> display::Object for ToggleButton<T> {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.icon.display_object()
|
||||
self.model.icon.display_object()
|
||||
}
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ where F:AnyFnEasing, OnStep:Callback<T>, OnEnd:Callback<EndStatus> {
|
||||
/// Start the animator.
|
||||
pub fn start(&self) {
|
||||
if self.animation_loop.get().is_none() {
|
||||
let animation_loop = animation::Loop::new(step(&self));
|
||||
let animation_loop = animation::Loop::new(step(self));
|
||||
self.animation_loop.set(Some(animation_loop));
|
||||
self.data.active.set(true);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ where Callback : RawLoopCallback {
|
||||
let weak_data = Rc::downgrade(&data);
|
||||
let on_frame = move |time| weak_data.upgrade().for_each(|t| t.borrow_mut().run(time));
|
||||
data.borrow_mut().on_frame = Some(Closure::new(on_frame));
|
||||
let handle_id = web::request_animation_frame(&data.borrow_mut().on_frame.as_ref().unwrap());
|
||||
let handle_id = web::request_animation_frame(data.borrow_mut().on_frame.as_ref().unwrap());
|
||||
data.borrow_mut().handle_id = handle_id;
|
||||
Self {data}
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ where T:Value, OnStep:Callback1<T>, OnStart:Callback0, OnEnd:Callback1<EndStatus
|
||||
fn start(&self) {
|
||||
if self.animation_loop.get().is_none() {
|
||||
let frame_rate = self.frame_rate.get();
|
||||
let step = step(&self);
|
||||
let step = step(self);
|
||||
let animation_loop = animation::Loop::new_with_fixed_frame_rate(frame_rate,step);
|
||||
self.animation_loop.set(Some(animation_loop));
|
||||
self.on_start.call();
|
||||
|
@ -251,7 +251,7 @@ impl Registry {
|
||||
mouse_down <- mouse.down.map (f!((t) model.shortcuts_registry.on_press(t.simple_name())));
|
||||
mouse_up <- mouse.up.map (f!((t) model.shortcuts_registry.on_release(t.simple_name())));
|
||||
event <- any(kb_down,kb_up,mouse_down,mouse_up);
|
||||
eval event ((m) model.process_rules(&m));
|
||||
eval event ((m) model.process_rules(m));
|
||||
}
|
||||
Self {model,network}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ impl NavigatorModel {
|
||||
let max_zoom = 10000.0;
|
||||
let disable_events = Rc::new(Cell::new(true));
|
||||
let (simulator,resize_callback,_events) = Self::start_navigator_events
|
||||
(&scene,camera,min_zoom,max_zoom,Rc::clone(&zoom_speed),Rc::clone(&pan_speed),
|
||||
(scene,camera,min_zoom,max_zoom,Rc::clone(&zoom_speed),Rc::clone(&pan_speed),
|
||||
Rc::clone(&disable_events));
|
||||
Self {_events,simulator,resize_callback,zoom_speed,pan_speed,disable_events}
|
||||
}
|
||||
@ -64,7 +64,7 @@ impl NavigatorModel {
|
||||
, pan_speed : SharedSwitch<f32>
|
||||
, disable_events : Rc<Cell<bool>>
|
||||
) -> (physics::inertia::DynSimulator<Vector3>,callback::Handle,NavigatorEvents) {
|
||||
let simulator = Self::create_simulator(&camera);
|
||||
let simulator = Self::create_simulator(camera);
|
||||
let panning_callback = enclose!((scene,camera,mut simulator,pan_speed) move |pan: PanEvent| {
|
||||
let fovy_slope = camera.half_fovy_slope();
|
||||
let distance = camera.position().z;
|
||||
|
@ -430,7 +430,7 @@ impl Dom {
|
||||
/// Constructor.
|
||||
pub fn new(logger:&Logger) -> Self {
|
||||
let root = web::create_div();
|
||||
let layers = DomLayers::new(&logger,&root);
|
||||
let layers = DomLayers::new(logger,&root);
|
||||
root.set_class_name("scene");
|
||||
root.set_style_or_panic("height" , "100vh");
|
||||
root.set_style_or_panic("width" , "100vw");
|
||||
@ -478,20 +478,20 @@ impl DomLayers {
|
||||
let front = DomScene::new(logger);
|
||||
let fullscreen_vis = DomScene::new(logger);
|
||||
let back = DomScene::new(logger);
|
||||
canvas.set_style_or_warn("height" , "100vh" , &logger);
|
||||
canvas.set_style_or_warn("width" , "100vw" , &logger);
|
||||
canvas.set_style_or_warn("display" , "block" , &logger);
|
||||
canvas.set_style_or_warn("height" , "100vh" , logger);
|
||||
canvas.set_style_or_warn("width" , "100vw" , logger);
|
||||
canvas.set_style_or_warn("display" , "block" , logger);
|
||||
// Position must not be "static" to have z-index working.
|
||||
canvas.set_style_or_warn("position" , "absolute", &logger);
|
||||
canvas.set_style_or_warn("z-index" , "2" , &logger);
|
||||
canvas.set_style_or_warn("pointer-events", "none" , &logger);
|
||||
canvas.set_style_or_warn("position" , "absolute", logger);
|
||||
canvas.set_style_or_warn("z-index" , "2" , logger);
|
||||
canvas.set_style_or_warn("pointer-events", "none" , logger);
|
||||
front.dom.set_class_name("front");
|
||||
front.dom.set_style_or_warn("z-index", "3", &logger);
|
||||
front.dom.set_style_or_warn("z-index", "3", logger);
|
||||
back.dom.set_class_name("back");
|
||||
back.dom.set_style_or_warn("pointer-events", "auto", &logger);
|
||||
back.dom.set_style_or_warn("z-index" , "0" , &logger);
|
||||
back.dom.set_style_or_warn("pointer-events", "auto", logger);
|
||||
back.dom.set_style_or_warn("z-index" , "0" , logger);
|
||||
fullscreen_vis.dom.set_class_name("fullscreen_vis");
|
||||
fullscreen_vis.dom.set_style_or_warn("z-index" , "1" , &logger);
|
||||
fullscreen_vis.dom.set_style_or_warn("z-index" , "1" , logger);
|
||||
dom.append_or_panic(&canvas);
|
||||
dom.append_or_panic(&front.dom);
|
||||
dom.append_or_panic(&back.dom);
|
||||
@ -779,7 +779,7 @@ impl SceneData {
|
||||
let on_change = enclose!((dirty_flag) move || dirty_flag.set());
|
||||
let var_logger = Logger::sub(&logger,"global_variables");
|
||||
let variables = UniformScope::new(var_logger);
|
||||
let symbols = SymbolRegistry::mk(&variables,&stats,&logger,on_change);
|
||||
let symbols = SymbolRegistry::mk(&variables,stats,&logger,on_change);
|
||||
// FIXME: This should be abstracted away and should also handle context loss when Symbol
|
||||
// definition will be finally refactored in such way, that it would not require
|
||||
// Scene instance to be created.
|
||||
|
@ -68,7 +68,7 @@ fn setup_camera_perspective(dom:&web::JsValue, near:f32, matrix:&Matrix4<f32>) {
|
||||
// details.
|
||||
unsafe {
|
||||
let matrix_array = matrix.js_buffer_view();
|
||||
js::setup_camera_perspective(&dom,&near.into(),&matrix_array)
|
||||
js::setup_camera_perspective(dom,&near.into(),&matrix_array)
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ fn setup_camera_orthographic(dom:&web::JsValue, matrix:&Matrix4<f32>) {
|
||||
// details.
|
||||
unsafe {
|
||||
let matrix_array = matrix.js_buffer_view();
|
||||
js::setup_camera_orthographic(&dom,&matrix_array)
|
||||
js::setup_camera_orthographic(dom,&matrix_array)
|
||||
}
|
||||
}
|
||||
|
||||
@ -186,7 +186,7 @@ impl DomScene {
|
||||
let dom = object.dom();
|
||||
let data = &self.data;
|
||||
if object.is_visible() {
|
||||
self.view_projection_dom.append_or_panic(&dom);
|
||||
self.view_projection_dom.append_or_panic(dom);
|
||||
}
|
||||
object.display_object().set_on_hide(f_!(dom.remove()));
|
||||
object.display_object().set_on_show(f__!([data,dom] {
|
||||
|
@ -467,7 +467,7 @@ impl LayerModel {
|
||||
graph.extend(self.depth_order.borrow().clone().into_iter());
|
||||
for element in &*self.elements.borrow() {
|
||||
if let LayerElement::ShapeSystem(id) = element {
|
||||
if let Some(info) = self.shape_system_to_symbol_info_map.borrow().get(&id) {
|
||||
if let Some(info) = self.shape_system_to_symbol_info_map.borrow().get(id) {
|
||||
for &id2 in &info.below { graph.insert_dependency(*element,id2.into()); }
|
||||
for &id2 in &info.above { graph.insert_dependency(id2.into(),*element); }
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ pub fn set_object_transform(dom:&web::JsValue, matrix:&Matrix4<f32>) {
|
||||
// details.
|
||||
unsafe {
|
||||
let matrix_array = matrix.js_buffer_view();
|
||||
js::set_object_transform(&dom,&matrix_array);
|
||||
js::set_object_transform(dom,&matrix_array);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,8 +292,8 @@ impl Symbol {
|
||||
let shader_dirty = ShaderDirty::new(mat_dirt_logger,Box::new(on_mut));
|
||||
let surface_on_mut = Box::new(f!(surface_dirty.set()));
|
||||
let shader_on_mut = Box::new(f!(shader_dirty.set()));
|
||||
let shader = Shader::new(shader_logger,&stats,shader_on_mut);
|
||||
let surface = Mesh::new(surface_logger,&stats,surface_on_mut);
|
||||
let shader = Shader::new(shader_logger,stats,shader_on_mut);
|
||||
let surface = Mesh::new(surface_logger,stats,surface_on_mut);
|
||||
let variables = UniformScope::new(Logger::sub(&logger,"uniform_scope"));
|
||||
let global_variables = global_variables.clone_ref();
|
||||
let bindings = default();
|
||||
@ -540,10 +540,10 @@ impl Symbol {
|
||||
/// is executed, both program and VAO are bound to None.
|
||||
fn with_program<F:FnOnce(&WebGlProgram)>(&self, context:&Context, f:F) {
|
||||
if let Some(program) = self.shader.program().as_ref() {
|
||||
context.use_program(Some(&program));
|
||||
context.use_program(Some(program));
|
||||
let bindings = self.bindings.borrow();
|
||||
if let Some(vao) = bindings.vao.as_ref() {
|
||||
vao.with(|| { f(&program) });
|
||||
vao.with(|| { f(program) });
|
||||
}
|
||||
context.use_program(None);
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ impl World {
|
||||
// TODO: We may want to enable it on weak hardware.
|
||||
// pixel_read_pass.set_threshold(1);
|
||||
let pipeline = RenderPipeline::new()
|
||||
.add(SymbolsRenderPass::new(&self.scene.symbols(),&self.scene.layers))
|
||||
.add(SymbolsRenderPass::new(self.scene.symbols(),&self.scene.layers))
|
||||
.add(ScreenRenderPass::new(self))
|
||||
.add(pixel_read_pass);
|
||||
self.scene.renderer.set_pipeline(pipeline);
|
||||
|
@ -261,17 +261,17 @@ impl Cursor {
|
||||
// host during the movement. After it is fully attached, cursor moves with the same
|
||||
// speed as the scene when panning.
|
||||
//
|
||||
let press = Animation :: <f32> :: new(&network);
|
||||
let radius = DEPRECATED_Animation :: <f32> :: new(&network);
|
||||
let size = DEPRECATED_Animation :: <Vector2> :: new(&network);
|
||||
let offset = DEPRECATED_Animation :: <Vector2> :: new(&network);
|
||||
let color_lab = DEPRECATED_Animation :: <Vector3> :: new(&network);
|
||||
let color_alpha = DEPRECATED_Animation :: <f32> :: new(&network);
|
||||
let inactive_fade = DEPRECATED_Animation :: <f32> :: new(&network);
|
||||
let host_position = DEPRECATED_Animation :: <Vector3> :: new(&network);
|
||||
let host_follow_weight = DEPRECATED_Animation :: <f32> :: new(&network);
|
||||
let host_attached_weight = DEPRECATED_Tween :: new(&network);
|
||||
let port_selection_layer_weight = Animation :: <f32> :: new(&network);
|
||||
let press = Animation :: <f32> :: new(network);
|
||||
let radius = DEPRECATED_Animation :: <f32> :: new(network);
|
||||
let size = DEPRECATED_Animation :: <Vector2> :: new(network);
|
||||
let offset = DEPRECATED_Animation :: <Vector2> :: new(network);
|
||||
let color_lab = DEPRECATED_Animation :: <Vector3> :: new(network);
|
||||
let color_alpha = DEPRECATED_Animation :: <f32> :: new(network);
|
||||
let inactive_fade = DEPRECATED_Animation :: <f32> :: new(network);
|
||||
let host_position = DEPRECATED_Animation :: <Vector3> :: new(network);
|
||||
let host_follow_weight = DEPRECATED_Animation :: <f32> :: new(network);
|
||||
let host_attached_weight = DEPRECATED_Tween :: new(network);
|
||||
let port_selection_layer_weight = Animation :: <f32> :: new(network);
|
||||
|
||||
host_attached_weight.set_duration(300.0);
|
||||
color_lab.set_target_value(DEFAULT_COLOR.opaque.into());
|
||||
|
@ -13,7 +13,6 @@
|
||||
#![feature(fn_traits)]
|
||||
#![feature(specialization)]
|
||||
#![feature(trait_alias)]
|
||||
#![feature(try_trait)]
|
||||
#![feature(marker_trait_attr)]
|
||||
#![feature(min_type_alias_impl_trait)]
|
||||
#![feature(unboxed_closures)]
|
||||
|
@ -58,7 +58,7 @@ TextureReload for Texture<GpuOnly,I,T> {
|
||||
let format = Self::gl_format().into();
|
||||
let elem_type = Self::gl_elem_type();
|
||||
|
||||
self.context().bind_texture(target,Some(&self.gl_texture()));
|
||||
self.context().bind_texture(target,Some(self.gl_texture()));
|
||||
self.context().tex_image_2d_with_i32_and_i32_and_i32_and_format_and_type_and_opt_u8_array
|
||||
(target,level,internal_format,width,height,border,format,elem_type,None).unwrap();
|
||||
|
||||
|
@ -62,7 +62,7 @@ Texture<RemoteImage,I,T> {
|
||||
let height = 1;
|
||||
let border = 0;
|
||||
let color = vec![0,0,255,255];
|
||||
self.context().bind_texture(Context::TEXTURE_2D,Some(&self.gl_texture()));
|
||||
self.context().bind_texture(Context::TEXTURE_2D,Some(self.gl_texture()));
|
||||
self.context().tex_image_2d_with_i32_and_i32_and_i32_and_format_and_type_and_opt_u8_array
|
||||
(target,level,internal_format,width,height,border,format,elem_type,Some(&color)).unwrap();
|
||||
}
|
||||
|
@ -72,21 +72,21 @@ pub trait CompilationTarget {
|
||||
|
||||
impl CompilationTarget for Shader {
|
||||
fn check(&self, ctx: &Context) -> bool {
|
||||
ctx.get_shader_parameter(&self, Context::COMPILE_STATUS).as_bool().unwrap_or(false)
|
||||
ctx.get_shader_parameter(self, Context::COMPILE_STATUS).as_bool().unwrap_or(false)
|
||||
}
|
||||
|
||||
fn logs(&self, ctx: &Context) -> String {
|
||||
unwrap_error(ctx.get_shader_info_log(&self))
|
||||
unwrap_error(ctx.get_shader_info_log(self))
|
||||
}
|
||||
}
|
||||
|
||||
impl CompilationTarget for Program {
|
||||
fn check(&self, ctx: &Context) -> bool {
|
||||
ctx.get_program_parameter(&self, Context::LINK_STATUS).as_bool().unwrap_or(false)
|
||||
ctx.get_program_parameter(self, Context::LINK_STATUS).as_bool().unwrap_or(false)
|
||||
}
|
||||
|
||||
fn logs(&self, ctx: &Context) -> String {
|
||||
unwrap_error(ctx.get_program_info_log(&self))
|
||||
unwrap_error(ctx.get_program_info_log(self))
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ pub fn link_program(ctx:&Context, vert_shader:&Shader, frag_shader:&Shader) -> R
|
||||
/// Set the array buffer data with floats.
|
||||
pub fn set_buffer_data(gl_context:&Context, buffer:&WebGlBuffer, data:&[f32]) {
|
||||
let target = Context::ARRAY_BUFFER;
|
||||
gl_context.bind_buffer(target,Some(&buffer));
|
||||
gl_context.bind_buffer(target,Some(buffer));
|
||||
set_bound_buffer_data(gl_context,target,data);
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ pub fn set_buffer_data(gl_context:&Context, buffer:&WebGlBuffer, data:&[f32]) {
|
||||
fn set_bound_buffer_data(gl_context:&Context, target:u32, data:&[f32]) {
|
||||
let usage = Context::STATIC_DRAW;
|
||||
unsafe {
|
||||
let float_array = Float32Array::view(&data);
|
||||
let float_array = Float32Array::view(data);
|
||||
gl_context.buffer_data_with_array_buffer_view(target,&float_array,usage);
|
||||
}
|
||||
}
|
||||
@ -183,7 +183,7 @@ fn set_bound_buffer_data(gl_context:&Context, target:u32, data:&[f32]) {
|
||||
/// Set the array buffer fragment with with floats.
|
||||
pub fn set_buffer_subdata(gl_context:&Context, buffer:&WebGlBuffer, offset:usize, data:&[f32]) {
|
||||
let target = Context::ARRAY_BUFFER;
|
||||
gl_context.bind_buffer(target,Some(&buffer));
|
||||
gl_context.bind_buffer(target,Some(buffer));
|
||||
set_bound_buffer_subdata(gl_context,target,offset as i32,data);
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ pub fn set_buffer_subdata(gl_context:&Context, buffer:&WebGlBuffer, offset:usize
|
||||
#[allow(unsafe_code)]
|
||||
fn set_bound_buffer_subdata(gl_context:&Context, target:u32, offset:i32, data:&[f32]) {
|
||||
unsafe {
|
||||
let float_array = Float32Array::view(&data);
|
||||
let float_array = Float32Array::view(data);
|
||||
gl_context.buffer_sub_data_with_i32_and_array_buffer_view(target,offset,&float_array);
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ mod deja_vu {
|
||||
|
||||
pub fn download_and_extract_all_fonts(out_dir : &path::Path) {
|
||||
let package_path = out_dir.join(PACKAGE.filename);
|
||||
PACKAGE.download(&out_dir);
|
||||
PACKAGE.download(out_dir);
|
||||
extract_all_fonts(package_path.as_path());
|
||||
}
|
||||
|
||||
|
@ -306,7 +306,7 @@ impl Area {
|
||||
let mouse = &scene.mouse.frp;
|
||||
let input = &self.frp.input;
|
||||
let out = &self.frp.output;
|
||||
let pos = DEPRECATED_Animation :: <Vector2> :: new(&network);
|
||||
let pos = DEPRECATED_Animation :: <Vector2> :: new(network);
|
||||
let keyboard = &scene.keyboard;
|
||||
let m = &model;
|
||||
pos.update_spring(|spring| spring*2.0);
|
||||
|
@ -1026,7 +1026,7 @@ impl Crumbable for crate::Match<Ast> {
|
||||
fn iter_subcrumbs<'a>(&'a self) -> Box<dyn Iterator<Item=Self::Crumb> + 'a> {
|
||||
let mut crumbs = vec![];
|
||||
if let Some(pat) = &self.pfx {
|
||||
for crumb in pattern_subcrumbs(&pat) {
|
||||
for crumb in pattern_subcrumbs(pat) {
|
||||
crumbs.push(MatchCrumb::Pfx{val:crumb});
|
||||
}
|
||||
}
|
||||
@ -1051,7 +1051,7 @@ impl Crumbable for crate::Ambiguous<Ast> {
|
||||
AmbiguousSegmentCrumb::Body =>
|
||||
&seg.body.as_ref().ok_or_else(|| NotPresent("body".into()))?.wrapped,
|
||||
};
|
||||
Ok(&ast)
|
||||
Ok(ast)
|
||||
}
|
||||
|
||||
fn set(&self, crumb:&Self::Crumb, new_ast:Ast) -> FallibleResult<Self> {
|
||||
|
@ -314,7 +314,7 @@ impl Ast {
|
||||
/// Returned index is the position of the first character of child's text representation within
|
||||
/// the text representation of this AST node.
|
||||
pub fn child_offset(&self, child:&Ast) -> FallibleResult<Index> {
|
||||
let searched_token = Token::Ast(&child);
|
||||
let searched_token = Token::Ast(child);
|
||||
let mut found_child = false;
|
||||
let mut position = 0;
|
||||
self.shape().feed_to(&mut |token:Token| {
|
||||
|
@ -83,7 +83,7 @@ pub fn as_lambda(ast:&Ast) -> Option<LambdaInfo> {
|
||||
let arg = ast.get_located(child_iter.next()?).ok()?;
|
||||
let opr = ast.get_located(child_iter.next()?).ok()?;
|
||||
let body = ast.get_located(child_iter.next()?).ok()?;
|
||||
let is_arrow = crate::opr::is_arrow_opr(&opr.item);
|
||||
let is_arrow = crate::opr::is_arrow_opr(opr.item);
|
||||
is_arrow.then_some(LambdaInfo {arg,opr,body})
|
||||
}
|
||||
|
||||
|
@ -346,12 +346,12 @@ impl Chain {
|
||||
/// If this is infix, it flattens whole chain and returns result.
|
||||
/// Otherwise, returns None.
|
||||
pub fn try_new(ast:&Ast) -> Option<Chain> {
|
||||
GeneralizedInfix::try_new(&ast).map(|infix| infix.flatten())
|
||||
GeneralizedInfix::try_new(ast).map(|infix| infix.flatten())
|
||||
}
|
||||
|
||||
/// Flattens infix chain if this is infix application of given operator.
|
||||
pub fn try_new_of(ast:&Ast, operator:&str) -> Option<Chain> {
|
||||
let infix = GeneralizedInfix::try_new(&ast)?;
|
||||
let infix = GeneralizedInfix::try_new(ast)?;
|
||||
(infix.name() == operator).as_some_from(|| infix.flatten())
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ pub fn to_variant_types
|
||||
let variant_decls = variant_idents.iter().zip(structs.iter())
|
||||
.map(|(i,v)| gen_variant_decl(i,v));
|
||||
let variant_froms = variant_idents.iter().zip(structs.iter())
|
||||
.map(|(i,v)| gen_from_impls(i, &decl, &v));
|
||||
.map(|(i,v)| gen_from_impls(i, &decl, v));
|
||||
|
||||
// Handle single value, unnamed params as created by user.
|
||||
let structs = structs.iter().filter(|v| match &v.fields {
|
||||
@ -267,7 +267,7 @@ pub fn derive_has_tokens
|
||||
(input:proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
let decl = syn::parse_macro_input!(input as syn::DeriveInput);
|
||||
let ret = match decl.data {
|
||||
syn::Data::Enum(ref e) => token::derive_for_enum(&decl, &e),
|
||||
syn::Data::Enum(ref e) => token::derive_for_enum(&decl, e),
|
||||
_ => quote! {},
|
||||
};
|
||||
proc_macro::TokenStream::from(ret)
|
||||
|
@ -308,7 +308,7 @@ impl SerializableUnion for FromServerPayloadOwned {
|
||||
Success::create(builder, &SuccessArgs {}).as_union_value()
|
||||
}
|
||||
FromServerPayloadOwned::Error {code,message,data} => {
|
||||
let message = builder.create_string(&message);
|
||||
let message = builder.create_string(message);
|
||||
let data_serialized = data.serialize(builder);
|
||||
Error::create(builder, &ErrorArgs {
|
||||
code : *code,
|
||||
@ -318,13 +318,13 @@ impl SerializableUnion for FromServerPayloadOwned {
|
||||
}).as_union_value()
|
||||
}
|
||||
FromServerPayloadOwned::FileContentsReply {contents} => {
|
||||
let contents = builder.create_vector(&contents);
|
||||
let contents = builder.create_vector(contents);
|
||||
FileContentsReply::create(builder, &FileContentsReplyArgs {
|
||||
contents : Some(contents)
|
||||
}).as_union_value()
|
||||
}
|
||||
FromServerPayloadOwned::VisualizationUpdate {data,context} => {
|
||||
let data = builder.create_vector(&data);
|
||||
let data = builder.create_vector(data);
|
||||
let context = context.serialize(builder);
|
||||
VisualisationUpdate::create(builder, &VisualisationUpdateArgs {
|
||||
data : Some(data),
|
||||
|
@ -216,7 +216,7 @@ pub fn decode_incoming_message
|
||||
use serde_json::Value;
|
||||
use serde_json::from_str;
|
||||
use serde_json::from_value;
|
||||
let message = from_str::<Message<Value>>(&message)?;
|
||||
let message = from_str::<Message<Value>>(message)?;
|
||||
from_value::<IncomingMessage>(message.payload)
|
||||
}
|
||||
|
||||
|
@ -112,13 +112,13 @@ impl SourceFile {
|
||||
}
|
||||
|
||||
/// Get fragment of serialized string with code.
|
||||
pub fn code_slice(&self) -> &str { &self.slice(&self.code) }
|
||||
pub fn code_slice(&self) -> &str { self.slice(&self.code) }
|
||||
|
||||
/// Get fragment of serialized string with id map.
|
||||
pub fn id_map_slice (&self) -> &str { &self.slice(&self.id_map) }
|
||||
pub fn id_map_slice (&self) -> &str { self.slice(&self.id_map) }
|
||||
|
||||
/// Get fragment of serialized string with metadata.
|
||||
pub fn metadata_slice(&self) -> &str { &self.slice(&self.metadata) }
|
||||
pub fn metadata_slice(&self) -> &str { self.slice(&self.metadata) }
|
||||
|
||||
fn slice(&self, range:&Range<ByteIndex>) -> &str {
|
||||
&self.content[range.start.value..range.end.value]
|
||||
|
@ -130,7 +130,7 @@ impl Parser {
|
||||
/// deeply nested ASTs.
|
||||
pub fn from_json_str_without_recursion_limit<'de, Value:serde::Deserialize<'de>>(json_text:&'de str)
|
||||
-> Result<Value,serde_json::Error> {
|
||||
let mut de = serde_json::Deserializer::from_str(&json_text);
|
||||
let mut de = serde_json::Deserializer::from_str(json_text);
|
||||
de.disable_recursion_limit();
|
||||
Value::deserialize(&mut de)
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ pub const PORT_VAR: &str = "ENSO_PARSER_PORT";
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
#[allow(clippy::enum_variant_names)]
|
||||
#[derive(Debug, Fail)]
|
||||
pub enum Error {
|
||||
#[fail(display = "Failed to parse given address url: {}", _0)]
|
||||
@ -88,6 +89,7 @@ impl From<serde_json::error::Error> for Error {
|
||||
// ==============
|
||||
|
||||
/// All request supported by the Parser Service.
|
||||
#[allow(clippy::enum_variant_names)]
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize)]
|
||||
pub enum Request {
|
||||
ParseRequest { program : String, ids : IdMap },
|
||||
|
@ -115,7 +115,7 @@ impl<'a,T> Implementation for node::Ref<'a,T> {
|
||||
let kind = &ins_point.kind;
|
||||
let ast = root.get_traversing(&self.ast_crumbs)?;
|
||||
let expect_arg = matches!(kind, ExpectedArgument(_));
|
||||
let extended_infix = (!expect_arg).and_option_from(|| ast::opr::Chain::try_new(&ast));
|
||||
let extended_infix = (!expect_arg).and_option_from(|| ast::opr::Chain::try_new(ast));
|
||||
let new_ast = modify_preserving_id(ast, |ast|
|
||||
if let Some(mut infix) = extended_infix {
|
||||
let item = ArgWithOffset {arg:new, offset:DEFAULT_OFFSET};
|
||||
|
@ -376,7 +376,7 @@ fn generate_node_for_known_match<T:Payload>
|
||||
let children_kind = node::Kind::argument().with_removable(removable);
|
||||
let mut gen = ChildGenerator::default();
|
||||
if let Some(pat) = &this.pfx {
|
||||
for macros::AstInPattern {ast,crumbs} in macros::all_ast_nodes_in_pattern(&pat) {
|
||||
for macros::AstInPattern {ast,crumbs} in macros::all_ast_nodes_in_pattern(pat) {
|
||||
let ast_crumb = ast::crumbs::MatchCrumb::Pfx {val:crumbs};
|
||||
let located_ast = Located::new(ast_crumb,ast.wrapped);
|
||||
gen.generate_ast_node(located_ast,children_kind.clone(),context)?;
|
||||
|
@ -64,18 +64,18 @@ impl<'a> PatternDfs<'a> {
|
||||
fn push_children_to_visit(&mut self, pattern:&LocatedPattern<'a>) {
|
||||
use ast::MacroPatternMatchRaw::*;
|
||||
match pattern.pattern.deref() {
|
||||
Except(pat) => self.push_child_to_visit(&pattern,&pat.elem,PatternMatchCrumb::Except),
|
||||
Tag(pat) => self.push_child_to_visit(&pattern,&pat.elem,PatternMatchCrumb::Tag),
|
||||
Cls(pat) => self.push_child_to_visit(&pattern,&pat.elem,PatternMatchCrumb::Cls),
|
||||
Or(pat) => self.push_child_to_visit(&pattern,&pat.elem,PatternMatchCrumb::Or),
|
||||
Except(pat) => self.push_child_to_visit(pattern,&pat.elem,PatternMatchCrumb::Except),
|
||||
Tag(pat) => self.push_child_to_visit(pattern,&pat.elem,PatternMatchCrumb::Tag),
|
||||
Cls(pat) => self.push_child_to_visit(pattern,&pat.elem,PatternMatchCrumb::Cls),
|
||||
Or(pat) => self.push_child_to_visit(pattern,&pat.elem,PatternMatchCrumb::Or),
|
||||
Seq(pat) => {
|
||||
let (left_elem,right_elem) = &pat.elem;
|
||||
self.push_child_to_visit(&pattern,right_elem,PatternMatchCrumb::Seq{right:true});
|
||||
self.push_child_to_visit(&pattern,left_elem ,PatternMatchCrumb::Seq{right:false});
|
||||
self.push_child_to_visit(pattern,right_elem,PatternMatchCrumb::Seq{right:true});
|
||||
self.push_child_to_visit(pattern,left_elem ,PatternMatchCrumb::Seq{right:false});
|
||||
},
|
||||
Many(pat) => {
|
||||
for (index,elem) in pat.elem.iter().enumerate().rev() {
|
||||
self.push_child_to_visit(&pattern,elem,PatternMatchCrumb::Many {index});
|
||||
self.push_child_to_visit(pattern,elem,PatternMatchCrumb::Many {index});
|
||||
}
|
||||
}
|
||||
// Other patterns does not have children.
|
||||
|
@ -56,7 +56,7 @@ impl<'a,T:Payload> Iterator for LeafIterator<'a,T> {
|
||||
impl<'a,T> LeafIterator<'a,T> {
|
||||
/// Create iterator iterating over leafs of subtree rooted on `node`.
|
||||
pub fn new(node: node::Ref<'a,T>, fragment:TreeFragment) -> Self {
|
||||
let stack = vec![StackFrame {node:&node.node, child_being_visited:0}];
|
||||
let stack = vec![StackFrame {node:node.node, child_being_visited:0}];
|
||||
let next_node = node.node.children.first().map(|ch| &ch.node);
|
||||
let base_node = node;
|
||||
let mut this = Self {stack,next_node,base_node,fragment};
|
||||
@ -81,8 +81,8 @@ impl<'a,T> LeafIterator<'a,T> {
|
||||
|
||||
fn descend_to_leaf(&mut self) {
|
||||
if let Some(mut current) = std::mem::take(&mut self.next_node) {
|
||||
while self.can_descend(¤t) && !current.children.is_empty() {
|
||||
self.stack.push(StackFrame { node: ¤t, child_being_visited: 0 });
|
||||
while self.can_descend(current) && !current.children.is_empty() {
|
||||
self.stack.push(StackFrame { node: current, child_being_visited: 0 });
|
||||
current = ¤t.children.first().unwrap().node;
|
||||
}
|
||||
self.next_node = Some(current);
|
||||
|
@ -502,7 +502,7 @@ impl<'a,T:Payload> Ref<'a,T> {
|
||||
Some(self)
|
||||
} else {
|
||||
self.children_iter().find_map(|ch|
|
||||
ch.span().contains_span(span).and_option_from(|| ch.find_by_span(&span))
|
||||
ch.span().contains_span(span).and_option_from(|| ch.find_by_span(span))
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -511,7 +511,7 @@ impl<'a,T:Payload> Ref<'a,T> {
|
||||
impl<'a,T> Deref for Ref<'a,T> {
|
||||
type Target = Node<T>;
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.node
|
||||
self.node
|
||||
}
|
||||
}
|
||||
|
||||
@ -671,7 +671,7 @@ impl<'a,T:Payload> RefMut<'a,T> {
|
||||
impl<'a,T> Deref for RefMut<'a,T> {
|
||||
type Target = Node<T>;
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.node
|
||||
self.node
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ impl ParsedInput {
|
||||
}
|
||||
|
||||
fn new_from_ast(ast:&Ast) -> Self {
|
||||
let prefix = ast::prefix::Chain::from_ast_non_strict(&ast);
|
||||
let prefix = ast::prefix::Chain::from_ast_non_strict(ast);
|
||||
ParsedInput {
|
||||
expression : Some(ast::Shifted::new(default(),prefix)),
|
||||
pattern_offset : 0,
|
||||
@ -335,7 +335,7 @@ impl ThisNode {
|
||||
// form. If we wanted to support pattern subparts, the engine would need to send us
|
||||
// value updates for matched pattern pieces. See the issue:
|
||||
// https://github.com/enso-org/enso/issues/1038
|
||||
(ast::identifier::as_var(&ast)?.to_owned(),false)
|
||||
(ast::identifier::as_var(ast)?.to_owned(),false)
|
||||
} else {
|
||||
(graph.variable_name_for(&node.info).ok()?.repr(),true)
|
||||
};
|
||||
@ -392,7 +392,7 @@ impl FragmentAddedByPickingSuggestion {
|
||||
|
||||
fn code_to_insert(&self, current_module:&QualifiedName, this_node:&Option<ThisNode>) -> CodeToInsert {
|
||||
let generate_this = self.id != CompletedFragmentId::Function || this_node.is_none();
|
||||
self.picked_suggestion.code_to_insert(Some(¤t_module),generate_this)
|
||||
self.picked_suggestion.code_to_insert(Some(current_module),generate_this)
|
||||
}
|
||||
}
|
||||
|
||||
@ -542,7 +542,7 @@ impl Searcher {
|
||||
/// in a new action list (the appropriate notification will be emitted).
|
||||
pub fn set_input(&self, new_input:String) -> FallibleResult {
|
||||
debug!(self.logger, "Manually setting input to {new_input}.");
|
||||
let parsed_input = ParsedInput::new(new_input,&self.ide.parser())?;
|
||||
let parsed_input = ParsedInput::new(new_input,self.ide.parser())?;
|
||||
let old_expr = self.data.borrow().input.expression.repr();
|
||||
let new_expr = parsed_input.expression.repr();
|
||||
|
||||
|
@ -84,7 +84,7 @@ impl Handle {
|
||||
use FileHandle::*;
|
||||
match &self.file {
|
||||
PlainText {path,language_server} => {
|
||||
let response = language_server.read_file(&path).await;
|
||||
let response = language_server.read_file(path).await;
|
||||
response.map(|response| response.contents)
|
||||
},
|
||||
Module{controller} => Ok(controller.code())
|
||||
|
@ -150,7 +150,7 @@ impl Handle {
|
||||
},
|
||||
VisualizationPath::File(path) => {
|
||||
let project = visualization::path::Project::CurrentProject;
|
||||
let js_code = self.language_server_rpc.read_file(&path).await?.contents;
|
||||
let js_code = self.language_server_rpc.read_file(path).await?.contents;
|
||||
let wrap_error = |err| {
|
||||
Error::js_preparation_error(visualization.clone(),err).into()
|
||||
};
|
||||
|
@ -196,7 +196,7 @@ impl AliasAnalyzer {
|
||||
|
||||
/// Processes the given AST, while crumb is temporarily pushed to the current location.
|
||||
fn process_located_ast(&mut self, located_ast:&Located<impl Borrow<Ast>>) {
|
||||
self.in_location_of(&located_ast, |this| this.process_ast(located_ast.item.borrow()))
|
||||
self.in_location_of(located_ast, |this| this.process_ast(located_ast.item.borrow()))
|
||||
}
|
||||
|
||||
/// Processes subtrees of the given AST denoted by given crumbs
|
||||
@ -223,7 +223,7 @@ impl AliasAnalyzer {
|
||||
///
|
||||
/// This is the primary function that is recursively being called as the AST is being traversed.
|
||||
pub fn process_ast(&mut self, ast:&Ast) {
|
||||
if let Some(definition) = DefinitionInfo::from_line_ast(&ast,ScopeKind::NonRoot,default()) {
|
||||
if let Some(definition) = DefinitionInfo::from_line_ast(ast,ScopeKind::NonRoot,default()) {
|
||||
self.process_definition(&definition)
|
||||
} else if let Some(assignment) = ast::opr::to_assignment(ast) {
|
||||
self.process_assignment(&assignment);
|
||||
|
@ -40,9 +40,9 @@ impl Endpoint {
|
||||
_ => None,
|
||||
}?;
|
||||
let line_ast = block.get(&line_crumb).ok()?;
|
||||
let definition = DefinitionInfo::from_line_ast(&line_ast,ScopeKind::NonRoot,block.indent);
|
||||
let definition = DefinitionInfo::from_line_ast(line_ast,ScopeKind::NonRoot,block.indent);
|
||||
let is_non_def = definition.is_none();
|
||||
let node = is_non_def.and_option_from(|| NodeInfo::from_line_ast(&line_ast))?.id();
|
||||
let node = is_non_def.and_option_from(|| NodeInfo::from_line_ast(line_ast))?.id();
|
||||
Some(Endpoint { node, crumbs })
|
||||
}
|
||||
}
|
||||
|
@ -175,8 +175,8 @@ impl QualifiedName {
|
||||
|
||||
let text = text.as_ref();
|
||||
let segments = text.split(ACCESS);
|
||||
if let [ref project_name,ref id_segments @ ..] = *segments.collect_vec().as_slice() {
|
||||
let project_name = ReferentName::new(*project_name)?;
|
||||
if let [project_name,ref id_segments @ ..] = *segments.collect_vec().as_slice() {
|
||||
let project_name = ReferentName::new(project_name)?;
|
||||
let id = Id::try_new(id_segments)?;
|
||||
Ok(Self::new(project_name,id))
|
||||
} else {
|
||||
@ -489,7 +489,7 @@ impl Info {
|
||||
pub fn add_module_import
|
||||
(&mut self, here:&QualifiedName, parser:&parser::Parser, to_add:&QualifiedName) {
|
||||
let is_here = to_add == here;
|
||||
let import = ImportInfo::from_qualified_name(&to_add);
|
||||
let import = ImportInfo::from_qualified_name(to_add);
|
||||
let already_imported = self.iter_imports().any(|imp| imp == import);
|
||||
if !is_here && !already_imported {
|
||||
self.add_import(parser,import);
|
||||
@ -658,7 +658,7 @@ pub fn locate_line_with
|
||||
pub fn locate_child
|
||||
(ast:&known::Module, crumb:&definition::Crumb)
|
||||
-> FallibleResult<ChildDefinition> {
|
||||
let child = ast.def_iter().find_by_name(&crumb)?;
|
||||
let child = ast.def_iter().find_by_name(crumb)?;
|
||||
Ok(ChildDefinition::try_from(child)?)
|
||||
}
|
||||
|
||||
@ -669,7 +669,7 @@ pub fn locate
|
||||
// Not exactly regular - we need special case for the first crumb as it is not a definition nor
|
||||
// a children. After this we can go just from one definition to another.
|
||||
let first_crumb = crumbs_iter.next().ok_or(EmptyDefinitionId)?;
|
||||
let mut child = ast.def_iter().find_by_name(&first_crumb)?;
|
||||
let mut child = ast.def_iter().find_by_name(first_crumb)?;
|
||||
for crumb in crumbs_iter {
|
||||
child = definition::resolve_single_name(child,crumb)?;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ pub fn is_node_by_id(line:&ast::BlockLine<Option<Ast>>, id:ast::Id) -> bool {
|
||||
/// Searches for `NodeInfo` with the associated `id` index in `lines`. Returns an error if
|
||||
/// the Id is not found.
|
||||
pub fn index_in_lines(lines:&[ast::BlockLine<Option<Ast>>], id:ast::Id) -> FallibleResult<usize> {
|
||||
let position = lines.iter().position(|line| is_node_by_id(&line,id));
|
||||
let position = lines.iter().position(|line| is_node_by_id(line,id));
|
||||
position.ok_or_else(|| IdNotFound{id}.into())
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@ impl NodeInfo {
|
||||
pub fn expression(&self) -> &Ast {
|
||||
match self {
|
||||
NodeInfo::Binding {infix} => &infix.rarg,
|
||||
NodeInfo::Expression{ast} => &ast,
|
||||
NodeInfo::Expression{ast} => ast,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -342,7 +342,7 @@ impl Collapser {
|
||||
if !self.extracted.is_selected(node_id) {
|
||||
Ok(LineDisposition::Keep)
|
||||
} else if node_id == self.replaced_node {
|
||||
let expression = self.call_to_extracted(&extracted_definition)?;
|
||||
let expression = self.call_to_extracted(extracted_definition)?;
|
||||
let no_node_err = failure::Error::from(CannotConstructCollapsedNode);
|
||||
let mut new_node = NodeInfo::new_expression(expression.clone_ref()).ok_or(no_node_err)?;
|
||||
new_node.set_id(self.collapsed_node);
|
||||
|
@ -36,7 +36,7 @@ pub fn apply_code_change_to_id_map(id_map:&mut IdMap, change:&data::text::TextCh
|
||||
info!(logger,"Updating the ID map with the following text edit: {change:?}.");
|
||||
|
||||
// Remove all entries fully covered by the removed span.
|
||||
vector.drain_filter(|(span,_)| removed.contains_span(&span));
|
||||
vector.drain_filter(|(span,_)| removed.contains_span(span));
|
||||
|
||||
// If the edited section ends up being the trailing part of AST node, how many bytes should be
|
||||
// trimmed from the id. Precalculated, as is constant in the loop below.
|
||||
|
@ -921,7 +921,7 @@ impl Model {
|
||||
Some(Panic { message,trace }) => Some((Kind::Panic , Some(message),trace)),
|
||||
}?;
|
||||
let propagated = if kind == Kind::Panic {
|
||||
let root_cause = self.get_node_causing_error_on_current_graph(&trace);
|
||||
let root_cause = self.get_node_causing_error_on_current_graph(trace);
|
||||
!root_cause.contains(&node_id)
|
||||
} else {
|
||||
// TODO[ao]: traces are not available for Dataflow errors.
|
||||
@ -939,7 +939,7 @@ impl Model {
|
||||
fn get_node_causing_error_on_current_graph
|
||||
(&self, trace:&[ExpressionId]) -> Option<graph_editor::NodeId> {
|
||||
let node_view_by_expression = self.node_view_by_expression.borrow();
|
||||
trace.iter().find_map(|expr_id| node_view_by_expression.get(&expr_id).copied())
|
||||
trace.iter().find_map(|expr_id| node_view_by_expression.get(expr_id).copied())
|
||||
}
|
||||
|
||||
fn refresh_connection_views
|
||||
@ -1031,7 +1031,7 @@ impl Model {
|
||||
self.view.show_prompt();
|
||||
self.prompt_was_shown.set(true);
|
||||
}
|
||||
self.refresh_computed_infos(&expressions)
|
||||
self.refresh_computed_infos(expressions)
|
||||
}
|
||||
|
||||
/// Request controller to detach all attached visualizations.
|
||||
@ -1200,7 +1200,7 @@ impl Model {
|
||||
fn searcher_opened_in_ui(weak_self:Weak<Self>)
|
||||
-> impl Fn(&Self,&graph_editor::NodeId) -> FallibleResult {
|
||||
move |this,displayed_id| {
|
||||
let node_view = this.view.graph().model.nodes.get_cloned_ref(&displayed_id);
|
||||
let node_view = this.view.graph().model.nodes.get_cloned_ref(displayed_id);
|
||||
let position = node_view.map(|node| node.position().xy());
|
||||
let position = position.map(|vector| model::module::Position{vector});
|
||||
let mode = controller::searcher::Mode::NewNode {position};
|
||||
@ -1309,7 +1309,7 @@ impl Model {
|
||||
|
||||
fn connection_created_in_ui(&self, edge_id:&graph_editor::EdgeId) -> FallibleResult {
|
||||
debug!(self.logger, "Creating connection.");
|
||||
let displayed = self.view.graph().model.edges.get_cloned(&edge_id).ok_or(GraphEditorInconsistency)?;
|
||||
let displayed = self.view.graph().model.edges.get_cloned(edge_id).ok_or(GraphEditorInconsistency)?;
|
||||
let con = self.controller_connection_from_displayed(&displayed)?;
|
||||
let inserting = self.connection_views.borrow_mut().insert(con.clone(), *edge_id);
|
||||
if inserting.did_overwrite() {
|
||||
|
@ -122,7 +122,7 @@ impl ComputedValueInfoRegistry {
|
||||
pub fn get_from_info<F,T>(self:&Rc<Self>, id:ExpressionId, mut f:F) -> StaticBoxFuture<Option<T>>
|
||||
where F : FnMut(Rc<ComputedValueInfo>) -> Option<T> + 'static,
|
||||
T : 'static {
|
||||
let weak = Rc::downgrade(&self);
|
||||
let weak = Rc::downgrade(self);
|
||||
if let Some(ret) = self.get(&id).and_then(&mut f) {
|
||||
ready_boxed(Some(ret))
|
||||
} else {
|
||||
|
@ -115,7 +115,7 @@ impl model::execution_context::API for ExecutionContext {
|
||||
|
||||
/// Access the registry of computed values information, like types or called method pointers.
|
||||
fn computed_value_info_registry(&self) -> &Rc<ComputedValueInfoRegistry> {
|
||||
&self.model.computed_value_info_registry()
|
||||
self.model.computed_value_info_registry()
|
||||
}
|
||||
|
||||
fn stack_items<'a>(&'a self) -> Box<dyn Iterator<Item=LocalCall> + 'a> {
|
||||
|
@ -71,13 +71,13 @@ impl ParsedContentSummary {
|
||||
}
|
||||
|
||||
// Get fragment of string with code.
|
||||
pub fn code_slice(&self) -> &str { &self.slice(&self.code) }
|
||||
pub fn code_slice(&self) -> &str { self.slice(&self.code) }
|
||||
|
||||
/// Get fragment of string with id map.
|
||||
pub fn id_map_slice (&self) -> &str { &self.slice(&self.id_map) }
|
||||
pub fn id_map_slice (&self) -> &str { self.slice(&self.id_map) }
|
||||
|
||||
/// Get fragment of string with metadata.
|
||||
pub fn metadata_slice(&self) -> &str { &self.slice(&self.metadata) }
|
||||
pub fn metadata_slice(&self) -> &str { self.slice(&self.metadata) }
|
||||
|
||||
fn slice(&self, range:&Range<TextLocation>) -> &str {
|
||||
let start_ix = range.start.to_index(&self.source);
|
||||
@ -291,7 +291,7 @@ impl Module {
|
||||
self.full_invalidation(summary,new_file).await,
|
||||
LanguageServerContent::Synchronized(summary) => match kind {
|
||||
NotificationKind::Invalidate =>
|
||||
self.partial_invalidation(&summary,new_file).await,
|
||||
self.partial_invalidation(summary,new_file).await,
|
||||
NotificationKind::CodeChanged{change,replaced_location} => {
|
||||
let code_change = TextEdit {
|
||||
range: replaced_location.into(),
|
||||
@ -336,7 +336,7 @@ impl Module {
|
||||
debug_assert_eq!(start.column, 0);
|
||||
|
||||
(source != target).as_some_from(|| {
|
||||
let edit = TextEdit::from_prefix_postfix_differences(&source, &target);
|
||||
let edit = TextEdit::from_prefix_postfix_differences(source, target);
|
||||
edit.move_by_lines(start.line)
|
||||
})
|
||||
}
|
||||
@ -379,7 +379,7 @@ impl Module {
|
||||
, new_file : &SourceFile
|
||||
, edits : Vec<TextEdit>
|
||||
) -> impl Future<Output=FallibleResult<ParsedContentSummary>> + 'static {
|
||||
let summary = ParsedContentSummary::from_source(&new_file);
|
||||
let summary = ParsedContentSummary::from_source(new_file);
|
||||
let edit = language_server::types::FileEdit {
|
||||
edits,
|
||||
path : self.path().file_path().clone(),
|
||||
|
@ -113,7 +113,7 @@ where K : Clone + Eq + Hash {
|
||||
|
||||
async fn get(&self, key:&K) -> Result<Option<Rc<V>>,LoadingError> {
|
||||
loop {
|
||||
let entry = self.registry.borrow_mut().get(&key);
|
||||
let entry = self.registry.borrow_mut().get(key);
|
||||
match entry {
|
||||
Some(Entry::Loaded(state)) => { break Ok(Some(state)); },
|
||||
Some(Entry::Loading(mut sub)) => {
|
||||
|
@ -147,6 +147,6 @@ impl From<BubbleChart> for Instance {
|
||||
|
||||
impl display::Object for BubbleChart {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.display_object.display_object()
|
||||
self.model.display_object.display_object()
|
||||
}
|
||||
}
|
||||
|
@ -256,6 +256,6 @@ impl From<Error> for Instance {
|
||||
|
||||
impl display::Object for Error {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.dom.display_object()
|
||||
self.model.dom.display_object()
|
||||
}
|
||||
}
|
||||
|
@ -155,6 +155,6 @@ impl From<RawText> for Instance {
|
||||
|
||||
impl display::Object for RawText {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.dom.display_object()
|
||||
self.dom.display_object()
|
||||
}
|
||||
}
|
||||
|
@ -126,9 +126,9 @@ pub struct Animations {
|
||||
impl Animations {
|
||||
/// Constructor.
|
||||
pub fn new(network:&frp::Network) -> Self {
|
||||
let color = DEPRECATED_Animation::new(&network);
|
||||
let fade_in = DEPRECATED_Animation::new(&network);
|
||||
let separator_color = DEPRECATED_Animation::new(&network);
|
||||
let color = DEPRECATED_Animation::new(network);
|
||||
let fade_in = DEPRECATED_Animation::new(network);
|
||||
let separator_color = DEPRECATED_Animation::new(network);
|
||||
Self{color,separator_color,fade_in}
|
||||
}
|
||||
}
|
||||
|
@ -106,8 +106,8 @@ pub struct Animations {
|
||||
impl Animations {
|
||||
/// Constructor.
|
||||
pub fn new(network:&frp::Network) -> Self {
|
||||
let color = DEPRECATED_Animation::new(&network);
|
||||
let position = DEPRECATED_Animation::new(&network);
|
||||
let color = DEPRECATED_Animation::new(network);
|
||||
let position = DEPRECATED_Animation::new(network);
|
||||
Self{color,position}
|
||||
}
|
||||
}
|
||||
@ -257,7 +257,7 @@ impl ProjectName {
|
||||
let hover_color = styles.get_color(theme::graph_editor::breadcrumbs::hover);
|
||||
let deselected_color = styles.get_color(theme::graph_editor::breadcrumbs::deselected::left);
|
||||
let selected_color = styles.get_color(theme::graph_editor::breadcrumbs::selected);
|
||||
let animations = Animations::new(&network);
|
||||
let animations = Animations::new(network);
|
||||
|
||||
frp::extend! { network
|
||||
|
||||
@ -292,7 +292,7 @@ impl ProjectName {
|
||||
// === Text Area ===
|
||||
|
||||
text_content <- text.content.map(|txt| txt.to_string());
|
||||
eval text_content((content) model.update_alignment(&content));
|
||||
eval text_content((content) model.update_alignment(content));
|
||||
text_width <- text_content.map(f!((content) model.width(content)));
|
||||
frp.source.width <+ text_width;
|
||||
|
||||
|
@ -1050,7 +1050,7 @@ impl Frp {
|
||||
def set_disabled = source();
|
||||
def set_color = source();
|
||||
}
|
||||
let shape_events = ShapeViewEventsProxy::new(&network);
|
||||
let shape_events = ShapeViewEventsProxy::new(network);
|
||||
Self {source_width,source_height,target_position,target_attached,source_attached,redraw
|
||||
,set_disabled,set_color,hover_position,shape_events}
|
||||
}
|
||||
@ -1250,7 +1250,7 @@ impl EdgeModelData {
|
||||
front . side_line2 . mod_rotation(|r| r.z = RIGHT_ANGLE);
|
||||
back . side_line2 . mod_rotation(|r| r.z = RIGHT_ANGLE);
|
||||
|
||||
let frp = Frp::new(&network);
|
||||
let frp = Frp::new(network);
|
||||
let source_height = default();
|
||||
let source_width = default();
|
||||
let target_position = default();
|
||||
@ -1906,7 +1906,7 @@ impl EdgeModelData {
|
||||
(&self, position:Vector2<f32>, focus_shape_id:display::object::Id, part: PortType)
|
||||
-> Result<SnapTarget, ()>{
|
||||
let snap_data = self.try_point_snap(position,focus_shape_id).ok_or(())?;
|
||||
let semantic_split = SemanticSplit::new(&self,snap_data.target_shape_id).ok_or(())?;
|
||||
let semantic_split = SemanticSplit::new(self,snap_data.target_shape_id).ok_or(())?;
|
||||
let angle = self.cut_angle_for_shape(snap_data.target_shape_id,position,part).ok_or(())?;
|
||||
|
||||
// Completely disable/enable focus for shapes that are not close to the split based on their
|
||||
|
@ -436,11 +436,11 @@ impl NodeModel {
|
||||
|
||||
// Disable shadows to allow interaction with the output port.
|
||||
let shape_system = scene.layers.main.shape_system_registry.shape_system
|
||||
(&scene,PhantomData::<backdrop::DynamicShape>);
|
||||
(scene,PhantomData::<backdrop::DynamicShape>);
|
||||
shape_system.shape_system.set_pointer_events(false);
|
||||
|
||||
let input = input::Area::new(&logger,app);
|
||||
let visualization = visualization::Container::new(&logger,&app,registry);
|
||||
let visualization = visualization::Container::new(&logger,app,registry);
|
||||
|
||||
display_object.add_child(&visualization);
|
||||
display_object.add_child(&input);
|
||||
@ -449,7 +449,7 @@ impl NodeModel {
|
||||
let (x,y) = ERROR_VISUALIZATION_SIZE;
|
||||
error_visualization.set_size.emit(Vector2(x,y));
|
||||
|
||||
let action_bar = action_bar::ActionBar::new(&logger,&app);
|
||||
let action_bar = action_bar::ActionBar::new(&logger,app);
|
||||
display_object.add_child(&action_bar);
|
||||
|
||||
let output = output::Area::new(&logger,app);
|
||||
@ -745,7 +745,7 @@ impl Node {
|
||||
// === Color Handling ===
|
||||
|
||||
let bgg = style_frp.get_color(ensogl_theme::graph_editor::node::background);
|
||||
let profiling_theme = profiling::Theme::from_styles(&style_frp,&network);
|
||||
let profiling_theme = profiling::Theme::from_styles(style_frp,network);
|
||||
|
||||
profiling_color <- all_with5
|
||||
(&frp.set_profiling_status,&frp.set_profiling_min_global_duration,
|
||||
|
@ -311,6 +311,6 @@ impl ActionBar {
|
||||
|
||||
impl display::Object for ActionBar {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.display_object()
|
||||
self.model.display_object()
|
||||
}
|
||||
}
|
||||
|
@ -114,14 +114,14 @@ impl Container {
|
||||
let height = format!("{}.px", height);
|
||||
let z_index = Z_INDEX.to_string();
|
||||
let border_radius = format!("{}.px", BORDER_RADIUS);
|
||||
background_dom.dom().set_style_or_warn("width" ,width ,&logger);
|
||||
background_dom.dom().set_style_or_warn("height" ,height ,&logger);
|
||||
background_dom.dom().set_style_or_warn("z-index" ,z_index ,&logger);
|
||||
background_dom.dom().set_style_or_warn("overflow-y" ,"auto" ,&logger);
|
||||
background_dom.dom().set_style_or_warn("overflow-x" ,"auto" ,&logger);
|
||||
background_dom.dom().set_style_or_warn("background" ,bg_hex ,&logger);
|
||||
background_dom.dom().set_style_or_warn("border-radius",border_radius,&logger);
|
||||
shadow::add_to_dom_element(&background_dom,&styles,&logger);
|
||||
background_dom.dom().set_style_or_warn("width" ,width ,logger);
|
||||
background_dom.dom().set_style_or_warn("height" ,height ,logger);
|
||||
background_dom.dom().set_style_or_warn("z-index" ,z_index ,logger);
|
||||
background_dom.dom().set_style_or_warn("overflow-y" ,"auto" ,logger);
|
||||
background_dom.dom().set_style_or_warn("overflow-x" ,"auto" ,logger);
|
||||
background_dom.dom().set_style_or_warn("background" ,bg_hex ,logger);
|
||||
background_dom.dom().set_style_or_warn("border-radius",border_radius,logger);
|
||||
shadow::add_to_dom_element(&background_dom,&styles,logger);
|
||||
background_dom
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ impl Shape {
|
||||
|
||||
impl display::Object for Shape {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.root.display_object()
|
||||
self.root.display_object()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,7 @@ impl Area {
|
||||
let label_color = color::Animation::new(network);
|
||||
|
||||
let hysteretic_transition = HystereticAnimation::new(
|
||||
&network,SHOW_DELAY_DURATION_MS,HIDE_DELAY_DURATION_MS);
|
||||
network,SHOW_DELAY_DURATION_MS,HIDE_DELAY_DURATION_MS);
|
||||
|
||||
frp::extend! { network
|
||||
|
||||
|
@ -220,7 +220,7 @@ impl ProfilingLabel {
|
||||
// === Color ===
|
||||
|
||||
let styles = StyleWatchFrp::new(&scene.style_sheet);
|
||||
let theme = Theme::from_styles(&styles,&network);
|
||||
let theme = Theme::from_styles(&styles,network);
|
||||
color.target_color <+ all_with4
|
||||
(&frp.set_status,&frp.set_min_global_duration,&frp.set_max_global_duration,&theme,
|
||||
|&status,&min,&max,&theme| status.display_color(min,max,theme)
|
||||
|
@ -188,7 +188,7 @@ impl StatusIndicator {
|
||||
|
||||
impl display::Object for StatusIndicator {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.display_object()
|
||||
self.model.display_object()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ impl Tooltip {
|
||||
ensogl_theme::application::tooltip::show_delay_duration_ms,0.0);
|
||||
|
||||
let hysteretic_transition = HystereticAnimation::new(
|
||||
&network,hide_delay_duration_ms,show_delay_duration_ms);
|
||||
network,hide_delay_duration_ms,show_delay_duration_ms);
|
||||
|
||||
frp::extend! { network
|
||||
|
||||
@ -240,6 +240,6 @@ impl Tooltip {
|
||||
|
||||
impl display::Object for Tooltip {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.root.display_object()
|
||||
self.model.root.display_object()
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ fn auto_hue(tp:&Type, styles:&StyleWatch) -> f32 {
|
||||
// Defines how many hue values we can have based on our incoming type name.
|
||||
let hue_steps = styles.get_number_or(theme::code::types::hue_steps,512.0);
|
||||
let hue_shift = styles.get_number_or(theme::code::types::hue_shift,0.0);
|
||||
(hash(&tp) % (hue_steps as u64)) as f32 / hue_steps + hue_shift
|
||||
(hash(tp) % (hue_steps as u64)) as f32 / hue_steps + hue_shift
|
||||
}
|
||||
|
||||
/// Compute the hash of the type for use in the `compute` function.
|
||||
|
@ -265,7 +265,7 @@ impl ContainerModel {
|
||||
let scene = scene.clone_ref();
|
||||
let is_fullscreen = default();
|
||||
let size = default();
|
||||
let action_bar = ActionBar::new(&app,registry.clone_ref());
|
||||
let action_bar = ActionBar::new(app,registry.clone_ref());
|
||||
view.add_child(&action_bar);
|
||||
|
||||
Self {logger,display_object,drag_root,visualization,vis_frp_connection,scene,view
|
||||
@ -308,7 +308,7 @@ impl ContainerModel {
|
||||
if let Some(viz) = &*self.visualization.borrow() {
|
||||
self.fullscreen_view.add_child(viz);
|
||||
if let Some(dom) = viz.root_dom() {
|
||||
self.scene.dom.layers.fullscreen_vis.manage(&dom);
|
||||
self.scene.dom.layers.fullscreen_vis.manage(dom);
|
||||
}
|
||||
viz.inputs.activate.emit(());
|
||||
}
|
||||
@ -319,7 +319,7 @@ impl ContainerModel {
|
||||
if let Some(viz) = &*self.visualization.borrow() {
|
||||
self.view.add_child(viz);
|
||||
if let Some(dom) = viz.root_dom() {
|
||||
self.scene.dom.layers.back.manage(&dom);
|
||||
self.scene.dom.layers.back.manage(dom);
|
||||
}
|
||||
viz.inputs.deactivate.emit(());
|
||||
}
|
||||
@ -479,7 +479,7 @@ impl Container {
|
||||
let logger = &self.model.logger;
|
||||
let action_bar = &model.action_bar.frp;
|
||||
let registry = &model.registry;
|
||||
let selection = Animation::new(&network);
|
||||
let selection = Animation::new(network);
|
||||
|
||||
frp::extend! { network
|
||||
eval frp.set_visibility ((v) model.set_visibility(*v));
|
||||
|
@ -266,7 +266,7 @@ impl Model {
|
||||
let logger = Logger::new("ActionBarModel");
|
||||
let background = background::View::new(&logger);
|
||||
let hover_area = hover_area::View::new(&logger);
|
||||
let visualization_chooser = VisualizationChooser::new(&app,vis_registry);
|
||||
let visualization_chooser = VisualizationChooser::new(app,vis_registry);
|
||||
let display_object = display::object::Instance::new(&logger);
|
||||
let size = default();
|
||||
let icons = Icons::new(logger);
|
||||
@ -415,6 +415,6 @@ impl ActionBar {
|
||||
|
||||
impl display::Object for ActionBar {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.display_object()
|
||||
self.model.display_object()
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ struct Model {
|
||||
|
||||
impl Model {
|
||||
pub fn new(app:&Application, registry:visualization::Registry) -> Self {
|
||||
let selection_menu = drop_down_menu::DropDownMenu::new(&app);
|
||||
let selection_menu = drop_down_menu::DropDownMenu::new(app);
|
||||
app.display.scene().layers.below_main.add_exclusive(&selection_menu);
|
||||
Self{selection_menu,registry}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ impl Definition {
|
||||
let source = source.as_ref();
|
||||
let source = source;
|
||||
let context = JsValue::NULL;
|
||||
let function = Function::new_with_args(binding::JS_CLASS_NAME,&source)
|
||||
let function = Function::new_with_args(binding::JS_CLASS_NAME,source)
|
||||
.map_err(Error::InvalidFunction)?;
|
||||
let js_class = binding::js_class();
|
||||
let class = function.call1(&context,&js_class).map_err(Error::InvalidFunction)?;
|
||||
|
@ -145,7 +145,7 @@ impl InstanceModel {
|
||||
-> result::Result<java_script::binding::Visualization,Error> {
|
||||
let js_new = js_sys::Function::new_with_args("cls,arg", "return new cls(arg)");
|
||||
let context = JsValue::NULL;
|
||||
let object = js_new.call2(&context,&class,&args.into())
|
||||
let object = js_new.call2(&context,class,&args.into())
|
||||
.map_err(|js_error|Error::ConstructorError {js_error})?;
|
||||
if !object.is_object() {
|
||||
return Err(Error::ValueIsNotAnObject { object } )
|
||||
@ -164,7 +164,7 @@ impl InstanceModel {
|
||||
let object = Self::instantiate_class_with_args(class,init_data)?;
|
||||
let on_data_received = get_method(object.as_ref(),method::ON_DATA_RECEIVED).ok();
|
||||
let on_data_received = Rc::new(on_data_received);
|
||||
let set_size = get_method(&object.as_ref(),method::SET_SIZE).ok();
|
||||
let set_size = get_method(object.as_ref(),method::SET_SIZE).ok();
|
||||
let set_size = Rc::new(set_size);
|
||||
let object = Rc::new(object);
|
||||
let scene = scene.clone_ref();
|
||||
@ -245,7 +245,7 @@ impl Instance {
|
||||
let frp = visualization::instance::Frp::new(&network);
|
||||
let model = InstanceModel::from_class(class,scene)?;
|
||||
model.set_dom_layer(&scene.dom.layers.back);
|
||||
Ok(Instance{model,frp,network}.init_frp(&scene).init_preprocessor_change_callback())
|
||||
Ok(Instance{model,frp,network}.init_frp(scene).init_preprocessor_change_callback())
|
||||
}
|
||||
|
||||
fn init_frp(self, scene:&Scene) -> Self {
|
||||
@ -292,7 +292,7 @@ impl From<Instance> for visualization::Instance {
|
||||
|
||||
impl display::Object for Instance {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.model.root_node.display_object()
|
||||
self.model.root_node.display_object()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ impl FrpInputs {
|
||||
impl Frp {
|
||||
/// Constructor.
|
||||
pub fn new(network:&frp::Network) -> Self {
|
||||
let inputs = FrpInputs::new(&network);
|
||||
let inputs = FrpInputs::new(network);
|
||||
frp::extend! { network
|
||||
def preprocessor_change = source();
|
||||
on_preprocessor_change <- preprocessor_change.sampler();
|
||||
|
@ -631,7 +631,7 @@ impl Node {
|
||||
|
||||
impl display::Object for Node {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.view.display_object()
|
||||
self.view.display_object()
|
||||
}
|
||||
}
|
||||
|
||||
@ -705,7 +705,7 @@ impl Edge {
|
||||
|
||||
impl display::Object for Edge {
|
||||
fn display_object(&self) -> &display::object::Instance {
|
||||
&self.view.display_object()
|
||||
self.view.display_object()
|
||||
}
|
||||
}
|
||||
|
||||
@ -1110,8 +1110,8 @@ pub struct TouchState {
|
||||
|
||||
impl TouchState {
|
||||
pub fn new(network:&frp::Network, mouse:&frp::io::Mouse) -> Self {
|
||||
let nodes = TouchNetwork::<NodeId>::new(&network,mouse);
|
||||
let background = TouchNetwork::<()>::new(&network,mouse);
|
||||
let nodes = TouchNetwork::<NodeId>::new(network,mouse);
|
||||
let background = TouchNetwork::<()>::new(network,mouse);
|
||||
Self {nodes,background}
|
||||
}
|
||||
}
|
||||
@ -1163,7 +1163,7 @@ struct NodeCreationContext<'a> {
|
||||
impl GraphEditorModelWithNetwork {
|
||||
pub fn new(app:&Application, cursor:cursor::Cursor, frp:&Frp) -> Self {
|
||||
let network = frp.network.clone_ref(); // FIXME make weak
|
||||
let model = GraphEditorModel::new(app,cursor,&frp);
|
||||
let model = GraphEditorModel::new(app,cursor,frp);
|
||||
Self {model,network}
|
||||
}
|
||||
|
||||
@ -1428,7 +1428,7 @@ impl GraphEditorModel {
|
||||
let breadcrumbs = component::Breadcrumbs::new(app.clone_ref());
|
||||
let app = app.clone_ref();
|
||||
let frp = frp.output.clone_ref();
|
||||
let navigator = Navigator::new(&scene,&scene.camera());
|
||||
let navigator = Navigator::new(scene,&scene.camera());
|
||||
let tooltip = Tooltip::new(&app);
|
||||
let profiling_statuses = profiling::Statuses::new();
|
||||
let profiling_button = component::profiling::Button::new(&app);
|
||||
@ -2316,12 +2316,12 @@ fn new_graph_editor(app:&Application) -> GraphEditor {
|
||||
out.source.nodes_labels_visible <+ out.node_edit_mode || node_in_edit_mode;
|
||||
|
||||
eval out.node_editing_started ([model] (id) {
|
||||
if let Some(node) = model.nodes.get_cloned_ref(&id) {
|
||||
if let Some(node) = model.nodes.get_cloned_ref(id) {
|
||||
node.model.input.frp.set_edit_mode(true);
|
||||
}
|
||||
});
|
||||
eval out.node_editing_finished ([model](id) {
|
||||
if let Some(node) = model.nodes.get_cloned_ref(&id) {
|
||||
if let Some(node) = model.nodes.get_cloned_ref(id) {
|
||||
node.model.input.set_edit_mode(false);
|
||||
}
|
||||
});
|
||||
@ -2333,8 +2333,8 @@ fn new_graph_editor(app:&Application) -> GraphEditor {
|
||||
node_pointer_style <- source::<cursor::Style>();
|
||||
node_tooltip <- source::<tooltip::Style>();
|
||||
|
||||
let node_input_touch = TouchNetwork::<EdgeEndpoint>::new(&network,&mouse);
|
||||
let node_output_touch = TouchNetwork::<EdgeEndpoint>::new(&network,&mouse);
|
||||
let node_input_touch = TouchNetwork::<EdgeEndpoint>::new(network,mouse);
|
||||
let node_output_touch = TouchNetwork::<EdgeEndpoint>::new(network,mouse);
|
||||
node_expression_set <- source();
|
||||
out.source.node_expression_set <+ node_expression_set;
|
||||
|
||||
@ -2648,9 +2648,9 @@ fn new_graph_editor(app:&Application) -> GraphEditor {
|
||||
// === Snapping ===
|
||||
|
||||
eval drag_tgts ((ids) model.disable_grid_snapping_for(ids));
|
||||
let node_tgt_pos_anim = DEPRECATED_Animation::<Vector2<f32>>::new(&network);
|
||||
let x_snap_strength = DEPRECATED_Tween::new(&network);
|
||||
let y_snap_strength = DEPRECATED_Tween::new(&network);
|
||||
let node_tgt_pos_anim = DEPRECATED_Animation::<Vector2<f32>>::new(network);
|
||||
let x_snap_strength = DEPRECATED_Tween::new(network);
|
||||
let y_snap_strength = DEPRECATED_Tween::new(network);
|
||||
x_snap_strength.set_duration(300.0);
|
||||
y_snap_strength.set_duration(300.0);
|
||||
|
||||
|
@ -79,7 +79,7 @@ impl Statuses {
|
||||
}));
|
||||
|
||||
min_and_max_from_remove <- frp.remove.map(f!([durations](node) {
|
||||
durations.borrow_mut().remove_by_left(&node);
|
||||
durations.borrow_mut().remove_by_left(node);
|
||||
Self::min_and_max(&*durations.borrow())
|
||||
}));
|
||||
|
||||
|
@ -122,7 +122,7 @@ impl View {
|
||||
}
|
||||
|
||||
impl display::Object for View {
|
||||
fn display_object(&self) -> &display::object::Instance { &self.model.display_object() }
|
||||
fn display_object(&self) -> &display::object::Instance { self.model.display_object() }
|
||||
}
|
||||
|
||||
impl application::command::FrpNetworkProvider for View {
|
||||
@ -135,7 +135,7 @@ impl application::View for View {
|
||||
fn new(app: &Application) -> Self { Self::new(app) }
|
||||
|
||||
fn app(&self) -> &Application {
|
||||
&self.model.app()
|
||||
self.model.app()
|
||||
}
|
||||
|
||||
fn default_shortcuts() -> Vec<shortcut::Shortcut> {
|
||||
|
@ -89,7 +89,7 @@ fn init(app:&Application) {
|
||||
let world = &app.display;
|
||||
let scene = world.scene();
|
||||
let camera = scene.camera();
|
||||
let navigator = Navigator::new(&scene,&camera);
|
||||
let navigator = Navigator::new(scene,&camera);
|
||||
|
||||
app.views.register::<project::View>();
|
||||
app.views.register::<text::Area>();
|
||||
|
@ -91,7 +91,7 @@ fn init(app:&Application) {
|
||||
let world = &app.display;
|
||||
let scene = world.scene();
|
||||
let camera = scene.camera();
|
||||
let navigator = Navigator::new(&scene,&camera);
|
||||
let navigator = Navigator::new(scene,&camera);
|
||||
let registry = Registry::new();
|
||||
|
||||
registry.add(constructor_graph());
|
||||
@ -100,7 +100,7 @@ fn init(app:&Application) {
|
||||
let vis_class = vis_factories.iter().find(|class| {
|
||||
&*class.signature.name == "Graph"
|
||||
}).expect("Couldn't find Graph class.");
|
||||
let visualization = vis_class.new_instance(&scene).expect("Couldn't create visualiser.");
|
||||
let visualization = vis_class.new_instance(scene).expect("Couldn't create visualiser.");
|
||||
visualization.activate.emit(());
|
||||
|
||||
let network = enso_frp::Network::new("VisualizationExample");
|
||||
|
@ -100,7 +100,7 @@ impl Model {
|
||||
let logger = Logger::new("SearcherView");
|
||||
let display_object = display::object::Instance::new(&logger);
|
||||
let list = app.new_view::<ListView>();
|
||||
let documentation = documentation::View::new(&scene);
|
||||
let documentation = documentation::View::new(scene);
|
||||
let doc_provider = default();
|
||||
scene.layers.above_nodes.add_exclusive(&list);
|
||||
display_object.add_child(&documentation);
|
||||
@ -199,7 +199,7 @@ impl View {
|
||||
let frp = &self.frp;
|
||||
let source = &self.frp.source;
|
||||
|
||||
let height = DEPRECATED_Animation::<f32>::new(&network);
|
||||
let height = DEPRECATED_Animation::<f32>::new(network);
|
||||
|
||||
frp::extend! { network
|
||||
eval frp.set_actions ([model] ((entries,docs)) {
|
||||
|
@ -269,7 +269,7 @@ impl View {
|
||||
/// Create new StatusBar view.
|
||||
pub fn new(app:&Application) -> Self {
|
||||
let frp = Frp::new();
|
||||
let model = Model::new(&app);
|
||||
let model = Model::new(app);
|
||||
let network = &frp.network;
|
||||
let scene = app.display.scene();
|
||||
|
||||
|
@ -220,7 +220,7 @@ impl View {
|
||||
|
||||
let style = StyleWatchFrp::new(&app.display.scene().style_sheet);
|
||||
let style_frp = LayoutParams::from_theme(&style);
|
||||
let layout_style = style_frp.flatten(&network);
|
||||
let layout_style = style_frp.flatten(network);
|
||||
|
||||
frp::extend! { network
|
||||
// Layout
|
||||
|
@ -228,14 +228,14 @@ impl<Shape:ButtonShape> View<Shape> {
|
||||
// Icon color initialization
|
||||
let default_icon_color_path = Shape::icon_color_path(State::Unconcerned);
|
||||
let default_icon_color = style.get_color(default_icon_color_path).value();
|
||||
let icon_color = color::Animation::new(&network);
|
||||
let icon_color = color::Animation::new(network);
|
||||
icon_color.target(color::Lcha::from(default_icon_color));
|
||||
model.set_icon_color(default_icon_color);
|
||||
|
||||
// Background color initialization
|
||||
let default_background_color_path = Shape::background_color_path(State::Unconcerned);
|
||||
let default_background_color = style.get_color(default_background_color_path).value();
|
||||
let background_color = color::Animation::new(&network);
|
||||
let background_color = color::Animation::new(network);
|
||||
background_color.target(color::Lcha::from(default_background_color));
|
||||
model.set_icon_color(default_background_color);
|
||||
|
||||
|
@ -2119,7 +2119,7 @@ impl<T1,T2,F,Out> stream::EventConsumer<Output<T1>> for OwnedMap2<T1,T2,F>
|
||||
where T1:EventOutput, T2:EventOutput, Out:Data, F:'static+Fn(&Output<T1>,&Output<T2>)->Out {
|
||||
fn on_event(&self, stack:CallStack, value1:&Output<T1>) {
|
||||
let value2 = self.src2.value();
|
||||
let out = (self.function)(&value1,&value2);
|
||||
let out = (self.function)(value1,&value2);
|
||||
self.emit_event(stack,&out);
|
||||
}
|
||||
}
|
||||
@ -2176,7 +2176,7 @@ where T1:EventOutput, T2:EventOutput, T3:EventOutput, Out:Data,
|
||||
fn on_event(&self, stack:CallStack, value1:&Output<T1>) {
|
||||
let value2 = self.src2.value();
|
||||
let value3 = self.src3.value();
|
||||
let out = (self.function)(&value1,&value2,&value3);
|
||||
let out = (self.function)(value1,&value2,&value3);
|
||||
self.emit_event(stack,&out);
|
||||
}
|
||||
}
|
||||
@ -2236,7 +2236,7 @@ impl<T1,T2,T3,T4,F,Out> stream::EventConsumer<Output<T1>> for OwnedMap4<T1,T2,T3
|
||||
let value2 = self.src2.value();
|
||||
let value3 = self.src3.value();
|
||||
let value4 = self.src4.value();
|
||||
let out = (self.function)(&value1,&value2,&value3,&value4);
|
||||
let out = (self.function)(value1,&value2,&value3,&value4);
|
||||
self.emit_event(stack,&out);
|
||||
}
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ impl<T:Clone> AutomataRegistryModel<T> {
|
||||
self.states.insert(alt_repr.clone(),out);
|
||||
} else {
|
||||
let key = name;
|
||||
path.push(&key);
|
||||
path.push(key);
|
||||
path.sort_unstable();
|
||||
let repr = path.join(" ");
|
||||
state = match self.states.get(&repr) {
|
||||
|
@ -51,9 +51,9 @@ pub trait BlobExt {
|
||||
impl BlobExt for web_sys::Blob {
|
||||
fn stream(&self) -> Result<web_sys::ReadableStream,Error> {
|
||||
let this = self.as_ref();
|
||||
let method_as_value = js_sys::Reflect::get(&this,&"stream".into())?;
|
||||
let method_as_value = js_sys::Reflect::get(this,&"stream".into())?;
|
||||
let method = method_as_value.dyn_into::<js_sys::Function>()?;
|
||||
Ok(method.call0(&this)?.dyn_into()?)
|
||||
Ok(method.call0(this)?.dyn_into()?)
|
||||
}
|
||||
|
||||
fn stream_reader(&self) -> Result<ReadableStreamDefaultReader,Error> {
|
||||
|
Loading…
Reference in New Issue
Block a user