@chronogrove/ui 0.78.0 → 0.79.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
@@ -12,6 +12,8 @@ pnpm add @chronogrove/ui
12
12
 
13
13
  Use **`pnpm publish`** for releases so `workspace:` dependencies in dependents are rewritten; see [pnpm workspaces — publishing](https://pnpm.io/workspaces#publishing-workspace-packages).
14
14
 
15
+ **Shared dependencies with `gatsby-theme-chronogrove`:** both packages depend on Theme UI, Emotion, and related libraries, with versions driven by the root [pnpm catalog](../../pnpm-workspace.yaml). When you bump those catalog entries, update **`packages/ui`** and **`theme`** in the **same change** so the theme and `@chronogrove/ui` stay aligned and you avoid duplicate or mismatched installs.
16
+
15
17
  ## Subpath exports
16
18
 
17
19
  Prefer deep imports so bundles stay lean:
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@chronogrove/ui",
3
- "version": "0.78.0",
3
+ "version": "0.79.0",
4
4
  "description": "Chronogrove Theme UI theme, color mode helpers, and shared UI primitives",
5
5
  "license": "MIT",
6
+ "type": "module",
7
+ "files": [
8
+ "src",
9
+ "README.md"
10
+ ],
6
11
  "repository": {
7
12
  "type": "git",
8
13
  "url": "https://github.com/chrisvogt/gatsby-theme-chronogrove.git",
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { useColorMode } from 'theme-ui'
3
3
  import { Expand } from '@theme-toggles/react'
4
- import isDarkMode from '@chronogrove/ui/is-dark-mode'
4
+ import isDarkMode from './helpers/isDarkMode.js'
5
5
 
6
6
  export default function ColorToggle() {
7
7
  const [colorMode, setColorMode] = useColorMode()
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx, useThemeUI } from 'theme-ui'
3
3
  import { forwardRef } from 'react'
4
- import isDarkMode from '@chronogrove/ui/is-dark-mode'
4
+ import isDarkMode from '../helpers/isDarkMode.js'
5
5
 
6
6
  const SkipNavLink = forwardRef(function SkipNavLink(
7
7
  { as: Comp = 'a', children = 'Skip to content', contentId = 'skip-nav-content', ...props },
package/babel.config.cjs DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * Jest transforms @emotion and JSX; mirror theme with classic runtime.
3
- */
4
- module.exports = {
5
- presets: [
6
- [require.resolve('@babel/preset-env'), { targets: { node: 'current' } }],
7
- [require.resolve('@babel/preset-react'), { runtime: 'classic', useBuiltIns: true }]
8
- ]
9
- }
package/jest.config.cjs DELETED
@@ -1,33 +0,0 @@
1
- /** @type {import('jest').Config} */
2
- module.exports = {
3
- testEnvironment: 'jsdom',
4
- clearMocks: true,
5
- setupFilesAfterEnv: ['<rootDir>/jest.setup.cjs'],
6
- testMatch: ['**/?(*.)+(spec|test).js'],
7
- transform: {
8
- '^.+\\.jsx?$': 'babel-jest'
9
- },
10
- transformIgnorePatterns: ['node_modules/(?!theme-ui)'],
11
- collectCoverageFrom: ['src/**/*.js', '!src/**/*.spec.js'],
12
- coverageDirectory: 'coverage',
13
- coveragePathIgnorePatterns: [
14
- '/node_modules/',
15
- 'src/index.js',
16
- 'src/skip-nav/index.js',
17
- 'src/color-mode/index.js',
18
- 'src/gatsby/index.js',
19
- 'src/theme.js'
20
- ],
21
- moduleNameMapper: {
22
- '^@chronogrove/ui/is-dark-mode$': '<rootDir>/src/helpers/isDarkMode.js',
23
- '^@theme-toggles/react$': '<rootDir>/test-utils/mock-theme-toggles-react.js'
24
- },
25
- coverageThreshold: {
26
- global: {
27
- statements: 95,
28
- branches: 90,
29
- functions: 95,
30
- lines: 95
31
- }
32
- }
33
- }
package/jest.setup.cjs DELETED
@@ -1 +0,0 @@
1
- require('@testing-library/jest-dom')
@@ -1,10 +0,0 @@
1
- import React from 'react'
2
-
3
- /** Test double for @theme-toggles/react (Jest moduleNameMapper); keeps ColorToggle unit tests offline. */
4
- export function Expand({ toggled, toggle, ...rest }) {
5
- return (
6
- <button type='button' data-toggled={String(toggled)} onClick={toggle} {...rest}>
7
- toggle
8
- </button>
9
- )
10
- }
package/turbo.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "$schema": "https://turbo.build/schema.json",
3
- "extends": ["//"],
4
- "tasks": {
5
- "test": {
6
- "outputs": []
7
- },
8
- "test:coverage": {
9
- "outputs": ["coverage/**"]
10
- }
11
- }
12
- }