create-ampless 0.2.0-alpha.11 → 0.2.0-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,17 @@
1
1
  @import 'tailwindcss';
2
+
3
+ /*
4
+ * Tailwind v4 doesn't scan `node_modules/` by default. The admin UI
5
+ * (`@ampless/admin`) and runtime UI bits (`@ampless/runtime`) ship
6
+ * compiled JS that uses Tailwind utility classes; without these
7
+ * explicit sources, every utility used only inside those packages
8
+ * (e.g. the admin sidebar's `flex`, `fixed`, `md:sticky`, ...) gets
9
+ * tree-shaken out of the final CSS, and the admin layout falls back
10
+ * to browser defaults — sidebar overlaps main content, etc.
11
+ */
12
+ @source '../node_modules/@ampless/admin/dist';
13
+ @source '../node_modules/@ampless/runtime/dist';
14
+
2
15
  @plugin '@tailwindcss/typography';
3
16
  /* DADS theme plugin from Digital Agency. Loaded globally so the
4
17
  * `templates/dads/` theme can use DADS-conformant color variables
@@ -7,13 +7,14 @@
7
7
  // `amplify_outputs.json` and `cms.config` into a single `Admin`
8
8
  // instance.
9
9
  //
10
- // NOTE: We intentionally do NOT pass an `ampless` instance to
11
- // createAdmin. That would import `lib/ampless.ts`, which imports
12
- // `themes-registry`, which (via theme pages `lib/i18n.ts`) imports
13
- // back to this file a circular chain that crashes with a TDZ
14
- // ReferenceError on `ampless` at module init. `createAdmin` builds
15
- // its own internal Ampless when omitted, which is functionally
16
- // equivalent for admin's needs.
10
+ // NOTE: we pass `ampless` as a thunk (not the resolved instance) so we
11
+ // don't have a static `import './ampless'` at the top of this file.
12
+ // A static import would form the cycle
13
+ // `lib/admin.ts lib/ampless.ts themes-registry themes lib/i18n.ts lib/admin.ts`
14
+ // and crash with a TDZ ReferenceError on `ampless` at module init.
15
+ // The thunk uses dynamic `import()` so `lib/ampless.ts` only loads on
16
+ // the first `loadSiteSettings` / `loadThemeConfig` call (request
17
+ // time), by which point every module has finished initialising.
17
18
 
18
19
  import outputs from '../amplify_outputs.json'
19
20
  import cmsConfig from '@/cms.config'
@@ -22,6 +23,7 @@ import { createAdmin } from '@ampless/admin'
22
23
  export const admin = createAdmin({
23
24
  outputs,
24
25
  cmsConfig,
26
+ ampless: async () => (await import('./ampless')).ampless,
25
27
  locale: (cmsConfig as { locale?: string }).locale ?? 'en',
26
28
  })
27
29
 
@@ -27,8 +27,8 @@
27
27
  "@ampless/plugin-rss": "^0.2.0-alpha.3",
28
28
  "@ampless/plugin-seo": "^0.2.0-alpha.3",
29
29
  "@ampless/plugin-webhook": "^0.2.0-alpha.3",
30
- "@ampless/admin": "^0.2.0-alpha.11",
31
- "@ampless/backend": "^0.2.0-alpha.4",
30
+ "@ampless/admin": "^0.2.0-alpha.12",
31
+ "@ampless/backend": "^0.2.0-alpha.5",
32
32
  "@ampless/runtime": "^0.2.0-alpha.5",
33
33
  "@digital-go-jp/tailwind-theme-plugin": "^0.3.4",
34
34
  "ampless": "^0.2.0-alpha.3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ampless",
3
- "version": "0.2.0-alpha.11",
3
+ "version": "0.2.0-alpha.13",
4
4
  "description": "Create a new ampless project",
5
5
  "license": "MIT",
6
6
  "type": "module",