Skip to content

Commit e574f02

Browse files
committed
Vite!
1 parent 90b1ffb commit e574f02

File tree

208 files changed

+5863
-5402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+5863
-5402
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
repo-token: ${{ secrets.GITHUB_TOKEN }}
4343
- run: echo ${{ github.event.number }} > ./pr-number.txt
44-
- run: pnpm turbo build
44+
- run: pnpm turbo build build:prod
4545
# Used for faster deploy so we don't need to checkout the repo
4646
- uses: actions/upload-artifact@v4
4747
with:

.github/workflows/deploy-preview.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
with:
7878
repo-token: ${{ secrets.GITHUB_TOKEN }}
7979
- uses: wyvox/action-setup-pnpm@v3
80-
- run: pnpm turbo build
80+
- run: pnpm turbo build:prod
8181
- uses: actions/upload-artifact@v4
8282
with:
8383
name: deploy-prep-dist

.github/workflows/preview-embroider-upgrade.yml

-36
This file was deleted.

.node-version

-1
This file was deleted.

.npmrc

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
node-version = 20.11.1
21
registry = https://registry.npmjs.org
32
ignore-scripts = true
43

.prettierrc.cjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
module.exports = {
44
printWidth: 100,
5-
plugins: ['prettier-plugin-ember-template-tag'],
5+
tailwindStylesheet: './app/styles/app.css',
6+
plugins: ['prettier-plugin-ember-template-tag', 'prettier-plugin-tailwindcss'],
67
overrides: [
78
{
89
// Lol, JavaScript

apps/repl/.eslintignore

-1
This file was deleted.

apps/repl/.eslintrc.cjs

-17
This file was deleted.
File renamed without changes.

apps/repl/CHANGELOG.md

-13
This file was deleted.

apps/repl/app/app.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
import 'limber-ui/theme.css';
22
import 'ember-statechart-component';
3+
import './icons.ts';
34

4-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
5-
// @ts-ignore
6-
import { DEBUG } from '@glimmer/env';
75
import Application from '@ember/application';
86
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
97
// @ts-ignore
108
import { _backburner } from '@ember/runloop';
9+
import compatModules from '@embroider/virtual/compat-modules';
1110

1211
import loadInitializers from 'ember-load-initializers';
1312
import Resolver from 'ember-resolver';
1413

15-
import config from 'limber/config/environment';
14+
import config from './config/environment';
1615

17-
if (DEBUG) {
16+
if (import.meta.env.DEV) {
1817
// This has performance implications, but the debuggability is worth it.
1918
// Debugging eventloop stuff is notoriously difficult, so let's make it
2019
// not difficult by default.
@@ -35,8 +34,7 @@ Object.assign(window, {
3534

3635
export default class App extends Application {
3736
modulePrefix = config.modulePrefix;
38-
podModulePrefix = config.podModulePrefix;
39-
Resolver = Resolver;
37+
Resolver = Resolver.withModules(compatModules);
4038
}
4139

42-
loadInitializers(App, config.modulePrefix);
40+
loadInitializers(App, config.modulePrefix, compatModules);

apps/repl/app/components/limber/demo-select.gts

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { inject as service } from '@ember/service';
66
import { waitFor } from '@ember/test-waiters';
77

88
import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon';
9+
import { faAngleUp, faAngleRight } from '@fortawesome/free-solid-svg-icons';
910

1011
import Menu from 'limber/components/limber/menu';
1112
import { getFromLabel, NAMES } from 'limber/snippets';
@@ -29,13 +30,13 @@ export class DemoSelect extends Component {
2930
<Menu @inline={{true}}>
3031
<:trigger as |t|>
3132
<t.Default data-test-demo-select as |menu|>
32-
<span class="grid grid-flow-col gap-2 items-center">
33+
<span class="grid grid-flow-col items-center gap-2">
3334
Select demo
3435

3536
{{#if menu.isOpen}}
36-
<FaIcon @icon="angle-up" class="min-w-3" />
37+
<FaIcon @icon={{faAngleUp}} class="min-w-3" />
3738
{{else}}
38-
<FaIcon @icon="angle-right" class="min-w-3" />
39+
<FaIcon @icon={{faAngleRight}} class="min-w-3" />
3940
{{/if}}
4041
</span>
4142
</t.Default>

apps/repl/app/components/limber/editor/-code-mirror.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,5 @@ export async function setupCodeMirror() {
101101
// TypeScript doesn't have a way to type files in the public folder
102102
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
103103
// @ts-ignore
104-
CODEMIRROR = (await import(/* webpackIgnore: true */ '/codemirror/preconfigured.js')).default;
104+
CODEMIRROR = (await import('@nullvoxpopuli/limber-codemirror/preconfigured')).default;
105105
}

apps/repl/app/components/limber/editor/index.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const Editor: TOC<{
7171

7272
{{else}}
7373
<div
74-
class="syntax-dark relative border border-gray-900 bg-code-bg overflow-hidden"
74+
class="syntax-dark relative overflow-hidden border border-gray-900 bg-code-bg"
7575
...attributes
7676
>
7777

apps/repl/app/components/limber/editor/loader.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div
33
data-test-editor-loader
4-
class="z-10 absolute inset-0 grid items-center content-center text-center bg-gray-800 bg-opacity-40 text-white text-3xl font-semibold"
4+
class="bg-opacity-40 absolute inset-0 z-10 grid content-center items-center bg-gray-800 text-center text-3xl font-semibold text-white"
55
>
66
Loading Editor...
77
</div>

apps/repl/app/components/limber/editor/loading-error.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const LoadingError: TOC<{
77
}> = <template>
88
<div
99
data-test-loading-error
10-
class="rounded absolute left-4 p-4 top-4 bg-red-100 text-black drop-shadow-md border border-red-700 max-w-[40vw]"
10+
class="absolute top-4 left-4 max-w-[40vw] rounded border border-red-700 bg-red-100 p-4 text-black drop-shadow-md"
1111
>
1212
{{!
1313
We need this log to get the stack trace, otherwise we have no easy to

apps/repl/app/components/limber/editor/placeholder.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const Placeholder: TOC<{
1818
data-test-placeholder
1919
id="initial-editor"
2020
spellcheck="false"
21-
class="w-full h-full px-6 py-2 font-sm font-mono text-white"
21+
class="font-sm h-full w-full px-6 py-2 font-mono text-white"
2222
{{! @glint-ignore }}
2323
{{highlighted context.text}}
2424
...attributes

apps/repl/app/components/limber/frame-output.gts

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default class FrameOutput extends Component {
167167
<iframe
168168
{{this.monitorConnection}}
169169
title="Rendered output"
170-
class="w-full h-full border-none"
170+
class="h-full w-full border-none"
171171
src="/output"
172172
></iframe>
173173
</template>

apps/repl/app/components/limber/header.gts

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon';
2+
import { faCubes } from '@fortawesome/free-solid-svg-icons';
3+
4+
import { faEmber, faGithub } from '@fortawesome/free-brands-svg-icons';
25
import { notInIframe } from 'ember-primitives/iframe';
36

47
import { FormatButtons } from 'limber/components/limber/layout/controls/format-buttons';
@@ -9,20 +12,19 @@ import { Share } from './share';
912

1013
<template>
1114
<header
12-
class="bg-ember-black flex justify-between items-center drop-shadow-lg z-20 py-2 px-4 max-h-12"
15+
class="z-20 flex max-h-12 items-center justify-between bg-ember-black px-4 py-2 drop-shadow-lg"
1316
>
14-
<div class="flex gap-2 items-center">
15-
<h1 class="text-ember-brand flex gap-2 items-center">
17+
<div class="flex items-center gap-2">
18+
<h1 class="flex items-center gap-2 text-ember-brand">
1619
<a
1720
class="focus:ring-4 focus:outline-none focus-visible:outline-none"
1821
href="https://emberjs.com"
1922
target="_blank"
2023
rel="noreferrer noopener"
2124
>
22-
<FaIcon @icon="ember" @prefix="fab" @size="3x" class="-mb-3 -mt-2" />
25+
<FaIcon @icon={{faEmber}} @size="3x" class="-mt-2 -mb-3" />
2326
<span class="sr-only">Ember.JS homepage</span>
2427
</a>
25-
{{!<FaIcon @icon="markdown" @prefix="fab" @size="2x" class="-mb-2 -mt-2" />}}
2628
</h1>
2729

2830
{{#if (notInIframe)}}
@@ -31,7 +33,7 @@ import { Share } from './share';
3133
<Share />
3234
</div>
3335

34-
<nav class="text-white flex gap-2 items-baseline">
36+
<nav class="flex items-baseline gap-2 text-white">
3537
<DemoSelect />
3638

3739
<ExternalLink href="/bundle.html">
@@ -41,8 +43,8 @@ import { Share } from './share';
4143
Bundle
4244
</DefaultContent>
4345
</span>
44-
<span class="block sm:hidden px-2">
45-
<FaIcon @icon="cubes" />
46+
<span class="block px-2 sm:hidden">
47+
<FaIcon @icon={{faCubes}} />
4648
</span>
4749
</:custom>
4850
</ExternalLink>
@@ -53,8 +55,8 @@ import { Share } from './share';
5355
GitHub
5456
</DefaultContent>
5557
</span>
56-
<span class="block sm:hidden px-2">
57-
<FaIcon @icon="github" @prefix="fab" />
58+
<span class="block px-2 sm:hidden">
59+
<FaIcon @icon={{faGithub}} />
5860
</span>
5961
</:custom>
6062
</ExternalLink>

apps/repl/app/components/limber/help.gts

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { on } from '@ember/modifier';
22

33
import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon';
4+
import { faQuestion, faXmark } from '@fortawesome/free-solid-svg-icons';
45
import { Modal } from 'ember-primitives';
56
import { notInIframe } from 'ember-primitives/iframe';
67

@@ -14,7 +15,7 @@ export const FAB: TOC<{
1415
}> = <template>
1516
<button
1617
type="button"
17-
class="inline-block items-center p-2 grid-flow-col grid gap-2 rounded-full border-2 text-black bg-white hover:bg-[var(--ember-faint-gray)] focus:outline-none focus:ring focus-visible:outline-none focus-visible:ring ring-ember-brand drop-shadow-2xl hover:drop-shadow-xl disabled:opacity-30 aspect-square text-4xl"
18+
class="grid aspect-square grid-flow-col items-center gap-2 rounded-full border-2 bg-white p-2 text-4xl text-black ring-ember-brand drop-shadow-2xl hover:bg-[var(--ember-faint-gray)] hover:drop-shadow-xl focus:ring focus:outline-none focus-visible:ring focus-visible:outline-none disabled:opacity-30"
1819
...attributes
1920
>
2021
{{yield}}
@@ -27,7 +28,7 @@ export const FlatButton: TOC<{
2728
}> = <template>
2829
<button
2930
type="button"
30-
class="inline-block items-center grid-flow-col grid gap-2 rounded-full p-2 border-1 text-black bg-white hover:bg-[var(--ember-faint-gray)] focus:outline-none focus:ring focus-visible:outline-none focus-visible:ring ring-ember-brand disabled:opacity-30 aspect-square text-2xl"
31+
class="grid aspect-square grid-flow-col items-center gap-2 rounded-full border-1 bg-white p-2 text-2xl text-black ring-ember-brand hover:bg-[var(--ember-faint-gray)] focus:ring focus:outline-none focus-visible:ring focus-visible:outline-none disabled:opacity-30"
3132
...attributes
3233
>
3334
{{yield}}
@@ -97,18 +98,18 @@ export const Help = <template>
9798
<Modal as |m|>
9899
<div class="fixed right-4 bottom-4">
99100
<FAB {{on "click" m.open}} aria-label="Help / How to use this tool">
100-
<FaIcon @size="xs" @icon="question" class="aspect-square" />
101+
<FaIcon @size="xs" @icon={{faQuestion}} class="aspect-square" />
101102
</FAB>
102103
</div>
103104

104105
<m.Dialog
105-
class="prose rounded drop-shadow-xl border border-white"
106+
class="prose rounded border border-white drop-shadow-xl"
106107
aria-label="help with this tool"
107108
>
108-
<header class="flex justify-between items-center py-2 px-2">
109+
<header class="flex items-center justify-between px-2 py-2">
109110
<h2 class="m-0">Help</h2>
110111
<FlatButton {{on "click" m.close}} aria-label="hide the help information">
111-
<FaIcon @size="xs" @icon="xmark" class="aspect-square" />
112+
<FaIcon @size="xs" @icon={{faXmark}} class="aspect-square" />
112113
</FlatButton>
113114
</header>
114115

apps/repl/app/components/limber/layout/building.gts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { service } from 'limber-ui';
44
{{#let (service "editor") as |editor|}}
55
{{#if editor.isCompiling}}
66
<div
7-
class="absolute top-0 inset-x-0 bg-opacity-95 p-10 bg-gray-100 shadow text-black text-2xl font-bold z-20 flex gap-4 items-center"
7+
class="bg-opacity-95 absolute inset-x-0 top-0 z-20 flex items-center gap-4 bg-gray-100 p-10 text-2xl font-bold text-black shadow"
88
>
9-
<div class="loader animate-spin h-6 w-6"></div>
9+
<div class="loader h-6 w-6 animate-spin"></div>
1010
<span>Building...</span>
1111
</div>
1212
{{/if}}

apps/repl/app/components/limber/layout/containers.gts

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export const EditorContainer: TOC<{
1212
}> = <template>
1313
<section
1414
data-test-editor-panel
15-
class="grid overflow-hidden relative min-w-[38px] min-h-[38px]
16-
{{if @splitHorizontally 'w-full h-[40vh] resize-y' 'w-[40vw] min-h-full resize-x'}}
15+
class="relative grid min-h-[38px] min-w-[38px] overflow-hidden
16+
{{if @splitHorizontally 'h-[40vh] w-full resize-y' 'min-h-full w-[40vw] resize-x'}}
1717
"
1818
...attributes
1919
>
@@ -24,8 +24,8 @@ export const EditorContainer: TOC<{
2424
export const OutputContainer: TOC<{
2525
Blocks: { default: [] };
2626
}> = <template>
27-
<section class="flex-1 drop-shadow-inner grid overflow-hidden relative">
28-
<div class="overflow-auto relative bg-white flex" data-test-output>
27+
<section class="drop-shadow-inner relative grid flex-1 overflow-hidden">
28+
<div class="relative flex overflow-auto bg-white" data-test-output>
2929
{{yield}}
3030
</div>
3131

0 commit comments

Comments
 (0)