@universal-ember/docs-support 0.1.0 → 0.3.0

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.
package/README.md CHANGED
@@ -2,8 +2,12 @@
2
2
 
3
3
  All docs' needs abstracted into one package for better sharing across the docs apps.
4
4
 
5
+ ## Dark Mode Toggle
5
6
 
6
- ## Fonts
7
+ You will need `bg-white dark:bg-slate-900` on the `body` element's class.
8
+
9
+
10
+ ## Fonts (Optional)
7
11
 
8
12
  Add to the HTML `<head>`:
9
13
  ```html
@@ -1 +1 @@
1
- {"version":3,"file":"page-layout.gts.d.ts","sourceRoot":"","sources":["../src/page-layout.gts"],"names":[],"mappings":"AAmJA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AA4B1D,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC;IAC3B,MAAM,EAAE;QACN,QAAQ,EAAE,EAAE,CAAC;QACb,QAAQ,EAAE,EAAE,CAAC;QACb,QAAQ,EAAE,CAAC,OAAO,QAAQ,CAAC,CAAC;QAC5B,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;KACxB,CAAC;CACH,CAyGC,CAAC;AAEH,QAAA,MAAM,QAAQ,EAAE,GAAG,CAAC;IAAE,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,MAAM,EAAE;QAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAA;CAAE,CAcrE,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC;IAAE,MAAM,EAAE;QAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAA;CAAE,CAapD,CAAC"}
1
+ {"version":3,"file":"page-layout.gts.d.ts","sourceRoot":"","sources":["../src/page-layout.gts"],"names":[],"mappings":"AA8IA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AA4B1D,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC;IAC3B,MAAM,EAAE;QACN,QAAQ,EAAE,EAAE,CAAC;QACb,QAAQ,EAAE,EAAE,CAAC;QACb,QAAQ,EAAE,CAAC,OAAO,QAAQ,CAAC,CAAC;QAC5B,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;KACxB,CAAC;CACH,CAkHC,CAAC;AAEH,QAAA,MAAM,QAAQ,EAAE,GAAG,CAAC;IAAE,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,MAAM,EAAE;QAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAA;CAAE,CAcrE,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC;IAAE,MAAM,EAAE;QAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAA;CAAE,CAapD,CAAC"}
@@ -29,7 +29,7 @@ const onWindowScroll = modifier(() => {
29
29
  window.removeEventListener('scroll', onScroll);
30
30
  };
31
31
  });
32
- const PageLayout = setComponentTemplate(precompileTemplate("\n <ResponsiveMenuLayout>\n <:header as |Toggle|>\n <header class=\"sticky top-0 z-50 transition duration-500 shadow-md shadow-slate-900/5 dark:shadow-none bg-white/95\n {{if isScrolled.current \"dark:bg-slate-900/95 dark:backdrop-blur dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75\" \"dark:bg-slate-900/95\"}}\" {{onWindowScroll}}>\n <div class=\"outer-content flex flex-none flex-wrap items-center justify-between py-4\">\n <div class=\"flex mr-6 lg:hidden\">\n <Toggle />\n </div>\n <div class=\"relative flex items-center flex-grow basis-0\">\n <a href=\"/\" aria-label=\"Home page\">\n {{yield to=\"logoLink\"}}\n </a>\n </div>\n {{!--\n If we ever have a search bar\n <div class=\"mr-6 -my-5 sm:mr-8 md:mr-0\">\n input here\n </div>\n --}}\n <TopRight>\n {{yield to=\"topRight\"}}\n </TopRight>\n </div>\n </header>\n </:header>\n <:content>\n <section data-main-scroll-container class=\"flex-auto max-w-2xl min-w-0 py-4 lg:max-w-none\">\n <Article>\n <Page>\n {{!-- TODO: we need a pending state here\n right now this is ignored, because the :pending\n block doesn't exist.\n --}}\n {{!-- -- <:pending>\n <div class=\"h-full w-full\"></div>\n </:pending>\n --}}\n\n <:error as |error|>\n <section>\n {{yield error to=\"error\"}}\n </section>\n </:error>\n\n <:success as |prose|>\n <prose />\n {{(removeLoader)}}\n {{!-- this is probably really bad, and anti-patterny\n but ember doesn't have a good way to have libraries\n tie in to the URL without a bunch of setup -- which is maybe fine?\n needs some experimenting -- there is a bit of a disconnect with\n deriving data from the URL, and the timing of the model hooks.\n It might be possible to have an afterModel hook wait until the page is\n compiled.\n (that's why we have async state, because we're compiling, not loading)\n --}}\n {{resetScroll prose}}\n </:success>\n </Page>\n </Article>\n\n {{#if (has-block \"editLink\")}}\n\n <div class=\"flex justify-end pt-6 mt-12 border-t border-slate-200 dark:border-slate-800\">\n\n {{yield EditLink to=\"editLink\"}}\n </div>\n {{/if}}\n </section>\n </:content>\n\n </ResponsiveMenuLayout>\n", {
32
+ const PageLayout = setComponentTemplate(precompileTemplate("\n <ResponsiveMenuLayout>\n <:header as |Toggle|>\n <header class=\"sticky top-0 z-50 transition duration-500 shadow-md shadow-slate-900/5 dark:shadow-none bg-white/95\n {{if isScrolled.current \"dark:bg-slate-900/95 dark:backdrop-blur dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75\" \"dark:bg-slate-900/95\"}}\" {{onWindowScroll}}>\n <div class=\"outer-content flex flex-none flex-wrap items-center justify-between py-4\">\n <div class=\"flex mr-6 lg:hidden\">\n <Toggle />\n </div>\n <div class=\"relative flex items-center flex-grow basis-0\">\n <a href=\"/\" aria-label=\"Home page\">\n {{yield to=\"logoLink\"}}\n </a>\n </div>\n {{!--\n If we ever have a search bar\n <div class=\"mr-6 -my-5 sm:mr-8 md:mr-0\">\n input here\n </div>\n --}}\n <TopRight>\n {{yield to=\"topRight\"}}\n </TopRight>\n </div>\n </header>\n </:header>\n <:content>\n <section data-main-scroll-container class=\"flex-auto max-w-2xl min-w-0 py-4 lg:max-w-none\">\n <Article>\n <Page>\n <:pending>\n <div class=\"h-full w-full\"></div>\n </:pending>\n\n <:error as |error|>\n <section>\n {{yield error to=\"error\"}}\n </section>\n </:error>\n\n <:success as |prose|>\n <prose />\n {{(removeLoader)}}\n {{!-- this is probably really bad, and anti-patterny\n but ember doesn't have a good way to have libraries\n tie in to the URL without a bunch of setup -- which is maybe fine?\n needs some experimenting -- there is a bit of a disconnect with\n deriving data from the URL, and the timing of the model hooks.\n It might be possible to have an afterModel hook wait until the page is\n compiled.\n (that's why we have async state, because we're compiling, not loading)\n --}}\n {{resetScroll prose}}\n </:success>\n </Page>\n </Article>\n\n {{#if (has-block \"editLink\")}}\n\n <div class=\"flex justify-end pt-6 mt-12 border-t border-slate-200 dark:border-slate-800\">\n\n {{yield EditLink to=\"editLink\"}}\n </div>\n {{/if}}\n </section>\n </:content>\n\n </ResponsiveMenuLayout>\n", {
33
33
  strictMode: true,
34
34
  scope: () => ({
35
35
  ResponsiveMenuLayout,
@@ -2,7 +2,7 @@ import './theme-toggle.css';
2
2
  import { on } from '@ember/modifier';
3
3
  import { Switch } from 'ember-primitives';
4
4
  import { colorScheme } from 'ember-primitives/color-scheme';
5
- import { Moon, Sun } from './icons.js';
5
+ import { Sun, Moon } from './icons.js';
6
6
  import { precompileTemplate } from '@ember/template-compilation';
7
7
  import { setComponentTemplate } from '@ember/component';
8
8
  import templateOnly from '@ember/component/template-only';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-ember/docs-support",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "The default blueprint for Embroider v2 addons.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -37,20 +37,20 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@embroider/addon-shim": "^1.8.7",
40
- "@fontsource/lexend": "^5.1.1",
40
+ "@fontsource/lexend": "^5.2.5",
41
41
  "@tailwindcss/typography": "^0.5.15",
42
42
  "change-case": "^5.4.4",
43
43
  "decorator-transforms": "^2.0.0",
44
- "ember-mobile-menu": "^5.1.0",
44
+ "ember-mobile-menu": "^5.3.0",
45
45
  "ember-modifier": "^4.2.0",
46
- "ember-primitives": "^0.26.0",
46
+ "ember-primitives": "^0.28.1",
47
47
  "ember-resources": "^7.0.3",
48
48
  "inter-ui": "^4.0.2",
49
- "kolay": "^2.0.2",
49
+ "kolay": "^3.2.0",
50
50
  "package-up": "^5.0.0",
51
51
  "read-package-up": "^11.0.0",
52
52
  "should-handle-link": "^1.2.2",
53
- "tailwindcss": "^3.4.14"
53
+ "tailwindcss": "^4.0.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@babel/core": "^7.24.4",
@@ -61,13 +61,13 @@
61
61
  "@glint/core": "unstable",
62
62
  "@glint/environment-ember-loose": "unstable",
63
63
  "@glint/environment-ember-template-imports": "unstable",
64
- "@glint/template": "1.4.1-unstable.34c4510",
64
+ "@glint/template": "1.5.2",
65
65
  "@rollup/plugin-babel": "^6.0.4",
66
66
  "@tsconfig/ember": "^3.0.6",
67
67
  "@typescript-eslint/eslint-plugin": "^8.13.0",
68
68
  "@typescript-eslint/parser": "^8.13.0",
69
69
  "babel-plugin-ember-template-compilation": "^2.2.5",
70
- "concurrently": "^8.2.2",
70
+ "concurrently": "^9.1.2",
71
71
  "ember-source": "^5.12.0",
72
72
  "ember-template-lint": "^6.0.0",
73
73
  "eslint": "^8.56.0",
package/tailwind.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import path from 'node:path';
2
- import assert from 'node:assert';
3
- import { createRequire } from 'node:module';
1
+ import path from "node:path";
2
+ import assert from "node:assert";
3
+ import { createRequire } from "node:module";
4
4
 
5
- import { readPackageUp } from 'read-package-up';
6
- import { packageUp } from 'package-up';
7
- import defaultTheme from 'tailwindcss/defaultTheme.js';
8
- import typography from '@tailwindcss/typography';
5
+ import { readPackageUp } from "read-package-up";
6
+ import { packageUp } from "package-up";
7
+ import defaultTheme from "tailwindcss/defaultTheme.js";
8
+ import typography from "@tailwindcss/typography";
9
9
 
10
10
  // tailwindcss is built incorrectly to allow named imports
11
11
  const fontFamily = defaultTheme.fontFamily;
@@ -16,8 +16,8 @@ const require = createRequire(import.meta.url);
16
16
  * Thanks, past self
17
17
  * https://github.com/CrowdStrike/ember-oss-docs/blob/main/ember-oss-docs/tailwind.cjs
18
18
  */
19
- const files = '**/*.{js,ts,hbs,gjs,gts,html}';
20
- const sourceEntries = '{app,src}';
19
+ const files = "**/*.{js,ts,hbs,gjs,gts,html}";
20
+ const sourceEntries = "{app,src}";
21
21
 
22
22
  export async function config(root, { packages } = {}) {
23
23
  const appManifestPath = await packageUp(root);
@@ -57,15 +57,15 @@ export async function config(root, { packages } = {}) {
57
57
  /** @type {import('tailwindcss').Config} */
58
58
  return {
59
59
  content: [...contentPaths],
60
- darkMode: 'selector',
60
+ darkMode: "selector",
61
61
  theme: {
62
62
  extend: {
63
63
  maxWidth: {
64
- '8xl': '88rem',
64
+ "8xl": "88rem",
65
65
  },
66
66
  fontFamily: {
67
- sans: ['InterVariable', ...fontFamily.sans],
68
- display: ['Lexend', { fontFeatureSettings: '"ss01"' }],
67
+ sans: ["InterVariable", ...fontFamily.sans],
68
+ display: ["Helvetica, Arial, sans-serif"],
69
69
  },
70
70
  },
71
71
  },