Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs-app/examples/daisyui/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import EmberRouter from '@ember/routing/router';

import PageTitleService from 'ember-page-title/services/page-title';
import { properLinks } from 'ember-primitives/proper-links';
import Application from 'ember-strict-application-resolver';

@properLinks
class Router extends EmberRouter {
location = 'history';
rootURL = '/examples/daisyui/';
}
Router.map(function () {
this.route('avatar');
});

class App extends Application {
modules = {
'./router': Router,
'./services/page-title': PageTitleService,
...import.meta.glob('./templates/**/*.gts', { eager: true }),
};
}

App.create();
16 changes: 16 additions & 0 deletions docs-app/examples/daisyui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<title>DaisyUI + ember-primitives</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<!-- https://daisyui.com/docs/cdn/ -->
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
</head>
<body>
<script type="module" src="./app.ts"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions docs-app/examples/daisyui/templates/application.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pageTitle from 'ember-page-title/helpers/page-title';

<template>
{{pageTitle "DaisyUI + ember-primitives"}}

<a href="./avatar">Avatar</a>

<hr />

{{outlet}}
</template>
34 changes: 34 additions & 0 deletions docs-app/examples/daisyui/templates/avatar.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Avatar } from 'ember-primitives/components/avatar';

<template>
<link href=" https://cdn.jsdelivr.net/npm/daisyui@5.1.27/daisyui.min.css " rel="stylesheet" />

<div class="not-prose">
<Avatar @src="https://img.daisyui.com/images/profile/demo/yellingwoman@192.webp" as |a|>
<div class="avatar avatar-online">
<div class="w-24 rounded-full">
<a.Image alt="women pointing at a cat in frustration" />
</div>
</div>
</Avatar>

<Avatar
class="w-24 rounded-full"
@src="https://broken.tld/hi"
as |a|
>
<div class="avatar avatar-offline avatar-placeholder">
{{#if a.isError}}
<a.Fallback>
<div class="bg-neutral text-neutral-content w-16 rounded-full">
<span class="text-xl">ope</span>
</div>
</a.Fallback>
{{else}}
<div class="w-24 rounded-full">
<a.Image alt="intentially broken" />
</div>
{{/if}}
</div>
</Avatar>
</template>
2 changes: 1 addition & 1 deletion docs-app/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<title>ember-primitives</title>
Expand Down
12 changes: 6 additions & 6 deletions docs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint:hbs:fix": "pnpm -w exec lint hbs:fix",
"lint:prettier:fix": "pnpm -w exec lint prettier:fix",
"lint:prettier": "pnpm -w exec lint prettier",
"lint:types": "glint",
"lint:types": "ember-tsc",
"start": "pnpm vite",
"test": "vite build --mode test && ember test --path dist",
"test:ember": "vite build --mode test && ember test --path dist"
Expand All @@ -38,6 +38,7 @@
"ember-primitives": "workspace:^",
"ember-repl": "^6.0.0",
"ember-route-template": "^1.0.3",
"ember-strict-application-resolver": "^0.1.0",
"form-data-utils": "^0.6.0",
"hash": "^0.2.1",
"highlight.js": "^11.8.0",
Expand Down Expand Up @@ -68,10 +69,9 @@
"@embroider/vite": "^1.1.5",
"@fontsource/lexend": "^5.2.7",
"@glimmer/component": "^2.0.0",
"@glint/core": "1.5.2",
"@glint/environment-ember-loose": "1.5.2",
"@glint/environment-ember-template-imports": "1.5.2",
"@glint/template": "1.5.2",
"@glint/ember-tsc": "1.0.3",
"@glint/template": "1.6.1",
"@glint/tsserver-plugin": "2.0.3",
"@nullvoxpopuli/eslint-configs": "^5.3.3",
"@rollup/plugin-babel": "^6.0.4",
"@tailwindcss/typography": "^0.5.15",
Expand All @@ -98,7 +98,7 @@
"ember-qunit": "^9.0.3",
"ember-resolver": "^13.1.1",
"ember-resources": "^7.0.4",
"ember-source": "6.5.0",
"ember-source": "6.7.0",
"ember-template-lint": "^7.7.0",
"ember-welcome-page": "^7.0.2",
"eslint": "^9.26.0",
Expand Down
6 changes: 1 addition & 5 deletions docs-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
"extends": "@ember/app-tsconfig",
"include": ["app", "tests", "types"],
"glint": {
"environment": ["ember-loose", "ember-template-imports"]
},
"compilerOptions": {
"paths": {
"docs-app/tests/*": ["./tests/*"],
"docs-app/*": ["./app/*"],
"*": ["./types/*"]
},
"types": ["ember-source/types", "kolay/virtual", "@embroider/core/virtual"]
"types": ["ember-source/types", "kolay/virtual", "@embroider/core/virtual", "vite/client", "@glint/ember-tsc/types"]
}
}
12 changes: 11 additions & 1 deletion docs-app/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ export default defineConfig((/* { mode } */) => {
return {
build: {
target: ["esnext"],
rollupOptions: {
input: {
main: "index.html",
tests: "tests/index.html",
"examples/daisyui": import.meta.resolve(
"./examples/daisyui/index.html",
import.meta.dirname,
),
},
},
},
css: {
postcss: "./config/postcss.config.mjs",
Expand All @@ -16,7 +26,7 @@ export default defineConfig((/* { mode } */) => {
extensions,
},
plugins: [
classicEmberSupport(),
// classicEmberSupport(),
ember(),
kolay({
src: "public/docs",
Expand Down
11 changes: 5 additions & 6 deletions ember-primitives/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"lint:published-types": "attw *.tgz || exit 0",
"lint:prettier:fix": "pnpm -w exec lint prettier:fix",
"lint:prettier": "pnpm -w exec lint prettier",
"lint:types": "glint",
"lint:types": "ember-tsc",
"pack": "pnpm pack",
"start": "rollup --config --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
Expand Down Expand Up @@ -63,18 +63,17 @@
"@embroider/addon-dev": "^7.0.1",
"@glimmer/component": "^2.0.0",
"@glimmer/tracking": "^1.1.2",
"@glint/core": "1.5.2",
"@glint/environment-ember-loose": "1.5.2",
"@glint/environment-ember-template-imports": "1.5.2",
"@glint/template": "^1.5.2",
"@glint/ember-tsc": "1.0.3",
"@glint/template": "1.6.1",
"@glint/tsserver-plugin": "2.0.3",
"@nullvoxpopuli/eslint-configs": "^5.3.3",
"@rollup/plugin-babel": "^6.0.4",
"@tsconfig/ember": "^3.0.5",
"babel-plugin-ember-template-compilation": "^2.4.0",
"concurrently": "^9.1.0",
"ember-modifier": "^4.2.2",
"ember-resources": "^7.0.4",
"ember-source": "6.5.0",
"ember-source": "6.7.0",
"ember-template-lint": "^7.7.0",
"eslint": "^9.26.0",
"fix-bad-declaration-output": "^1.1.4",
Expand Down
5 changes: 1 addition & 4 deletions ember-primitives/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "@tsconfig/ember/tsconfig.json",
"include": ["src/**/*"],
"glint": {
"environment": ["ember-template-imports"]
},
"compilerOptions": {
"skipLibCheck": true,
"declarationDir": "declarations",
Expand Down Expand Up @@ -43,6 +40,6 @@
can do the proper transformations on those files.
*/
"allowImportingTsExtensions": true,
"types": ["ember-source/types"]
"types": ["ember-source/types", "@glint/ember-tsc/types"]
}
}
Loading
Loading