Commit Graph

34 Commits

Author SHA1 Message Date
Evan Simkowitz
8971e2feba
Set up electron-builder for new app (#113)
Adds electron-builder, which we will use to package and distribute our
application, same as in the existing app.
Replaces explicit port assignments with dynamic ones, which are then
stored into environment variables.
Adds a ~/.w2-dev folder for use when running a dev build.

The build-helper pipeline from the old repo is included here too, but it
is not updated yet so it will fail.

Also removes some redundant utility functions and cleans up some let vs.
const usage.

The packaging can be run using the `package:prod` and `package:dev`
tasks.

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-07-17 18:42:49 -07:00
Red J Adaya
e140076801
webview controls (#110) 2024-07-15 09:40:28 -07:00
Red J Adaya
1f973b3fdc
WaveAI (#93) 2024-07-03 14:32:55 -07:00
dependabot[bot]
e162960c9e
Bump ws from 8.17.0 to 8.17.1 in the npm_and_yarn group across 1 directory (#90)
Bumps the npm_and_yarn group with 1 update in the / directory:
[ws](https://github.com/websockets/ws).

Updates `ws` from 8.17.0 to 8.17.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/websockets/ws/releases">ws's
releases</a>.</em></p>
<blockquote>
<h2>8.17.1</h2>
<h1>Bug fixes</h1>
<ul>
<li>Fixed a DoS vulnerability (<a
href="https://redirect.github.com/websockets/ws/issues/2231">#2231</a>).</li>
</ul>
<p>A request with a number of headers exceeding
the[<code>server.maxHeadersCount</code>][]
threshold could be used to crash a ws server.</p>
<pre lang="js"><code>const http = require('http');
const WebSocket = require('ws');
<p>const wss = new WebSocket.Server({ port: 0 }, function () {
const chars =
&quot;!#$%&amp;'*+-.0123456789abcdefghijklmnopqrstuvwxyz^_`|~&quot;.split('');
const headers = {};
let count = 0;</p>
<p>for (let i = 0; i &lt; chars.length; i++) {
if (count === 2000) break;</p>
<pre><code>for (let j = 0; j &amp;lt; chars.length; j++) {
  const key = chars[i] + chars[j];
  headers[key] = 'x';

  if (++count === 2000) break;
}
</code></pre>
<p>}</p>
<p>headers.Connection = 'Upgrade';
headers.Upgrade = 'websocket';
headers['Sec-WebSocket-Key'] = 'dGhlIHNhbXBsZSBub25jZQ==';
headers['Sec-WebSocket-Version'] = '13';</p>
<p>const request = http.request({
headers: headers,
host: '127.0.0.1',
port: wss.address().port
});</p>
<p>request.end();
});
</code></pre></p>
<p>The vulnerability was reported by <a
href="https://github.com/rrlapointe">Ryan LaPointe</a> in <a
href="https://redirect.github.com/websockets/ws/issues/2230">websockets/ws#2230</a>.</p>
<p>In vulnerable versions of ws, the issue can be mitigated in the
following ways:</p>
<ol>
<li>Reduce the maximum allowed length of the request headers using the
[<code>--max-http-header-size=size</code>][] and/or the
[<code>maxHeaderSize</code>][] options so
that no more headers than the <code>server.maxHeadersCount</code> limit
can be sent.</li>
</ol>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3c56601092"><code>3c56601</code></a>
[dist] 8.17.1</li>
<li><a
href="e55e5106f1"><code>e55e510</code></a>
[security] Fix crash when the Upgrade header cannot be read (<a
href="https://redirect.github.com/websockets/ws/issues/2231">#2231</a>)</li>
<li><a
href="6a00029edd"><code>6a00029</code></a>
[test] Increase code coverage</li>
<li><a
href="ddfe4a804d"><code>ddfe4a8</code></a>
[perf] Reduce the amount of <code>crypto.randomFillSync()</code>
calls</li>
<li>See full diff in <a
href="https://github.com/websockets/ws/compare/8.17.0...8.17.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ws&package-manager=npm_and_yarn&previous-version=8.17.0&new-version=8.17.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/wavetermdev/thenextwave/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-28 14:52:50 -07:00
Red J Adaya
4d4e026749
webview fixes (#83) 2024-06-27 18:09:30 -07:00
Evan Simkowitz
638883eef9
Fix Storybook for TileLayout (#81)
Fix typing of memoized TileLayout component, fix broken Vite config,
upgrade Storybook to latest.
2024-06-26 12:22:27 -07:00
Red J Adaya
edb8eb25b8
CSV view (#73) 2024-06-24 10:17:35 -07:00
Evan Simkowitz
2c6f6d917f
Fix greedy rendering of drag preview (#68) 2024-06-21 10:18:35 -07:00
Red J Adaya
e83b5c8763
Scrollable tabs using OverlayScrollbars (#60) 2024-06-20 20:04:00 -07:00
Mike Sawka
4ded6d94b6
stickers and terminal serialization (#57) 2024-06-17 22:38:48 -07:00
Mike Sawka
8e3540f754
working on ijson and wsh magic (#53) 2024-06-13 23:54:04 -07:00
Evan Simkowitz
0d4be9cb88
Fix Vite CJS deprecation warning when using Storybook (#52)
This was a weird one, apparently Storybook still uses CJS but Vite has fully deprecated CJS support. So we need to dynamically import the electron.vite.config.ts file for Storybook, but this breaks because Typescript doesn't resolve and properly compile the dynamic import. To get around this, I am using the `tsx` package, which can dynamically compile typescript imports.
2024-06-13 23:03:57 -07:00
Evan Simkowitz
e3c5d4de48
Upgrade Storybok and yarn 2024-06-13 19:50:27 -07:00
Evan Simkowitz
b2b1f9b9df
Switch to using electron-vite instead of WebPack (#45)
This sets us back up to use Vite via the electron-vite package. This
will let us continue to build our testing suite on Vitest and take
advantage of Vite features like Hot Module Reloading, etc.

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-06-13 16:49:25 -07:00
sawka
605b9ea048 remove wails deps 2024-06-12 11:58:17 -07:00
Mike Sawka
1874d9a252
port to electron (#33) 2024-06-11 17:42:10 -07:00
Evan Simkowitz
0a45311f30
Implement outer drop direction, add rudimentary drag preview image rendering (#29)
This PR adds support for Outer variants of each DropDirection.

When calculating the drop direction, the cursor position is calculated
relevant to the box over which it is hovering. The following diagram
shows how drop directions are calculated. The colored in center is
currently not supported, it is assigned to the top, bottom, left, right
direction for now, though it will ultimately be its own distinct
direction.

![IMG_3505](https://github.com/wavetermdev/thenextwave/assets/16651283/a7ea7387-b95d-4831-9e29-d3225b824c97)

When an outer drop direction is provided for a move operation, if the
reference node flexes in the same axis as the drop direction, the new
node will be inserted at the same level as the parent of the reference
node. If the reference node flexes in a different direction or the
reference node does not have a grandparent, the operation will fall back
to its non-Outer variant.

This also removes some chatty debug statements, adds a blur to the
currently-dragging node to indicate that it cannot be dropped onto, and
simplifies the deriving of the layout state atom from the tab atom so
there's no longer another intermediate derived atom for the layout node.

This also adds rudimentary support for rendering custom preview images
for any tile being dragged. Right now, this is a simple block containing
the block ID, but this can be anything. This resolves an issue where
letting React-DnD generate its own previews could take up to a half
second, and would block dragging until complete. For Monaco, this was
outright failing.

It also fixes an issue where the tile layout could animate on first
paint. Now, I use React Suspense to prevent the layout from displaying
until all the children have loaded.
2024-06-11 13:03:41 -07:00
Evan Simkowitz
2866862253
Replace lots of separate ResizeObservers with a single one via useResizeObserver (#24) 2024-06-06 14:57:37 -07:00
sawka
cf85ad0980 debounce resize handler, fix useEffect() in term.tsx 2024-06-04 23:47:18 -07:00
Evan Simkowitz
c3e71c5c7d
Integrate Faraday layout system (#16)
Co-authored-by: Mike Sawka <sawka@users.noreply.github.com>
Co-authored-by: sawka <mike.sawka@gmail.com>
2024-06-04 13:05:44 -07:00
sawka
3c86bfea8d integrate codeedit loader (just hello world for now) 2024-06-03 11:35:06 -07:00
Sylvia Crowe
b9f6da57f9 feat: add basic directory navigation in preview
Note: this does not add backwards navigation and will break if
attempting to open certain types of files.
2024-05-29 00:00:36 -07:00
Evan Simkowitz
108107c55e
fix package versions 2024-05-24 17:46:33 -07:00
Evan Simkowitz
9bbc39405e
Add configs from Faraday repo 2024-05-24 17:44:41 -07:00
Sylvia Crowe
259bbf44db merge branch 'main' into sylvie/preview-dir 2024-05-21 13:49:49 -07:00
sawka
901334eb49 new wails bindings format working 2024-05-21 11:09:22 -07:00
Sylvia Crowe
304a54a994 feat: integrate react-table in directory view 2024-05-20 16:08:45 -07:00
Sylvia Crowe
afd125a77e feat: integrate plots into new block setup 2024-05-16 13:54:15 -07:00
sawka
eab6afb91a create block using a blockdef. better controller control. preview that takes a file. atom caching per block. lots of updates 2024-05-16 00:29:58 -07:00
Sylvia Crowe
a228267b43 feat: basic plotting example
This adds a basic plot to tabs in a naive, hardcoded way. This will be
updated to be more customizable.
2024-05-14 13:48:53 -07:00
sawka
91a3394602 load README.md into preview view 2024-05-14 12:29:41 -07:00
sawka
1db615bb3a markdown preview 2024-05-14 09:37:41 -07:00
sawka
540f2fe0c0 more structure, store, types, views, global store to track tabs/blocks. two views 2024-05-13 23:45:41 -07:00
sawka
77a4987384 big reorg, move frontend to the top level, moves yarn, node_modules, vite, etc. 2024-05-13 21:42:25 -07:00