diff --git a/packages/boxel-ui/addon/package.json b/packages/boxel-ui/addon/package.json index 57897e5f69..febab4322e 100644 --- a/packages/boxel-ui/addon/package.json +++ b/packages/boxel-ui/addon/package.json @@ -73,7 +73,7 @@ "@babel/plugin-transform-class-static-block": "^7.22.11", "@babel/plugin-transform-typescript": "^7.22.15", "@babel/runtime": "^7.24.4", - "@embroider/addon-dev": "^7.0.0", + "@embroider/addon-dev": "7.0.1-unstable.4070ba7", "@embroider/macros": "^1.16.9", "@rollup/plugin-babel": "^6.0.4", "@tsconfig/ember": "3.0.1", @@ -97,7 +97,6 @@ "prettier-plugin-ember-template-tag": "^1.1.0", "rollup": "^4.18.1", "rollup-plugin-copy": "^3.5.0", - "rollup-plugin-import-css": "^3.5.7", "svgo": "3.0.2" }, "peerDependencies": { diff --git a/packages/boxel-ui/addon/rollup.config.mjs b/packages/boxel-ui/addon/rollup.config.mjs index 7992e3c0bd..45bdf2a8d7 100644 --- a/packages/boxel-ui/addon/rollup.config.mjs +++ b/packages/boxel-ui/addon/rollup.config.mjs @@ -2,7 +2,6 @@ import { Addon } from '@embroider/addon-dev/rollup'; import { babel } from '@rollup/plugin-babel'; import { scopedCSS } from 'glimmer-scoped-css/rollup'; import copy from 'rollup-plugin-copy'; -import css from 'rollup-plugin-import-css'; const addon = new Addon({ srcDir: 'src', @@ -16,7 +15,6 @@ export default { plugins: [ scopedCSS('src'), - css(), // These are the modules that users should be able to import from your // addon. Anything not listed here may get optimized away. @@ -44,29 +42,28 @@ export default { // Ensure that .gjs files are properly integrated as Javascript addon.gjs(), - // addons are allowed to contain imports of .css files, which we want rollup - // to leave alone and keep in the published output. + // css is importable for side-effect + addon.keepAssets(['**/*.css']), + + // these asset types are imported for their URLs addon.keepAssets( - [ - 'styles/**/*.css', - '**/*.css', - '**/*.otf', - '**/*.png', - '**/*.webp', - '**/*.woff2', - ], + ['**/*.otf', '**/*.png', '**/*.webp', '**/*.woff2'], 'default', ), // Remove leftover build artifacts when starting a new build. addon.clean({ runOnce: true }), - // Copy Readme and License into published package + // Copy files into published package copy({ targets: [ { src: '../README.md', dest: '.' }, { src: '../LICENSE.md', dest: '.' }, + { src: './src/styles/*.{css,woff2,otf}', dest: './dist/styles' }, ], + // this makes it late enough that the `clean()` hook above doesn't remove + // our copied files + hook: 'generateBundle', }), // This babel config should *not* apply presets or compile away ES modules. diff --git a/packages/boxel-ui/addon/src/components/drag-and-drop/index.gts b/packages/boxel-ui/addon/src/components/drag-and-drop/index.gts index 07c2e305f1..b489624967 100644 --- a/packages/boxel-ui/addon/src/components/drag-and-drop/index.gts +++ b/packages/boxel-ui/addon/src/components/drag-and-drop/index.gts @@ -1,4 +1,3 @@ -import { LoadingIndicator } from '@cardstack/boxel-ui/components'; import { fn, hash } from '@ember/helper'; import { on } from '@ember/modifier'; import { action } from '@ember/object'; @@ -6,6 +5,7 @@ import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; import { and, eq } from '../../helpers/truth-helpers.ts'; +import LoadingIndicator from '../loading-indicator/index.gts'; const isFastBoot = typeof (globalThis as any).FastBoot !== 'undefined'; diff --git a/packages/boxel-ui/addon/src/components/drag-and-drop/usage.gts b/packages/boxel-ui/addon/src/components/drag-and-drop/usage.gts index a7f9297fee..d1ccb40f0e 100644 --- a/packages/boxel-ui/addon/src/components/drag-and-drop/usage.gts +++ b/packages/boxel-ui/addon/src/components/drag-and-drop/usage.gts @@ -1,4 +1,3 @@ -import { cssVar } from '@cardstack/boxel-ui/helpers'; import { fn } from '@ember/helper'; import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; @@ -9,6 +8,7 @@ import { } from 'ember-freestyle/decorators/css-variable'; import { get } from 'lodash'; +import cssVar from '../../helpers/css-var.ts'; import Pill from '../pill/index.gts'; import DndKanbanBoard, { DndColumn } from './index.gts'; diff --git a/packages/boxel-ui/addon/src/types/ember-power-calendar/components/index.d.ts b/packages/boxel-ui/addon/src/types/ember-power-calendar/components/index.d.ts index d3764adda4..df42f2b956 100644 --- a/packages/boxel-ui/addon/src/types/ember-power-calendar/components/index.d.ts +++ b/packages/boxel-ui/addon/src/types/ember-power-calendar/components/index.d.ts @@ -1,5 +1,5 @@ -import DayComponent from 'ember-power-calendar/components/days'; -import NavComponent from 'ember-power-calendar/components/nav'; +import type DayComponent from 'ember-power-calendar/components/days'; +import type NavComponent from 'ember-power-calendar/components/nav'; declare module 'ember-power-calendar/components/power-calendar-range' { interface PowerCalendarRangeDefaultBlock { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c1edbfd3c8..b18c514ead 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -868,8 +868,8 @@ importers: specifier: ^7.24.4 version: 7.26.0 '@embroider/addon-dev': - specifier: ^7.0.0 - version: 7.0.0(@glint/template@1.3.0)(rollup@4.18.1) + specifier: 7.0.1-unstable.4070ba7 + version: 7.0.1-unstable.4070ba7(@glint/template@1.3.0)(rollup@4.18.1) '@embroider/macros': specifier: ^1.16.9 version: 1.16.9(@glint/template@1.3.0) @@ -939,9 +939,6 @@ importers: rollup-plugin-copy: specifier: ^3.5.0 version: 3.5.0 - rollup-plugin-import-css: - specifier: ^3.5.7 - version: 3.5.7(rollup@4.18.1) svgo: specifier: 3.0.2 version: 3.0.2 @@ -4592,6 +4589,33 @@ packages: - utf-8-validate dev: true + /@embroider/addon-dev@7.0.1-unstable.4070ba7(@glint/template@1.3.0)(rollup@4.18.1): + resolution: {integrity: sha512-pQri54qUhl/Nef0vEKGhGGaHUAg1EDYa5cCEVuA6WbFWq7+fY24Ubo9fFX7ZmfAjKlQ8YPrh1mSmray/6aAtOA==} + engines: {node: 12.* || 14.* || >= 16} + hasBin: true + peerDependencies: + rollup: ^4.6.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@embroider/core': 3.4.20(@glint/template@1.3.0) + '@rollup/pluginutils': 5.1.3(rollup@4.18.1) + content-tag: 3.0.0 + fs-extra: 10.1.0 + minimatch: 3.1.2 + rollup: 4.18.1 + rollup-plugin-copy-assets: 2.0.3(rollup@4.18.1) + walk-sync: 3.0.0 + yargs: 17.7.2 + transitivePeerDependencies: + - '@glint/template' + - bufferutil + - canvas + - supports-color + - utf-8-validate + dev: true + /@embroider/addon-shim@0.50.2: resolution: {integrity: sha512-a+pFlXZPovcCNFo05HxXBW9ole43mPyFZnkhvZlLF0f1sHEn9j0sD1Ld2BM/NCERmHcYz9eXQnX1FPNLCDoGEA==} engines: {node: 12.* || 14.* || >= 16} @@ -4732,6 +4756,43 @@ packages: - utf-8-validate dev: true + /@embroider/core@3.4.20(@glint/template@1.3.0): + resolution: {integrity: sha512-bKy/uIrcoUyJXcBud2d8E7J8R8NRMz0T3xaKbEUx4nxc4/BbBsU+y7wSyzzfggykyJTK/95PwNIxls8gqnyYYA==} + engines: {node: 12.* || 14.* || >= 16} + dependencies: + '@babel/core': 7.24.3(supports-color@8.1.1) + '@babel/parser': 7.25.7 + '@babel/traverse': 7.25.7(supports-color@8.1.1) + '@embroider/macros': 1.16.10(@glint/template@1.3.0) + '@embroider/shared-internals': 2.8.1(supports-color@8.1.1) + assert-never: 1.2.1 + babel-plugin-ember-template-compilation: 2.3.0 + broccoli-node-api: 1.7.0 + broccoli-persistent-filter: 3.1.3 + broccoli-plugin: 4.0.7 + broccoli-source: 3.0.1 + debug: 4.3.7(supports-color@8.1.1) + fast-sourcemap-concat: 2.1.1 + filesize: 10.0.12 + fs-extra: 9.1.0 + fs-tree-diff: 2.0.1 + handlebars: 4.7.8 + js-string-escape: 1.0.1 + jsdom: 25.0.1(supports-color@8.1.1) + lodash: 4.17.21 + resolve: 1.22.8 + resolve-package-path: 4.0.3 + semver: 7.6.2 + typescript-memoize: 1.1.1 + walk-sync: 3.0.0 + transitivePeerDependencies: + - '@glint/template' + - bufferutil + - canvas + - supports-color + - utf-8-validate + dev: true + /@embroider/hbs-loader@3.0.3(@embroider/core@3.4.19)(webpack@5.89.0): resolution: {integrity: sha512-sI2K3/III1WGGxS+aIf8uW5tgcNiE7APNhThn2ZTwqU47fK20Uz8TJZhst0GfNZFsCsmuQMRUikRJvQU8naSWA==} engines: {node: 12.* || 14.* || >= 16} @@ -4743,6 +4804,28 @@ packages: webpack: 5.89.0 dev: true + /@embroider/macros@1.16.10(@glint/template@1.3.0): + resolution: {integrity: sha512-G0vCsKgNCX0PMmuVNsTLG7IYXz8VkekQMK4Kcllzqpwb7ivFRDwVx2bD4QSvZ9LCTd4eWQ654RsCqVbW5aviww==} + engines: {node: 12.* || 14.* || >= 16} + peerDependencies: + '@glint/template': ^1.0.0 + peerDependenciesMeta: + '@glint/template': + optional: true + dependencies: + '@embroider/shared-internals': 2.8.1(supports-color@8.1.1) + '@glint/template': 1.3.0 + assert-never: 1.2.1 + babel-import-util: 2.0.1 + ember-cli-babel: 7.26.11 + find-up: 5.0.0 + lodash: 4.17.21 + resolve: 1.22.8 + semver: 7.6.2 + transitivePeerDependencies: + - supports-color + dev: true + /@embroider/macros@1.16.9(@glint/template@1.3.0): resolution: {integrity: sha512-AUrmHQdixczIU3ouv/+HzWxwYVsw/NwssZxAQnXfBDJ3d3/CRtAvGRu3JhY6OT3AAPFwfa2WT66tB5jeAa7r5g==} engines: {node: 12.* || 14.* || >= 16} @@ -22607,16 +22690,6 @@ packages: is-plain-object: 3.0.1 dev: true - /rollup-plugin-import-css@3.5.7(rollup@4.18.1): - resolution: {integrity: sha512-mipsJ1s5xL5MgALTSMCMehngpAMFMMcYUFk6gAvv4Es8DlHGnA8iNQrw0X6hXiQYtjsa17uV1rpk5tXo0otZ6Q==} - engines: {node: '>=16'} - peerDependencies: - rollup: ^2.x.x || ^3.x.x || ^4.x.x - dependencies: - '@rollup/pluginutils': 5.1.3(rollup@4.18.1) - rollup: 4.18.1 - dev: true - /rollup@4.18.1: resolution: {integrity: sha512-Elx2UT8lzxxOXMpy5HWQGZqkrQOtrVDDa/bm9l10+U4rQnVzbL/LgZ4NOM1MPIDyHk69W4InuYDF5dzRh4Kw1A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -24300,7 +24373,7 @@ packages: resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} engines: {node: '>=12'} dependencies: - punycode: 2.3.0 + punycode: 2.3.1 dev: true /tr46@4.1.1: