diff --git a/.ado/azure-pipelines.yml b/.ado/azure-pipelines.yml index b65685c253..d7bc027547 100644 --- a/.ado/azure-pipelines.yml +++ b/.ado/azure-pipelines.yml @@ -28,10 +28,6 @@ jobs: yarn prettier displayName: 'check prettier' - - script: | - yarn align-deps - displayName: 'run align-deps' - - script: | yarn lint-lockfile displayName: 'run lint-lockfile' diff --git a/.yarnrc.yml b/.yarnrc.yml index 4ba216422e..9b0614ab7e 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,5 +1,15 @@ catalog: + '@rnx-kit/align-deps': '^3.4.0' + '@rnx-kit/config': '^0.7.4' + '@rnx-kit/eslint-plugin': '^0.9.5' + '@rnx-kit/jest-preset': '^0.3.1' + '@rnx-kit/lint-lockfile': '^0.1.2' + '@rnx-kit/reporter': '^0.1.0' + '@rnx-kit/tools-packages': '^0.1.1' + '@rnx-kit/tools-typescript': '^0.1.1' + '@rnx-kit/tsconfig': '^2.1.1' '@types/jasmine': '5.1.13' + '@types/node': '^22.19.7' '@wdio/appium-service': '^9.23.0' '@wdio/cli': '^9.23.0' '@wdio/globals': '^9.23.0' @@ -14,7 +24,9 @@ catalog: 'appium-uiautomator2-driver': '^6.7.8' 'appium-windows-driver': '^5.1.5' 'appium-xcuitest-driver': '^10.14.5' + 'cross-env': '^10.1.0' 'expect-webdriverio': '^5.6.1' + 'knip': '^5.81.0' 'rimraf': '^6.1.2' 'webdriverio': '^9.23.0' diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000000..32623fb00d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,247 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +This is the **FluentUI React Native** repository, a monorepo containing React Native components that implement Microsoft's Fluent Design System. The repository supports multiple platforms including iOS, Android, macOS, Windows, and Win32. + +## Repository Architecture + +### High-Level Structure +``` +/apps/ - Demo and test applications + /fluent-tester/ - Main test app for component development + /E2E/ - End-to-end testing setup using Appium/WebDriverIO + /win32/ - Win32-specific test app + /component-generator/ - Tool to generate new components +/packages/ - Core library packages + /components/ - UI component implementations (Button, Checkbox, Avatar, etc.) + /framework/ - Core theming and composition framework + /composition/ - Component composition factory (current approach) + /theme/ - Theme system + /use-tokens/ - Token-based styling hooks + /use-slots/ - Slot-based component composition + /theming/ - Theme definitions for different platforms + /android-theme/ + /apple-theme/ + /default-theme/ + /win32-theme/ + /experimental/ - Components under active development + /deprecated/ - Old framework code (foundation-compose, foundation-composable) + /utils/ - Shared utilities and tools +/scripts/ - Build and development scripts (fluentui-scripts CLI) +/docs/ - Component and theming documentation +``` + +### Key Framework Concepts + +**Composition Framework**: The repository uses `@fluentui-react-native/composition` (located at `packages/framework/composition/`) for building components. This is the current approach and is simpler than the older foundation-compose/foundation-composable frameworks in `/deprecated/`. + +**Slots**: The slot pattern is used to compose higher-order components. A slot represents an inner component (actual entry in the render tree). For example, a Button might have slots for `root`, `icon`, and `content`. This allows advanced customization scenarios. Components wrapping a single native component typically have one slot. + +**Tokens**: Design tokens handle styling and customization. Tokens are design-time values set via theme or component customization (e.g., "brandColor"). Tokens can also be props (specified via "TokensThatAreAlsoProps"). This system enables simpler customization and better memoization. + +**Platform-Specific Files**: Components use platform-specific files with extensions like `.ios.ts`, `.android.ts`, `.win32.ts`, `.macos.ts` for platform-specific implementations. + +**Legacy vs V1**: Many components have both legacy and V1 implementations (e.g., `Button` and `ButtonV1`). The V1 versions use the newer composition framework and are preferred. + +## Build System & Commands + +The project uses **Yarn 4** (Berry) in **pnpm mode** with **Lage** as the task runner for orchestrating builds across the monorepo. The pnpm mode provides better disk space efficiency and stricter dependency management. + +### Primary Commands +```bash +yarn build # TypeScript build for all packages (outputs to lib/ and lib-commonjs/) +yarn test # Build, lint, and run tests across all packages +yarn lint # ESLint across all packages +yarn bundle # Bundle all packages +yarn buildci # Full CI pipeline: build + test + lint + bundle + depcheck + check-publishing +yarn clean # Clean build artifacts +``` + +### Development Commands +```bash +yarn prettier-fix # Format code with Prettier +yarn depcheck # Check for unused dependencies across packages +yarn depcheck-fix # Fix depcheck issues automatically +yarn align-deps # Align React Native dependencies using @rnx-kit/align-deps +yarn change # Generate Beachball change files (required before PR merge) +yarn checkchange # Verify change files exist for modified packages +``` + +### Lage Configuration +The build pipeline is defined in `lage.config.js`: +- Tasks have dependency ordering (e.g., `test` depends on `build`) +- Lage uses caching to avoid redundant steps +- Add `--no-cache` to bypass caching +- Add `--verbose` for detailed output + +### Package-Level Commands +Individual packages use `fluentui-scripts` (in `/scripts/`) which provides: +- `yarn build` - TypeScript compilation to `lib/` (ESM) and `lib-commonjs/` (CJS) + - The build script automatically sets `--moduleResolution` to match `--module` for TypeScript 5.8+ compatibility + - ESM builds use `--module esnext --moduleResolution bundler` + - CJS builds use `--module node16 --moduleResolution node16` +- `yarn lint` - ESLint +- `yarn lint-package` - Lint package configuration (includes align-deps and depcheck) + - Use `--fix` flag to automatically fix issues + - Validates dependencies, scripts, entry points, and build configuration +- `yarn test` - Jest tests (where applicable) +- `yarn depcheck` - Check for unused dependencies +- `yarn prettier` - Check code formatting +- `yarn prettier-fix` - Fix code formatting + +## TypeScript Configuration + +The repository uses **TypeScript 5.8+** with **@typescript/native-preview** for improved performance and React Native compatibility. The native preview is automatically added to packages with a `tsconfig.json` via dynamic package extensions. + +### Key TypeScript Settings +- Base configuration in `/scripts/configs/tsconfig.json` +- Module system: `node16` with matching `moduleResolution: node16` +- Target: `es2022` +- Strict mode enabled (with some exceptions for legacy code compatibility) +- **TypeScript Native Preview**: Packages automatically receive `@typescript/native-preview` as a development dependency + +### TypeScript 5.8+ Compatibility Notes +- The `suppressImplicitAnyIndexErrors` option has been removed (deprecated in TS 5.8+) +- Module resolution must match module format when using Node16 resolution +- Stricter type checking for platform values (e.g., `Platform.OS` doesn't include 'win32' in React Native types, but react-native-windows does support it at runtime) +- TypeScript native preview provides better performance for large React Native codebases + +### Framework Type System +The composition framework uses precise types for better type safety: +- **`SlotFn`**: Slot functions return `React.ReactElement | null` (not `ReactNode`) + - This reflects the actual behavior: slots always return elements via staged render or `React.createElement` + - Provides better type inference when accessing slot props (e.g., `Slots.root({}).props`) +- **`FinalRender`**: Final render functions in staged components return `JSX.Element | null` + - Used in composition framework's `useRender` functions + - Ensures type compatibility between staged components and the composition system + +## Development Workflow + +### Setting Up Development Environment +1. Clone repository +2. Run `yarn` to install dependencies +3. Run `yarn build` to build all packages +4. Launch FluentUI Tester app for component testing (see `/apps/fluent-tester/README.md`) + +### Component Development + +**Component Location**: Components are in `/packages/components/` (stable) or `/packages/experimental/` (under development). + +**Component Structure**: Each component typically has: +- `package.json` - Package definition with workspace dependencies +- `src/index.ts` - Main export file +- `src/.tsx` - Component implementation (requires `/** @jsxImportSource @fluentui-react-native/framework-base */` pragma) +- `src/.types.ts` - TypeScript type definitions +- `src/.styling.ts` - Styling and token definitions +- `src/..ts` - Platform-specific implementations +- `SPEC.md` - Component specification and usage documentation +- `MIGRATION.md` - Migration guide (for V1 components) +- `tsconfig.json`, `babel.config.js`, `jest.config.js`, `eslint.config.js` + +**Using Composition Framework**: Use `@fluentui-react-native/composition` for new components. For simpler components without slots/tokens, use the `stagedComponent` pattern from `@fluentui-react-native/use-slot`. + +**JSX Runtime**: All components use the modern automatic JSX runtime: +- Add `/** @jsxImportSource @fluentui-react-native/framework-base */` at the top of `.tsx` files +- The custom jsx-runtime intercepts JSX calls to optimize slot rendering +- No need to import `withSlots` - it's handled automatically by the runtime +- Components using React Fragments (`<>...`) work automatically (Fragment is re-exported from the jsx-runtime) +- Packages using the jsx-runtime need `@fluentui-react-native/framework-base` in `devDependencies` + +**TypeScript Patterns**: +- Slot functions automatically return `React.ReactElement`, so you can access `.props` directly without type assertions +- When checking for win32 platform: `Platform.OS === ('win32' as any)` - TypeScript doesn't recognize 'win32' but react-native-windows supports it +- Final render functions should return `FinalRender` with children as rest parameters: `(props: TProps, ...children: React.ReactNode[])` + +**Native Modules**: Components with native code (iOS/Android/Windows): +- Typically have one root slot wrapping the native component +- Use `codegenNativeComponent` for new architecture compatibility +- May use `constantsToExport` for default values from native side +- iOS/macOS: Include `.podspec` files +- Must be added to FluentTester's Podfile (transitive dependencies aren't autolinked) + +### Creating a New Component + +1. Create directory: `/packages/components/` or `/packages/experimental/` +2. Copy structure from existing component (e.g., Shimmer, Button) +3. Update `package.json` with correct name and dependencies (use `workspace:*` for internal packages) +4. Create source files in `src/` +5. Add test page to FluentTester at `/apps/fluent-tester/src/TestComponents//` +6. Register test page in `testPages.tsx` and platform-specific `testPages..tsx` +7. Add E2E tests (see E2E Testing section) +8. Run `yarn` and `yarn build` from root +9. For Apple platforms: run `pod install` in test app directories + +### Theming + +Platform-specific themes are in `/packages/theming/`: +- `android-theme/` - Android theming +- `apple-theme/` - iOS and macOS theming +- `win32-theme/` - Win32 theming +- `default-theme/` - Cross-platform defaults +- `theme-tokens/` - Token definitions +- `theme-types/` - TypeScript types for themes + +Components require `ThemeProvider` from `@fluentui-react-native/theme` to work properly. + +### Testing + +**Manual Testing**: Use FluentUI Tester app (`/apps/fluent-tester/`) for interactive component testing. Test pages are in `/apps/fluent-tester/src/TestComponents/`. + +**E2E Testing**: Required for all new components. Uses Appium + WebDriverIO. +- E2E tests live in `/apps/E2E/src//` +- Each component needs: + - Page Object (`PageObject..ts`) - Interface to interact with test page + - Spec Document (`Spec..ts`) - Jasmine test cases + - Constants file in test component (`/apps/fluent-tester/src/TestComponents//consts.ts`) +- Test pages must include: + - `testID` on first section matching page object's `_pageName` + - Optional `e2eSections` prop for dedicated E2E test elements +- Run E2E tests: `yarn e2etest:` from `/apps/E2E/` + +**Unit Tests**: Component-specific Jest tests where present, typically in `src/` directories. + +### Platform-Specific Development + +**iOS/macOS**: +- May wrap native controls from FluentUI Apple +- Requires `.podspec` files for native modules +- Run `pod install` after adding dependencies + +**Android**: +- Platform-specific styling and tokens +- Uses `accessibilityLabel` for E2E selectors (other platforms use `testID`) + +**Win32**: +- Separate test app at `/apps/win32/` +- Uses WinAppDriver for E2E testing + +**Windows (UWP)**: +- Separate test app configuration +- Legacy support + +## Version Management + +**Beachball**: Used for change logs and versioning. +- Run `yarn change` to create change files when modifying packages +- Change files are required before merging PRs (`yarn checkchange` validates) +- Beachball config in `beachball.config.js` +- Major versions are disallowed (`disallowedChangeTypes: ['major']`) +- On publish, `onPublish` field in `package.json` gets merged into package + +## Important Notes + +- This is an **alpha-stage** library under active development +- **Requires TypeScript 5.8+** with `@typescript/native-preview` for proper type checking and module resolution +- **Uses Yarn 4 in pnpm mode** for dependency management (configured in `.yarnrc.yml`) +- **Uses modern automatic JSX runtime** - all components should use `@jsxImportSource @fluentui-react-native/framework-base` +- **Dynamic package extensions**: Common dev dependencies (TypeScript, Jest, ESLint, Prettier) are automatically added via `scripts/dynamic.extensions.mjs` +- **Integrated linting**: `yarn lint-package` now includes align-deps and depcheck validation +- Follow existing component patterns for consistency +- Test components using FluentUI Tester app before submitting PRs +- Platform differences should be documented in component `SPEC.md` files +- Use the newer composition framework (`@fluentui-react-native/composition`) for new components, not the deprecated foundation frameworks +- When importing V1 components, consider aliasing: `import { ButtonV1 as Button }` +- Slot functions return `React.ReactElement` - you can safely access `.props` without type assertions diff --git a/apps/E2E/package.json b/apps/E2E/package.json index f0ed11e639..55126ee7b7 100644 --- a/apps/E2E/package.json +++ b/apps/E2E/package.json @@ -2,20 +2,30 @@ "name": "@fluentui-react-native/e2e-testing", "version": "1.43.11", "description": "Package containing E2E testing specs", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "apps/E2E" + }, "license": "MIT", - "main": "lib/index.js", - "module": "lib/index.mjs", - "typings": "lib/index.d.ts", "exports": { ".": { "types": "./lib/index.d.ts", - "import": "./lib/index.mjs", - "require": "./lib/index.js" + "import": "./lib/index.js", + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", + "files": [ + "src/**/*", + "dist/*" + ], "scripts": { - "build": "fluentui-scripts hybrid-build", - "lint": "fluentui-scripts eslint", + "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "e2eprep:android": "cross-env APPIUM_HOME=.appium yarn exec appium driver install uiautomator2", "e2eprep:ios": "cross-env APPIUM_HOME=.appium yarn exec appium driver install xcuitest", "e2eprep:macos": "cross-env APPIUM_HOME=.appium yarn exec appium driver install mac2", @@ -25,37 +35,27 @@ "e2etest:ios": "cross-env APPIUM_HOME=.appium wdio run wdio.conf.ios.js", "e2etest:macos": "cross-env APPIUM_HOME=.appium wdio run wdio.conf.macos.js", "e2etest:win32": "cross-env APPIUM_HOME=.appium wdio run wdio.conf.win32.js", - "e2etest:windows": "rimraf errorShots reports && cross-env APPIUM_HOME=.appium wdio run wdio.conf.windows.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "apps/E2E" + "e2etest:windows": "rimraf errorShots reports && cross-env APPIUM_HOME=.appium wdio run wdio.conf.windows.js", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package" }, - "files": [ - "src/**/*", - "dist/*" - ], "dependencies": { - "@office-iss/react-native-win32": "^0.74.0", - "@office-iss/rex-win32": "0.73.11-devmain.16.0.17615.15030", - "react": "18.2.0", - "react-native": "^0.74.0", - "react-native-macos": "^0.74.0", - "react-native-windows": "^0.74.0" + "@office-iss/rex-win32": "0.73.11-devmain.16.0.17615.15030" }, "devDependencies": { "@babel/core": "^7.8.0", "@babel/runtime": "^7.8.0", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/focus-zone": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", + "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-babel-transformer": "^0.74.0", "@react-native/metro-config": "^0.74.0", "@rnx-kit/metro-config": "^2.0.0", "@types/jasmine": "catalog:", - "@types/node": "^22.2.0", + "@types/node": "catalog:", "@types/react": "^18.2.0", "@wdio/appium-service": "catalog:", "@wdio/cli": "catalog:", @@ -71,34 +71,53 @@ "appium-uiautomator2-driver": "catalog:", "appium-windows-driver": "catalog:", "appium-xcuitest-driver": "catalog:", - "cross-env": "^7.0.3", + "cross-env": "catalog:", "expect-webdriverio": "catalog:", "metro-config": "^0.80.3", - "rimraf": "^5.0.1", + "react": "18.2.0", + "react-native": "^0.74.0", + "react-native-macos": "^0.74.0", + "react-native-windows": "^0.74.0", + "rimraf": "catalog:", "ts-node": "^10.7.0", "webdriverio": "catalog:" }, "installConfig": { "hoistingLimits": "dependencies" }, + "peerDependencies": { + "@office-iss/react-native-win32": "^0.73.0 || ^0.74.0", + "react": "18.2.0", + "react-native": "^0.73.0 || ^0.74.0", + "react-native-macos": "^0.73.0 || ^0.74.0", + "react-native-windows": "^0.73.0 || ^0.74.0" + }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { - "kitType": "app", + "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": [ - "react-native@0.74" - ], "capabilities": [ "babel-preset-react-native", "core", "core-macos", "core-windows", + "core-win32", "metro-config", "metro-react-native-babel-transformer", - "react" + "react", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/apps/E2E/tsconfig.json b/apps/E2E/tsconfig.json index 9c8b91768d..d73e1413a0 100644 --- a/apps/E2E/tsconfig.json +++ b/apps/E2E/tsconfig.json @@ -1,14 +1,9 @@ { "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", "compilerOptions": { - "baseUrl": ".", "module": "Node16", "moduleResolution": "Node16", "outDir": "lib", - "paths": { - "*": ["*", "*.win32", "./*"], - "src/*": ["./src/*", "src"] - }, "types": ["@types/jasmine", "@wdio/globals/types", "@wdio/jasmine-framework", "node"] }, "include": ["src"] diff --git a/apps/component-generator/component-templates/ComponentTemplate/package.json b/apps/component-generator/component-templates/ComponentTemplate/package.json index 5b8b1079e0..70acd118bf 100644 --- a/apps/component-generator/component-templates/ComponentTemplate/package.json +++ b/apps/component-generator/component-templates/ComponentTemplate/package.json @@ -4,7 +4,7 @@ "description": "add component-description", "main": "src/index.ts", "module": "src/index.ts", - "typings": "lib/index.d.ts", + "types": "lib/index.d.ts", "private": true, "scripts": { "build": "fluentui-scripts build", @@ -12,6 +12,7 @@ "depcheck": "fluentui-scripts depcheck", "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "test": "fluentui-scripts jest", "update-snapshots": "fluentui-scripts jest -u", "prettier": "fluentui-scripts prettier", diff --git a/apps/fluent-tester/babel.config.js b/apps/fluent-tester/babel.config.js index 21ca3f7b3f..aa7d482ebf 100644 --- a/apps/fluent-tester/babel.config.js +++ b/apps/fluent-tester/babel.config.js @@ -1,3 +1 @@ -module.exports = { - presets: [['module:@react-native/babel-preset', { runtime: 'classic' }]], -}; +module.exports = require('@fluentui-react-native/babel-config'); diff --git a/apps/fluent-tester/macos/Podfile.lock b/apps/fluent-tester/macos/Podfile.lock index 354a83da44..85ce2e1452 100644 --- a/apps/fluent-tester/macos/Podfile.lock +++ b/apps/fluent-tester/macos/Podfile.lock @@ -1223,7 +1223,7 @@ PODS: - React-logger (= 0.74.30) - React-perflogger (= 0.74.30) - React-utils (= 0.74.30) - - ReactNativeHost (0.5.0): + - ReactNativeHost (0.5.15): - DoubleConversion - glog - RCT-Folly (= 2024.01.01.00) @@ -1521,7 +1521,7 @@ SPEC CHECKSUMS: React-runtimescheduler: abda2da3b75a17017ba04f034deb9cf0eef16734 React-utils: ac5abf4d2d95d579be3b63fa44b46af2ca38544b ReactCommon: 1eab570cb54edc279d28066475dbcf7e5b44c29e - ReactNativeHost: 9205ed2a753cd228224a46304fbc0a870739aaf3 + ReactNativeHost: 91d43cc8ebaf158a27f8ae406a7e8b43ec823faa ReactTestApp-DevSupport: 52ac76197e5accf579592aa3b9aa07fd0766f211 ReactTestApp-Resources: 3c8739a3e3ed26f67f8ab68f13102fb9591301c8 RNCPicker: 124b4fb5859ba1a3fd53a91e16d1e7a0fc016e59 @@ -1529,6 +1529,6 @@ SPEC CHECKSUMS: SocketRocket: f6c6249082c011e6de2de60ed641ef8bbe0cfac9 Yoga: bd03cda842f416ba4c2d4b79fcd0fd27e917b91e -PODFILE CHECKSUM: 4097863ec325734071cacea4c9bf046456f5c100 +PODFILE CHECKSUM: 0452977cf4cb4258cb5f51d6eee0f88e459b9529 COCOAPODS: 1.16.2 diff --git a/apps/fluent-tester/package.json b/apps/fluent-tester/package.json index fde1fe1021..54ee2c2462 100644 --- a/apps/fluent-tester/package.json +++ b/apps/fluent-tester/package.json @@ -2,16 +2,29 @@ "name": "@fluentui-react-native/tester", "version": "0.170.50", "description": "A test app to test FluentUI React Native Components during development", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "apps/fluent-tester" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib/index.js", + "exports": { + ".": { + "types": "./lib/index.d.ts", + "import": "./lib/index.js", + "require": "./lib-commonjs/index.js" + } + }, + "main": "lib-commonjs/index.js", "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "types": "lib/index.d.ts", "scripts": { "android": "rnx-cli run --platform android", - "build": "fluentui-scripts hybrid-build", + "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle:android": "rnx-cli bundle --dev false --platform android", "bundle:ios": "rnx-cli bundle --dev false --platform ios", @@ -20,18 +33,15 @@ "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "ios": "rnx-cli run --platform ios", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "macos": "rnx-cli run --platform macos", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true", "start": "rnx-cli start", "windows": "react-native run-windows --arch x64 --sln windows/FluentTester.sln" }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "apps/fluent-tester" + "jest": { + "preset": "react-native" }, "dependencies": { "@fluentui-react-native/android-theme": "workspace:*", @@ -87,7 +97,7 @@ "@react-native-community/slider": "^4.5.7", "@react-native-menu/menu": "^0.7.3", "@react-native-picker/picker": "^2.7.0", - "@types/node": "^22.0.0", + "@types/node": "catalog:", "@types/react": "~18.2.0", "react": "18.2.0", "react-native": "^0.74.0", @@ -98,9 +108,11 @@ "devDependencies": { "@babel/core": "^7.20.0", "@babel/runtime": "^7.20.0", + "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/experimental-native-font-metrics": "workspace:*", "@fluentui-react-native/focus-zone": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/menu-button": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native-community/cli": "^13.6.4", @@ -113,7 +125,7 @@ "@rnx-kit/cli": "^0.18.14", "@rnx-kit/metro-config": "^2.1.0", "@rnx-kit/metro-resolver-symlinks": "^0.2.5", - "@types/jasmine": "5.1.4", + "@types/jasmine": "catalog:", "@types/react-test-renderer": "^18.2.0", "@wdio/cli": "catalog:", "@wdio/globals": "catalog:", @@ -128,8 +140,17 @@ "react-test-renderer": "18.2.0", "webdriverio": "catalog:" }, - "jest": { - "preset": "react-native" + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + } + }, + "furn": { + "depcheck": { + "ignoreMatches": [ + "@fluentui-react-native/experimental-expander" + ] + } }, "rnx-kit": { "kitType": "app", @@ -180,15 +201,14 @@ } ], "alignDeps": { - "presets": [ - "microsoft/react-native", - "@fluentui-react-native/scripts/configs/align-deps-preset.cjs" - ], - "requirements": [ - "react-native@0.74" - ], + "requirements": { + "production": [ + "react-native@0.74" + ] + }, "capabilities": [ "babel-preset-react-native", + "community/cli", "core-android", "core-ios", "core-macos", @@ -200,18 +220,9 @@ "react-test-renderer", "svg", "test-app", - "community/cli" + "tools-core" ] - } - }, - "depcheck": { - "ignoreMatches": [ - "@fluentui-react-native/experimental-expander" - ] - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/apps/fluent-tester/src/TestComponents/Avatar/BasicAvatar.tsx b/apps/fluent-tester/src/TestComponents/Avatar/BasicAvatar.tsx index cc05310dc2..92efc3e4fc 100644 --- a/apps/fluent-tester/src/TestComponents/Avatar/BasicAvatar.tsx +++ b/apps/fluent-tester/src/TestComponents/Avatar/BasicAvatar.tsx @@ -1,4 +1,4 @@ -import React, { useState, useCallback } from 'react'; +import { useState, useCallback } from 'react'; import type { FunctionComponent } from 'react'; import { View, Text, Platform } from 'react-native'; diff --git a/apps/fluent-tester/src/TestComponents/Common/StyledPicker.tsx b/apps/fluent-tester/src/TestComponents/Common/StyledPicker.tsx index 81c38341ca..c0d1e05de5 100644 --- a/apps/fluent-tester/src/TestComponents/Common/StyledPicker.tsx +++ b/apps/fluent-tester/src/TestComponents/Common/StyledPicker.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Platform } from 'react-native'; import type { ColorValue } from 'react-native'; diff --git a/apps/fluent-tester/tsconfig.json b/apps/fluent-tester/tsconfig.json index 583daaaa98..b59c5d96d6 100644 --- a/apps/fluent-tester/tsconfig.json +++ b/apps/fluent-tester/tsconfig.json @@ -1,13 +1,8 @@ { "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", "compilerOptions": { - "baseUrl": ".", "outDir": "lib", "allowSyntheticDefaultImports": true, - "paths": { - "*": ["*", "*.win32", "./*"], - "src/*": ["./src/*", "src"] - }, "types": ["@types/jasmine", "@wdio/globals/types", "@wdio/jasmine-framework", "node"] }, "include": ["src"] diff --git a/apps/win32/package.json b/apps/win32/package.json index 291c5264a5..2607fe1127 100644 --- a/apps/win32/package.json +++ b/apps/win32/package.json @@ -1,37 +1,40 @@ { "name": "@fluentui-react-native/tester-win32", "version": "0.38.69", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "apps/win32" + }, "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "bundle": "rnx-cli bundle --dev false", + "bundle-dev": "rnx-cli bundle", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "start": "rnx-cli start", - "bundle": "rnx-cli bundle --dev false", - "bundle-dev": "rnx-cli bundle", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "run-win32": "rex-win32 --bundle index.win32 --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8", "run-win32-dev": "rex-win32 --bundle index --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useFastRefresh", - "run-win32-devmain-dev": "rex-win32 --bundle index --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useFastRefresh --useDevMain", "run-win32-devmain": "rex-win32 --bundle index.win32 --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useDevMain ", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "run-win32-devmain-dev": "rex-win32 --bundle index --component FluentTester --basePath ./dist --useDirectDebugger --windowTitle \"FluentUI Tester\" --pluginProps --debugBundlePath index --jsEngine v8 --useFastRefresh --useDevMain", + "start": "rnx-cli start" }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "apps/win32" + "jest": { + "preset": "react-native" }, "dependencies": { "@fluentui-react-native/tester": "workspace:*", @@ -43,6 +46,7 @@ "devDependencies": { "@babel/core": "^7.20.0", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/rex-win32": "0.73.11-devmain.16.0.17615.15030", "@react-native/babel-preset": "^0.74.0", @@ -56,10 +60,15 @@ "metro-config": "^0.80.3", "react-native-svg-transformer": "^1.0.0", "react-test-renderer": "18.2.0", - "rimraf": "^5.0.1" + "rimraf": "catalog:" }, - "jest": { - "preset": "react-native" + "peerDependencies": { + "@office-iss/react-native-win32": "^0.74.0" + }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + } }, "rnx-kit": { "kitType": "app", @@ -92,12 +101,11 @@ } ], "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": [ - "react-native@0.74" - ], + "requirements": { + "production": [ + "react-native@0.74" + ] + }, "capabilities": [ "babel-preset-react-native", "core", @@ -105,16 +113,10 @@ "metro-react-native-babel-transformer", "react", "react-test-renderer", - "svg" + "svg", + "tools-core" ] - } - }, - "peerDependencies": { - "@office-iss/react-native-win32": "^0.74.0" - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/apps/win32/tsconfig.json b/apps/win32/tsconfig.json index a1a7d153a2..2c7e2516f6 100644 --- a/apps/win32/tsconfig.json +++ b/apps/win32/tsconfig.json @@ -1,11 +1,4 @@ { "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "paths": { - "*": ["*", "*.win32"], - "src/*": ["./src/*"] - } - }, "include": ["src"] } diff --git a/change/@fluentui-react-native-06d0f9da-87ef-4508-932f-f41ece321158.json b/change/@fluentui-react-native-06d0f9da-87ef-4508-932f-f41ece321158.json new file mode 100644 index 0000000000..2551634992 --- /dev/null +++ b/change/@fluentui-react-native-06d0f9da-87ef-4508-932f-f41ece321158.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui/react-native", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-adapters-c1f81460-567e-45b6-929e-f39a232516ba.json b/change/@fluentui-react-native-adapters-c1f81460-567e-45b6-929e-f39a232516ba.json new file mode 100644 index 0000000000..d1605eb8d8 --- /dev/null +++ b/change/@fluentui-react-native-adapters-c1f81460-567e-45b6-929e-f39a232516ba.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/adapters", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-android-theme-fa8f8ee5-174e-44b0-ba06-6e387d158a0b.json b/change/@fluentui-react-native-android-theme-fa8f8ee5-174e-44b0-ba06-6e387d158a0b.json new file mode 100644 index 0000000000..0f2997ca68 --- /dev/null +++ b/change/@fluentui-react-native-android-theme-fa8f8ee5-174e-44b0-ba06-6e387d158a0b.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/android-theme", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-apple-theme-b0cb457c-33e1-4c0d-bd19-a548c6df69af.json b/change/@fluentui-react-native-apple-theme-b0cb457c-33e1-4c0d-bd19-a548c6df69af.json new file mode 100644 index 0000000000..f5dbc5afac --- /dev/null +++ b/change/@fluentui-react-native-apple-theme-b0cb457c-33e1-4c0d-bd19-a548c6df69af.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/apple-theme", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-avatar-964ebfe6-e8ca-409e-8f88-9b0402930a8a.json b/change/@fluentui-react-native-avatar-964ebfe6-e8ca-409e-8f88-9b0402930a8a.json new file mode 100644 index 0000000000..eeda08d6f5 --- /dev/null +++ b/change/@fluentui-react-native-avatar-964ebfe6-e8ca-409e-8f88-9b0402930a8a.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/avatar", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-badge-c46df4c6-3707-4159-bd0f-83b63e716801.json b/change/@fluentui-react-native-badge-c46df4c6-3707-4159-bd0f-83b63e716801.json new file mode 100644 index 0000000000..3570e266a1 --- /dev/null +++ b/change/@fluentui-react-native-badge-c46df4c6-3707-4159-bd0f-83b63e716801.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/badge", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-button-b1b9ef04-136f-4f70-9f80-9ce8b4f50fd0.json b/change/@fluentui-react-native-button-b1b9ef04-136f-4f70-9f80-9ce8b4f50fd0.json new file mode 100644 index 0000000000..f94018d958 --- /dev/null +++ b/change/@fluentui-react-native-button-b1b9ef04-136f-4f70-9f80-9ce8b4f50fd0.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/button", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-callout-0fffb12f-cfa7-4ded-a346-27a99f310dd7.json b/change/@fluentui-react-native-callout-0fffb12f-cfa7-4ded-a346-27a99f310dd7.json new file mode 100644 index 0000000000..7491f1a353 --- /dev/null +++ b/change/@fluentui-react-native-callout-0fffb12f-cfa7-4ded-a346-27a99f310dd7.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/callout", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-checkbox-d0ee0372-7284-4870-9999-6daada9d9883.json b/change/@fluentui-react-native-checkbox-d0ee0372-7284-4870-9999-6daada9d9883.json new file mode 100644 index 0000000000..ee3f06192e --- /dev/null +++ b/change/@fluentui-react-native-checkbox-d0ee0372-7284-4870-9999-6daada9d9883.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/checkbox", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-chip-3f2b7a8f-2090-4d4e-bbe0-5f0c2efc6917.json b/change/@fluentui-react-native-chip-3f2b7a8f-2090-4d4e-bbe0-5f0c2efc6917.json new file mode 100644 index 0000000000..137eab42b0 --- /dev/null +++ b/change/@fluentui-react-native-chip-3f2b7a8f-2090-4d4e-bbe0-5f0c2efc6917.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/chip", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-codemods-9048f492-867d-468c-9016-473c6ad348a5.json b/change/@fluentui-react-native-codemods-9048f492-867d-468c-9016-473c6ad348a5.json new file mode 100644 index 0000000000..5fd717ad5a --- /dev/null +++ b/change/@fluentui-react-native-codemods-9048f492-867d-468c-9016-473c6ad348a5.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "integrate depcheck and align deps with package linting and make things consistent", + "packageName": "@fluentui-react-native/codemods", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-composition-fcec16e1-f0f1-411c-a4ef-bf83d8eb92d8.json b/change/@fluentui-react-native-composition-fcec16e1-f0f1-411c-a4ef-bf83d8eb92d8.json new file mode 100644 index 0000000000..6ad38dff23 --- /dev/null +++ b/change/@fluentui-react-native-composition-fcec16e1-f0f1-411c-a4ef-bf83d8eb92d8.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/composition", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-contextual-menu-d7a1b66b-838e-4403-9ca0-c83166a107b4.json b/change/@fluentui-react-native-contextual-menu-d7a1b66b-838e-4403-9ca0-c83166a107b4.json new file mode 100644 index 0000000000..4b55a7b784 --- /dev/null +++ b/change/@fluentui-react-native-contextual-menu-d7a1b66b-838e-4403-9ca0-c83166a107b4.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/contextual-menu", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-default-theme-2d2cb23b-68ad-4277-b978-06475d388fff.json b/change/@fluentui-react-native-default-theme-2d2cb23b-68ad-4277-b978-06475d388fff.json new file mode 100644 index 0000000000..34797c322e --- /dev/null +++ b/change/@fluentui-react-native-default-theme-2d2cb23b-68ad-4277-b978-06475d388fff.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/default-theme", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-divider-5a163a9c-7f6b-477d-a2ad-b54918df2948.json b/change/@fluentui-react-native-divider-5a163a9c-7f6b-477d-a2ad-b54918df2948.json new file mode 100644 index 0000000000..2b0280778c --- /dev/null +++ b/change/@fluentui-react-native-divider-5a163a9c-7f6b-477d-a2ad-b54918df2948.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/divider", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-drawer-48f958b1-2099-4160-9504-f883ff8d6f36.json b/change/@fluentui-react-native-drawer-48f958b1-2099-4160-9504-f883ff8d6f36.json new file mode 100644 index 0000000000..f31a416155 --- /dev/null +++ b/change/@fluentui-react-native-drawer-48f958b1-2099-4160-9504-f883ff8d6f36.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/drawer", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-dropdown-4629aa5f-6e2c-4556-9fb4-fb5b55daa46e.json b/change/@fluentui-react-native-dropdown-4629aa5f-6e2c-4556-9fb4-fb5b55daa46e.json new file mode 100644 index 0000000000..fbb0bbde88 --- /dev/null +++ b/change/@fluentui-react-native-dropdown-4629aa5f-6e2c-4556-9fb4-fb5b55daa46e.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/dropdown", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-e2e-testing-4f9d77d1-ae49-4d0c-b930-d01a45d27402.json b/change/@fluentui-react-native-e2e-testing-4f9d77d1-ae49-4d0c-b930-d01a45d27402.json new file mode 100644 index 0000000000..20170a0039 --- /dev/null +++ b/change/@fluentui-react-native-e2e-testing-4f9d77d1-ae49-4d0c-b930-d01a45d27402.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/e2e-testing", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-activity-indicator-e0713e50-f1cf-4bb2-833e-a631ece96b3e.json b/change/@fluentui-react-native-experimental-activity-indicator-e0713e50-f1cf-4bb2-833e-a631ece96b3e.json new file mode 100644 index 0000000000..f4bd33e795 --- /dev/null +++ b/change/@fluentui-react-native-experimental-activity-indicator-e0713e50-f1cf-4bb2-833e-a631ece96b3e.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-activity-indicator", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-appearance-additions-ad027923-8820-4471-8024-4389b0fdd851.json b/change/@fluentui-react-native-experimental-appearance-additions-ad027923-8820-4471-8024-4389b0fdd851.json new file mode 100644 index 0000000000..c48014aef2 --- /dev/null +++ b/change/@fluentui-react-native-experimental-appearance-additions-ad027923-8820-4471-8024-4389b0fdd851.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-appearance-additions", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-avatar-c7171a8f-fc59-4a96-9009-5bbc95b6caf5.json b/change/@fluentui-react-native-experimental-avatar-c7171a8f-fc59-4a96-9009-5bbc95b6caf5.json new file mode 100644 index 0000000000..105d331ab8 --- /dev/null +++ b/change/@fluentui-react-native-experimental-avatar-c7171a8f-fc59-4a96-9009-5bbc95b6caf5.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-avatar", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-checkbox-ec7fdf82-1e30-44e3-a98d-41258bd66b0b.json b/change/@fluentui-react-native-experimental-checkbox-ec7fdf82-1e30-44e3-a98d-41258bd66b0b.json new file mode 100644 index 0000000000..483decd5ad --- /dev/null +++ b/change/@fluentui-react-native-experimental-checkbox-ec7fdf82-1e30-44e3-a98d-41258bd66b0b.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-checkbox", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-expander-d4b7a69d-a5bf-4c67-b960-ced1995e9b03.json b/change/@fluentui-react-native-experimental-expander-d4b7a69d-a5bf-4c67-b960-ced1995e9b03.json new file mode 100644 index 0000000000..cd5028993c --- /dev/null +++ b/change/@fluentui-react-native-experimental-expander-d4b7a69d-a5bf-4c67-b960-ced1995e9b03.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-expander", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-menu-button-56886bc7-50ce-42ab-a5cb-d8933eccf4b7.json b/change/@fluentui-react-native-experimental-menu-button-56886bc7-50ce-42ab-a5cb-d8933eccf4b7.json new file mode 100644 index 0000000000..356fdb8764 --- /dev/null +++ b/change/@fluentui-react-native-experimental-menu-button-56886bc7-50ce-42ab-a5cb-d8933eccf4b7.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-menu-button", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-native-date-picker-0dd89ebb-b38c-4b0e-9898-3d417b7b437f.json b/change/@fluentui-react-native-experimental-native-date-picker-0dd89ebb-b38c-4b0e-9898-3d417b7b437f.json new file mode 100644 index 0000000000..e11384167a --- /dev/null +++ b/change/@fluentui-react-native-experimental-native-date-picker-0dd89ebb-b38c-4b0e-9898-3d417b7b437f.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-native-date-picker", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-native-font-metrics-86d23d32-0d80-4455-881d-b5e6eb6f0b4d.json b/change/@fluentui-react-native-experimental-native-font-metrics-86d23d32-0d80-4455-881d-b5e6eb6f0b4d.json new file mode 100644 index 0000000000..8000977a05 --- /dev/null +++ b/change/@fluentui-react-native-experimental-native-font-metrics-86d23d32-0d80-4455-881d-b5e6eb6f0b4d.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-native-font-metrics", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-shadow-856416fb-80d4-4f92-aa81-5a0ad07df6b1.json b/change/@fluentui-react-native-experimental-shadow-856416fb-80d4-4f92-aa81-5a0ad07df6b1.json new file mode 100644 index 0000000000..0e147ead72 --- /dev/null +++ b/change/@fluentui-react-native-experimental-shadow-856416fb-80d4-4f92-aa81-5a0ad07df6b1.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-shadow", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-experimental-shimmer-f686350d-421c-43b6-8a7b-18434ee76a50.json b/change/@fluentui-react-native-experimental-shimmer-f686350d-421c-43b6-8a7b-18434ee76a50.json new file mode 100644 index 0000000000..d100da0673 --- /dev/null +++ b/change/@fluentui-react-native-experimental-shimmer-f686350d-421c-43b6-8a7b-18434ee76a50.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/experimental-shimmer", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-focus-trap-zone-ae319176-4e42-4389-aa88-ad6079770f1e.json b/change/@fluentui-react-native-focus-trap-zone-ae319176-4e42-4389-aa88-ad6079770f1e.json new file mode 100644 index 0000000000..9432ec3d0a --- /dev/null +++ b/change/@fluentui-react-native-focus-trap-zone-ae319176-4e42-4389-aa88-ad6079770f1e.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/focus-trap-zone", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-focus-zone-85b37309-6d5d-4f0b-ac75-b70bb0aaf4a1.json b/change/@fluentui-react-native-focus-zone-85b37309-6d5d-4f0b-ac75-b70bb0aaf4a1.json new file mode 100644 index 0000000000..3334c6c902 --- /dev/null +++ b/change/@fluentui-react-native-focus-zone-85b37309-6d5d-4f0b-ac75-b70bb0aaf4a1.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/focus-zone", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-framework-5c01636e-ef57-46c8-88f4-3e0f9319663e.json b/change/@fluentui-react-native-framework-5c01636e-ef57-46c8-88f4-3e0f9319663e.json new file mode 100644 index 0000000000..821c80aed7 --- /dev/null +++ b/change/@fluentui-react-native-framework-5c01636e-ef57-46c8-88f4-3e0f9319663e.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/framework", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-framework-base-263cc167-4861-42bf-a1a6-9ef8d506dee0.json b/change/@fluentui-react-native-framework-base-263cc167-4861-42bf-a1a6-9ef8d506dee0.json new file mode 100644 index 0000000000..4f2966a9ce --- /dev/null +++ b/change/@fluentui-react-native-framework-base-263cc167-4861-42bf-a1a6-9ef8d506dee0.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/framework-base", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-icon-59f2277b-8e55-474f-abb5-40c7d59debf1.json b/change/@fluentui-react-native-icon-59f2277b-8e55-474f-abb5-40c7d59debf1.json new file mode 100644 index 0000000000..73eb84cdb7 --- /dev/null +++ b/change/@fluentui-react-native-icon-59f2277b-8e55-474f-abb5-40c7d59debf1.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/icon", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-immutable-merge-06ecc9cc-c089-438c-aecc-493a03d54c4d.json b/change/@fluentui-react-native-immutable-merge-06ecc9cc-c089-438c-aecc-493a03d54c4d.json new file mode 100644 index 0000000000..4289a59863 --- /dev/null +++ b/change/@fluentui-react-native-immutable-merge-06ecc9cc-c089-438c-aecc-493a03d54c4d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "integrate depcheck and align deps with package linting and make things consistent", + "packageName": "@fluentui-react-native/immutable-merge", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-input-5b77cdd0-bd93-4921-bfc9-d5d22a5bf4c3.json b/change/@fluentui-react-native-input-5b77cdd0-bd93-4921-bfc9-d5d22a5bf4c3.json new file mode 100644 index 0000000000..a8dfb7e2ec --- /dev/null +++ b/change/@fluentui-react-native-input-5b77cdd0-bd93-4921-bfc9-d5d22a5bf4c3.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/input", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-interactive-hooks-79aecb80-963a-435e-8c48-37431a1861a7.json b/change/@fluentui-react-native-interactive-hooks-79aecb80-963a-435e-8c48-37431a1861a7.json new file mode 100644 index 0000000000..1c2a5911b0 --- /dev/null +++ b/change/@fluentui-react-native-interactive-hooks-79aecb80-963a-435e-8c48-37431a1861a7.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/interactive-hooks", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-link-3554bfea-5116-4454-845c-9844ea03cae8.json b/change/@fluentui-react-native-link-3554bfea-5116-4454-845c-9844ea03cae8.json new file mode 100644 index 0000000000..3d9dc3d632 --- /dev/null +++ b/change/@fluentui-react-native-link-3554bfea-5116-4454-845c-9844ea03cae8.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/link", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-memo-cache-bb302e3a-6da3-4497-aac8-02383d9de167.json b/change/@fluentui-react-native-memo-cache-bb302e3a-6da3-4497-aac8-02383d9de167.json new file mode 100644 index 0000000000..db7c02f31b --- /dev/null +++ b/change/@fluentui-react-native-memo-cache-bb302e3a-6da3-4497-aac8-02383d9de167.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "integrate depcheck and align deps with package linting and make things consistent", + "packageName": "@fluentui-react-native/memo-cache", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-menu-75b2ee1e-233b-4966-bdfa-d142ceb888e9.json b/change/@fluentui-react-native-menu-75b2ee1e-233b-4966-bdfa-d142ceb888e9.json new file mode 100644 index 0000000000..1599af4119 --- /dev/null +++ b/change/@fluentui-react-native-menu-75b2ee1e-233b-4966-bdfa-d142ceb888e9.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/menu", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-menu-button-d6c30d6a-b89e-48b8-9677-883ca3f779b1.json b/change/@fluentui-react-native-menu-button-d6c30d6a-b89e-48b8-9677-883ca3f779b1.json new file mode 100644 index 0000000000..46a51532d1 --- /dev/null +++ b/change/@fluentui-react-native-menu-button-d6c30d6a-b89e-48b8-9677-883ca3f779b1.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/menu-button", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-merge-props-32c575eb-5afa-47ba-b939-93d569e9082d.json b/change/@fluentui-react-native-merge-props-32c575eb-5afa-47ba-b939-93d569e9082d.json new file mode 100644 index 0000000000..61dc3601fa --- /dev/null +++ b/change/@fluentui-react-native-merge-props-32c575eb-5afa-47ba-b939-93d569e9082d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "integrate depcheck and align deps with package linting and make things consistent", + "packageName": "@fluentui-react-native/merge-props", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-notification-ea07a644-b7ba-458f-8a87-61223aa6ab63.json b/change/@fluentui-react-native-notification-ea07a644-b7ba-458f-8a87-61223aa6ab63.json new file mode 100644 index 0000000000..43c9585e5e --- /dev/null +++ b/change/@fluentui-react-native-notification-ea07a644-b7ba-458f-8a87-61223aa6ab63.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/notification", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-overflow-e41ed68b-1cc4-4282-93ff-38f748bfca7c.json b/change/@fluentui-react-native-overflow-e41ed68b-1cc4-4282-93ff-38f748bfca7c.json new file mode 100644 index 0000000000..1b25104265 --- /dev/null +++ b/change/@fluentui-react-native-overflow-e41ed68b-1cc4-4282-93ff-38f748bfca7c.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/overflow", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-persona-coin-f537cf08-10c9-4cc3-9a2c-78e5af361a4b.json b/change/@fluentui-react-native-persona-coin-f537cf08-10c9-4cc3-9a2c-78e5af361a4b.json new file mode 100644 index 0000000000..7a8875e574 --- /dev/null +++ b/change/@fluentui-react-native-persona-coin-f537cf08-10c9-4cc3-9a2c-78e5af361a4b.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/persona-coin", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-persona-ff8872cd-683d-4c11-b7fb-0df130954bba.json b/change/@fluentui-react-native-persona-ff8872cd-683d-4c11-b7fb-0df130954bba.json new file mode 100644 index 0000000000..95c9fe06a3 --- /dev/null +++ b/change/@fluentui-react-native-persona-ff8872cd-683d-4c11-b7fb-0df130954bba.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/persona", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-popover-746eb928-5a12-497c-83d9-56f548b1e0d2.json b/change/@fluentui-react-native-popover-746eb928-5a12-497c-83d9-56f548b1e0d2.json new file mode 100644 index 0000000000..bcb481d141 --- /dev/null +++ b/change/@fluentui-react-native-popover-746eb928-5a12-497c-83d9-56f548b1e0d2.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/popover", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-pressable-01bfdc96-009f-4934-b46e-d65f3801fa2f.json b/change/@fluentui-react-native-pressable-01bfdc96-009f-4934-b46e-d65f3801fa2f.json new file mode 100644 index 0000000000..188b868bf6 --- /dev/null +++ b/change/@fluentui-react-native-pressable-01bfdc96-009f-4934-b46e-d65f3801fa2f.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/pressable", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-radio-group-2176ce82-bd35-4ed0-aee7-f9ed1a3d0a40.json b/change/@fluentui-react-native-radio-group-2176ce82-bd35-4ed0-aee7-f9ed1a3d0a40.json new file mode 100644 index 0000000000..e57947406b --- /dev/null +++ b/change/@fluentui-react-native-radio-group-2176ce82-bd35-4ed0-aee7-f9ed1a3d0a40.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/radio-group", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-separator-b740de05-ecc0-4ef5-842f-ac2595b5c6b1.json b/change/@fluentui-react-native-separator-b740de05-ecc0-4ef5-842f-ac2595b5c6b1.json new file mode 100644 index 0000000000..e76ae8c9ee --- /dev/null +++ b/change/@fluentui-react-native-separator-b740de05-ecc0-4ef5-842f-ac2595b5c6b1.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/separator", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-spinner-f637805d-2b4b-4184-a0b7-d78543c559f7.json b/change/@fluentui-react-native-spinner-f637805d-2b4b-4184-a0b7-d78543c559f7.json new file mode 100644 index 0000000000..8f2e408257 --- /dev/null +++ b/change/@fluentui-react-native-spinner-f637805d-2b4b-4184-a0b7-d78543c559f7.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/spinner", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-stack-0584ec41-a97d-4f11-bd82-75a5c6932593.json b/change/@fluentui-react-native-stack-0584ec41-a97d-4f11-bd82-75a5c6932593.json new file mode 100644 index 0000000000..903a3f523b --- /dev/null +++ b/change/@fluentui-react-native-stack-0584ec41-a97d-4f11-bd82-75a5c6932593.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/stack", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-styling-utils-bc75ee88-e825-44a7-a68a-c5556dd89304.json b/change/@fluentui-react-native-styling-utils-bc75ee88-e825-44a7-a68a-c5556dd89304.json new file mode 100644 index 0000000000..1a1d72bece --- /dev/null +++ b/change/@fluentui-react-native-styling-utils-bc75ee88-e825-44a7-a68a-c5556dd89304.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/styling-utils", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-switch-2a735a23-715e-4b2a-94c8-a21321b5c272.json b/change/@fluentui-react-native-switch-2a735a23-715e-4b2a-94c8-a21321b5c272.json new file mode 100644 index 0000000000..df6b5d5d65 --- /dev/null +++ b/change/@fluentui-react-native-switch-2a735a23-715e-4b2a-94c8-a21321b5c272.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/switch", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tablist-f8a94db1-6c57-4869-801e-bd1ceb637ae0.json b/change/@fluentui-react-native-tablist-f8a94db1-6c57-4869-801e-bd1ceb637ae0.json new file mode 100644 index 0000000000..5afe4831d9 --- /dev/null +++ b/change/@fluentui-react-native-tablist-f8a94db1-6c57-4869-801e-bd1ceb637ae0.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/tablist", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tester-b718ee4c-e5d3-4821-b893-d512eb89f9e6.json b/change/@fluentui-react-native-tester-b718ee4c-e5d3-4821-b893-d512eb89f9e6.json new file mode 100644 index 0000000000..31c875eb76 --- /dev/null +++ b/change/@fluentui-react-native-tester-b718ee4c-e5d3-4821-b893-d512eb89f9e6.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/tester", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tester-win32-0ff0f138-8738-4350-acc2-c51718827c11.json b/change/@fluentui-react-native-tester-win32-0ff0f138-8738-4350-acc2-c51718827c11.json new file mode 100644 index 0000000000..a5cea5402d --- /dev/null +++ b/change/@fluentui-react-native-tester-win32-0ff0f138-8738-4350-acc2-c51718827c11.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/tester-win32", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-text-016270e9-29f1-44cd-8c3b-92982cdf9677.json b/change/@fluentui-react-native-text-016270e9-29f1-44cd-8c3b-92982cdf9677.json new file mode 100644 index 0000000000..2bc18b01fe --- /dev/null +++ b/change/@fluentui-react-native-text-016270e9-29f1-44cd-8c3b-92982cdf9677.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/text", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theme-eacc5c7f-3294-4d28-9126-afe1e9eff1aa.json b/change/@fluentui-react-native-theme-eacc5c7f-3294-4d28-9126-afe1e9eff1aa.json new file mode 100644 index 0000000000..c894cf6e60 --- /dev/null +++ b/change/@fluentui-react-native-theme-eacc5c7f-3294-4d28-9126-afe1e9eff1aa.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/theme", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theme-tokens-85b4dbe3-ab86-4638-8588-3d315f59259a.json b/change/@fluentui-react-native-theme-tokens-85b4dbe3-ab86-4638-8588-3d315f59259a.json new file mode 100644 index 0000000000..be217cd152 --- /dev/null +++ b/change/@fluentui-react-native-theme-tokens-85b4dbe3-ab86-4638-8588-3d315f59259a.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/theme-tokens", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theme-types-89712a20-f241-4006-99c6-e3936a053812.json b/change/@fluentui-react-native-theme-types-89712a20-f241-4006-99c6-e3936a053812.json new file mode 100644 index 0000000000..db8a75b170 --- /dev/null +++ b/change/@fluentui-react-native-theme-types-89712a20-f241-4006-99c6-e3936a053812.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/theme-types", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-themed-stylesheet-77f512b4-8117-4ad4-8853-f2dc9b2c5cb5.json b/change/@fluentui-react-native-themed-stylesheet-77f512b4-8117-4ad4-8853-f2dc9b2c5cb5.json new file mode 100644 index 0000000000..63af546501 --- /dev/null +++ b/change/@fluentui-react-native-themed-stylesheet-77f512b4-8117-4ad4-8853-f2dc9b2c5cb5.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/themed-stylesheet", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-theming-utils-b1dca837-4429-4e6b-9eef-5d4219d75493.json b/change/@fluentui-react-native-theming-utils-b1dca837-4429-4e6b-9eef-5d4219d75493.json new file mode 100644 index 0000000000..57284a368c --- /dev/null +++ b/change/@fluentui-react-native-theming-utils-b1dca837-4429-4e6b-9eef-5d4219d75493.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/theming-utils", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tokens-c4c6de55-b2ef-443d-a356-3ae43f818bc3.json b/change/@fluentui-react-native-tokens-c4c6de55-b2ef-443d-a356-3ae43f818bc3.json new file mode 100644 index 0000000000..28be84095d --- /dev/null +++ b/change/@fluentui-react-native-tokens-c4c6de55-b2ef-443d-a356-3ae43f818bc3.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/tokens", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-tooltip-7ebba51c-5a34-45fe-8733-2854e9f4560f.json b/change/@fluentui-react-native-tooltip-7ebba51c-5a34-45fe-8733-2854e9f4560f.json new file mode 100644 index 0000000000..1e196bcbcb --- /dev/null +++ b/change/@fluentui-react-native-tooltip-7ebba51c-5a34-45fe-8733-2854e9f4560f.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/tooltip", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-slot-604bd9e3-3f58-484b-b5d6-1f4f747791ac.json b/change/@fluentui-react-native-use-slot-604bd9e3-3f58-484b-b5d6-1f4f747791ac.json new file mode 100644 index 0000000000..058d905e50 --- /dev/null +++ b/change/@fluentui-react-native-use-slot-604bd9e3-3f58-484b-b5d6-1f4f747791ac.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/use-slot", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-slots-84cfa9b7-b26f-4b86-a643-2611b24f8bba.json b/change/@fluentui-react-native-use-slots-84cfa9b7-b26f-4b86-a643-2611b24f8bba.json new file mode 100644 index 0000000000..bbc117514a --- /dev/null +++ b/change/@fluentui-react-native-use-slots-84cfa9b7-b26f-4b86-a643-2611b24f8bba.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/use-slots", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-styling-8c3a948e-9043-4652-9d85-0c466f111521.json b/change/@fluentui-react-native-use-styling-8c3a948e-9043-4652-9d85-0c466f111521.json new file mode 100644 index 0000000000..c9ac3fd93b --- /dev/null +++ b/change/@fluentui-react-native-use-styling-8c3a948e-9043-4652-9d85-0c466f111521.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/use-styling", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-use-tokens-e999dfbb-fec5-4b60-a3c9-b6eaa6b0d48a.json b/change/@fluentui-react-native-use-tokens-e999dfbb-fec5-4b60-a3c9-b6eaa6b0d48a.json new file mode 100644 index 0000000000..ad903d1da9 --- /dev/null +++ b/change/@fluentui-react-native-use-tokens-e999dfbb-fec5-4b60-a3c9-b6eaa6b0d48a.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/use-tokens", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-vibrancy-view-b0323eb2-4f76-4124-8702-045cd0e1ade0.json b/change/@fluentui-react-native-vibrancy-view-b0323eb2-4f76-4124-8702-045cd0e1ade0.json new file mode 100644 index 0000000000..da036e3cfd --- /dev/null +++ b/change/@fluentui-react-native-vibrancy-view-b0323eb2-4f76-4124-8702-045cd0e1ade0.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/vibrancy-view", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-native-win32-theme-e3dd9463-d05d-4b4e-a1de-9236c151a73c.json b/change/@fluentui-react-native-win32-theme-e3dd9463-d05d-4b4e-a1de-9236c151a73c.json new file mode 100644 index 0000000000..aa6a9fb67b --- /dev/null +++ b/change/@fluentui-react-native-win32-theme-e3dd9463-d05d-4b4e-a1de-9236c151a73c.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@fluentui-react-native/win32-theme", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-foundation-composable-dd19667f-24f9-486a-8fdf-e15d8018a031.json b/change/@uifabricshared-foundation-composable-dd19667f-24f9-486a-8fdf-e15d8018a031.json new file mode 100644 index 0000000000..e8f0c2feeb --- /dev/null +++ b/change/@uifabricshared-foundation-composable-dd19667f-24f9-486a-8fdf-e15d8018a031.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@uifabricshared/foundation-composable", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-foundation-compose-b2a7b3a6-e280-4539-aca4-ed0a4fdbefa9.json b/change/@uifabricshared-foundation-compose-b2a7b3a6-e280-4539-aca4-ed0a4fdbefa9.json new file mode 100644 index 0000000000..500fe8bc2e --- /dev/null +++ b/change/@uifabricshared-foundation-compose-b2a7b3a6-e280-4539-aca4-ed0a4fdbefa9.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@uifabricshared/foundation-compose", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-foundation-settings-0d060824-482c-445c-bac6-9d2ccb002fa5.json b/change/@uifabricshared-foundation-settings-0d060824-482c-445c-bac6-9d2ccb002fa5.json new file mode 100644 index 0000000000..87b2c1f5e8 --- /dev/null +++ b/change/@uifabricshared-foundation-settings-0d060824-482c-445c-bac6-9d2ccb002fa5.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@uifabricshared/foundation-settings", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-foundation-tokens-99240c02-0730-4aac-94c1-6af493c5d763.json b/change/@uifabricshared-foundation-tokens-99240c02-0730-4aac-94c1-6af493c5d763.json new file mode 100644 index 0000000000..5a9e4be146 --- /dev/null +++ b/change/@uifabricshared-foundation-tokens-99240c02-0730-4aac-94c1-6af493c5d763.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@uifabricshared/foundation-tokens", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-theme-registry-daf4d46e-d6fc-4849-a368-4e63229b94f1.json b/change/@uifabricshared-theme-registry-daf4d46e-d6fc-4849-a368-4e63229b94f1.json new file mode 100644 index 0000000000..64792517fe --- /dev/null +++ b/change/@uifabricshared-theme-registry-daf4d46e-d6fc-4849-a368-4e63229b94f1.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@uifabricshared/theme-registry", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-themed-settings-29086fb1-10e3-47b1-b17d-c55611df3126.json b/change/@uifabricshared-themed-settings-29086fb1-10e3-47b1-b17d-c55611df3126.json new file mode 100644 index 0000000000..057d00d2b0 --- /dev/null +++ b/change/@uifabricshared-themed-settings-29086fb1-10e3-47b1-b17d-c55611df3126.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@uifabricshared/themed-settings", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-theming-ramp-46cc3ad9-5f22-4ce2-a8b0-744b63fa6937.json b/change/@uifabricshared-theming-ramp-46cc3ad9-5f22-4ce2-a8b0-744b63fa6937.json new file mode 100644 index 0000000000..3783915815 --- /dev/null +++ b/change/@uifabricshared-theming-ramp-46cc3ad9-5f22-4ce2-a8b0-744b63fa6937.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@uifabricshared/theming-ramp", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@uifabricshared-theming-react-native-11c04b42-f8ad-4e5a-b8fb-e608308b852d.json b/change/@uifabricshared-theming-react-native-11c04b42-f8ad-4e5a-b8fb-e608308b852d.json new file mode 100644 index 0000000000..5439225ed4 --- /dev/null +++ b/change/@uifabricshared-theming-react-native-11c04b42-f8ad-4e5a-b8fb-e608308b852d.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "switch everything to modern jsx-runtime", + "packageName": "@uifabricshared/theming-react-native", + "email": "jasonmo@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/lage.config.js b/lage.config.js index da7d7001d6..b7ad2e7f54 100644 --- a/lage.config.js +++ b/lage.config.js @@ -1,12 +1,22 @@ module.exports = { npmClient: 'yarn', pipeline: { - build: { - dependsOn: ['^build'], + 'build-cjs': { + dependsOn: ['^build-cjs'], + inputs: ['*', 'src/**/*', 'assets/**/*'], + outputs: ['lib-commonjs/**/*'], + }, + 'build-esm': { + dependsOn: ['^build-esm'], + inputs: ['*', 'src/**/*', 'assets/**/*'], + outputs: ['lib/**/*'], + }, + 'build-dual': { + dependsOn: ['build-cjs', 'build-esm'], inputs: ['*', 'src/**/*', 'assets/**/*'], outputs: ['lib/**/*', 'lib-commonjs/**/*'], }, - buildci: ['build', 'test', 'lint', 'depcheck', 'check-publishing'], + buildci: ['build-dual', 'test', 'lint', 'lint-package', 'check-publishing'], bundle: { inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'], outputs: ['dist/**/*'], @@ -14,22 +24,22 @@ module.exports = { clean: { cache: false, }, - depcheck: { - inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'], - outputs: [], - }, lint: { inputs: ['*', 'src/**/*'], outputs: [], }, + 'lint-package': { + inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'], + outputs: [], + }, prettier: { inputs: ['*', 'src/**/*'], outputs: [], }, - ['pr-check']: ['build', 'test', 'lint', 'depcheck', 'check-publishing', 'align-deps', 'lint-lockfile', 'prettier'], + ['pr-check']: ['build-dual', 'test', 'lint', 'check-publishing', 'align-deps', 'lint-package', 'lint-lockfile', 'prettier'], ['prettier-fix']: [], test: { - dependsOn: ['build'], + dependsOn: ['build-dual'], inputs: [], outputs: [], }, diff --git a/package.json b/package.json index da8ee9e253..a3e4618dc6 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "expect-webdriverio": "patch:expect-webdriverio@npm%3A5.6.1#~/.yarn/patches/expect-webdriverio-npm-5.6.1-69666d39e9.patch" }, "scripts": { - "build": "lage build", + "build": "lage build-dual", "buildci": "lage buildci", "bump-versions": "beachball bump", "clean-all": "node ./scripts/src/preinstall/clean-all.js", @@ -34,15 +34,14 @@ "check-for-changed-files": "cd scripts && yarn fluentui-scripts check-changes", "checkchange": "beachball check --changehint \"Run 'yarn change' to generate a change file\"", "check-publishing": "node ./scripts/src/cli.mjs check-publishing", - "align-deps": "rnx-align-deps --no-unmanaged --requirements react-native@0.74", - "depcheck": "lage depcheck", - "depcheck-fix": "yarn workspaces foreach -all -no-private run depcheck --fix-errors", - "depcheck-fix-check": "yarn workspaces foreach -all -no-private run depcheck --fix-errors --dry-run", "lint": "lage lint", + "lint-fix": "cross-env FURN_FIX_MODE=true lage lint", + "lint-package": "lage lint-package", + "lint-package-fix": "cross-env FURN_FIX_MODE=true lage lint-package", "pr-check": "lage pr-check", "preinstall": "node ./scripts/src/preinstall/use-yarn-please.js", "prettier": "lage prettier", - "prettier-fix": "lage prettier-fix", + "prettier-fix": "cross-env FURN_FIX_MODE=true lage prettier", "publish:beachball": "beachball publish --bump-deps -m\"📦 applying package updates ***NO_CI***\" --verbose", "test": "lage test", "test-links": "markdown-link-check" @@ -57,12 +56,13 @@ "@react-native/babel-preset": "^0.74.0", "@react-native/metro-babel-transformer": "^0.74.0", "@react-native/metro-config": "^0.74.0", - "@rnx-kit/align-deps": "^3.0.0", - "@rnx-kit/lint-lockfile": "^0.1.0", + "@rnx-kit/align-deps": "catalog:", + "@rnx-kit/lint-lockfile": "catalog:", "babel-jest": "^29.7.0", "beachball": "^2.20.0", - "eslint": "^9.0.0", - "eslint-plugin-import": "^2.27.5", + "cross-env": "catalog:", + "eslint": "^9.39.2", + "eslint-plugin-import": "^2.32.0", "lage": "^2.0.0", "markdown-link-check": "^3.8.7", "prettier": "^2.4.1", diff --git a/packages/codemods/package.json b/packages/codemods/package.json index d7f68a9242..d6e98c7008 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -2,37 +2,37 @@ "name": "@fluentui-react-native/codemods", "version": "0.5.24", "description": "Transform files to make refactoring FURN code easier", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/codemods" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "bin": { "transform": "./transform.js" }, "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/codemods" + "test": "fluentui-scripts jest" }, "dependencies": { "jscodeshift": "^17.0.0", @@ -44,17 +44,29 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@types/jscodeshift": "^0.11.11", - "@types/node": "^22.0.0" + "@types/node": "catalog:" + }, + "furn": { + "depcheck": { + "ignoreMatches": [ + ".bin" + ], + "ignorePatterns": [ + "src/transforms/__testfixtures__/*" + ] + } }, - "depcheck": { - "ignoreMatches": [ - ".bin" - ], - "ignorePatterns": [ - "src/transforms/__testfixtures__/*" - ] + "rnx-kit": { + "kitType": "library", + "extends": "@fluentui-react-native/kit-config", + "alignDeps": { + "capabilities": [ + "tools-core" + ] + } } } diff --git a/packages/components/Avatar/package.json b/packages/components/Avatar/package.json index be1177c97a..df5947d38a 100644 --- a/packages/components/Avatar/package.json +++ b/packages/components/Avatar/package.json @@ -2,35 +2,35 @@ "name": "@fluentui-react-native/avatar", "version": "1.12.23", "description": "A cross-platform Avatar component using the Fluent Design System", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Avatar" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Avatar" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -47,7 +47,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -69,20 +71,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -92,19 +94,10 @@ "core-windows", "react", "react-test-renderer", - "svg" + "svg", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Avatar/src/Avatar.tsx b/packages/components/Avatar/src/Avatar.tsx index e85486e03c..4a3d006d27 100644 --- a/packages/components/Avatar/src/Avatar.tsx +++ b/packages/components/Avatar/src/Avatar.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Fragment } from 'react'; import { Image, View, Text, Platform } from 'react-native'; import { PresenceBadge } from '@fluentui-react-native/badge'; import type { UseSlots, Slots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon } from '@fluentui-react-native/icon'; import { Svg, Path } from 'react-native-svg'; diff --git a/packages/components/Avatar/src/__tests__/Avatar.test.tsx b/packages/components/Avatar/src/__tests__/Avatar.test.tsx index 494d8d6914..4a8ea62acc 100644 --- a/packages/components/Avatar/src/__tests__/Avatar.test.tsx +++ b/packages/components/Avatar/src/__tests__/Avatar.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Avatar } from '..'; diff --git a/packages/components/Avatar/src/getHashCode.ts b/packages/components/Avatar/src/getHashCode.ts index b703dc1290..1ba64f7819 100644 --- a/packages/components/Avatar/src/getHashCode.ts +++ b/packages/components/Avatar/src/getHashCode.ts @@ -9,7 +9,7 @@ export const getHashCodeWeb = (str: string): number => { for (let len: number = str.length - 1; len >= 0; len--) { const ch = str.charCodeAt(len); const shift = len % 8; - hashCode ^= (ch << shift) + (ch >> (8 - shift)); // eslint-disable-line no-bitwise + hashCode ^= (ch << shift) + (ch >> (8 - shift)); } return hashCode; diff --git a/packages/components/Badge/package.json b/packages/components/Badge/package.json index b4954eb597..3143b3c260 100644 --- a/packages/components/Badge/package.json +++ b/packages/components/Badge/package.json @@ -2,30 +2,31 @@ "name": "@fluentui-react-native/badge", "version": "0.11.17", "description": "A cross-platform Badge component using the Fluent Design System. A badge is an additional visual descriptor for UI elements.", + "homepage": "https://github.com/microsoft/fluentui-react-native", "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "sideEffects": false, "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -43,7 +44,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -66,21 +69,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "sideEffects": false, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -90,19 +92,10 @@ "core-windows", "react", "react-test-renderer", - "svg" + "svg", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Badge/src/Badge.tsx b/packages/components/Badge/src/Badge.tsx index 2dd81b3f02..d91b5906d5 100644 --- a/packages/components/Badge/src/Badge.tsx +++ b/packages/components/Badge/src/Badge.tsx @@ -1,12 +1,11 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ReactNode } from 'react'; import { Children } from 'react'; import { View, I18nManager } from 'react-native'; import { Shadow } from '@fluentui-react-native/experimental-shadow'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Badge/src/CounterBadge/CounterBadge.tsx b/packages/components/Badge/src/CounterBadge/CounterBadge.tsx index 1e2d167231..38a0a6f783 100644 --- a/packages/components/Badge/src/CounterBadge/CounterBadge.tsx +++ b/packages/components/Badge/src/CounterBadge/CounterBadge.tsx @@ -1,12 +1,11 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ReactNode } from 'react'; import React, { Children } from 'react'; import { View, I18nManager } from 'react-native'; import { Shadow } from '@fluentui-react-native/experimental-shadow'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Badge/src/PresenceBadge/PresenceBadge.tsx b/packages/components/Badge/src/PresenceBadge/PresenceBadge.tsx index 274c65f3c9..00d83c153e 100644 --- a/packages/components/Badge/src/PresenceBadge/PresenceBadge.tsx +++ b/packages/components/Badge/src/PresenceBadge/PresenceBadge.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View, Platform } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Svg, Path } from 'react-native-svg'; import { stylingSettings } from './PresenceBadge.styling'; diff --git a/packages/components/Badge/src/__tests__/Badge.test.tsx b/packages/components/Badge/src/__tests__/Badge.test.tsx index 107bf19ebd..0beab6e254 100644 --- a/packages/components/Badge/src/__tests__/Badge.test.tsx +++ b/packages/components/Badge/src/__tests__/Badge.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Badge, CounterBadge, PresenceBadge } from '../'; diff --git a/packages/components/Button/package.json b/packages/components/Button/package.json index 906c9bb1f7..f2478579b4 100644 --- a/packages/components/Button/package.json +++ b/packages/components/Button/package.json @@ -2,32 +2,35 @@ "name": "@fluentui-react-native/button", "version": "0.39.22", "description": "A cross-platform Button component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Button" + }, + "license": "MIT", + "author": "", + "sideEffects": false, "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", + "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Button" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -52,7 +55,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -75,23 +80,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", - "sideEffects": false, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -100,20 +102,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Button/src/Button.test.tsx b/packages/components/Button/src/Button.test.tsx index 5adf700072..e11d59ce08 100644 --- a/packages/components/Button/src/Button.test.tsx +++ b/packages/components/Button/src/Button.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Pressable, Text } from 'react-native'; import { Icon } from '@fluentui-react-native/icon'; diff --git a/packages/components/Button/src/Button.tsx b/packages/components/Button/src/Button.tsx index 7e498fbf9a..79a4c7a038 100644 --- a/packages/components/Button/src/Button.tsx +++ b/packages/components/Button/src/Button.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, Pressable, View } from 'react-native'; import { ActivityIndicator } from '@fluentui-react-native/experimental-activity-indicator'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, memoize, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, memoize, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import type { IPressableState } from '@fluentui-react-native/interactive-hooks'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Button/src/CompoundButton/CompoundButton.mobile.tsx b/packages/components/Button/src/CompoundButton/CompoundButton.mobile.tsx index b78ef38eb1..961cfaea3a 100644 --- a/packages/components/Button/src/CompoundButton/CompoundButton.mobile.tsx +++ b/packages/components/Button/src/CompoundButton/CompoundButton.mobile.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import { compose } from '@fluentui-react-native/framework'; diff --git a/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx b/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx index 3e1d122b49..9b59759233 100644 --- a/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx +++ b/packages/components/Button/src/CompoundButton/CompoundButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { CompoundButton } from './CompoundButton'; diff --git a/packages/components/Button/src/CompoundButton/CompoundButton.tsx b/packages/components/Button/src/CompoundButton/CompoundButton.tsx index c48c0e17f1..46239b4c65 100644 --- a/packages/components/Button/src/CompoundButton/CompoundButton.tsx +++ b/packages/components/Button/src/CompoundButton/CompoundButton.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, Pressable, View } from 'react-native'; import { ActivityIndicator } from '@fluentui-react-native/experimental-activity-indicator'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Button/src/FAB/FAB.mobile.tsx b/packages/components/Button/src/FAB/FAB.mobile.tsx index 2c041c1e90..df6b305ff5 100644 --- a/packages/components/Button/src/FAB/FAB.mobile.tsx +++ b/packages/components/Button/src/FAB/FAB.mobile.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, Pressable, View } from 'react-native'; import { Shadow } from '@fluentui-react-native/experimental-shadow'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import type { IPressableState } from '@fluentui-react-native/interactive-hooks'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Button/src/FAB/FAB.test.tsx b/packages/components/Button/src/FAB/FAB.test.tsx index 29107b8b2b..fdbe970f17 100644 --- a/packages/components/Button/src/FAB/FAB.test.tsx +++ b/packages/components/Button/src/FAB/FAB.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { FAB } from './FAB'; diff --git a/packages/components/Button/src/FAB/FAB.tsx b/packages/components/Button/src/FAB/FAB.tsx index 2f75b6acbb..c19a2e2373 100644 --- a/packages/components/Button/src/FAB/FAB.tsx +++ b/packages/components/Button/src/FAB/FAB.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type * as React from 'react'; import { Pressable } from 'react-native'; diff --git a/packages/components/Button/src/ToggleButton/ToggleButton.android.tsx b/packages/components/Button/src/ToggleButton/ToggleButton.android.tsx index e9c2bf6e4e..7e0bc34376 100644 --- a/packages/components/Button/src/ToggleButton/ToggleButton.android.tsx +++ b/packages/components/Button/src/ToggleButton/ToggleButton.android.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import { compose } from '@fluentui-react-native/framework'; diff --git a/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx b/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx index 91812fc1fc..c06bbea21d 100644 --- a/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx +++ b/packages/components/Button/src/ToggleButton/ToggleButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { ToggleButton } from './ToggleButton'; diff --git a/packages/components/Button/src/ToggleButton/ToggleButton.tsx b/packages/components/Button/src/ToggleButton/ToggleButton.tsx index cae9858d0b..a3fa7d89f4 100644 --- a/packages/components/Button/src/ToggleButton/ToggleButton.tsx +++ b/packages/components/Button/src/ToggleButton/ToggleButton.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, Pressable, View } from 'react-native'; import { ActivityIndicator } from '@fluentui-react-native/experimental-activity-indicator'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Button/src/deprecated/Button.android.tsx b/packages/components/Button/src/deprecated/Button.android.tsx index 97c3b6919f..e755dfb0d4 100644 --- a/packages/components/Button/src/deprecated/Button.android.tsx +++ b/packages/components/Button/src/deprecated/Button.android.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Pressable, View } from 'react-native'; @@ -9,7 +8,6 @@ import { useAsPressable, useViewCommandFocus } from '@fluentui-react-native/inte import { Text } from '@fluentui-react-native/text'; import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Button/src/deprecated/Button.test.tsx b/packages/components/Button/src/deprecated/Button.test.tsx index 64e9897182..0232bff796 100644 --- a/packages/components/Button/src/deprecated/Button.test.tsx +++ b/packages/components/Button/src/deprecated/Button.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Button } from './Button'; diff --git a/packages/components/Button/src/deprecated/Button.tsx b/packages/components/Button/src/deprecated/Button.tsx index 2458998d13..36960622ee 100644 --- a/packages/components/Button/src/deprecated/Button.tsx +++ b/packages/components/Button/src/deprecated/Button.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; @@ -9,7 +8,6 @@ import { useAsPressable, useKeyProps, useViewCommandFocus, useOnPressWithFocus } import { Text } from '@fluentui-react-native/text'; import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Callout/package.json b/packages/components/Callout/package.json index 5b5b9f83c9..65e4bfaad6 100644 --- a/packages/components/Callout/package.json +++ b/packages/components/Callout/package.json @@ -2,35 +2,35 @@ "name": "@fluentui-react-native/callout", "version": "0.27.17", "description": "A cross-platform Callout component using the Fluent Design System", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Callout" + }, "license": "MIT", "author": "", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Callout" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -44,6 +44,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -62,32 +63,6 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "rnx-kit": { - "kitType": "library", - "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, - "capabilities": [ - "babel-preset-react-native", - "core", - "core-android", - "core-ios", - "core-macos", - "core-windows", - "react", - "react-test-renderer" - ] - } - }, "peerDependenciesMeta": { "@office-iss/react-native-win32": { "optional": true @@ -103,5 +78,22 @@ "name": "FRNCalloutSpec", "type": "components", "jsSrcsDir": "lib" + }, + "rnx-kit": { + "kitType": "library", + "alignDeps": { + "capabilities": [ + "babel-preset-react-native", + "core", + "core-android", + "core-ios", + "core-macos", + "core-windows", + "react", + "react-test-renderer", + "tools-core" + ] + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Callout/src/__tests__/Callout.test.tsx b/packages/components/Callout/src/__tests__/Callout.test.tsx index f493264af0..8a11512f37 100644 --- a/packages/components/Callout/src/__tests__/Callout.test.tsx +++ b/packages/components/Callout/src/__tests__/Callout.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Callout } from '..'; diff --git a/packages/components/Checkbox/package.json b/packages/components/Checkbox/package.json index 6a5203a589..b9cc1ea309 100644 --- a/packages/components/Checkbox/package.json +++ b/packages/components/Checkbox/package.json @@ -2,32 +2,35 @@ "name": "@fluentui-react-native/checkbox", "version": "0.23.23", "description": "A cross-platform Checkbox component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Checkbox" + }, + "license": "MIT", + "author": "", + "sideEffects": false, "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Checkbox" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -48,7 +51,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -71,23 +76,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", - "sideEffects": false, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -96,20 +98,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Checkbox/src/Checkbox.macos.tsx b/packages/components/Checkbox/src/Checkbox.macos.tsx index 7a63492ae3..77c11aff65 100644 --- a/packages/components/Checkbox/src/Checkbox.macos.tsx +++ b/packages/components/Checkbox/src/Checkbox.macos.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import type { IViewProps } from '@fluentui-react-native/adapters'; diff --git a/packages/components/Checkbox/src/Checkbox.tsx b/packages/components/Checkbox/src/Checkbox.tsx index cc952be831..78834f4a95 100644 --- a/packages/components/Checkbox/src/Checkbox.tsx +++ b/packages/components/Checkbox/src/Checkbox.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Pressable, Platform } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { Svg, Path } from 'react-native-svg'; diff --git a/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx b/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx index 2c1b5cf403..4ac3cd5e7e 100644 --- a/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx +++ b/packages/components/Checkbox/src/__tests__/Checkbox.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Text, View } from 'react-native'; import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; diff --git a/packages/components/Checkbox/src/deprecated/Checkbox.tsx b/packages/components/Checkbox/src/deprecated/Checkbox.tsx index 90adbb0ea4..319852f967 100644 --- a/packages/components/Checkbox/src/deprecated/Checkbox.tsx +++ b/packages/components/Checkbox/src/deprecated/Checkbox.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; @@ -16,7 +15,6 @@ import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens, borderTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import { backgroundColorTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; @@ -71,7 +69,7 @@ export const Checkbox = compose({ ...pressable.state, disabled: !!userProps.disabled, checked: isChecked, - boxAtEnd: boxSide == undefined || boxSide == 'start' ? false : true, + boxAtEnd: !(boxSide == undefined || boxSide == 'start'), }; // Grab the styling information from the userProps, referencing the state as well as the props. diff --git a/packages/components/Checkbox/src/useCheckbox.ts b/packages/components/Checkbox/src/useCheckbox.ts index a729f4eadd..036f16814c 100644 --- a/packages/components/Checkbox/src/useCheckbox.ts +++ b/packages/components/Checkbox/src/useCheckbox.ts @@ -68,7 +68,7 @@ export const useCheckbox = (props: CheckboxProps): CheckboxInfo => { ...pressable.state, disabled: !!props.disabled, checked: isChecked, - labelIsBefore: labelPosition === 'before' ? true : false, + labelIsBefore: labelPosition === 'before', }; const onAccessibilityActionProp = React.useCallback( diff --git a/packages/components/Chip/package.json b/packages/components/Chip/package.json index 4580469449..3c6f6484a1 100644 --- a/packages/components/Chip/package.json +++ b/packages/components/Chip/package.json @@ -2,30 +2,30 @@ "name": "@fluentui-react-native/chip", "version": "0.4.23", "description": "A cross-platform Chip component using the Fluent Design System. A chip is a compact representations of entities (most commonly, people) that can be typed in, deleted or dragged easily.", + "homepage": "https://github.com/microsoft/fluentui-react-native", "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -41,7 +41,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -63,20 +65,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,20 +87,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Chip/src/Chip.mobile.tsx b/packages/components/Chip/src/Chip.mobile.tsx index e76ee4e31a..aeec473fc3 100644 --- a/packages/components/Chip/src/Chip.mobile.tsx +++ b/packages/components/Chip/src/Chip.mobile.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ReactNode } from 'react'; import { Children } from 'react'; import { Pressable, I18nManager } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Icon } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Chip/src/Chip.tsx b/packages/components/Chip/src/Chip.tsx index 4b157ac062..9e424f884c 100644 --- a/packages/components/Chip/src/Chip.tsx +++ b/packages/components/Chip/src/Chip.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ReactNode } from 'react'; import { Pressable } from 'react-native'; diff --git a/packages/components/Chip/src/__tests__/Chip.test.tsx b/packages/components/Chip/src/__tests__/Chip.test.tsx index 88364d7be6..1cc1c1cad6 100644 --- a/packages/components/Chip/src/__tests__/Chip.test.tsx +++ b/packages/components/Chip/src/__tests__/Chip.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Chip } from '../'; diff --git a/packages/components/Chip/src/assets/DismissIcon.tsx b/packages/components/Chip/src/assets/DismissIcon.tsx index 13b3ba68e6..31b6add407 100644 --- a/packages/components/Chip/src/assets/DismissIcon.tsx +++ b/packages/components/Chip/src/assets/DismissIcon.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import Svg, { Path } from 'react-native-svg'; import type { SvgProps } from 'react-native-svg'; diff --git a/packages/components/ContextualMenu/package.json b/packages/components/ContextualMenu/package.json index 948e28f5c6..7ba61a398b 100644 --- a/packages/components/ContextualMenu/package.json +++ b/packages/components/ContextualMenu/package.json @@ -2,35 +2,35 @@ "name": "@fluentui-react-native/contextual-menu", "version": "0.24.31", "description": "A cross-platform ContextualMenu component using the Fluent Design System", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/ContextualMenu" + }, "license": "MIT", "author": "", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/ContextualMenu" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -48,7 +48,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/pressable": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -73,20 +75,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -94,22 +96,13 @@ "core-ios", "core-macos", "core-windows", + "metro-config", "react", + "react-test-renderer", "svg", - "metro-config", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/ContextualMenu/src/ContextualMenu.tsx b/packages/components/ContextualMenu/src/ContextualMenu.tsx index f18aae018a..ad7aaa27ec 100644 --- a/packages/components/ContextualMenu/src/ContextualMenu.tsx +++ b/packages/components/ContextualMenu/src/ContextualMenu.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View, ScrollView, Platform } from 'react-native'; @@ -9,7 +8,6 @@ import type { IFocusable } from '@fluentui-react-native/interactive-hooks'; import { useSelectedKey } from '@fluentui-react-native/interactive-hooks'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/ContextualMenu/src/ContextualMenuItem.tsx b/packages/components/ContextualMenu/src/ContextualMenuItem.tsx index 4376af7526..2a78171f24 100644 --- a/packages/components/ContextualMenu/src/ContextualMenuItem.tsx +++ b/packages/components/ContextualMenu/src/ContextualMenuItem.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; @@ -8,7 +7,6 @@ import { useAsPressable, useKeyProps, useViewCommandFocus } from '@fluentui-reac import { Text } from '@fluentui-react-native/text'; import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/ContextualMenu/src/Submenu.tsx b/packages/components/ContextualMenu/src/Submenu.tsx index d49cd62621..efb1c2ebdc 100644 --- a/packages/components/ContextualMenu/src/Submenu.tsx +++ b/packages/components/ContextualMenu/src/Submenu.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View, ScrollView, Platform, I18nManager } from 'react-native'; @@ -9,7 +8,6 @@ import type { IFocusable } from '@fluentui-react-native/interactive-hooks'; import { useKeyDownProps, useSelectedKey } from '@fluentui-react-native/interactive-hooks'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/ContextualMenu/src/SubmenuItem.tsx b/packages/components/ContextualMenu/src/SubmenuItem.tsx index b8906df2d7..feadcbbe6d 100644 --- a/packages/components/ContextualMenu/src/SubmenuItem.tsx +++ b/packages/components/ContextualMenu/src/SubmenuItem.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { I18nManager, Platform, View } from 'react-native'; @@ -9,7 +8,6 @@ import { useKeyDownProps, useViewCommandFocus, useAsPressable } from '@fluentui- import { Text } from '@fluentui-react-native/text'; import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/ContextualMenu/src/__tests__/ContextualMenu.test.tsx b/packages/components/ContextualMenu/src/__tests__/ContextualMenu.test.tsx index 7b73f23447..0a10ec2275 100644 --- a/packages/components/ContextualMenu/src/__tests__/ContextualMenu.test.tsx +++ b/packages/components/ContextualMenu/src/__tests__/ContextualMenu.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { ContextualMenu } from '..'; diff --git a/packages/components/Divider/package.json b/packages/components/Divider/package.json index 3420105663..b97f1a65fe 100644 --- a/packages/components/Divider/package.json +++ b/packages/components/Divider/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/divider", "version": "0.7.23", "description": "A cross-platform Divider component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Divider" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Divider" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -40,7 +42,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -63,22 +67,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -87,20 +89,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Divider/src/Divider.tsx b/packages/components/Divider/src/Divider.tsx index 962318ab07..dbdbb27064 100644 --- a/packages/components/Divider/src/Divider.tsx +++ b/packages/components/Divider/src/Divider.tsx @@ -1,11 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ -/** @jsxFrag */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { View } from 'react-native'; import type { ViewProps } from 'react-native'; -import { withSlots, compressible, useSlot, useFluentTheme, patchTokens } from '@fluentui-react-native/framework'; +import { compressible, useSlot, useFluentTheme, patchTokens } from '@fluentui-react-native/framework'; import type { UseTokens } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import type { IconPropsV1 as IconProps } from '@fluentui-react-native/icon'; diff --git a/packages/components/Divider/src/__tests__/Divider.test.tsx b/packages/components/Divider/src/__tests__/Divider.test.tsx index f8fab53302..8da5a09735 100644 --- a/packages/components/Divider/src/__tests__/Divider.test.tsx +++ b/packages/components/Divider/src/__tests__/Divider.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Divider } from '../Divider'; diff --git a/packages/components/FocusTrapZone/package.json b/packages/components/FocusTrapZone/package.json index 0cac16c0b9..568a9c2d54 100644 --- a/packages/components/FocusTrapZone/package.json +++ b/packages/components/FocusTrapZone/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/focus-trap-zone", "version": "0.12.20", "description": "A cross-platform FocusTrapZone component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/FocusTrapZone" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", + "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/FocusTrapZone" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -40,6 +42,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -59,22 +62,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -83,19 +84,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/FocusZone/package.json b/packages/components/FocusZone/package.json index c950e6c371..83795b1a3e 100644 --- a/packages/components/FocusZone/package.json +++ b/packages/components/FocusZone/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/focus-zone", "version": "0.21.15", "description": "A cross-platform FocusZone component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/FocusZone" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", + "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/FocusZone" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -40,6 +42,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -60,22 +63,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,19 +86,10 @@ "core-windows", "metro-react-native-babel-transformer", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/FocusZone/src/__tests__/FocusZone.test.tsx b/packages/components/FocusZone/src/__tests__/FocusZone.test.tsx index 105b2ae6dd..592330be60 100644 --- a/packages/components/FocusZone/src/__tests__/FocusZone.test.tsx +++ b/packages/components/FocusZone/src/__tests__/FocusZone.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Button } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Icon/package.json b/packages/components/Icon/package.json index cac99ea1a6..5f15e9d7b0 100644 --- a/packages/components/Icon/package.json +++ b/packages/components/Icon/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/icon", "version": "0.21.23", "description": "A cross-platform Icon component", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Icon" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", + "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Icon" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -39,6 +41,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -61,22 +64,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,20 +86,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Icon/src/FontIcon/FontIcon.tsx b/packages/components/Icon/src/FontIcon/FontIcon.tsx index 5f518b8b2f..d847394391 100644 --- a/packages/components/Icon/src/FontIcon/FontIcon.tsx +++ b/packages/components/Icon/src/FontIcon/FontIcon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Text } from 'react-native'; import { mergeProps, stagedComponent } from '@fluentui-react-native/framework'; diff --git a/packages/components/Icon/src/Icon.tsx b/packages/components/Icon/src/Icon.tsx index 98303e31a1..1d5cab3601 100644 --- a/packages/components/Icon/src/Icon.tsx +++ b/packages/components/Icon/src/Icon.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { FontIcon } from './FontIcon/FontIcon'; import type { IconProps } from './Icon.types'; import { SvgIcon } from './SvgIcon/SvgIcon'; diff --git a/packages/components/Icon/src/SvgIcon/SvgIcon.tsx b/packages/components/Icon/src/SvgIcon/SvgIcon.tsx index 69a03e8aa6..51b046b62f 100644 --- a/packages/components/Icon/src/SvgIcon/SvgIcon.tsx +++ b/packages/components/Icon/src/SvgIcon/SvgIcon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Platform, View } from 'react-native'; import { mergeProps, stagedComponent } from '@fluentui-react-native/framework'; diff --git a/packages/components/Icon/src/__tests__/Icon.test.tsx b/packages/components/Icon/src/__tests__/Icon.test.tsx index e488ad1017..73b08bd533 100644 --- a/packages/components/Icon/src/__tests__/Icon.test.tsx +++ b/packages/components/Icon/src/__tests__/Icon.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { Path, Svg } from 'react-native-svg'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Icon/src/legacy/Icon.tsx b/packages/components/Icon/src/legacy/Icon.tsx index cba6fd9294..ee160fefe6 100644 --- a/packages/components/Icon/src/legacy/Icon.tsx +++ b/packages/components/Icon/src/legacy/Icon.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Image, Platform, View } from 'react-native'; import type { ImageStyle, TextStyle } from 'react-native'; diff --git a/packages/components/Input/package.json b/packages/components/Input/package.json index d5c2ff488b..461ad4874c 100644 --- a/packages/components/Input/package.json +++ b/packages/components/Input/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/input", "version": "0.7.23", "description": "A cross-platform Text input component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Input" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Input" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -43,7 +45,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@react-native/babel-preset": "^0.74.0", @@ -65,22 +69,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -89,20 +91,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Input/src/Input.mobile.tsx b/packages/components/Input/src/Input.mobile.tsx index 8ba3302ea2..5040b4a280 100644 --- a/packages/components/Input/src/Input.mobile.tsx +++ b/packages/components/Input/src/Input.mobile.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Fragment } from 'react'; import { Pressable, ScrollView, TextInput, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { createIconProps } from '@fluentui-react-native/icon'; import { Icon } from '@fluentui-react-native/icon'; import type { FocusState } from '@fluentui-react-native/interactive-hooks'; diff --git a/packages/components/Input/src/Input.tsx b/packages/components/Input/src/Input.tsx index 82554916cc..0537647d49 100644 --- a/packages/components/Input/src/Input.tsx +++ b/packages/components/Input/src/Input.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Pressable, ScrollView, TextInput, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; diff --git a/packages/components/Input/src/__tests__/Input.test.tsx b/packages/components/Input/src/__tests__/Input.test.tsx index 92701e6ca2..a57fdf81f8 100644 --- a/packages/components/Input/src/__tests__/Input.test.tsx +++ b/packages/components/Input/src/__tests__/Input.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Input } from '../Input'; diff --git a/packages/components/Link/package.json b/packages/components/Link/package.json index 93862ac045..0dbbc29391 100644 --- a/packages/components/Link/package.json +++ b/packages/components/Link/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/link", "version": "0.23.23", "description": "A cross-platform Link component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Link" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Link" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -44,7 +46,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@react-native/babel-preset": "^0.74.0", @@ -64,22 +68,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -88,19 +90,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Link/src/Link.tsx b/packages/components/Link/src/Link.tsx index 4b1f0bb906..c15c763e25 100644 --- a/packages/components/Link/src/Link.tsx +++ b/packages/components/Link/src/Link.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Platform, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { stylingSettings } from './Link.styling'; diff --git a/packages/components/Link/src/__tests__/Link.test.tsx b/packages/components/Link/src/__tests__/Link.test.tsx index 509dca3ab6..804d63307e 100644 --- a/packages/components/Link/src/__tests__/Link.test.tsx +++ b/packages/components/Link/src/__tests__/Link.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Alert } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Link/src/legacy/Link.tsx b/packages/components/Link/src/legacy/Link.tsx index 4f3717b8ef..0ca49364fd 100644 --- a/packages/components/Link/src/legacy/Link.tsx +++ b/packages/components/Link/src/legacy/Link.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Linking, View } from 'react-native'; @@ -8,7 +7,6 @@ import { useAsPressable, useKeyProps, useOnPressWithFocus, useViewCommandFocus } import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Link/src/legacy/__tests__/Link.test.tsx b/packages/components/Link/src/legacy/__tests__/Link.test.tsx index aaf811c259..c94e78f976 100644 --- a/packages/components/Link/src/legacy/__tests__/Link.test.tsx +++ b/packages/components/Link/src/legacy/__tests__/Link.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { View } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Menu/package.json b/packages/components/Menu/package.json index b8bf05257c..8f9eaec8f3 100644 --- a/packages/components/Menu/package.json +++ b/packages/components/Menu/package.json @@ -2,32 +2,35 @@ "name": "@fluentui-react-native/menu", "version": "1.14.42", "description": "A cross-platform Menu component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/menu" + }, + "license": "MIT", + "author": "", + "sideEffects": false, "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/menu" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -47,13 +50,15 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/button": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", - "@types/node": "^22.0.0", + "@types/node": "catalog:", "@types/react": "~18.2.0", "@types/react-test-renderer": "^18.2.0", "react": "18.2.0", @@ -71,23 +76,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", - "sideEffects": false, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -96,20 +98,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Menu/src/Menu/useMenu.android.ts b/packages/components/Menu/src/Menu/useMenu.android.ts index 7de1f02fc6..f098fde8ab 100644 --- a/packages/components/Menu/src/Menu/useMenu.android.ts +++ b/packages/components/Menu/src/Menu/useMenu.android.ts @@ -158,7 +158,7 @@ export const useMenu = (props: MenuProps): MenuState => { }; // Adjust position of menu - TODO: fix this warning removal, potentially adds extra re-renders - // eslint-disable-next-line react-hooks/exhaustive-deps + const transforms = []; useMemo(() => { diff --git a/packages/components/Menu/src/MenuDivider/MenuDivider.tsx b/packages/components/Menu/src/MenuDivider/MenuDivider.tsx index 121d4904a2..69c266b486 100644 --- a/packages/components/Menu/src/MenuDivider/MenuDivider.tsx +++ b/packages/components/Menu/src/MenuDivider/MenuDivider.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots } from '@fluentui-react-native/framework'; +import { compose } from '@fluentui-react-native/framework'; import { stylingSettings } from './MenuDivider.styling'; import type { MenuDividerProps, MenuDividerType } from './MenuDivider.types'; diff --git a/packages/components/Menu/src/MenuGroup/MenuGroup.tsx b/packages/components/Menu/src/MenuGroup/MenuGroup.tsx index c7780cdb3f..45e60d98e5 100644 --- a/packages/components/Menu/src/MenuGroup/MenuGroup.tsx +++ b/packages/components/Menu/src/MenuGroup/MenuGroup.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Platform, View } from 'react-native'; import { FocusZone } from '@fluentui-react-native/focus-zone'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { UseSlots } from '@fluentui-react-native/framework'; import type { MenuGroupProps, MenuGroupType } from './MenuGroup.types'; diff --git a/packages/components/Menu/src/MenuGroupHeader/MenuGroupHeader.tsx b/packages/components/Menu/src/MenuGroupHeader/MenuGroupHeader.tsx index f01fbb05f2..f2ea3abf0a 100644 --- a/packages/components/Menu/src/MenuGroupHeader/MenuGroupHeader.tsx +++ b/packages/components/Menu/src/MenuGroupHeader/MenuGroupHeader.tsx @@ -1,8 +1,7 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { UseSlots } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/Menu/src/MenuItem/MenuItem.tsx b/packages/components/Menu/src/MenuItem/MenuItem.tsx index 994f48028d..f59928f95f 100644 --- a/packages/components/Menu/src/MenuItem/MenuItem.tsx +++ b/packages/components/Menu/src/MenuItem/MenuItem.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { I18nManager, Image, Pressable, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, memoize, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, memoize, mergeProps } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { SvgXml } from 'react-native-svg'; diff --git a/packages/components/Menu/src/MenuItemCheckbox/MenuItemCheckbox.tsx b/packages/components/Menu/src/MenuItemCheckbox/MenuItemCheckbox.tsx index 0bf5b2834b..a08da2b84d 100644 --- a/packages/components/Menu/src/MenuItemCheckbox/MenuItemCheckbox.tsx +++ b/packages/components/Menu/src/MenuItemCheckbox/MenuItemCheckbox.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Image, Platform, Pressable, View } from 'react-native'; import type { Slots, UseSlots, FinalRender } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { SvgXml } from 'react-native-svg'; diff --git a/packages/components/Menu/src/MenuItemRadio/MenuItemRadio.tsx b/packages/components/Menu/src/MenuItemRadio/MenuItemRadio.tsx index 415db4e644..90c1731d5a 100644 --- a/packages/components/Menu/src/MenuItemRadio/MenuItemRadio.tsx +++ b/packages/components/Menu/src/MenuItemRadio/MenuItemRadio.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Image, Platform, Pressable, View } from 'react-native'; import type { Slots, UseSlots, FinalRender } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { SvgXml } from 'react-native-svg'; diff --git a/packages/components/Menu/src/MenuItemRadio/useMenuItemRadio.ts b/packages/components/Menu/src/MenuItemRadio/useMenuItemRadio.ts index 935ed4257d..dc8341b736 100644 --- a/packages/components/Menu/src/MenuItemRadio/useMenuItemRadio.ts +++ b/packages/components/Menu/src/MenuItemRadio/useMenuItemRadio.ts @@ -35,7 +35,7 @@ export const useMenuItemRadio = (props: MenuItemRadioProps): MenuItemRadioInfo = return () => { listContext.removeRadioItem(name); }; - }, []); // eslint-disable-line react-hooks/exhaustive-deps + }, []); return useMenuCheckboxInteraction(props, toggleChecked); }; diff --git a/packages/components/Menu/src/MenuList/MenuList.tsx b/packages/components/Menu/src/MenuList/MenuList.tsx index 90d2785971..e83af30d5f 100644 --- a/packages/components/Menu/src/MenuList/MenuList.tsx +++ b/packages/components/Menu/src/MenuList/MenuList.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { Platform, ScrollView, View } from 'react-native'; import { FocusZone } from '@fluentui-react-native/focus-zone'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots } from '@fluentui-react-native/framework'; +import { compose } from '@fluentui-react-native/framework'; import { stylingSettings } from './MenuList.styling'; import type { MenuListProps, MenuListState, MenuListType } from './MenuList.types'; diff --git a/packages/components/Menu/src/MenuList/useMenuList.ts b/packages/components/Menu/src/MenuList/useMenuList.ts index e8db9fc5f2..087fea98e3 100644 --- a/packages/components/Menu/src/MenuList/useMenuList.ts +++ b/packages/components/Menu/src/MenuList/useMenuList.ts @@ -209,6 +209,5 @@ export const useMenuItemTracking = (ref: React.RefObject, disabled: boolea React.useEffect(() => { trackMenuItem(item); return () => untrackMenuItem(item); - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); }; diff --git a/packages/components/Menu/src/MenuPopover/useMenuPopover.ts b/packages/components/Menu/src/MenuPopover/useMenuPopover.ts index 445f0bd490..c3a48c1ef4 100644 --- a/packages/components/Menu/src/MenuPopover/useMenuPopover.ts +++ b/packages/components/Menu/src/MenuPopover/useMenuPopover.ts @@ -29,7 +29,6 @@ export const useMenuPopover = (props: MenuPopoverProps): MenuPopoverState => { const onDismiss = React.useCallback(() => { props.onDismiss?.(); setOpen(undefined, false /* isOpen */), [setOpen]; - // eslint-disable-next-line react-hooks/exhaustive-deps }, [props.onDismiss, setOpen]); const dismissBehaviors = isControlled ? controlledDismissBehaviors : undefined; const directionalHint = props.directionalHint ?? getDirectionalHint(isSubmenu, I18nManager.isRTL); diff --git a/packages/components/Menu/src/MenuTrigger/useMergeRefs.ts b/packages/components/Menu/src/MenuTrigger/useMergeRefs.ts index 255a5c8f9f..96cf58ff21 100644 --- a/packages/components/Menu/src/MenuTrigger/useMergeRefs.ts +++ b/packages/components/Menu/src/MenuTrigger/useMergeRefs.ts @@ -34,7 +34,7 @@ export function useMergedRefs(...refs: (React.Ref | undefined)[]): RefObje } } }, - // eslint-disable-next-line react-hooks/exhaustive-deps -- already exhaustive + [...refs], ) as unknown as RefObjectFunction; diff --git a/packages/components/Menu/src/__tests__/Menu.test.tsx b/packages/components/Menu/src/__tests__/Menu.test.tsx index 7fc6cce6eb..96f7396e41 100644 --- a/packages/components/Menu/src/__tests__/Menu.test.tsx +++ b/packages/components/Menu/src/__tests__/Menu.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { ButtonV1 as Button } from '@fluentui-react-native/button'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/MenuButton/package.json b/packages/components/MenuButton/package.json index 78e717064e..801bec0602 100644 --- a/packages/components/MenuButton/package.json +++ b/packages/components/MenuButton/package.json @@ -2,35 +2,35 @@ "name": "@fluentui-react-native/menu-button", "version": "0.13.37", "description": "A cross-platform MenuButton component using the Fluent Design System", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/MenuButton" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/MenuButton" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/button": "workspace:*", @@ -45,7 +45,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -67,20 +69,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -89,20 +91,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/MenuButton/src/MenuButton.macos.tsx b/packages/components/MenuButton/src/MenuButton.macos.tsx index f7b9bc7684..88fb896cd8 100644 --- a/packages/components/MenuButton/src/MenuButton.macos.tsx +++ b/packages/components/MenuButton/src/MenuButton.macos.tsx @@ -4,8 +4,7 @@ * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Image } from 'react-native'; import type { ImageResolvedAssetSource } from 'react-native'; @@ -13,7 +12,6 @@ import type { IconProps } from '@fluentui-react-native/icon'; import { createIconProps } from '@fluentui-react-native/icon'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/MenuButton/src/MenuButton.tsx b/packages/components/MenuButton/src/MenuButton.tsx index 1622b626f6..a7154abb3e 100644 --- a/packages/components/MenuButton/src/MenuButton.tsx +++ b/packages/components/MenuButton/src/MenuButton.tsx @@ -1,12 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React, { useRef, useState, useCallback } from 'react'; import { ButtonV1 as Button } from '@fluentui-react-native/button'; import { ContextualMenu, ContextualMenuItem, SubmenuItem, Submenu } from '@fluentui-react-native/contextual-menu'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; @@ -54,7 +52,7 @@ export const MenuButton = compose({ iconPosition: startIcon != undefined ? 'before' : 'after', componentRef: stdBtnRef, onClick: toggleShowContextualMenu, - iconOnly: content == undefined ? true : false, + iconOnly: content == undefined, ...rest, }; diff --git a/packages/components/MenuButton/src/__tests__/MenuButton.test.tsx b/packages/components/MenuButton/src/__tests__/MenuButton.test.tsx index 9a88ddb5fb..493f5875fa 100644 --- a/packages/components/MenuButton/src/__tests__/MenuButton.test.tsx +++ b/packages/components/MenuButton/src/__tests__/MenuButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import type { MenuButtonItemProps } from '..'; diff --git a/packages/components/Notification/package.json b/packages/components/Notification/package.json index 59c5b6d6dc..a36fc22846 100644 --- a/packages/components/Notification/package.json +++ b/packages/components/Notification/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/notification", "version": "0.25.29", "description": "add component-description", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Notification" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Notification" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -48,7 +50,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -71,22 +75,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -95,20 +97,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Notification/src/Notification.tsx b/packages/components/Notification/src/Notification.tsx index c5f460dd00..f3d1980ff3 100644 --- a/packages/components/Notification/src/Notification.tsx +++ b/packages/components/Notification/src/Notification.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { PressableProps, ViewStyle, ViewProps } from 'react-native'; import { useWindowDimensions, View } from 'react-native'; @@ -7,7 +6,7 @@ import type { SizeClassIOS } from '@fluentui-react-native/experimental-appearanc import { useHorizontalSizeClass } from '@fluentui-react-native/experimental-appearance-additions'; import { Shadow } from '@fluentui-react-native/experimental-shadow'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, memoize } from '@fluentui-react-native/framework'; +import { compose, mergeProps, memoize } from '@fluentui-react-native/framework'; import { Icon, createIconProps } from '@fluentui-react-native/icon'; import type { InteractionEvent } from '@fluentui-react-native/interactive-hooks'; import { Pressable } from '@fluentui-react-native/pressable'; diff --git a/packages/components/Notification/src/__tests__/Notification.test.tsx b/packages/components/Notification/src/__tests__/Notification.test.tsx index b6c1d40053..3bfdba8488 100644 --- a/packages/components/Notification/src/__tests__/Notification.test.tsx +++ b/packages/components/Notification/src/__tests__/Notification.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Notification } from '../Notification'; diff --git a/packages/components/Persona/package.json b/packages/components/Persona/package.json index c677cd8b23..fe5333887e 100644 --- a/packages/components/Persona/package.json +++ b/packages/components/Persona/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/persona", "version": "0.16.17", "description": "A cross-platform Persona component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Persona" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Persona" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -43,6 +45,8 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -59,22 +63,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -82,19 +84,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Persona/src/Persona.tsx b/packages/components/Persona/src/Persona.tsx index 8fd71d4757..a5e62ed761 100644 --- a/packages/components/Persona/src/Persona.tsx +++ b/packages/components/Persona/src/Persona.tsx @@ -1,12 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View, Text } from 'react-native'; import { filterViewProps } from '@fluentui-react-native/adapters'; import { PersonaCoin } from '@fluentui-react-native/persona-coin'; import { foregroundColorTokens } from '@fluentui-react-native/tokens'; import type { ISlots, IRenderData } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/PersonaCoin/package.json b/packages/components/PersonaCoin/package.json index 9ce2ad891c..9ba367b8a2 100644 --- a/packages/components/PersonaCoin/package.json +++ b/packages/components/PersonaCoin/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/persona-coin", "version": "0.15.17", "description": "A cross-platform PersonaCoin component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/PersonaCoin" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/PersonaCoin" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -43,6 +45,8 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -60,22 +64,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -83,19 +85,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/PersonaCoin/src/PersonaCoin.tsx b/packages/components/PersonaCoin/src/PersonaCoin.tsx index f215f3da22..a3eb4ec57d 100644 --- a/packages/components/PersonaCoin/src/PersonaCoin.tsx +++ b/packages/components/PersonaCoin/src/PersonaCoin.tsx @@ -1,11 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Image, View, Text } from 'react-native'; import { filterViewProps, filterImageProps } from '@fluentui-react-native/adapters'; import { foregroundColorTokens } from '@fluentui-react-native/tokens'; import type { ISlots, IRenderData } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import { compose } from '@uifabricshared/foundation-compose'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Pressable/package.json b/packages/components/Pressable/package.json index 0eaecea5fe..9d39256483 100644 --- a/packages/components/Pressable/package.json +++ b/packages/components/Pressable/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/pressable", "version": "0.12.19", "description": "A cross-platform Pressable component", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Pressable" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Pressable" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -39,6 +41,7 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -55,22 +58,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -78,19 +79,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/RadioGroup/package.json b/packages/components/RadioGroup/package.json index c0877196b4..53b68fea36 100644 --- a/packages/components/RadioGroup/package.json +++ b/packages/components/RadioGroup/package.json @@ -2,32 +2,35 @@ "name": "@fluentui-react-native/radio-group", "version": "0.21.31", "description": "A cross-platform Radio Group component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/RadioGroup" + }, + "license": "MIT", + "author": "", + "sideEffects": false, "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/RadioGroup" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -47,7 +50,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -70,23 +75,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", - "sideEffects": false, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -95,20 +97,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/RadioGroup/src/Radio/Radio.ios.tsx b/packages/components/RadioGroup/src/Radio/Radio.ios.tsx index b0c8a0e548..719c7970d0 100644 --- a/packages/components/RadioGroup/src/Radio/Radio.ios.tsx +++ b/packages/components/RadioGroup/src/Radio/Radio.ios.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Platform, Pressable, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { PressableState } from '@fluentui-react-native/interactive-hooks'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { Svg, Path } from 'react-native-svg'; diff --git a/packages/components/RadioGroup/src/Radio/Radio.tsx b/packages/components/RadioGroup/src/Radio/Radio.tsx index 4cf0a79548..04eebafbd5 100644 --- a/packages/components/RadioGroup/src/Radio/Radio.tsx +++ b/packages/components/RadioGroup/src/Radio/Radio.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Platform, Pressable, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { PressableState } from '@fluentui-react-native/interactive-hooks'; import { TextV1 as Text } from '@fluentui-react-native/text'; diff --git a/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx b/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx index b7f874fd08..6432d26b28 100644 --- a/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx +++ b/packages/components/RadioGroup/src/Radio/__tests__/RadioExperimental.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Radio } from '../Radio'; diff --git a/packages/components/RadioGroup/src/RadioGroup/RadioGroup.tsx b/packages/components/RadioGroup/src/RadioGroup/RadioGroup.tsx index b38e8d91df..fc73041ea4 100644 --- a/packages/components/RadioGroup/src/RadioGroup/RadioGroup.tsx +++ b/packages/components/RadioGroup/src/RadioGroup/RadioGroup.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { Platform, View } from 'react-native'; import { FocusZone } from '@fluentui-react-native/focus-zone'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { stylingSettings } from './RadioGroup.styling'; diff --git a/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx b/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx index a511530af4..faa4035cf0 100644 --- a/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx +++ b/packages/components/RadioGroup/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Radio } from '../../Radio/Radio'; diff --git a/packages/components/RadioGroup/src/legacy/RadioButton.macos.tsx b/packages/components/RadioGroup/src/legacy/RadioButton.macos.tsx index 6421435ed9..fbf09b0556 100644 --- a/packages/components/RadioGroup/src/legacy/RadioButton.macos.tsx +++ b/packages/components/RadioGroup/src/legacy/RadioButton.macos.tsx @@ -3,12 +3,10 @@ * Licensed under the MIT License. * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import { compose } from '@uifabricshared/foundation-compose'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/RadioGroup/src/legacy/RadioButton.tsx b/packages/components/RadioGroup/src/legacy/RadioButton.tsx index 9531c16398..c1e1da3364 100644 --- a/packages/components/RadioGroup/src/legacy/RadioButton.tsx +++ b/packages/components/RadioGroup/src/legacy/RadioButton.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ 'use strict'; import * as React from 'react'; import { View } from 'react-native'; @@ -9,7 +8,6 @@ import { useAsPressable, useOnPressWithFocus, useViewCommandFocus } from '@fluen import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens, borderTokens, backgroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/RadioGroup/src/legacy/RadioButton.win32.tsx b/packages/components/RadioGroup/src/legacy/RadioButton.win32.tsx index 743cac7ef3..e023d6ae1f 100644 --- a/packages/components/RadioGroup/src/legacy/RadioButton.win32.tsx +++ b/packages/components/RadioGroup/src/legacy/RadioButton.win32.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ 'use strict'; import * as React from 'react'; import { View, I18nManager } from 'react-native'; @@ -10,7 +9,6 @@ import { useAsPressable, useViewCommandFocus, useKeyDownProps } from '@fluentui- import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens, borderTokens, backgroundColorTokens, getPaletteFromTheme } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/RadioGroup/src/legacy/RadioGroup.tsx b/packages/components/RadioGroup/src/legacy/RadioGroup.tsx index 8b07d860e3..64e0da5017 100644 --- a/packages/components/RadioGroup/src/legacy/RadioGroup.tsx +++ b/packages/components/RadioGroup/src/legacy/RadioGroup.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; @@ -8,7 +7,6 @@ import { useSelectedKey } from '@fluentui-react-native/interactive-hooks'; import { Text } from '@fluentui-react-native/text'; import { foregroundColorTokens, textTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/RadioGroup/src/legacy/__tests__/RadioButton.test.tsx b/packages/components/RadioGroup/src/legacy/__tests__/RadioButton.test.tsx index fb6687f4b7..e53b765d38 100644 --- a/packages/components/RadioGroup/src/legacy/__tests__/RadioButton.test.tsx +++ b/packages/components/RadioGroup/src/legacy/__tests__/RadioButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { RadioButton } from '../RadioButton'; diff --git a/packages/components/RadioGroup/src/legacy/__tests__/RadioButtonGroup.test.tsx b/packages/components/RadioGroup/src/legacy/__tests__/RadioButtonGroup.test.tsx index e9f0d3630b..dd30dd81c2 100644 --- a/packages/components/RadioGroup/src/legacy/__tests__/RadioButtonGroup.test.tsx +++ b/packages/components/RadioGroup/src/legacy/__tests__/RadioButtonGroup.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { View } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Separator/package.json b/packages/components/Separator/package.json index b8cbe2a46f..e7c26d0d0b 100644 --- a/packages/components/Separator/package.json +++ b/packages/components/Separator/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/separator", "version": "0.18.17", "description": "A cross-platform Separator component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Separator" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Separator" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -38,7 +40,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -58,22 +62,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -82,19 +84,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Separator/src/Separator.tsx b/packages/components/Separator/src/Separator.tsx index c1d7da969d..8763125539 100644 --- a/packages/components/Separator/src/Separator.tsx +++ b/packages/components/Separator/src/Separator.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { stylingSettings } from './Separator.styling'; import type { SeparatorProps, SeparatorType } from './Separator.types'; diff --git a/packages/components/Separator/src/__tests__/Separator.test.tsx b/packages/components/Separator/src/__tests__/Separator.test.tsx index 66b11a12ed..cce9c3232b 100644 --- a/packages/components/Separator/src/__tests__/Separator.test.tsx +++ b/packages/components/Separator/src/__tests__/Separator.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Separator } from '..'; diff --git a/packages/components/Stack/package.json b/packages/components/Stack/package.json index 23ec26ce8d..62b37d20bb 100644 --- a/packages/components/Stack/package.json +++ b/packages/components/Stack/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/stack", "version": "0.10.22", "description": "A cross-platform opinionated Fluent Text component", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Stack" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Stack" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -42,7 +44,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/text": "workspace:*", "@react-native/babel-preset": "^0.74.0", @@ -62,22 +66,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -86,19 +88,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Stack/src/Stack.tsx b/packages/components/Stack/src/Stack.tsx index 6d1fd2a4a3..93ac975c79 100644 --- a/packages/components/Stack/src/Stack.tsx +++ b/packages/components/Stack/src/Stack.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; import type { StyleProp, ViewStyle } from 'react-native'; @@ -7,7 +6,6 @@ import type { StyleProp, ViewStyle } from 'react-native'; import { filterViewProps } from '@fluentui-react-native/adapters'; import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens'; import type { ISlots } from '@uifabricshared/foundation-composable'; -import { withSlots } from '@uifabricshared/foundation-composable'; import type { IUseComposeStyling } from '@uifabricshared/foundation-compose'; import { compose } from '@uifabricshared/foundation-compose'; import { mergeSettings } from '@uifabricshared/foundation-settings'; diff --git a/packages/components/Stack/src/__tests__/Stack.test.tsx b/packages/components/Stack/src/__tests__/Stack.test.tsx index 43739a340c..b3d800d649 100644 --- a/packages/components/Stack/src/__tests__/Stack.test.tsx +++ b/packages/components/Stack/src/__tests__/Stack.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { Text } from '@fluentui-react-native/text'; import * as renderer from 'react-test-renderer'; diff --git a/packages/components/Switch/package.json b/packages/components/Switch/package.json index 367de53232..9a2c49c5d4 100644 --- a/packages/components/Switch/package.json +++ b/packages/components/Switch/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/switch", "version": "0.13.22", "description": "A cross-platform Switch component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Switch" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", + "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Switch" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -42,7 +44,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -63,22 +67,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -87,19 +89,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Switch/src/Switch.tsx b/packages/components/Switch/src/Switch.tsx index b30ef92628..ed546c91ca 100644 --- a/packages/components/Switch/src/Switch.tsx +++ b/packages/components/Switch/src/Switch.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { StyleProp, TextStyle } from 'react-native'; import { View, AccessibilityInfo, Pressable, Animated, Platform } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, memoize, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, memoize, mergeProps } from '@fluentui-react-native/framework'; import { Text } from '@fluentui-react-native/text'; import { stylingSettings } from './Switch.styling'; diff --git a/packages/components/Switch/src/__tests__/Switch.test.tsx b/packages/components/Switch/src/__tests__/Switch.test.tsx index b8f43b9012..a2412548c9 100644 --- a/packages/components/Switch/src/__tests__/Switch.test.tsx +++ b/packages/components/Switch/src/__tests__/Switch.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Switch } from '../Switch'; diff --git a/packages/components/TabList/package.json b/packages/components/TabList/package.json index c6f80b912e..baecd0308b 100644 --- a/packages/components/TabList/package.json +++ b/packages/components/TabList/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/tablist", "version": "0.7.19", "description": "A cross-platform TabList component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/TabList" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/TabList" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -44,7 +46,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -67,22 +71,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -91,20 +93,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/TabList/src/Tab/Tab.tsx b/packages/components/TabList/src/Tab/Tab.tsx index caeb7308a7..1004e83021 100644 --- a/packages/components/TabList/src/Tab/Tab.tsx +++ b/packages/components/TabList/src/Tab/Tab.tsx @@ -1,13 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ -/** @jsxFrag */ - +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { View, Pressable } from 'react-native'; import type { ViewProps } from 'react-native'; import type { UseTokens } from '@fluentui-react-native/framework'; -import { withSlots, compressible, useSlot, useFluentTheme, applyTokenLayers, mergeProps } from '@fluentui-react-native/framework'; +import { compressible, useSlot, useFluentTheme, applyTokenLayers, mergeProps } from '@fluentui-react-native/framework'; import { IconV1 as Icon } from '@fluentui-react-native/icon'; import type { IconPropsV1 as IconProps } from '@fluentui-react-native/icon'; import type { PressablePropsExtended } from '@fluentui-react-native/interactive-hooks'; diff --git a/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx b/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx index b99d4aa52f..d85663f286 100644 --- a/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx +++ b/packages/components/TabList/src/Tab/__tests__/Tab.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import Tab from '../Tab'; diff --git a/packages/components/TabList/src/Tab/useTab.ts b/packages/components/TabList/src/Tab/useTab.ts index 971d06cec4..dcad8865a1 100644 --- a/packages/components/TabList/src/Tab/useTab.ts +++ b/packages/components/TabList/src/Tab/useTab.ts @@ -68,7 +68,6 @@ export const useTab = (props: TabProps): TabInfo => { componentRef && setFocusedTabRef(componentRef); } return () => removeTabKey(tabKey); - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); // Used when creating accessibility properties in mergeSettings below. diff --git a/packages/components/TabList/src/Tab/useTab.win32.ts b/packages/components/TabList/src/Tab/useTab.win32.ts index 6004a91dc6..47a3fc69af 100644 --- a/packages/components/TabList/src/Tab/useTab.win32.ts +++ b/packages/components/TabList/src/Tab/useTab.win32.ts @@ -87,19 +87,16 @@ export const useTab = (props: TabProps): TabInfo => { componentRef && setFocusedTabRef(componentRef); } return () => removeTabKey(tabKey); - // eslint-disable-next-line react-hooks/exhaustive-deps }, []); React.useEffect(() => { updateTabRef(tabKey, componentRef); // Disable exhaustive-deps warning because the hook shouldn't run whenever the excluded dependency, updateTabRef, changes. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [tabKey, componentRef]); React.useEffect(() => { updateDisabledTabs(tabKey, disabled); // Disable exhaustive-deps warning because the hook shouldn't run whenever the excluded dependency, updateDisabledTabs, change. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [tabKey, disabled]); /** @@ -113,7 +110,6 @@ export const useTab = (props: TabProps): TabInfo => { setInvoked(false); } // Disable exhaustive-deps warning because hook should only run whenever 'invoked' and its setter are updated. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [invoked, setInvoked]); // Used when creating accessibility properties in mergeSettings below. diff --git a/packages/components/TabList/src/Tab/useTabAnimation.ts b/packages/components/TabList/src/Tab/useTabAnimation.ts index 0d30133b95..3d03eb8782 100644 --- a/packages/components/TabList/src/Tab/useTabAnimation.ts +++ b/packages/components/TabList/src/Tab/useTabAnimation.ts @@ -36,7 +36,6 @@ export function useTabAnimation( updateAnimatedIndicatorStyles({ backgroundColor: tokens.indicatorColor, borderRadius: tokens.indicatorRadius }); } // Disabling warning because effect does not need to fire on `updateAnimatedIndicatorStyles` being changed - // eslint-disable-next-line react-hooks/exhaustive-deps }, [tabKey, selectedKey, tokens.indicatorColor, tokens.indicatorRadius]); /** diff --git a/packages/components/TabList/src/TabList/TabList.tsx b/packages/components/TabList/src/TabList/TabList.tsx index e78aee657a..450a906dba 100644 --- a/packages/components/TabList/src/TabList/TabList.tsx +++ b/packages/components/TabList/src/TabList/TabList.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; import { FocusZone } from '@fluentui-react-native/focus-zone'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { stylingSettings } from './TabList.styling'; import type { TabListType, TabListProps } from './TabList.types'; diff --git a/packages/components/TabList/src/TabList/__tests__/TabList.test.tsx b/packages/components/TabList/src/TabList/__tests__/TabList.test.tsx index 3542a29502..af4ca45659 100644 --- a/packages/components/TabList/src/TabList/__tests__/TabList.test.tsx +++ b/packages/components/TabList/src/TabList/__tests__/TabList.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import Tab from '../../Tab/Tab'; diff --git a/packages/components/TabList/src/TabList/useTabList.ts b/packages/components/TabList/src/TabList/useTabList.ts index a2d6a79101..5d6fa12d73 100644 --- a/packages/components/TabList/src/TabList/useTabList.ts +++ b/packages/components/TabList/src/TabList/useTabList.ts @@ -161,7 +161,6 @@ export const useTabList = (props: TabListProps): TabListInfo => { } } // Disable exhaustive-deps warning because this hook should only run once 'isSelectedTabDisabled' dependency changes. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [isSelectedTabDisabled]); // win32 only prop used to implemement CTRL + TAB shortcut native to windows tab components diff --git a/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.tsx b/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.tsx index a811fded97..7aee136acd 100644 --- a/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.tsx +++ b/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.tsx @@ -1,5 +1,3 @@ -/** @jsxRuntime classic */ -import React from 'react'; import { Animated } from 'react-native'; import { stagedComponent } from '@fluentui-react-native/framework'; diff --git a/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.win32.tsx b/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.win32.tsx index 470b12a37b..11732f552c 100644 --- a/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.win32.tsx +++ b/packages/components/TabList/src/TabListAnimatedIndicator/TabListAnimatedIndicator.win32.tsx @@ -1,6 +1,3 @@ -/** @jsxRuntime classic */ - -import React from 'react'; import { View } from 'react-native'; import type { Animated, ViewProps, ViewStyle } from 'react-native'; diff --git a/packages/components/TabList/src/TabListAnimatedIndicator/useAnimatedIndicatorStyles.ts b/packages/components/TabList/src/TabListAnimatedIndicator/useAnimatedIndicatorStyles.ts index c77fd1d2e0..7dd6f50ef2 100644 --- a/packages/components/TabList/src/TabListAnimatedIndicator/useAnimatedIndicatorStyles.ts +++ b/packages/components/TabList/src/TabListAnimatedIndicator/useAnimatedIndicatorStyles.ts @@ -16,7 +16,7 @@ export function useAnimatedIndicatorStyles(props: AnimatedIndicatorProps): Anima const indicatorScale = React.useRef(new Animated.Value(1)).current; // Save the initial selected layout, this shouldn't update after the first render. - // eslint-disable-next-line react-hooks/exhaustive-deps + const startingKey = React.useMemo(() => selectedKey, []); React.useEffect(() => { @@ -56,7 +56,6 @@ export function useAnimatedIndicatorStyles(props: AnimatedIndicatorProps): Anima // extent change among the tabs: specifically whenever the selected tab is bolded and previously selected tab is unbolded. Without checking for #2, // the animation for scaling and translating the indicator uses outdated layout info, resulting in a unaligned, small indicator. All other dependencies // are irrelevant. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [selectedKey, tabLayout, vertical]); // Calculate styles using both layout information and user defined styles diff --git a/packages/components/Text/package.json b/packages/components/Text/package.json index fe78b64cdc..365ab6c813 100644 --- a/packages/components/Text/package.json +++ b/packages/components/Text/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/text", "version": "0.24.21", "description": "A cross-platform Text component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/text" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/text" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -41,7 +43,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@react-native/babel-preset": "^0.74.0", @@ -61,22 +65,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,19 +87,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/components/Text/src/Text.tsx b/packages/components/Text/src/Text.tsx index 1456546244..fa9070b98c 100644 --- a/packages/components/Text/src/Text.tsx +++ b/packages/components/Text/src/Text.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { I18nManager, Platform, Text as RNText } from 'react-native'; import type { UseTokens, FontWeightValue } from '@fluentui-react-native/framework'; -import { fontStyles, withSlots, useFluentTheme, mergeStyles, compressible, patchTokens } from '@fluentui-react-native/framework'; +import { fontStyles, useFluentTheme, mergeStyles, compressible, patchTokens } from '@fluentui-react-native/framework'; import { useKeyProps } from '@fluentui-react-native/interactive-hooks'; import { globalTokens } from '@fluentui-react-native/theme-tokens'; diff --git a/packages/components/Text/src/__tests__/Text.test.tsx b/packages/components/Text/src/__tests__/Text.test.tsx index 54189475dc..49849f43fc 100644 --- a/packages/components/Text/src/__tests__/Text.test.tsx +++ b/packages/components/Text/src/__tests__/Text.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Text } from '../Text'; diff --git a/packages/configs/babel-config/babel.config.js b/packages/configs/babel-config/babel.config.js index 975b636e48..6f267f69e0 100644 --- a/packages/configs/babel-config/babel.config.js +++ b/packages/configs/babel-config/babel.config.js @@ -7,7 +7,7 @@ module.exports = { targets: { node: 'current' }, }, ], - '@babel/preset-react', + ['@babel/preset-react', { runtime: 'automatic' }], ['@babel/preset-typescript', { allowSyntheticDefaultImports: true }], ['module:@react-native/babel-preset', { runtime: 'automatic' }], ], diff --git a/packages/configs/babel-config/babel.react.config.js b/packages/configs/babel-config/babel.react.config.js index 3bac67a819..6dcf6634a9 100644 --- a/packages/configs/babel-config/babel.react.config.js +++ b/packages/configs/babel-config/babel.react.config.js @@ -7,7 +7,7 @@ module.exports = { targets: { node: 'current' }, }, ], - '@babel/preset-react', + ['@babel/preset-react', { runtime: 'automatic' }], ['@babel/preset-typescript', { allowSyntheticDefaultImports: true }], ], overrides: [ diff --git a/packages/configs/babel-config/package.json b/packages/configs/babel-config/package.json index 417d105ac6..37076a976f 100644 --- a/packages/configs/babel-config/package.json +++ b/packages/configs/babel-config/package.json @@ -2,11 +2,11 @@ "name": "@fluentui-react-native/babel-config", "private": true, "version": "0.1.1", - "description": "Babel configuration for UI Fabric React Native", + "description": "Babel configuration for Fluent UI React Native packages", "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", - "directory": "packages/framework/babel-config" + "directory": "packages/configs/babel-config" }, "main": "./babel.config.js", "exports": { @@ -27,6 +27,9 @@ "@react-native/babel-preset": "^0.74.0", "@react-native/metro-babel-transformer": "^0.74.0" }, + "furn": { + "packageType": "tooling" + }, "beachball": { "shouldPublish": false, "disallowedChangeTypes": [ diff --git a/packages/framework/eslint-config-rules/.npmignore b/packages/configs/eslint-config-rules/.npmignore similarity index 100% rename from packages/framework/eslint-config-rules/.npmignore rename to packages/configs/eslint-config-rules/.npmignore diff --git a/packages/framework/eslint-config-rules/CHANGELOG.json b/packages/configs/eslint-config-rules/CHANGELOG.json similarity index 100% rename from packages/framework/eslint-config-rules/CHANGELOG.json rename to packages/configs/eslint-config-rules/CHANGELOG.json diff --git a/packages/framework/eslint-config-rules/CHANGELOG.md b/packages/configs/eslint-config-rules/CHANGELOG.md similarity index 100% rename from packages/framework/eslint-config-rules/CHANGELOG.md rename to packages/configs/eslint-config-rules/CHANGELOG.md diff --git a/packages/framework/eslint-config-rules/eslint.config.js b/packages/configs/eslint-config-rules/eslint.config.js similarity index 97% rename from packages/framework/eslint-config-rules/eslint.config.js rename to packages/configs/eslint-config-rules/eslint.config.js index 962857bc76..1d55aeb842 100644 --- a/packages/framework/eslint-config-rules/eslint.config.js +++ b/packages/configs/eslint-config-rules/eslint.config.js @@ -38,6 +38,7 @@ module.exports = [ 'no-prototype-builtins': 'off', 'no-undef': 'off', 'react/display-name': 'off', + 'react/react-in-jsx-scope': 'off', // unnecessary with new JSX transform 'react-hooks/exhaustive-deps': 'off', // This should be fixed in the future but is a big change 'no-restricted-exports': [ 'error', diff --git a/packages/framework/eslint-config-rules/package.json b/packages/configs/eslint-config-rules/package.json similarity index 66% rename from packages/framework/eslint-config-rules/package.json rename to packages/configs/eslint-config-rules/package.json index 10df79a3f2..bc44e2e7cb 100644 --- a/packages/framework/eslint-config-rules/package.json +++ b/packages/configs/eslint-config-rules/package.json @@ -7,24 +7,31 @@ "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/eslint-config-rules" }, - "main": "./eslint.config.js", + "license": "MIT", "exports": { ".": "./eslint.config.js", "./eslint.config.js": "./eslint.config.js" }, + "main": "./eslint.config.js", "scripts": { - "build": "fluentui-scripts build" + "build": "fluentui-scripts build", + "build-cjs": "tsgo", + "build-esm": "tsgo", + "lint-package": "fluentui-scripts lint-package" }, - "license": "MIT", "dependencies": { "@microsoft/eslint-plugin-sdl": "^1.1.0", - "@rnx-kit/eslint-plugin": "^0.8.6" + "@rnx-kit/eslint-plugin": "catalog:" }, "devDependencies": { + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", - "@types/eslint": "^9.0.0", - "@types/node": "^22.0.0", - "eslint": "^9.0.0" + "@types/eslint": "^9.6.1", + "@types/node": "catalog:", + "eslint": "^9.39.2" + }, + "furn": { + "packageType": "tooling" }, "beachball": { "shouldPublish": false, diff --git a/packages/framework/eslint-config-rules/tsconfig.json b/packages/configs/eslint-config-rules/tsconfig.json similarity index 100% rename from packages/framework/eslint-config-rules/tsconfig.json rename to packages/configs/eslint-config-rules/tsconfig.json diff --git a/packages/configs/jest-config/package.json b/packages/configs/jest-config/package.json index c777578a28..a171a33313 100644 --- a/packages/configs/jest-config/package.json +++ b/packages/configs/jest-config/package.json @@ -20,7 +20,7 @@ "lint": "fluentui-scripts eslint" }, "dependencies": { - "@rnx-kit/jest-preset": "^0.2.1" + "@rnx-kit/jest-preset": "catalog:" }, "devDependencies": { "@babel/core": "^7.28.0", @@ -33,6 +33,9 @@ "jest-transform-stub": "^2.0.0", "typescript": "^5.8.0" }, + "furn": { + "packageType": "tooling" + }, "beachball": { "shouldPublish": false, "disallowedChangeTypes": [ diff --git a/packages/configs/kit-config/README.md b/packages/configs/kit-config/README.md new file mode 100644 index 0000000000..58af27fc71 --- /dev/null +++ b/packages/configs/kit-config/README.md @@ -0,0 +1,3 @@ +# `@fluentui-react-native/babel-config` + +Common babel configuration for the fluentui-react-native repository. diff --git a/packages/configs/kit-config/furn-preset.cjs b/packages/configs/kit-config/furn-preset.cjs new file mode 100644 index 0000000000..e3159bd045 --- /dev/null +++ b/packages/configs/kit-config/furn-preset.cjs @@ -0,0 +1,54 @@ +const { presets } = require('@rnx-kit/align-deps'); +const rnPresets = presets['microsoft/react-native']; + +/** @typedef {import('@rnx-kit/align-deps').Preset} Preset */ + +const rn73preset = rnPresets['0.73']; +const rn74preset = rnPresets['0.74']; + +const toolsPreset = { + 'tools-align-deps': { + name: '@fluentui-react-native/kit-config', + version: 'workspace:*', + devOnly: true, + }, + 'tools-core': { + name: '@fluentui-react-native/scripts', + version: 'workspace:*', + devOnly: true, + capabilities: ['tools-align-deps'], + }, + 'tools-eslint': { + name: '@fluentui-react-native/eslint-config-rules', + version: 'workspace:*', + devOnly: true, + capabilities: ['tools-core'], + }, + 'tools-jest': { + name: '@fluentui-react-native/jest-config', + version: 'workspace:*', + devOnly: true, + capabilities: ['tools-core'], + }, +}; + +module.exports = { + 0.73: { + ...rn73preset, + ...toolsPreset, + 'core-win32': { + name: '@office-iss/react-native-win32', + version: '^0.73.0', + capabilities: ['core'], + }, + }, + 0.74: { + ...rn74preset, + ...toolsPreset, + 'core-win32': { + name: '@office-iss/react-native-win32', + version: '^0.74.0', + capabilities: ['core'], + }, + }, +}; diff --git a/packages/configs/kit-config/package.json b/packages/configs/kit-config/package.json new file mode 100644 index 0000000000..038b1ef354 --- /dev/null +++ b/packages/configs/kit-config/package.json @@ -0,0 +1,39 @@ +{ + "name": "@fluentui-react-native/kit-config", + "private": true, + "version": "0.1.1", + "description": "Rnx-kit configuration for Fluent UI React Native packages", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native", + "directory": "packages/configs/kit-config" + }, + "main": "./rnx-kit.config.cjs", + "exports": { + ".": "./rnx-kit.config.cjs", + "./furn-preset.cjs": "./furn-preset.cjs", + "./rnx-kit.config.cjs": "./rnx-kit.config.cjs" + }, + "license": "MIT", + "scripts": { + "build": "tsgo", + "build-cjs": "tsgo", + "build-esm": "tsgo" + }, + "dependencies": { + "@rnx-kit/align-deps": "^3.4.0", + "@rnx-kit/config": "^0.7.4" + }, + "devDependencies": { + "@rnx-kit/tsconfig": "^2.1.1" + }, + "furn": { + "packageType": "tooling" + }, + "beachball": { + "shouldPublish": false, + "disallowedChangeTypes": [ + "major" + ] + } +} diff --git a/packages/configs/kit-config/rnx-kit.config.cjs b/packages/configs/kit-config/rnx-kit.config.cjs new file mode 100644 index 0000000000..711b5b7fbb --- /dev/null +++ b/packages/configs/kit-config/rnx-kit.config.cjs @@ -0,0 +1,13 @@ +/** @type {import('@rnx-kit/config').KitConfig} */ +const config = { + kitType: 'library', + alignDeps: { + presets: ['@fluentui-react-native/kit-config/furn-preset.cjs'], + requirements: { + development: ['react-native@0.74'], + production: ['react-native@0.73 || 0.74'], + }, + }, +}; + +module.exports = config; diff --git a/packages/configs/kit-config/tsconfig.json b/packages/configs/kit-config/tsconfig.json new file mode 100644 index 0000000000..058e7ed80e --- /dev/null +++ b/packages/configs/kit-config/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@rnx-kit/tsconfig/tsconfig.node.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "noEmit": true + }, + "include": ["."] +} diff --git a/packages/deprecated/foundation-composable/package.json b/packages/deprecated/foundation-composable/package.json index a05efc9c39..1b59ec700a 100644 --- a/packages/deprecated/foundation-composable/package.json +++ b/packages/deprecated/foundation-composable/package.json @@ -2,38 +2,38 @@ "name": "@uifabricshared/foundation-composable", "version": "0.13.11", "description": "Composable component building blocks", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/deprecated/foundation-composable" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@uifabricshared/foundation-settings": "workspace:*" @@ -41,6 +41,7 @@ "devDependencies": { "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/metro-config": "^0.74.0", "@types/jest": "^29.0.0", @@ -55,20 +56,11 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ - "core" + "core", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/deprecated/foundation-compose/package.json b/packages/deprecated/foundation-compose/package.json index 35c74ae4b8..6ed7af946f 100644 --- a/packages/deprecated/foundation-compose/package.json +++ b/packages/deprecated/foundation-compose/package.json @@ -2,38 +2,38 @@ "name": "@uifabricshared/foundation-compose", "version": "1.15.17", "description": "Compose infrastructure", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/deprecated/foundation-compose" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/default-theme": "workspace:*", "@fluentui-react-native/framework-base": "workspace:*", @@ -47,6 +47,7 @@ "devDependencies": { "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -63,13 +64,6 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "depcheck": { - "ignoreMatches": [ - "@fluentui-react-native/default-theme", - "@fluentui-react-native/memo-cache", - "@fluentui-react-native/theme-types" - ] - }, "peerDependenciesMeta": { "@office-iss/react-native-win32": { "optional": true @@ -81,27 +75,26 @@ "optional": true } }, + "furn": { + "depcheck": { + "ignoreMatches": [ + "@fluentui-react-native/default-theme", + "@fluentui-react-native/memo-cache", + "@fluentui-react-native/theme-types" + ] + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "@fluentui-react-native/scripts/configs/align-deps-preset.cjs", - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "core", "core-macos", "core-win32", - "core-windows" + "core-windows", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/deprecated/foundation-settings/package.json b/packages/deprecated/foundation-settings/package.json index 3cfa265bf4..bd30c65075 100644 --- a/packages/deprecated/foundation-settings/package.json +++ b/packages/deprecated/foundation-settings/package.json @@ -2,38 +2,38 @@ "name": "@uifabricshared/foundation-settings", "version": "0.15.11", "description": "Settings and style definitions and helpers", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/deprecated/foundation-settings" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*" }, @@ -42,6 +42,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -56,23 +57,14 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", - "core-ios" + "core-ios", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/deprecated/foundation-settings/src/Settings.types.ts b/packages/deprecated/foundation-settings/src/Settings.types.ts index b60833984d..50e60b41ff 100644 --- a/packages/deprecated/foundation-settings/src/Settings.types.ts +++ b/packages/deprecated/foundation-settings/src/Settings.types.ts @@ -1,5 +1,3 @@ -/* eslint-disable */ - export interface ISlotProps { root: TProps; } diff --git a/packages/deprecated/foundation-tokens/package.json b/packages/deprecated/foundation-tokens/package.json index ca11f4aa04..2ed610d200 100644 --- a/packages/deprecated/foundation-tokens/package.json +++ b/packages/deprecated/foundation-tokens/package.json @@ -2,42 +2,42 @@ "name": "@uifabricshared/foundation-tokens", "version": "0.15.17", "description": "Core tokens package", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/deprecated/foundation-tokens" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/tokens": "workspace:*", - "@types/node": "^22.0.0", + "@types/node": "catalog:", "@uifabricshared/foundation-settings": "workspace:*" }, "devDependencies": { @@ -45,7 +45,9 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", + "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", "@types/jest": "^29.0.0", @@ -56,45 +58,37 @@ "react-native-windows": "^0.74.0" }, "peerDependencies": { - "@office-iss/react-native-win32": "^0.74.0", + "@office-iss/react-native-win32": "^0.73.0 || ^0.74.0", "react": "18.2.0", "react-native": "^0.73.0 || ^0.74.0", "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", "core-macos", - "core-windows" + "core-win32", + "core-windows", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/deprecated/theme-registry/package.json b/packages/deprecated/theme-registry/package.json index 91ba3ebfe1..0dbd0e0a82 100644 --- a/packages/deprecated/theme-registry/package.json +++ b/packages/deprecated/theme-registry/package.json @@ -2,44 +2,45 @@ "name": "@uifabricshared/theme-registry", "version": "0.12.10", "description": "Implementation of the theme graph", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/deprecated/theme-registry" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "devDependencies": { "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -47,30 +48,21 @@ "react": "18.2.0", "react-native": "^0.74.0" }, + "peerDependencies": { + "react": "18.2.0", + "react-native": "^0.73.0 || ^0.74.0" + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", - "core-ios" + "core-ios", + "tools-core" ] - } - }, - "peerDependencies": { - "react": "18.2.0", - "react-native": "^0.73.0 || ^0.74.0" + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/deprecated/themed-settings/package.json b/packages/deprecated/themed-settings/package.json index 484162d516..9aa8c3e011 100644 --- a/packages/deprecated/themed-settings/package.json +++ b/packages/deprecated/themed-settings/package.json @@ -2,38 +2,38 @@ "name": "@uifabricshared/themed-settings", "version": "0.12.11", "description": "Package which drives custom cacheable settings for a component", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/deprecated/themed-settings" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@uifabricshared/foundation-settings": "workspace:*" @@ -43,11 +43,12 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", "@types/jest": "^29.0.0", - "@types/node": "^22.0.0", + "@types/node": "catalog:", "react": "18.2.0", "react-native": "^0.74.0" }, @@ -58,23 +59,14 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", - "core-ios" + "core-ios", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/deprecated/theming-ramp/package.json b/packages/deprecated/theming-ramp/package.json index 7d3d40707a..9b174ef181 100644 --- a/packages/deprecated/theming-ramp/package.json +++ b/packages/deprecated/theming-ramp/package.json @@ -2,38 +2,38 @@ "name": "@uifabricshared/theming-ramp", "version": "0.20.17", "description": "Theming Library", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/deprecated/theming-ramp" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/theme-types": "workspace:*", @@ -43,6 +43,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@react-native/metro-config": "^0.74.0", @@ -58,20 +59,11 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ - "core" + "core", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/deprecated/theming-ramp/src/SettingsWorker.ts b/packages/deprecated/theming-ramp/src/SettingsWorker.ts index 9f443cb185..aedf23ec24 100644 --- a/packages/deprecated/theming-ramp/src/SettingsWorker.ts +++ b/packages/deprecated/theming-ramp/src/SettingsWorker.ts @@ -4,7 +4,6 @@ import type { IComponentSettings } from '@uifabricshared/foundation-settings'; /** helper to strip out the component settings specific bits from the returned structure */ export function returnAsSlotProps(target: IComponentSettings): IComponentSettings { if (target) { - // eslint-disable-next-line @typescript-eslint/no-unused-vars const { _overrides, _precedence, ...settings } = target; return settings; } diff --git a/packages/deprecated/theming-react-native/package.json b/packages/deprecated/theming-react-native/package.json index 96f0343ea7..8cd342e1ca 100644 --- a/packages/deprecated/theming-react-native/package.json +++ b/packages/deprecated/theming-react-native/package.json @@ -2,38 +2,38 @@ "name": "@uifabricshared/theming-react-native", "version": "0.20.20", "description": "A library of functions which produce React Native styles from a Theme", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "keywords": [], + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/deprecated/theming-react-native" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/deprecated/theming-react-native" - }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/default-theme": "workspace:*", "@fluentui-react-native/win32-theme": "workspace:*", @@ -44,6 +44,7 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -61,20 +62,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -82,19 +83,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/ActivityIndicator/package.json b/packages/experimental/ActivityIndicator/package.json index 7260161c00..ffe9203618 100644 --- a/packages/experimental/ActivityIndicator/package.json +++ b/packages/experimental/ActivityIndicator/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/experimental-activity-indicator", "version": "0.10.18", "description": "A cross-platform Fluent Activity Indicator component", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/ActivityIndicator" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/ActivityIndicator" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -36,6 +38,8 @@ "devDependencies": { "@babel/core": "^7.20.0", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -54,22 +58,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -78,19 +80,10 @@ "core-macos", "core-windows", "react", - "svg" + "svg", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/ActivityIndicator/src/ActivityIndicator.mobile.tsx b/packages/experimental/ActivityIndicator/src/ActivityIndicator.mobile.tsx index e213cf0d4f..b070182f20 100644 --- a/packages/experimental/ActivityIndicator/src/ActivityIndicator.mobile.tsx +++ b/packages/experimental/ActivityIndicator/src/ActivityIndicator.mobile.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { useRef, useEffect, useCallback } from 'react'; import { Animated, Easing, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, buildUseStyling } from '@fluentui-react-native/framework'; +import { compose, mergeProps, buildUseStyling } from '@fluentui-react-native/framework'; import { Svg, Path } from 'react-native-svg'; import type { SvgProps } from 'react-native-svg'; diff --git a/packages/experimental/ActivityIndicator/src/CoreActivityIndicator.tsx b/packages/experimental/ActivityIndicator/src/CoreActivityIndicator.tsx index c9e81c5a7c..569b212ff6 100644 --- a/packages/experimental/ActivityIndicator/src/CoreActivityIndicator.tsx +++ b/packages/experimental/ActivityIndicator/src/CoreActivityIndicator.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { ActivityIndicator as CoreActivityIndicator } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots } from '@fluentui-react-native/framework'; +import { compose } from '@fluentui-react-native/framework'; import { coreStylingSettings } from './ActivityIndicator.styling'; import type { CoreActivityIndicatorType, ActivityIndicatorProps } from './ActivityIndicator.types'; diff --git a/packages/experimental/AppearanceAdditions/package.json b/packages/experimental/AppearanceAdditions/package.json index 78c1038d14..d200d53b0f 100644 --- a/packages/experimental/AppearanceAdditions/package.json +++ b/packages/experimental/AppearanceAdditions/package.json @@ -2,35 +2,35 @@ "name": "@fluentui-react-native/experimental-appearance-additions", "version": "0.7.17", "description": "A module to expose callbacks for additional traitCollection changes.", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/AppearanceAdditions" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/AppearanceAdditions" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -41,6 +41,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/framework": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -58,39 +59,30 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/AppearanceAdditions/src/NativeAppearanceAdditions.ts b/packages/experimental/AppearanceAdditions/src/NativeAppearanceAdditions.ts index 6d9e3c8356..f3ca3c1fb6 100644 --- a/packages/experimental/AppearanceAdditions/src/NativeAppearanceAdditions.ts +++ b/packages/experimental/AppearanceAdditions/src/NativeAppearanceAdditions.ts @@ -1,9 +1,8 @@ import type { AccessibilityContrastOption, SizeClass, UserInterfaceLevel } from './NativeAppearanceAdditions.types'; export const NativeAppearanceAdditions = { - // eslint-disable-next-line @typescript-eslint/no-empty-function addListener: (_: string) => {}, - // eslint-disable-next-line @typescript-eslint/no-empty-function + removeListeners: (_: number) => {}, initializeTraitCollection: (_: number) => { console.warn('NativeAppearanceAdditions is only available on iOS'); diff --git a/packages/experimental/Avatar/package.json b/packages/experimental/Avatar/package.json index fabf0f036a..bbc7801a91 100644 --- a/packages/experimental/Avatar/package.json +++ b/packages/experimental/Avatar/package.json @@ -2,35 +2,35 @@ "name": "@fluentui-react-native/experimental-avatar", "version": "0.21.19", "description": "A cross-platform Avatar component using the Fluent Design System. Currently only implemented on iOS", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Avatar" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Avatar" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*" @@ -39,6 +39,8 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -57,20 +59,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -79,19 +81,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Avatar/src/NativeAvatar.tsx b/packages/experimental/Avatar/src/NativeAvatar.tsx index 5610b2f1fe..a4770e90be 100644 --- a/packages/experimental/Avatar/src/NativeAvatar.tsx +++ b/packages/experimental/Avatar/src/NativeAvatar.tsx @@ -3,13 +3,12 @@ * Licensed under the MIT License. * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ImageURISource, ViewProps, ColorValue } from 'react-native'; import { NativeModules, TurboModuleRegistry } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, buildProps, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, buildProps, mergeProps } from '@fluentui-react-native/framework'; const avatarName = 'NativeAvatar'; diff --git a/packages/experimental/Checkbox/package.json b/packages/experimental/Checkbox/package.json index 030cbb2f7c..fe2fbf858a 100644 --- a/packages/experimental/Checkbox/package.json +++ b/packages/experimental/Checkbox/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/experimental-checkbox", "version": "0.17.24", "description": "A cross-platform Checkbox component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Checkbox" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Checkbox" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -38,6 +40,8 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -57,22 +61,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -81,19 +83,10 @@ "core-macos", "core-windows", "react", - "svg" + "svg", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Checkbox/src/Checkbox.macos.tsx b/packages/experimental/Checkbox/src/Checkbox.macos.tsx index 7880e9f076..168bcf4fcd 100644 --- a/packages/experimental/Checkbox/src/Checkbox.macos.tsx +++ b/packages/experimental/Checkbox/src/Checkbox.macos.tsx @@ -3,13 +3,12 @@ * Licensed under the MIT License. * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { IViewProps } from '@fluentui-react-native/adapters'; import type { CheckboxTokens, CheckboxProps, CheckboxState } from '@fluentui-react-native/checkbox'; import { checkboxName } from '@fluentui-react-native/checkbox'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, buildProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps, buildProps } from '@fluentui-react-native/framework'; import NativeCheckboxView from './MacOSCheckboxNativeComponent'; diff --git a/packages/experimental/Checkbox/src/Checkbox.tsx b/packages/experimental/Checkbox/src/Checkbox.tsx index 4601ee9541..02740895ba 100644 --- a/packages/experimental/Checkbox/src/Checkbox.tsx +++ b/packages/experimental/Checkbox/src/Checkbox.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { CheckboxV1 } from '@fluentui-react-native/checkbox'; if (__DEV__) { diff --git a/packages/experimental/Drawer/package.json b/packages/experimental/Drawer/package.json index 85af285063..e20c8a55af 100644 --- a/packages/experimental/Drawer/package.json +++ b/packages/experimental/Drawer/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/drawer", "version": "0.4.19", "description": "A cross-platform Drawer component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/components/Drawer" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/components/Drawer" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -39,7 +41,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -58,22 +62,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -82,19 +84,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Drawer/src/Drawer.tsx b/packages/experimental/Drawer/src/Drawer.tsx index 50b5a77e65..c94e088193 100644 --- a/packages/experimental/Drawer/src/Drawer.tsx +++ b/packages/experimental/Drawer/src/Drawer.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Animated, Modal, TouchableWithoutFeedback, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { stylingSettings } from './Drawer.styling'; import type { DrawerType, DrawerProps } from './Drawer.types'; diff --git a/packages/experimental/Drawer/src/__tests__/Drawer.test.tsx b/packages/experimental/Drawer/src/__tests__/Drawer.test.tsx index 2985bb540a..32be8c3145 100644 --- a/packages/experimental/Drawer/src/__tests__/Drawer.test.tsx +++ b/packages/experimental/Drawer/src/__tests__/Drawer.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Text } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/experimental/Dropdown/package.json b/packages/experimental/Dropdown/package.json index a8d9e3f8a2..6a6a9b4071 100644 --- a/packages/experimental/Dropdown/package.json +++ b/packages/experimental/Dropdown/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/dropdown", "version": "0.10.31", "description": "A cross-platform Dropdown component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/dropdown" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/dropdown" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -42,6 +44,8 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@react-native/babel-preset": "^0.74.0", @@ -61,22 +65,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,19 +87,10 @@ "core-macos", "core-windows", "react", - "svg" + "svg", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Dropdown/src/Dropdown/Dropdown.tsx b/packages/experimental/Dropdown/src/Dropdown/Dropdown.tsx index a4cf9b6b33..99b0d8986c 100644 --- a/packages/experimental/Dropdown/src/Dropdown/Dropdown.tsx +++ b/packages/experimental/Dropdown/src/Dropdown/Dropdown.tsx @@ -1,12 +1,11 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { View } from 'react-native'; import type { ButtonProps } from '@fluentui-react-native/button'; import { ButtonV1 as Button } from '@fluentui-react-native/button'; import type { UseTokens } from '@fluentui-react-native/framework'; -import { buildUseTokens, compressible, useSlot, withSlots } from '@fluentui-react-native/framework'; +import { buildUseTokens, compressible, useSlot } from '@fluentui-react-native/framework'; import type { PressablePropsExtended } from '@fluentui-react-native/interactive-hooks'; import type { SvgProps } from 'react-native-svg'; import { Path, Svg } from 'react-native-svg'; diff --git a/packages/experimental/Dropdown/src/Listbox/Listbox.tsx b/packages/experimental/Dropdown/src/Listbox/Listbox.tsx index 6e0fa36e72..572beef5ae 100644 --- a/packages/experimental/Dropdown/src/Listbox/Listbox.tsx +++ b/packages/experimental/Dropdown/src/Listbox/Listbox.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { View } from 'react-native'; @@ -7,7 +6,7 @@ import type { IViewProps } from '@fluentui-react-native/adapters'; import type { ICalloutProps } from '@fluentui-react-native/callout'; import { Callout } from '@fluentui-react-native/callout'; import type { UseTokens } from '@fluentui-react-native/framework'; -import { buildUseTokens, compressible, useSlot, withSlots } from '@fluentui-react-native/framework'; +import { buildUseTokens, compressible, useSlot } from '@fluentui-react-native/framework'; import type { ListboxProps, ListboxTokens } from './Listbox.types'; import { listboxName } from './Listbox.types'; diff --git a/packages/experimental/Dropdown/src/Option/Option.tsx b/packages/experimental/Dropdown/src/Option/Option.tsx index 20d9eefc86..a6382d8a9f 100644 --- a/packages/experimental/Dropdown/src/Option/Option.tsx +++ b/packages/experimental/Dropdown/src/Option/Option.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React from 'react'; import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { Path, Svg } from 'react-native-svg'; diff --git a/packages/experimental/Expander/package.json b/packages/experimental/Expander/package.json index 23d8de2021..193bcf7df0 100644 --- a/packages/experimental/Expander/package.json +++ b/packages/experimental/Expander/package.json @@ -2,37 +2,38 @@ "name": "@fluentui-react-native/experimental-expander", "version": "0.8.18", "description": "A cross-platform Native Expander component using the Fluent Design System. Currently only implemented on windows", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Expander" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "test": "fluentui-scripts jest", + "update-api": "fluentui-scripts update-api-extractor", "update-snapshots": "fluentui-scripts jest -u", "verify-api": "fluentui-scripts verify-api-extractor", - "update-api": "fluentui-scripts update-api-extractor", "windows": "react-native run-windows" }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Expander" - }, "dependencies": { "@fluentui-react-native/framework": "workspace:*" }, @@ -40,6 +41,8 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -56,20 +59,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -77,19 +80,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Expander/src/Expander.tsx b/packages/experimental/Expander/src/Expander.tsx index 3acbb38c5d..3f457ecc96 100644 --- a/packages/experimental/Expander/src/Expander.tsx +++ b/packages/experimental/Expander/src/Expander.tsx @@ -4,12 +4,11 @@ * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, buildProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps, buildProps } from '@fluentui-react-native/framework'; import type { ExpanderType, ExpanderProps, ExpanderViewProps } from './Expander.types'; import { expanderName } from './Expander.types'; diff --git a/packages/experimental/MenuButton/package.json b/packages/experimental/MenuButton/package.json index 1849e92f6d..e30f4cc933 100644 --- a/packages/experimental/MenuButton/package.json +++ b/packages/experimental/MenuButton/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/experimental-menu-button", "version": "0.10.37", "description": "A cross-platform MenuButton component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/MenuButton" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/MenuButton" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/button": "workspace:*", @@ -39,7 +41,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -61,22 +65,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,20 +87,11 @@ "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/MenuButton/src/MenuButton.tsx b/packages/experimental/MenuButton/src/MenuButton.tsx index 53825c1360..f6e92aaf29 100644 --- a/packages/experimental/MenuButton/src/MenuButton.tsx +++ b/packages/experimental/MenuButton/src/MenuButton.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import React, { useRef, useState, useCallback, useMemo } from 'react'; import { Platform } from 'react-native'; import { ButtonV1 as Button } from '@fluentui-react-native/button'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots } from '@fluentui-react-native/framework'; +import { compose } from '@fluentui-react-native/framework'; import { SvgXml } from 'react-native-svg'; import { stylingSettings } from './MenuButton.styling'; @@ -77,7 +76,7 @@ export const MenuButton = compose({ style, componentRef: stdBtnRef, onClick: toggleShowContextualMenu, - iconOnly: content ? false : true, + iconOnly: !content, accessibilityState: { expanded: showContextualMenu }, accessibilityActions: defaultAccessibilityActions, onAccessibilityAction, diff --git a/packages/experimental/MenuButton/src/__tests__/MenuButton.test.tsx b/packages/experimental/MenuButton/src/__tests__/MenuButton.test.tsx index d049e64555..57a0f1bb3e 100644 --- a/packages/experimental/MenuButton/src/__tests__/MenuButton.test.tsx +++ b/packages/experimental/MenuButton/src/__tests__/MenuButton.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import type { MenuButtonItemProps } from '..'; diff --git a/packages/experimental/MenuButton/src/renderContextualMenu.tsx b/packages/experimental/MenuButton/src/renderContextualMenu.tsx index 1f7828378a..f19f3cd706 100644 --- a/packages/experimental/MenuButton/src/renderContextualMenu.tsx +++ b/packages/experimental/MenuButton/src/renderContextualMenu.tsx @@ -1,5 +1,3 @@ -/** @jsxRuntime classic */ -/* @jsxFrag React.Fragment */ import * as React from 'react'; import type { ContextualMenuProps } from '@fluentui-react-native/contextual-menu'; diff --git a/packages/experimental/NativeDatePicker/package.json b/packages/experimental/NativeDatePicker/package.json index 8a79162a4c..f0ff0f5893 100644 --- a/packages/experimental/NativeDatePicker/package.json +++ b/packages/experimental/NativeDatePicker/package.json @@ -2,40 +2,41 @@ "name": "@fluentui-react-native/experimental-native-date-picker", "version": "0.11.5", "description": "A Native date picker component using the Fluent Design System. Currently only implemented on iOS.", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/NativeDatePicker" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/NativeDatePicker" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "devDependencies": { "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -49,24 +50,15 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", - "react" + "react", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/NativeFontMetrics/package.json b/packages/experimental/NativeFontMetrics/package.json index b2002f5592..c4e1be1d0b 100644 --- a/packages/experimental/NativeFontMetrics/package.json +++ b/packages/experimental/NativeFontMetrics/package.json @@ -2,35 +2,35 @@ "name": "@fluentui-react-native/experimental-native-font-metrics", "version": "0.6.5", "description": "A temporary partial wrapper for UIFontMetrics.", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/NativeFontMetrics" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", - "lint": "fluentui-scripts eslint", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/NativeFontMetrics" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "use-subscription": "^1.11.0" @@ -39,6 +39,7 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -53,23 +54,14 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-ios", - "react" + "react", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/NativeFontMetrics/src/NativeFontMetrics.ts b/packages/experimental/NativeFontMetrics/src/NativeFontMetrics.ts index f82f217721..d953c65de6 100644 --- a/packages/experimental/NativeFontMetrics/src/NativeFontMetrics.ts +++ b/packages/experimental/NativeFontMetrics/src/NativeFontMetrics.ts @@ -1,9 +1,8 @@ import type { TextStyle } from './NativeFontMetrics.types'; const NativeFontMetrics = { - // eslint-disable-next-line @typescript-eslint/no-empty-function addListener: (_: string) => {}, - // eslint-disable-next-line @typescript-eslint/no-empty-function + removeListeners: (_: number) => {}, currentScaleFactors: () => { console.warn('NativeFontMetrics is only available on iOS'); diff --git a/packages/experimental/Overflow/package.json b/packages/experimental/Overflow/package.json index 78a7638631..d9d4cbc6ac 100644 --- a/packages/experimental/Overflow/package.json +++ b/packages/experimental/Overflow/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/overflow", "version": "0.3.42", "description": "A cross-platform Overflow component for React Native.", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Overflow" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Overflow" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*" @@ -38,6 +40,7 @@ "@fluentui-react-native/button": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/menu": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", @@ -61,42 +64,31 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Overflow/src/Overflow/Overflow.tsx b/packages/experimental/Overflow/src/Overflow/Overflow.tsx index 56b4e5d891..9ec996449d 100644 --- a/packages/experimental/Overflow/src/Overflow/Overflow.tsx +++ b/packages/experimental/Overflow/src/Overflow/Overflow.tsx @@ -1,4 +1,3 @@ -/** @jsxRuntime classic */ import * as React from 'react'; import { View } from 'react-native'; diff --git a/packages/experimental/Overflow/src/Overflow/useOverflow.ts b/packages/experimental/Overflow/src/Overflow/useOverflow.ts index 100c16deac..84fe4204c4 100644 --- a/packages/experimental/Overflow/src/Overflow/useOverflow.ts +++ b/packages/experimental/Overflow/src/Overflow/useOverflow.ts @@ -71,7 +71,7 @@ export function useOverflow(props: OverflowProps): OverflowInfo { overflowManager.removeItem(id); }, // overflowManager is not needed as a dependency, due to being attached to a ref - // eslint-disable-next-line react-hooks/exhaustive-deps + [overflowItemUpdateCallbacks], ); @@ -162,7 +162,6 @@ export function useOverflow(props: OverflowProps): OverflowInfo { overflowManager.update(containerSize); } // We only want to run this layout effect whenever the container's size updates. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [containerSize]); // On initial mount, wait for layout to run for all items / components before showing. diff --git a/packages/experimental/Overflow/src/OverflowItem/OverflowItem.tsx b/packages/experimental/Overflow/src/OverflowItem/OverflowItem.tsx index f82b1beec9..8ce16638f9 100644 --- a/packages/experimental/Overflow/src/OverflowItem/OverflowItem.tsx +++ b/packages/experimental/Overflow/src/OverflowItem/OverflowItem.tsx @@ -1,4 +1,3 @@ -/** @jsxRuntime classic */ import * as React from 'react'; import type { StyleProp, ViewProps, ViewStyle } from 'react-native'; diff --git a/packages/experimental/Overflow/src/OverflowItem/useOverflowItem.ts b/packages/experimental/Overflow/src/OverflowItem/useOverflowItem.ts index cb4851eb47..e695dbc1eb 100644 --- a/packages/experimental/Overflow/src/OverflowItem/useOverflowItem.ts +++ b/packages/experimental/Overflow/src/OverflowItem/useOverflowItem.ts @@ -41,7 +41,6 @@ export function useOverflowItem(props: OverflowItemProps): OverflowItemInfo { updateItem({ id: overflowID, size: size, priority: priority }); } // The item's size updates whenever the onLayout callback runs. This is purely for updating the item info when its priority changes. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [priority]); React.useEffect(() => { @@ -49,7 +48,6 @@ export function useOverflowItem(props: OverflowItemProps): OverflowItemInfo { return () => disconnect(overflowID); // Runs when mounting / unmounting / whenever an onOverflowItemChange callback is added. Register / disconnect shouldn't be called at any // other point. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [onOveflowItemChange]); React.useLayoutEffect(() => { @@ -63,7 +61,6 @@ export function useOverflowItem(props: OverflowItemProps): OverflowItemInfo { } } // This effect should only run when the size of the item or container changes. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [size, containerSize]); const onLayout = React.useCallback( diff --git a/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx b/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx index cc7cdf8d5a..c99a0f52c6 100644 --- a/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx +++ b/packages/experimental/Overflow/src/__tests__/Overflow.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { ButtonV1 } from '@fluentui-react-native/button'; import { Menu, MenuPopover, MenuTrigger, MenuItem } from '@fluentui-react-native/menu'; import * as renderer from 'react-test-renderer'; diff --git a/packages/experimental/Popover/package.json b/packages/experimental/Popover/package.json index e59569f725..ee08e40fa0 100644 --- a/packages/experimental/Popover/package.json +++ b/packages/experimental/Popover/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/popover", "version": "0.4.17", "description": "A cross-platform Popover component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/popover" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/popover" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -37,6 +39,8 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -53,22 +57,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -76,19 +78,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Popover/src/Popover.tsx b/packages/experimental/Popover/src/Popover.tsx index fcdcf50e53..d0223c4275 100644 --- a/packages/experimental/Popover/src/Popover.tsx +++ b/packages/experimental/Popover/src/Popover.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { UseTokens } from '@fluentui-react-native/framework'; import { compressible, buildUseTokens } from '@fluentui-react-native/framework'; diff --git a/packages/experimental/Shadow/package.json b/packages/experimental/Shadow/package.json index e56d419745..ee77f8d5f7 100644 --- a/packages/experimental/Shadow/package.json +++ b/packages/experimental/Shadow/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/experimental-shadow", "version": "0.6.19", "description": "A cross-platform Shadow component using the Fluent Design System", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Shadow" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Shadow" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -39,6 +41,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@react-native/babel-preset": "^0.74.0", @@ -58,22 +61,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -82,19 +83,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Shimmer/package.json b/packages/experimental/Shimmer/package.json index d65d7339fc..82ab78c865 100644 --- a/packages/experimental/Shimmer/package.json +++ b/packages/experimental/Shimmer/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/experimental-shimmer", "version": "0.13.20", "description": "A cross-platform Fluent Shimmer component", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Shimmer" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Shimmer" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -40,7 +42,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -61,22 +65,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -84,20 +86,11 @@ "core-ios", "core-macos", "core-windows", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Shimmer/src/Shimmer.test.tsx b/packages/experimental/Shimmer/src/Shimmer.test.tsx index 140991e837..b7d72ce93e 100644 --- a/packages/experimental/Shimmer/src/Shimmer.test.tsx +++ b/packages/experimental/Shimmer/src/Shimmer.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import * as renderer from 'react-test-renderer'; import { Shimmer } from './Shimmer'; diff --git a/packages/experimental/Shimmer/src/Shimmer.tsx b/packages/experimental/Shimmer/src/Shimmer.tsx index 7f3b728523..d2b1d6aec1 100644 --- a/packages/experimental/Shimmer/src/Shimmer.tsx +++ b/packages/experimental/Shimmer/src/Shimmer.tsx @@ -1,11 +1,10 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { useRef, useEffect, useMemo, useCallback } from 'react'; import type { ScaleXTransform, TranslateXTransform } from 'react-native'; import { Animated, I18nManager } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots, buildUseStyling } from '@fluentui-react-native/framework'; +import { compose, mergeProps, buildUseStyling } from '@fluentui-react-native/framework'; import assertNever from 'assert-never'; import { Circle, ClipPath, Defs, LinearGradient, Rect, Stop, Svg, G } from 'react-native-svg'; diff --git a/packages/experimental/Shimmer/src/Shimmer.win32.tsx b/packages/experimental/Shimmer/src/Shimmer.win32.tsx index ce98d85549..bfd601a444 100644 --- a/packages/experimental/Shimmer/src/Shimmer.win32.tsx +++ b/packages/experimental/Shimmer/src/Shimmer.win32.tsx @@ -4,13 +4,11 @@ * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { processColor, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; import { compose, mergeProps } from '@fluentui-react-native/framework'; -import { withSlots } from '@fluentui-react-native/framework'; import { assertNever } from 'assert-never'; import type { SvgProps } from 'react-native-svg'; import { ClipPath, Defs, LinearGradient, Path, Rect, Stop, Svg } from 'react-native-svg'; diff --git a/packages/experimental/Spinner/package.json b/packages/experimental/Spinner/package.json index ba87e5465b..aa27e6cb0f 100644 --- a/packages/experimental/Spinner/package.json +++ b/packages/experimental/Spinner/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/spinner", "version": "0.9.24", "description": "A cross-platform Fluent spinner component", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Spinner" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Spinner" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/framework": "workspace:*", @@ -39,6 +41,8 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -57,22 +61,20 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -81,19 +83,10 @@ "core-macos", "core-windows", "react", - "svg" + "svg", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Spinner/src/Spinner.android.tsx b/packages/experimental/Spinner/src/Spinner.android.tsx index 0d66fe57f3..603f47a3ac 100644 --- a/packages/experimental/Spinner/src/Spinner.android.tsx +++ b/packages/experimental/Spinner/src/Spinner.android.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { useEffect, useCallback } from 'react'; import type { ColorValue } from 'react-native'; import { Animated, Easing, View } from 'react-native'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import type { UseSlots } from '@fluentui-react-native/framework'; import { Path, Svg } from 'react-native-svg'; import type { SvgProps } from 'react-native-svg'; diff --git a/packages/experimental/Spinner/src/Spinner.tsx b/packages/experimental/Spinner/src/Spinner.tsx index 7e5236bd17..0814cd586c 100644 --- a/packages/experimental/Spinner/src/Spinner.tsx +++ b/packages/experimental/Spinner/src/Spinner.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import { Animated, View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { Svg } from 'react-native-svg'; import type { SpinnerProps, SpinnerType } from './Spinner.types'; diff --git a/packages/experimental/Spinner/src/Spinner.win32.tsx b/packages/experimental/Spinner/src/Spinner.win32.tsx index 059926ccd8..3996afd5f5 100644 --- a/packages/experimental/Spinner/src/Spinner.win32.tsx +++ b/packages/experimental/Spinner/src/Spinner.win32.tsx @@ -4,13 +4,12 @@ * @format */ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ColorValue } from 'react-native'; import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, mergeProps, withSlots } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { TextV1 as Text } from '@fluentui-react-native/text'; import { Path, Svg } from 'react-native-svg'; import type { SvgProps } from 'react-native-svg'; diff --git a/packages/experimental/Stack/package.json b/packages/experimental/Stack/package.json index 2b43e877cc..527778ca63 100644 --- a/packages/experimental/Stack/package.json +++ b/packages/experimental/Stack/package.json @@ -1,34 +1,36 @@ { "name": "@fluentui-react-native/experimental-stack", "version": "0.1.0", + "private": true, "description": "A cross-platform opinionated Fluent Text component", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Stack" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", - "private": true, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Stack" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -39,7 +41,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/text": "workspace:*", "@react-native/babel-preset": "^0.74.0", @@ -61,22 +65,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,19 +87,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Stack/src/Stack.tsx b/packages/experimental/Stack/src/Stack.tsx index f316a470e5..8a7ebd7e82 100644 --- a/packages/experimental/Stack/src/Stack.tsx +++ b/packages/experimental/Stack/src/Stack.tsx @@ -1,12 +1,11 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; import type { ViewProps } from 'react-native'; import { filterViewProps } from '@fluentui-react-native/adapters'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps, getTypedMemoCache } from '@fluentui-react-native/framework'; +import { compose, mergeProps, getTypedMemoCache } from '@fluentui-react-native/framework'; import { stylingSettings } from './Stack.styling'; import { stackName } from './Stack.types'; diff --git a/packages/experimental/Stack/src/StackItem/StackItem.tsx b/packages/experimental/Stack/src/StackItem/StackItem.tsx index 5097bce419..ea4d0eaa3e 100644 --- a/packages/experimental/Stack/src/StackItem/StackItem.tsx +++ b/packages/experimental/Stack/src/StackItem/StackItem.tsx @@ -1,10 +1,9 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import { View } from 'react-native'; import type { UseSlots } from '@fluentui-react-native/framework'; -import { compose, withSlots, mergeProps } from '@fluentui-react-native/framework'; +import { compose, mergeProps } from '@fluentui-react-native/framework'; import { stylingSettings } from './StackItem.styles'; import { stackItemName } from './StackItem.types'; diff --git a/packages/experimental/Stack/src/__tests__/Stack.test.tsx b/packages/experimental/Stack/src/__tests__/Stack.test.tsx index 43739a340c..b3d800d649 100644 --- a/packages/experimental/Stack/src/__tests__/Stack.test.tsx +++ b/packages/experimental/Stack/src/__tests__/Stack.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { Text } from '@fluentui-react-native/text'; import * as renderer from 'react-test-renderer'; diff --git a/packages/experimental/Tooltip/package.json b/packages/experimental/Tooltip/package.json index 6d04cdc6d1..ada535f8f8 100644 --- a/packages/experimental/Tooltip/package.json +++ b/packages/experimental/Tooltip/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/tooltip", "version": "0.4.29", "description": "A cross-platform Tooltip component for React Native.", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/Tooltip" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/Tooltip" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/callout": "workspace:*", @@ -39,6 +41,7 @@ "@fluentui-react-native/button": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -61,42 +64,31 @@ "react-native-svg": ">=15.0.0 <15.13.0 || >=15.4.0 <15.13.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-macos", "core-windows", "react", + "react-test-renderer", "svg", - "react-test-renderer" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/Tooltip/src/Tooltip.tsx b/packages/experimental/Tooltip/src/Tooltip.tsx index 8db684cc14..e20acf27f2 100644 --- a/packages/experimental/Tooltip/src/Tooltip.tsx +++ b/packages/experimental/Tooltip/src/Tooltip.tsx @@ -4,7 +4,6 @@ * @format */ -/** @jsxRuntime classic */ import * as React from 'react'; import { findNodeHandle } from 'react-native'; diff --git a/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx b/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx index 70e5e963e4..9dfe33f119 100644 --- a/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx +++ b/packages/experimental/Tooltip/src/__tests__/Tooltip.test.tsx @@ -1,5 +1,3 @@ -import * as React from 'react'; - import { ButtonV1 } from '@fluentui-react-native/button'; import * as renderer from 'react-test-renderer'; diff --git a/packages/experimental/VibrancyView/package.json b/packages/experimental/VibrancyView/package.json index 68a4c8ccfc..49fc2353a4 100644 --- a/packages/experimental/VibrancyView/package.json +++ b/packages/experimental/VibrancyView/package.json @@ -2,33 +2,35 @@ "name": "@fluentui-react-native/vibrancy-view", "version": "0.3.5", "description": "A native wrapper for NSVisualEffectView on macOS", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/experimental/VibrancyView" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "homepage": "https://github.com/microsoft/fluentui-react-native", - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/experimental/VibrancyView" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*" @@ -37,7 +39,9 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", + "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", "@types/react": "~18.2.0", @@ -47,48 +51,38 @@ "react-native-windows": "^0.74.0" }, "peerDependencies": { - "@office-iss/react-native-win32": "^0.74.0", + "@office-iss/react-native-win32": "^0.73.0 || ^0.74.0", "react": "18.2.0", "react-native": "^0.73.0 || ^0.74.0", "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", "core-macos", + "core-win32", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/experimental/VibrancyView/src/VibrancyView.tsx b/packages/experimental/VibrancyView/src/VibrancyView.tsx index e27005df96..856569ff31 100644 --- a/packages/experimental/VibrancyView/src/VibrancyView.tsx +++ b/packages/experimental/VibrancyView/src/VibrancyView.tsx @@ -1,12 +1,3 @@ -/** - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * @format - */ - -/** @jsxRuntime classic */ -import React from 'react'; - import type { VibrancyViewProps } from './VibrancyView.types'; import NativeVibrancyView from './VibrancyViewNativeComponent'; diff --git a/packages/framework-base/jsx-runtime.js b/packages/framework-base/jsx-runtime.js new file mode 100644 index 0000000000..d8c219a400 --- /dev/null +++ b/packages/framework-base/jsx-runtime.js @@ -0,0 +1 @@ +module.exports = require('./lib-commonjs/jsx-runtime.js'); diff --git a/packages/framework-base/package.json b/packages/framework-base/package.json index 219ed423b1..03c99d945f 100644 --- a/packages/framework-base/package.json +++ b/packages/framework-base/package.json @@ -2,53 +2,67 @@ "name": "@fluentui-react-native/framework-base", "version": "0.2.1", "description": "Base types and utilities fluentui-react-native frameworks", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework-base" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "typings": "lib/index.d.ts", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" }, "./jsx-runtime": { + "types": "./lib/jsx-runtime.d.ts", "import": "./lib/jsx-runtime.js", - "require": "./lib-commonjs/jsx-runtime.js", - "types": "./lib/jsx-runtime.d.ts" + "require": "./lib-commonjs/jsx-runtime.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "keywords": [], - "author": "", - "license": "MIT", - "dependencies": { - "@types/react": "^18.2.0", - "react": "18.2.0" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "devDependencies": { "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@types/jest": "^29.0.0", - "@types/node": "^22.0.0" + "@types/node": "catalog:", + "@types/react": "^18.2.0", + "react": "18.2.0" + }, + "peerDependencies": { + "react": "18.2.0" + }, + "rnx-kit": { + "extends": "@fluentui-react-native/kit-config", + "kitType": "library", + "alignDeps": { + "capabilities": [ + "react", + "tools-core", + "tools-eslint", + "tools-jest" + ] + } } } diff --git a/packages/framework-base/src/immutable-merge/Merge.test.ts b/packages/framework-base/src/immutable-merge/Merge.test.ts index bf64870177..62252a972f 100644 --- a/packages/framework-base/src/immutable-merge/Merge.test.ts +++ b/packages/framework-base/src/immutable-merge/Merge.test.ts @@ -305,7 +305,11 @@ describe('Immutable merge unit tests', () => { const arrayMerger = (...targets: any[]) => { const arrays = targets.filter((t) => Array.isArray(t)); let result = []; - arrays.forEach((v) => (result = result.concat(...v))); + for (const v of arrays) { + if (v.length > 0) { + result = result.concat(...v); + } + } return result; }; diff --git a/packages/framework-base/src/jsx-runtime.ts b/packages/framework-base/src/jsx-runtime.ts index b5f19bddf7..b00a4b673f 100644 --- a/packages/framework-base/src/jsx-runtime.ts +++ b/packages/framework-base/src/jsx-runtime.ts @@ -9,3 +9,6 @@ export function jsx(type: React.ElementType, props: React.PropsWithChildren, key?: React.Key): React.ReactElement { return renderForJsxRuntime(type, props, key, ReactJSX.jsxs); } + +// Re-export Fragment for <> syntax +export { Fragment } from 'react/jsx-runtime'; diff --git a/packages/framework-base/tsconfig.json b/packages/framework-base/tsconfig.json index 89a07a88a9..1c424a0c1d 100644 --- a/packages/framework-base/tsconfig.json +++ b/packages/framework-base/tsconfig.json @@ -1,7 +1,9 @@ { "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", "compilerOptions": { - "outDir": "lib" + "outDir": "lib", + "allowJs": true, + "checkJs": true }, "include": ["src"] } diff --git a/packages/framework/composition/package.json b/packages/framework/composition/package.json index 1519b27d66..5414685b0f 100644 --- a/packages/framework/composition/package.json +++ b/packages/framework/composition/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/composition", "version": "0.11.12", "description": "Composition factories for building HOCs", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/composition" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/use-slots": "workspace:*", @@ -44,6 +44,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -60,24 +61,15 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/framework/composition/src/composeFactory.test.tsx b/packages/framework/composition/src/composeFactory.test.tsx index d37ea7e758..c889f82595 100644 --- a/packages/framework/composition/src/composeFactory.test.tsx +++ b/packages/framework/composition/src/composeFactory.test.tsx @@ -1,9 +1,7 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ViewProps, TextProps, ColorValue } from 'react-native'; import { View, Text } from 'react-native'; -import { withSlots } from '@fluentui-react-native/framework-base'; import type { ThemeHelper } from '@fluentui-react-native/use-styling'; import * as renderer from 'react-test-renderer'; diff --git a/packages/framework/framework/babel.config.js b/packages/framework/framework/babel.config.js index cd365f475c..4f4b7171c4 100644 --- a/packages/framework/framework/babel.config.js +++ b/packages/framework/framework/babel.config.js @@ -1,4 +1,4 @@ module.exports = { - presets: [['module:@react-native/babel-preset', { runtime: 'classic' }]], + presets: [['module:@react-native/babel-preset', { runtime: 'automatic' }]], babelrcRoots: ['experiments/*'], }; diff --git a/packages/framework/framework/package.json b/packages/framework/framework/package.json index 8d0f25dbc9..707cf87cf0 100644 --- a/packages/framework/framework/package.json +++ b/packages/framework/framework/package.json @@ -2,34 +2,36 @@ "name": "@fluentui-react-native/framework", "version": "0.14.17", "description": "Component framework used by fluentui react native controls", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/framework/framework" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "start:tester": "rnx-cli start", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start-test": "fluentui-scripts jest-watch", + "start:tester": "rnx-cli start", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/framework/framework" + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/composition": "workspace:*", @@ -46,6 +48,7 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -65,22 +68,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -89,19 +90,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true }, - "react-native-macos": { - "optional": true - }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/framework/framework/src/compressible.test.tsx b/packages/framework/framework/src/compressible.test.tsx index 9020255e26..776efadba5 100644 --- a/packages/framework/framework/src/compressible.test.tsx +++ b/packages/framework/framework/src/compressible.test.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import type { TextProps, TextStyle } from 'react-native'; import { Text, View } from 'react-native'; @@ -7,7 +6,6 @@ import { Text, View } from 'react-native'; import { mergeStyles } from '@fluentui-react-native/framework-base'; import type { Theme } from '@fluentui-react-native/theme-types'; import { useSlot } from '@fluentui-react-native/use-slot'; -import { withSlots } from '@fluentui-react-native/framework-base'; import { applyTokenLayers } from '@fluentui-react-native/use-tokens'; import * as renderer from 'react-test-renderer'; diff --git a/packages/framework/immutable-merge/package.json b/packages/framework/immutable-merge/package.json index 58da2ef05d..b1c1471130 100644 --- a/packages/framework/immutable-merge/package.json +++ b/packages/framework/immutable-merge/package.json @@ -2,44 +2,63 @@ "name": "@fluentui-react-native/immutable-merge", "version": "1.2.11", "description": "Immutable merge routines for deep customizable merging", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/immutable-merge" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "start": "fluentui-scripts dev", - "start-test": "fluentui-scripts jest-watch", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*" }, "devDependencies": { "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@types/jest": "^29.0.0", - "@types/node": "^22.0.0" + "@types/node": "catalog:", + "react": "18.2.0" + }, + "peerDependencies": { + "react": "18.2.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + } + }, + "rnx-kit": { + "kitType": "library", + "extends": "@fluentui-react-native/kit-config", + "alignDeps": { + "capabilities": [ + "react", + "tools-core", + "tools-eslint" + ] + } } } diff --git a/packages/framework/memo-cache/package.json b/packages/framework/memo-cache/package.json index 81668452e4..b819543d12 100644 --- a/packages/framework/memo-cache/package.json +++ b/packages/framework/memo-cache/package.json @@ -2,45 +2,64 @@ "name": "@fluentui-react-native/memo-cache", "version": "1.3.12", "description": "Layered memoization style cache helper", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/memo-cache" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "start": "fluentui-scripts dev", - "start-test": "fluentui-scripts jest-watch", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*" }, "devDependencies": { "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@types/jest": "^29.0.0", - "@types/node": "^22.0.0", + "@types/node": "catalog:", + "react": "18.2.0", "tslib": "^2.3.1" + }, + "peerDependencies": { + "react": "18.2.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + } + }, + "rnx-kit": { + "kitType": "library", + "extends": "@fluentui-react-native/kit-config", + "alignDeps": { + "capabilities": [ + "react", + "tools-core", + "tools-eslint" + ] + } } } diff --git a/packages/framework/merge-props/package.json b/packages/framework/merge-props/package.json index a148812176..f2dc6d8397 100644 --- a/packages/framework/merge-props/package.json +++ b/packages/framework/merge-props/package.json @@ -2,38 +2,34 @@ "name": "@fluentui-react-native/merge-props", "version": "0.9.11", "description": "Utility for merging props with styles and caching style combinations", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/merge-props" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "test": "fluentui-scripts jest", "lint": "fluentui-scripts eslint", - "start": "fluentui-scripts dev", - "start-test": "fluentui-scripts jest-watch", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*" }, @@ -41,37 +37,29 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", - "@react-native/metro-config": "^0.74.0", "@types/jest": "^29.0.0", - "react": "18.2.0", - "react-native": "^0.74.0" + "react": "18.2.0" }, "peerDependencies": { - "react": "18.2.0", - "react-native": "^0.73.0 || ^0.74.0" + "react": "18.2.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + } }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ - "babel-preset-react-native", - "core", - "core-android", - "core-ios" + "react", + "tools-core", + "tools-eslint" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/framework/theme/package.json b/packages/framework/theme/package.json index e1380a8553..8dd9092f66 100644 --- a/packages/framework/theme/package.json +++ b/packages/framework/theme/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/theme", "version": "0.11.16", "description": "Experimental version of fluentui-react-native theme framework", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/theme" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/theme-types": "workspace:*" @@ -43,6 +43,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@react-native/babel-preset": "^0.74.0", @@ -57,24 +58,15 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", - "react" + "react", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/framework/themed-stylesheet/package.json b/packages/framework/themed-stylesheet/package.json index 0fdc3d70cd..50cbaeb61a 100644 --- a/packages/framework/themed-stylesheet/package.json +++ b/packages/framework/themed-stylesheet/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/themed-stylesheet", "version": "1.7.11", "description": "Helper for using react-native StyleSheets with themes", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/themed-stylesheet" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*" }, @@ -42,6 +42,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -55,23 +56,14 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", - "core-ios" + "core-ios", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/framework/use-slot/package.json b/packages/framework/use-slot/package.json index 0a89e3c095..1f712c21df 100644 --- a/packages/framework/use-slot/package.json +++ b/packages/framework/use-slot/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/use-slot", "version": "0.6.12", "description": "Hook function to use a component as a pluggable slot", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/use-slot" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", - "typings": "lib/index.d.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*" }, @@ -41,6 +41,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/metro-config": "^0.74.0", "@types/jest": "^29.0.0", @@ -57,24 +58,15 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "core", "core-android", "core-ios", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/framework/use-slot/src/useSlot.test.tsx b/packages/framework/use-slot/src/useSlot.test.tsx index 505b02bf4a..f05d40778b 100644 --- a/packages/framework/use-slot/src/useSlot.test.tsx +++ b/packages/framework/use-slot/src/useSlot.test.tsx @@ -1,5 +1,4 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import * as React from 'react'; import type { TextProps } from 'react-native'; import { Text, View } from 'react-native'; @@ -10,7 +9,6 @@ import * as renderer from 'react-test-renderer'; import type { NativeReactType } from '@fluentui-react-native/framework-base'; import { stagedComponent } from '@fluentui-react-native/framework-base'; import { useSlot } from './useSlot'; -import { withSlots } from '@fluentui-react-native/framework-base'; type PluggableTextProps = React.PropsWithChildren & { inner?: NativeReactType | React.FunctionComponent }; diff --git a/packages/framework/use-slots/package.json b/packages/framework/use-slots/package.json index 38a5199d7d..f1b2a04709 100644 --- a/packages/framework/use-slots/package.json +++ b/packages/framework/use-slots/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/use-slots", "version": "0.10.12", "description": "Hook function to return styled slots", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/use-slots" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/use-slot": "workspace:*" @@ -43,6 +43,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -59,25 +60,16 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/framework/use-slots/src/buildUseSlots.test.tsx b/packages/framework/use-slots/src/buildUseSlots.test.tsx index c04f126622..5b48b3e6e0 100644 --- a/packages/framework/use-slots/src/buildUseSlots.test.tsx +++ b/packages/framework/use-slots/src/buildUseSlots.test.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { ViewProps, TextProps } from 'react-native'; import { View, Text } from 'react-native'; -import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base'; +import { stagedComponent } from '@fluentui-react-native/framework-base'; import * as renderer from 'react-test-renderer'; import { buildUseSlots } from './buildUseSlots'; diff --git a/packages/framework/use-slots/src/useSlots.samples.test.tsx b/packages/framework/use-slots/src/useSlots.samples.test.tsx index 20a19879fb..72be5e9ff0 100644 --- a/packages/framework/use-slots/src/useSlots.samples.test.tsx +++ b/packages/framework/use-slots/src/useSlots.samples.test.tsx @@ -1,9 +1,8 @@ -/** @jsxRuntime classic */ -/** @jsx withSlots */ +/** @jsxImportSource @fluentui-react-native/framework-base */ import type { CSSProperties } from 'react'; import { mergeProps } from '@fluentui-react-native/framework-base'; -import { withSlots, stagedComponent } from '@fluentui-react-native/framework-base'; +import { stagedComponent } from '@fluentui-react-native/framework-base'; import * as renderer from 'react-test-renderer'; import { buildUseSlots } from './buildUseSlots'; diff --git a/packages/framework/use-styling/package.json b/packages/framework/use-styling/package.json index 71b5e4c155..8c64f07d06 100644 --- a/packages/framework/use-styling/package.json +++ b/packages/framework/use-styling/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/use-styling", "version": "0.13.12", "description": "Opinionated use styling hook implementation", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/use-styling" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/use-tokens": "workspace:*" @@ -43,6 +43,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -53,32 +54,23 @@ "react-native": "^0.74.0", "react-test-renderer": "18.2.0" }, + "peerDependencies": { + "react": "18.2.0", + "react-native": "^0.73.0 || ^0.74.0" + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependencies": { - "react": "18.2.0", - "react-native": "^0.73.0 || ^0.74.0" + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/framework/use-tokens/package.json b/packages/framework/use-tokens/package.json index 3deedb2fb1..d46aa5832c 100644 --- a/packages/framework/use-tokens/package.json +++ b/packages/framework/use-tokens/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/use-tokens", "version": "0.6.12", "description": "Utilities and hook function for getting themed tokens for a component", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native", "directory": "packages/framework/use-tokens" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*" }, @@ -42,6 +42,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -52,32 +53,23 @@ "react-native": "^0.74.0", "react-test-renderer": "18.2.0" }, + "peerDependencies": { + "react": "18.2.0", + "react-native": "^0.73.0 || ^0.74.0" + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependencies": { - "react": "18.2.0", - "react-native": "^0.73.0 || ^0.74.0" + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/libraries/core/babel.config.js b/packages/libraries/core/babel.config.js index cd365f475c..4f4b7171c4 100644 --- a/packages/libraries/core/babel.config.js +++ b/packages/libraries/core/babel.config.js @@ -1,4 +1,4 @@ module.exports = { - presets: [['module:@react-native/babel-preset', { runtime: 'classic' }]], + presets: [['module:@react-native/babel-preset', { runtime: 'automatic' }]], babelrcRoots: ['experiments/*'], }; diff --git a/packages/libraries/core/package.json b/packages/libraries/core/package.json index 8a7e4223a8..04a6220958 100644 --- a/packages/libraries/core/package.json +++ b/packages/libraries/core/package.json @@ -2,35 +2,36 @@ "name": "@fluentui/react-native", "version": "0.42.31", "description": "A react-native component library that implements the Fluent Design System.", - "license": "MIT", "repository": { "type": "git", "url": "git@github.com:microsoft/fluentui-react-native.git", "directory": "packages/libraries/core" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "sideEffects": false, "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", - "just": "fluentui-scripts", "lint": "fluentui-scripts eslint", - "start:tester": "rnx-cli start", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start-test": "fluentui-scripts jest-watch", + "start:tester": "rnx-cli start", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/button": "workspace:*", @@ -50,6 +51,22 @@ "@fluentui-react-native/tablist": "workspace:*", "@fluentui-react-native/text": "workspace:*" }, + "devDependencies": { + "@babel/core": "^7.20.0", + "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", + "@fluentui-react-native/scripts": "workspace:*", + "@react-native/babel-preset": "^0.74.0", + "@react-native/metro-config": "^0.74.0", + "@rnx-kit/cli": "^0.18.14", + "@types/react": "~18.2.0", + "react": "18.2.0", + "react-native": "^0.74.0", + "react-native-macos": "^0.74.0", + "react-native-svg": ">=15.4.0 <15.13.0", + "react-native-windows": "^0.74.0" + }, "peerDependencies": { "@office-iss/react-native-win32": "^0.74.0", "react": "18.2.0", @@ -69,32 +86,9 @@ "optional": true } }, - "devDependencies": { - "@babel/core": "^7.20.0", - "@fluentui-react-native/eslint-config-rules": "workspace:*", - "@fluentui-react-native/jest-config": "workspace:*", - "@fluentui-react-native/scripts": "workspace:*", - "@react-native/babel-preset": "^0.74.0", - "@react-native/metro-config": "^0.74.0", - "@rnx-kit/cli": "^0.18.14", - "@types/react": "~18.2.0", - "react": "18.2.0", - "react-native": "^0.74.0", - "react-native-macos": "^0.74.0", - "react-native-svg": ">=15.4.0 <15.13.0", - "react-native-windows": "^0.74.0" - }, "rnx-kit": { "kitType": "library", "alignDeps": { - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -103,9 +97,10 @@ "core-macos", "core-windows", "react", - "svg" + "svg", + "tools-core" ] - } - }, - "sideEffects": false + }, + "extends": "@fluentui-react-native/kit-config" + } } diff --git a/packages/libraries/core/tsconfig.json b/packages/libraries/core/tsconfig.json index a9d3e78c42..715c7d0065 100644 --- a/packages/libraries/core/tsconfig.json +++ b/packages/libraries/core/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "@fluentui-react-native/scripts/configs/tsconfig.json", "compilerOptions": { - "baseUrl": ".", "jsx": "react", "outDir": "lib", "declaration": true, diff --git a/packages/theming/android-theme/package.json b/packages/theming/android-theme/package.json index d618281feb..0cde4a8ffa 100644 --- a/packages/theming/android-theme/package.json +++ b/packages/theming/android-theme/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/android-theme", "version": "0.25.17", "description": "A FluentUI React Native theme that pulls constants from FluentUI Android", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/theming/android-theme" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/theme": "workspace:*", @@ -46,6 +46,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -62,20 +63,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -83,19 +84,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/theming/apple-theme/package.json b/packages/theming/apple-theme/package.json index a38ac873b5..f718a5fbcc 100644 --- a/packages/theming/apple-theme/package.json +++ b/packages/theming/apple-theme/package.json @@ -2,37 +2,37 @@ "name": "@fluentui-react-native/apple-theme", "version": "0.28.17", "description": "A FluentUI React Native theme that pulls constants from FluentUI Apple", + "homepage": "https://github.com/microsoft/fluentui-react-native", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/theming/apple-theme" + }, "license": "MIT", "author": "Microsoft ", - "homepage": "https://github.com/microsoft/fluentui-react-native", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/theming/apple-theme" + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/default-theme": "workspace:*", @@ -51,6 +51,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -67,20 +68,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -88,19 +89,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/theming/default-theme/package.json b/packages/theming/default-theme/package.json index 10fa8157df..6043da14e2 100644 --- a/packages/theming/default-theme/package.json +++ b/packages/theming/default-theme/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/default-theme", "version": "0.26.17", "description": "Typing only package for fluentui-react-native theme types", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/theming/default-theme" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/framework-base": "workspace:*", "@fluentui-react-native/theme": "workspace:*", @@ -47,6 +47,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -64,20 +65,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,19 +86,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/theming/default-theme/src/stockWebPalette.macos.ts b/packages/theming/default-theme/src/stockWebPalette.macos.ts index d4441c8d3b..f97a3fa48f 100644 --- a/packages/theming/default-theme/src/stockWebPalette.macos.ts +++ b/packages/theming/default-theme/src/stockWebPalette.macos.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import { globalTokens } from '@fluentui-react-native/theme-tokens'; import type { ThemeColorDefinition } from '@fluentui-react-native/theme-types'; diff --git a/packages/theming/default-theme/src/stockWebPalette.win32.ts b/packages/theming/default-theme/src/stockWebPalette.win32.ts index d4441c8d3b..f97a3fa48f 100644 --- a/packages/theming/default-theme/src/stockWebPalette.win32.ts +++ b/packages/theming/default-theme/src/stockWebPalette.win32.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import { globalTokens } from '@fluentui-react-native/theme-tokens'; import type { ThemeColorDefinition } from '@fluentui-react-native/theme-types'; diff --git a/packages/theming/theme-tokens/package.json b/packages/theming/theme-tokens/package.json index b8de6f37e2..2e4c0e4b08 100644 --- a/packages/theming/theme-tokens/package.json +++ b/packages/theming/theme-tokens/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/theme-tokens", "version": "0.27.11", "description": "Defines values for tokens used to fill out themes.", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/theming/theme-tokens" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/design-tokens-android": "^0.53.0", "@fluentui-react-native/design-tokens-ios": "^0.53.0", @@ -46,6 +46,7 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -59,24 +60,15 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", - "react" + "react", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/theming/theme-types/package.json b/packages/theming/theme-types/package.json index 69d6e6b8e3..826a7f58bf 100644 --- a/packages/theming/theme-types/package.json +++ b/packages/theming/theme-types/package.json @@ -2,42 +2,43 @@ "name": "@fluentui-react-native/theme-types", "version": "0.43.0", "description": "Typing only package for fluentui-react-native theme types", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/theming/theme-types" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "devDependencies": { "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -52,24 +53,15 @@ "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", - "react" + "react", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/theming/theming-utils/package.json b/packages/theming/theming-utils/package.json index 510a037411..ea883a9c90 100644 --- a/packages/theming/theming-utils/package.json +++ b/packages/theming/theming-utils/package.json @@ -7,27 +7,29 @@ "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/theming/theming-utils" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/theme-types": "workspace:*", @@ -40,6 +42,7 @@ "@fluentui-react-native/design-tokens-windows": "^0.53.0", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -56,22 +59,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -79,19 +80,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/theming/win32-theme/package.json b/packages/theming/win32-theme/package.json index 7a46263de5..8ad7a4116b 100644 --- a/packages/theming/win32-theme/package.json +++ b/packages/theming/win32-theme/package.json @@ -2,38 +2,38 @@ "name": "@fluentui-react-native/win32-theme", "version": "0.38.0", "description": "Win32 office theme that works with the theming native module", + "keywords": [], "repository": { "type": "git", "url": "https://github.com/microsoft/fluentui-react-native.git", "directory": "packages/theming/win32-theme" }, - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", + "lint-package": "fluentui-scripts lint-package", + "prettier": "fluentui-scripts prettier", "start": "fluentui-scripts dev", "start-test": "fluentui-scripts jest-watch", "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", - "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" + "update-snapshots": "fluentui-scripts jest -u" }, - "keywords": [], - "author": "", - "license": "MIT", "dependencies": { "@fluentui-react-native/default-theme": "workspace:*", "@fluentui-react-native/design-tokens-win32": "^0.53.0", @@ -48,6 +48,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -65,20 +66,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -86,19 +87,10 @@ "core-ios", "core-macos", "core-windows", - "react" + "react", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/utils/adapters/package.json b/packages/utils/adapters/package.json index d9161dd596..29894f74fa 100644 --- a/packages/utils/adapters/package.json +++ b/packages/utils/adapters/package.json @@ -2,38 +2,41 @@ "name": "@fluentui-react-native/adapters", "version": "0.13.5", "description": "Adapters for working with react-native types", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/utils/adapters" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/utils/adapters" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "devDependencies": { "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", "@react-native/babel-preset": "^0.74.0", @@ -52,43 +55,31 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "@fluentui-react-native/scripts/configs/align-deps-preset.cjs", - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", "core-macos", + "core-win32", "core-windows", - "core-win32" + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/utils/interactive-hooks/package.json b/packages/utils/interactive-hooks/package.json index 05b4abca77..3755359ecb 100644 --- a/packages/utils/interactive-hooks/package.json +++ b/packages/utils/interactive-hooks/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/interactive-hooks", "version": "0.27.19", "description": "Hooks for adding focus, hover, and press semantics to view based components", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/utils/interactive-hooks" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/utils/interactive-hooks" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -39,6 +41,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@fluentui-react-native/test-tools": "workspace:*", "@office-iss/react-native-win32": "^0.74.0", @@ -61,22 +64,20 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", @@ -85,19 +86,10 @@ "core-macos", "core-windows", "react", - "react-test-renderer" + "react-test-renderer", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx b/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx index 76df738426..4ff3950cf0 100644 --- a/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx +++ b/packages/utils/interactive-hooks/src/__tests__/useKeyProps.test.tsx @@ -1,4 +1,3 @@ -import * as React from 'react'; import { Pressable } from 'react-native'; import * as renderer from 'react-test-renderer'; diff --git a/packages/utils/interactive-hooks/src/useControllableValue.ts b/packages/utils/interactive-hooks/src/useControllableValue.ts index c20e4f4ff5..8f55f08a08 100644 --- a/packages/utils/interactive-hooks/src/useControllableValue.ts +++ b/packages/utils/interactive-hooks/src/useControllableValue.ts @@ -20,8 +20,8 @@ type ConvertToValue = (current: unknown) => TValue; * is passed the previous value and returns the new value. * @see https://reactjs.org/docs/uncontrolled-components.html */ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function useControllableValue( + +export function useControllableValue( controlledValue: TValue | undefined, defaultUncontrolledValue: TValue | undefined, ): Readonly<[TValue | undefined, (update: React.SetStateAction) => void]>; diff --git a/packages/utils/styling/package.json b/packages/utils/styling/package.json index c4712653e9..d010f50604 100644 --- a/packages/utils/styling/package.json +++ b/packages/utils/styling/package.json @@ -2,37 +2,40 @@ "name": "@fluentui-react-native/styling-utils", "version": "0.7.5", "description": "Utility functions for styling components in FURN", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/utils/styling" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/utils/styling" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "devDependencies": { "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -43,29 +46,18 @@ "react": "18.2.0", "react-native": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", - "react" + "react", + "tools-core" ] - } + }, + "extends": "@fluentui-react-native/kit-config" } } diff --git a/packages/utils/test-tools/package.json b/packages/utils/test-tools/package.json index 7ce94d8c04..ec4f3dd4b6 100644 --- a/packages/utils/test-tools/package.json +++ b/packages/utils/test-tools/package.json @@ -1,32 +1,35 @@ { "name": "@fluentui-react-native/test-tools", "version": "0.1.1", + "private": true, "description": "Tools and mocks for testing components using jest", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "typings": "lib/index.d.ts", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/utils/test-tools" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", "require": "./lib-commonjs/index.js" } }, - "private": true, + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/utils/test-tools" + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/theme-types": "workspace:*" @@ -35,6 +38,7 @@ "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", "@fluentui-react-native/jest-config": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@types/jest": "^29.0.0", "@types/react": "^18.2.0", @@ -47,9 +51,13 @@ "react": "18.2.0", "react-native": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", "rnx-kit": { - "kitType": "library" + "kitType": "library", + "extends": "@fluentui-react-native/kit-config", + "alignDeps": { + "capabilities": [ + "tools-core" + ] + } } } diff --git a/packages/utils/tokens/package.json b/packages/utils/tokens/package.json index 17ffe67953..74b50ba26c 100644 --- a/packages/utils/tokens/package.json +++ b/packages/utils/tokens/package.json @@ -2,32 +2,34 @@ "name": "@fluentui-react-native/tokens", "version": "0.23.11", "description": "Token interface parts and helpers", - "main": "lib-commonjs/index.js", - "module": "lib/index.js", - "react-native": "src/index.ts", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "packages/utils/tokens" + }, + "license": "MIT", + "author": "", "exports": { ".": { + "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js", - "types": "./lib/index.d.ts" + "require": "./lib-commonjs/index.js" } }, - "typings": "lib/index.d.ts", + "main": "lib-commonjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "fluentui-scripts build", - "just": "fluentui-scripts", + "build-cjs": "tsgo --outDir lib-commonjs", + "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", - "test": "fluentui-scripts jest", - "update-snapshots": "fluentui-scripts jest -u", + "lint-package": "fluentui-scripts lint-package", "prettier": "fluentui-scripts prettier", - "prettier-fix": "fluentui-scripts prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "packages/utils/tokens" + "test": "fluentui-scripts jest", + "update-snapshots": "fluentui-scripts jest -u" }, "dependencies": { "@fluentui-react-native/adapters": "workspace:*", @@ -37,6 +39,7 @@ "@babel/core": "^7.20.0", "@fluentui-react-native/babel-config": "workspace:*", "@fluentui-react-native/eslint-config-rules": "workspace:*", + "@fluentui-react-native/kit-config": "workspace:*", "@fluentui-react-native/scripts": "workspace:*", "@react-native/babel-preset": "^0.74.0", "@react-native/metro-config": "^0.74.0", @@ -53,41 +56,30 @@ "react-native-macos": "^0.73.0 || ^0.74.0", "react-native-windows": "^0.73.0 || ^0.74.0" }, - "author": "", - "license": "MIT", + "peerDependenciesMeta": { + "@office-iss/react-native-win32": { + "optional": true + }, + "react-native-macos": { + "optional": true + }, + "react-native-windows": { + "optional": true + } + }, "rnx-kit": { "kitType": "library", "alignDeps": { - "presets": [ - "microsoft/react-native" - ], - "requirements": { - "development": [ - "react-native@0.74" - ], - "production": [ - "react-native@0.73 || 0.74" - ] - }, "capabilities": [ "babel-preset-react-native", "core", "core-android", "core-ios", "core-macos", - "core-windows" + "core-windows", + "tools-core" ] - } - }, - "peerDependenciesMeta": { - "@office-iss/react-native-win32": { - "optional": true - }, - "react-native-macos": { - "optional": true }, - "react-native-windows": { - "optional": true - } + "extends": "@fluentui-react-native/kit-config" } } diff --git a/scripts/configs/align-deps-preset.cjs b/scripts/configs/align-deps-preset.cjs deleted file mode 100644 index 73fdd4d31b..0000000000 --- a/scripts/configs/align-deps-preset.cjs +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = { - 0.73: { - 'core-win32': { - name: '@office-iss/react-native-win32', - version: '^0.73.0', - capabilities: ['core'], - }, - }, - 0.74: { - 'core-win32': { - name: '@office-iss/react-native-win32', - version: '^0.74.0', - capabilities: ['core'], - }, - }, -}; diff --git a/scripts/configs/tsconfig.json b/scripts/configs/tsconfig.json index f42959578e..38ec934071 100644 --- a/scripts/configs/tsconfig.json +++ b/scripts/configs/tsconfig.json @@ -20,7 +20,7 @@ "skipLibCheck": true, "skipDefaultLibCheck": true, "sourceMap": true, - "jsx": "react", + "jsx": "react-jsx", "resolveJsonModule": true, "types": ["jest", "node"] }, diff --git a/scripts/dynamic.extensions.mjs b/scripts/dynamic.extensions.mjs index 87b4f94688..b68dc85cab 100644 --- a/scripts/dynamic.extensions.mjs +++ b/scripts/dynamic.extensions.mjs @@ -11,7 +11,7 @@ import { getToolVersion } from './src/preinstall/tool-versions.js'; /** * Conditionally add a dependency to the given dependencies object if it is not already present * @param {string[]} depsToAdd - * @param {import('./src/utils/projectRoot.js').PackageManifest} manifest + * @param {import('./src/utils/projectRoot.ts').PackageManifest} manifest * @param {ConditionalCheck | boolean | undefined} condition * @returns {Record} */ @@ -36,7 +36,7 @@ function conditionallyAdd(depsToAdd, manifest, condition) { } /** - * @param {import('./src/utils/projectRoot.js').PackageManifest} manifest - The package manifest. + * @param {import('./src/utils/projectRoot.ts').PackageManifest} manifest - The package manifest. * @returns {boolean} true if prettier is already in the manifest or if a prettier script is defined */ function addPrettier(manifest) { @@ -46,7 +46,7 @@ function addPrettier(manifest) { /** * Check if Jest is already in the manifest or if a Jest script is defined. * @param {string} cwd - The current working directory. - * @param {import('./src/utils/projectRoot.js').PackageManifest} manifest - The package manifest. + * @param {import('./src/utils/projectRoot.ts').PackageManifest} manifest - The package manifest. * @returns {boolean} - True if Jest should be added, false otherwise. */ function addJest(cwd, manifest) { @@ -55,7 +55,7 @@ function addJest(cwd, manifest) { /** * Get the dynamic dependencies for the given package given the package root directory and its manifest. - * @param {{cwd: string, manifest: import('./src/utils/projectRoot.js').PackageManifest}} param0 + * @param {{cwd: string, manifest: import('./src/utils/projectRoot.ts').PackageManifest}} param0 * @returns { { dependencies: Record } } */ export default function ({ cwd, manifest }) { @@ -63,7 +63,9 @@ export default function ({ cwd, manifest }) { return { dependencies: { - ...conditionallyAdd(['typescript', '@types/node', '@types/jest'], manifest, () => fs.existsSync(path.join(cwd, 'tsconfig.json'))), + ...conditionallyAdd(['typescript', '@types/node', '@types/jest', '@typescript/native-preview'], manifest, () => + fs.existsSync(path.join(cwd, 'tsconfig.json')), + ), ...conditionallyAdd(['eslint'], manifest, enableLinting), ...conditionallyAdd(['prettier'], manifest, () => addPrettier(manifest)), ...conditionallyAdd(['jest', '@types/jest'], manifest, () => addJest(cwd, manifest)), diff --git a/scripts/eslint.config.js b/scripts/eslint.config.js index 37af806ee0..d9e3f1445b 100644 --- a/scripts/eslint.config.js +++ b/scripts/eslint.config.js @@ -32,6 +32,7 @@ export default [ }, }, ], + '@typescript-eslint/consistent-type-definitions': ['error', 'type'], }, }, ]; diff --git a/scripts/package.json b/scripts/package.json index 1531071566..75c0d3f474 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -2,34 +2,41 @@ "name": "@fluentui-react-native/scripts", "version": "0.1.1", "private": true, - "main": "./src/index.js", + "description": "Scripts and build tools for fluentui-react-native repository", + "repository": { + "type": "git", + "url": "https://github.com/microsoft/fluentui-react-native.git", + "directory": "scripts" + }, "type": "module", + "main": "./src/index.js", "bin": { "fluentui-scripts": "./src/cli.mjs" }, "scripts": { "build": "node ./src/cli.mjs build", + "build-cjs": "tsgo", + "build-esm": "tsgo", "bundlesize": "bundlesize --debug", "depcheck": "node ./src/cli.mjs depcheck", "lint": "node ./src/cli.mjs lint", - "prettier": "node ./src/cli.mjs prettier", - "prettier-fix": "node ./src/cli.mjs prettier --fix true" - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/fluentui-react-native.git", - "directory": "scripts" + "lint-package": "node ./src/cli.mjs lint-package", + "prettier": "node ./src/cli.mjs prettier" }, "devDependencies": { "@eslint/js": "^9.0.0", - "@rnx-kit/eslint-plugin": "^0.8.6", - "@rnx-kit/jest-preset": "^0.2.1", - "@rnx-kit/reporter": "^0.1.0", - "@rnx-kit/tools-packages": "^0.1.1", - "@rnx-kit/tools-typescript": "^0.1.1", - "@rnx-kit/tsconfig": "^2.1.1", + "@fluentui-react-native/kit-config": "workspace:*", + "@rnx-kit/align-deps": "catalog:", + "@rnx-kit/config": "catalog:", + "@rnx-kit/eslint-plugin": "catalog:", + "@rnx-kit/jest-preset": "catalog:", + "@rnx-kit/reporter": "catalog:", + "@rnx-kit/tools-packages": "catalog:", + "@rnx-kit/tools-typescript": "catalog:", + "@rnx-kit/tsconfig": "catalog:", "@types/micromatch": "^4.0.9", - "@types/node": "^22.0.0", + "@types/node": "catalog:", + "@typescript/native-preview": "7.0.0-dev.20260113.1", "chalk": "^4.0.0", "clipanion": "^4.0.0-rc.4", "depcheck": "^1.0.0", @@ -37,12 +44,16 @@ "eslint": "^9.0.0", "find-up": "^5.0.0", "jest": "^29.2.1", + "knip": "catalog:", "micromatch": "^4.0.8", "react": "18.2.0", "react-native": "^0.74.0", "typescript": "^5.8.0", "workspace-tools": "^0.26.3" }, + "furn": { + "packageType": "tooling" + }, "bundlesize": [ { "path": "../apps/test-bundles/dist/office-ui-fabric-react-Button.min.js", @@ -54,8 +65,5 @@ "disallowedChangeTypes": [ "major" ] - }, - "rnx-kit": { - "kitType": "library" } } diff --git a/scripts/src/cli.mjs b/scripts/src/cli.mjs index c4be1751f3..28f25fe02f 100755 --- a/scripts/src/cli.mjs +++ b/scripts/src/cli.mjs @@ -2,15 +2,15 @@ // @ts-check import { Builtins, Cli } from 'clipanion'; -import { BuildCommand } from './tasks/build.js'; +import { BuildCommand } from './tasks/build.ts'; import { CleanCommand } from './tasks/clean.js'; -import { HybridBuildCommand } from './tasks/hybrid-build.ts'; import { PrettierCommand } from './tasks/prettier.js'; import { LintCommand } from './tasks/eslint.js'; +import { LintPackageCommand } from './tasks/lintPackage.ts'; import { JestCommand } from './tasks/jest.js'; import { CheckChangesCommand } from './tasks/checkForModifiedFilesTask.js'; import { CheckPublishingCommand } from './tasks/checkPublishingTask.js'; -import { DepcheckCommand } from './tasks/depcheck.js'; +import { DepcheckCommand } from './tasks/depcheck.ts'; const cli = new Cli({ binaryLabel: 'fluentui-scripts CLI', @@ -20,9 +20,9 @@ const cli = new Cli({ cli.register(BuildCommand); cli.register(CleanCommand); -cli.register(HybridBuildCommand); cli.register(PrettierCommand); cli.register(LintCommand); +cli.register(LintPackageCommand); cli.register(JestCommand); cli.register(CheckChangesCommand); cli.register(CheckPublishingCommand); diff --git a/scripts/src/index.js b/scripts/src/index.js index f08c5b266b..a4d81b66e6 100644 --- a/scripts/src/index.js +++ b/scripts/src/index.js @@ -1,2 +1,2 @@ // @ts-check -export { isPnpmMode } from './utils/ispnpm.js'; +export { isPnpmMode } from './utils/ispnpm.ts'; diff --git a/scripts/src/preinstall/tool-versions.js b/scripts/src/preinstall/tool-versions.js index 62bd83d0ec..b67261a22e 100644 --- a/scripts/src/preinstall/tool-versions.js +++ b/scripts/src/preinstall/tool-versions.js @@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'; /** * Get the package.json manifest for a given folder. * @param {string} folder - * @returns {import('../utils/projectRoot.js').PackageManifest} + * @returns {import('../utils/projectRoot.ts').PackageManifest} */ function getPackageManifest(folder) { const manifestPath = path.join(folder, 'package.json'); diff --git a/scripts/src/tasks/build.js b/scripts/src/tasks/build.js deleted file mode 100644 index 145b9ad91f..0000000000 --- a/scripts/src/tasks/build.js +++ /dev/null @@ -1,123 +0,0 @@ -// @ts-check - -import { Command } from 'clipanion'; -import path from 'node:path'; -import fs from 'node:fs'; -import { runScript } from '../utils/runScript.js'; -import { readTypeScriptConfig } from '@rnx-kit/tools-typescript'; -import { getPackageInfoFromPath } from '@rnx-kit/tools-packages'; -import { ModuleKind } from 'typescript'; -import { cleanFolder } from './clean.js'; - -/** - * @typedef {{ module: string, outDir: string }} BuildTarget - */ - -export class BuildCommand extends Command { - /** @override */ - static paths = [['build']]; - - /** @override */ - static usage = Command.Usage({ - description: 'Builds the current package using TypeScript compiler', - details: 'This command builds the current package based on the tsconfig.json and package.json configuration.', - examples: [['Build the current package', '$0 build']], - }); - - async execute() { - const cwd = process.cwd(); - const targets = getBuildTargets(cwd); - if (targets.length === 0) { - console.log('No build targets found. Skipping build.'); - return 0; - } - - // Clean the output directories before building - cleanFolder(); - const buildPromises = targets.map((target) => buildTarget(target, cwd)); - const results = await Promise.all(buildPromises); - for (const result of results) { - if (result !== 0) { - throw new Error(`Build failed with exit code: ${result}`); - } - } - return 0; - } -} - -/** - * Get the module string for a given module kind. - * @param {ModuleKind} [moduleKind] - The module kind to get the string for. - * @returns {string} - The module string. - */ -function getModuleString(moduleKind) { - switch (moduleKind) { - case ModuleKind.CommonJS: - return 'commonjs'; - case ModuleKind.ESNext: - return 'esnext'; - default: - return 'node16'; - } -} - -/** - * Get the build targets for the project. - * @param {string} cwd - The current working directory to search in. - * @returns {BuildTarget[]} - The build targets found. - */ -function getBuildTargets(cwd = process.cwd()) { - /** @type {BuildTarget[]} */ - const targets = []; - const pkgInfo = getPackageInfoFromPath(cwd); - - // do nothing if no tsconfig.json exists - if (fs.existsSync(path.join(cwd, 'tsconfig.json'))) { - const manifest = pkgInfo.manifest; - const tsconfig = readTypeScriptConfig(pkgInfo); - const options = tsconfig.options || {}; - const moduleBase = getModuleString(options.module); - - // now look for a cjs target - const cjsPath = manifest.main; - if (cjsPath && typeof cjsPath === 'string') { - const module = moduleBase && moduleBase !== 'esnext' ? moduleBase : 'node16'; - targets.push({ module, outDir: path.dirname(cjsPath) }); - } - - // look for an esm target - const esmPath = manifest.module; - if (esmPath && typeof esmPath === 'string') { - targets.push({ module: 'esnext', outDir: path.dirname(esmPath) }); - } - } - - return targets; -} - -/** - * Execute the build for a given target - * @param {BuildTarget} target - The build target to execute. - * @param {string} cwd - The current working directory. - * @returns {Promise} - The exit code of the build process. - */ -async function buildTarget(target, cwd) { - const { module, outDir } = target; - const extraArgs = ['--outDir', outDir, '--module', module]; - - // TypeScript 5.8+ requires moduleResolution to match module when using Node16 - // Set moduleResolution to match the module setting - if (module === 'node16') { - extraArgs.push('--moduleResolution', 'node16'); - } else if (module === 'esnext') { - extraArgs.push('--moduleResolution', 'bundler'); - } - - const result = await runScript('tsc', ...extraArgs); - - if (result !== 0) { - console.error(`Build failed for target: ${cwd}:${outDir}`); - } - - return result; -} diff --git a/scripts/src/tasks/build.ts b/scripts/src/tasks/build.ts new file mode 100644 index 0000000000..7579032b75 --- /dev/null +++ b/scripts/src/tasks/build.ts @@ -0,0 +1,48 @@ +// @ts-check + +import { Command } from 'clipanion'; +import { runYarn } from '../utils/runScript.js'; +import { getProjectRoot } from '../utils/projectRoot.ts'; +import { getResolvedConfig } from '../utils/buildConfig.ts'; + +export class BuildCommand extends Command { + /** @override */ + static override paths = [['build']]; + + /** @override */ + static override usage = Command.Usage({ + description: 'Builds the current package using TypeScript compiler', + details: 'This command builds the current package based on the tsconfig.json and package.json configuration.', + examples: [['Build the current package', '$0 build']], + }); + + async execute() { + const cwd = process.cwd(); + const buildConfig = getResolvedConfig(getProjectRoot(cwd)).typescript; + const { cjsScript, esmScript } = buildConfig; + + if (!cjsScript && !esmScript) { + console.log('No build scripts defined. Skipping build.'); + return 0; + } + + if (cjsScript) { + const [cmd, ...args] = cjsScript.split(' '); + const result = await runYarn(cmd, ...args); + if (result !== 0) { + console.error(`Build (cjs) - failed with code ${result}`); + return result; + } + } + + if (esmScript && esmScript !== cjsScript) { + const [cmd, ...args] = esmScript.split(' '); + const result = await runYarn(cmd, ...args); + if (result !== 0) { + console.error(`Build (esm) - failed with code ${result}`); + return result; + } + } + return 0; + } +} diff --git a/scripts/src/tasks/depcheck.js b/scripts/src/tasks/depcheck.ts similarity index 69% rename from scripts/src/tasks/depcheck.js rename to scripts/src/tasks/depcheck.ts index 70bc286f04..c6564ab2c0 100644 --- a/scripts/src/tasks/depcheck.js +++ b/scripts/src/tasks/depcheck.ts @@ -2,25 +2,27 @@ import { Command, Option } from 'clipanion'; import depcheck from 'depcheck'; -import { getProjectRoot } from '../utils/projectRoot.js'; +import type { ProjectRoot } from '../utils/projectRoot.ts'; +import { getProjectRoot } from '../utils/projectRoot.ts'; import getInjectedDeps from '../../dynamic.extensions.mjs'; -import { getReporter } from '../utils/getReporter.js'; +import { getReporter } from '../utils/getReporter.ts'; import { getToolVersion } from '../preinstall/tool-versions.js'; import micromatch from 'micromatch'; +import { isFixMode } from '../utils/env.ts'; -/** - * @typedef {'unused' | 'missing'} IssueType - * @typedef {'dependency' | 'devDependency'} DependencyType - * @typedef {{issue: IssueType, depType?: DependencyType, dependency: string, files?: string[]}} Issue - */ +type IssueType = 'unused' | 'missing'; +type DependencyType = 'dependency' | 'devDependency'; +type Issue = { + issue: IssueType; + depType?: DependencyType; + dependency: string; + files?: string[]; +}; /** * Merges two objects at one level. - * @param {Record} a - * @param {Record} b - * @returns {Record} */ -function mergeOneLevel(a, b = {}) { +function mergeOneLevel(a: Record, b: Record = {}): Record { const result = { ...a, ...b }; Object.keys(a).forEach((key) => { if (Array.isArray(b[key]) && Array.isArray(a[key])) { @@ -30,18 +32,12 @@ function mergeOneLevel(a, b = {}) { return result; } -/* -function scriptsDevDeps() { - return Object.keys(getScriptProjectRoot().manifest.devDependencies || {}); -} -*/ - export class DepcheckCommand extends Command { /** @override */ - static paths = [['depcheck']]; + static override paths = [['depcheck']]; /** @override */ - static usage = Command.Usage({ + static override usage = Command.Usage({ description: 'Check for unused dependencies in the project using depcheck', details: 'This command analyzes the project to find unused dependencies and missing dependencies.', examples: [['Check dependencies in the current package', '$0 depcheck']], @@ -63,30 +59,44 @@ export class DepcheckCommand extends Command { description: 'Perform a dry run of fixes without making any changes', }); - /** @type {import('@rnx-kit/reporter').Reporter} */ - reporter = getReporter(); - - projectRoot = getProjectRoot(); - ignored = new Set(injectedDevDeps(this.projectRoot)); - - /** @type {Issue[]} */ - issues = []; - - /** @type {number} */ - errors = 0; - - /** @type {string[]} */ - removedDevDeps = []; + async execute() { + const runner = new DepCheckRunner({ + verbose: this.verbose, + fixErrors: isFixMode(this.fixErrors), + fixWarnings: this.fixWarnings, + dryRun: this.dryRun, + }); + return runner.execute(); + } +} - /** @type {string[]} */ - removedDeps = []; +/** + * Runner for depcheck task, can be called from the command or from another command + */ +export class DepCheckRunner { + private verbose: boolean; + private fixErrors: boolean; + private fixWarnings: boolean; + private dryRun: boolean; + private changes = false; + private issues: Issue[] = []; + private errors = 0; + private projectRoot = getProjectRoot(); + private ignored: Set = new Set(injectedDevDeps(this.projectRoot)); + private removedDevDeps: string[] = []; + private removedDeps: string[] = []; + private addedDeps: { dependencies?: Record; devDependencies?: Record } = {}; + private reporter = getReporter(); - /** @type {{dependencies?: Record, devDependencies?: Record}} */ - addedDeps = {}; + constructor(options: { verbose?: boolean; fixErrors?: boolean; fixWarnings?: boolean; dryRun?: boolean } = {}) { + this.verbose = options.verbose ?? false; + this.fixErrors = options.fixErrors ?? false; + this.fixWarnings = options.fixWarnings ?? false; + this.dryRun = options.dryRun ?? false; + } async execute() { - const config = this.projectRoot.manifest; - const depcheckOptions = typeof config.depcheck === 'object' && !Array.isArray(config.depcheck) ? config.depcheck : {}; + const depcheckOptions = this.projectRoot.buildConfig.depcheck ?? {}; const options = mergeOneLevel( { ignorePatterns: ['/lib/*', '/lib-commonjs/*'], @@ -95,7 +105,7 @@ export class DepcheckCommand extends Command { depcheckOptions, ); - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { depcheck(process.cwd(), options, (result) => { try { // build up the set of found issues @@ -115,13 +125,18 @@ export class DepcheckCommand extends Command { resolve(0); } catch (error) { - reject(error); + console.error('Error during depcheck processing:', error); + resolve(1); } }); }); } - handleIssues() { + madeChanges(): boolean { + return this.changes; + } + + private handleIssues() { for (const issue of this.issues) { if (issue.issue === 'unused') { this.handleUnused(issue); @@ -133,12 +148,14 @@ export class DepcheckCommand extends Command { this.handleFixes(); } - handleFixes() { - let hasFixes = this.removedDeps.length > 0 || this.removedDevDeps.length > 0 || Object.keys(this.addedDeps).length > 0; + private handleFixes() { + this.changes = this.removedDeps.length > 0 || this.removedDevDeps.length > 0 || Object.keys(this.addedDeps).length > 0; const prefix = this.dryRun ? '[dry-run]' : ' -'; if (this.removedDevDeps.length > 0) { if (!this.dryRun) { - this.projectRoot.removeDependencies(this.removedDevDeps, 'devDependencies'); + for (const dep of this.removedDevDeps) { + this.projectRoot.updateRecordEntry('devDependencies', dep, undefined); + } } console.warn( prefix, @@ -147,14 +164,16 @@ export class DepcheckCommand extends Command { } if (this.removedDeps.length > 0) { if (!this.dryRun) { - this.projectRoot.removeDependencies(this.removedDeps, 'dependencies'); + for (const dep of this.removedDeps) { + this.projectRoot.updateRecordEntry('dependencies', dep, undefined); + } } console.error(prefix, `Removed unused dependencies: ${this.removedDeps.map((dep) => this.reporter.formatPackage(dep)).join(', ')}`); } if (this.addedDeps.dependencies) { for (const [dep, version] of Object.entries(this.addedDeps.dependencies)) { if (!this.dryRun) { - this.projectRoot.addDependencies({ [dep]: version }, 'dependencies'); + this.projectRoot.updateRecordEntry('dependencies', dep, version); } console.warn(prefix, `Added dependency: ${this.reporter.formatPackage(dep)}@${version}`); } @@ -162,20 +181,14 @@ export class DepcheckCommand extends Command { if (this.addedDeps.devDependencies) { for (const [dep, version] of Object.entries(this.addedDeps.devDependencies)) { if (!this.dryRun) { - this.projectRoot.addDependencies({ [dep]: version }, 'devDependencies'); + this.projectRoot.updateRecordEntry('devDependencies', dep, version); } console.warn(prefix, `Added devDependency: ${this.reporter.formatPackage(dep)}@${version}`); } } - if (hasFixes && !this.dryRun) { - this.projectRoot.writeManifest(); - } } - /** - * @param {Issue} issue - */ - handleUnused(issue) { + private handleUnused(issue: Issue) { const color = this.reporter.color; const { dependency, depType = 'dependency' } = issue; const prettyDependency = this.reporter.formatPackage(dependency); @@ -201,11 +214,7 @@ export class DepcheckCommand extends Command { } } - /** - * Handle a missing dependency issue. - * @param {Issue} issue - */ - handleMissing(issue) { + private handleMissing(issue: Issue) { const color = this.reporter.color; const { dependency, files } = issue; const prettyDependency = this.reporter.formatPackage(dependency); @@ -247,21 +256,13 @@ export class DepcheckCommand extends Command { } } -/** - * @param {import('../utils/projectRoot.js').ProjectRoot} projectRoot - * @returns {string[]} - */ -function injectedDevDeps(projectRoot) { +function injectedDevDeps(projectRoot: ProjectRoot): string[] { const options = { cwd: projectRoot.root, manifest: projectRoot.manifest }; const injectedDeps = getInjectedDeps(options); return Object.keys(injectedDeps); } -/** - * @param {string} fileName - * @returns {boolean} - */ -function isTestFile(fileName) { +function isTestFile(fileName: string): boolean { return micromatch.isMatch(fileName, [ '**/*.test.*', '**/*.spec.*', diff --git a/scripts/src/tasks/eslint.js b/scripts/src/tasks/eslint.js index 59ebe90a85..6709397303 100644 --- a/scripts/src/tasks/eslint.js +++ b/scripts/src/tasks/eslint.js @@ -2,6 +2,7 @@ import { Command, Option } from 'clipanion'; import { runScript } from '../utils/runScript.js'; +import { isFixMode } from '../utils/env.ts'; export class LintCommand extends Command { /** @override */ @@ -17,7 +18,10 @@ export class LintCommand extends Command { args = Option.Proxy(); async execute() { - const args = this.args.length > 0 ? this.args : []; + const args = [...this.args]; + if (isFixMode()) { + args.push('--fix'); + } return await runScript('eslint', 'src/', ...args); } } diff --git a/scripts/src/tasks/lintPackage.ts b/scripts/src/tasks/lintPackage.ts new file mode 100644 index 0000000000..f67ace9bb0 --- /dev/null +++ b/scripts/src/tasks/lintPackage.ts @@ -0,0 +1,384 @@ +import { Command, Option } from 'clipanion'; +import type { PackageManifest, ResolvedBuildConfig } from '../utils/projectRoot.ts'; +import { getProjectRoot, type ProjectRoot } from '../utils/projectRoot.ts'; +import { getResolvedConfig } from '../utils/buildConfig.ts'; +import { isFixMode } from '../utils/env.ts'; +import { runAlignDeps } from './runAlignDeps.ts'; +import { DepCheckRunner } from './depcheck.ts'; +import { getCatalog } from '../utils/getCatalog.ts'; + +export class LintPackageCommand extends Command { + static override paths = [['lint-package']]; + + static override usage = Command.Usage({ + description: 'Lint the current package configuration', + details: + 'This command analyzes the current package configuration for potential issues. When --fix is specified, it will attempt to automatically fix any detected problems.', + examples: [['Lint the current package', '$0 lint-package']], + }); + + fix = Option.Boolean('--fix', false, { + description: 'Automatically fix detected issues where possible', + }); + + fixDepWarnings = Option.Boolean('--fix-dep-warnings', false, { + description: 'Automatically fix dependency warnings where possible, be very careful when using this option', + }); + + private changed = false; + private issues = 0; + private isScripts = false; + private projRoot: ProjectRoot = getProjectRoot(process.cwd()); + private result = 0; + + async execute() { + this.fix = isFixMode(this.fix); + this.isScripts = this.projRoot.manifest.name === '@fluentui-react-native/scripts'; + + const runningOps: Promise[] = []; + + // kick off align deps or wait for it in fix mode + if (this.fix) { + await this.startAlignDepsCheck(); + } else { + runningOps.push(this.startAlignDepsCheck()); + } + + // kick off depcheck or wait for it in fix mode + if (this.fix) { + await this.startDependencyCheck(); + } else { + runningOps.push(this.startDependencyCheck()); + } + + // now do the custom linting + const buildConfig = getResolvedConfig(this.projRoot, true); + + const catalogCheck = this.checkCatalogs(); + this.checkManifest(); + this.checkScripts(); + this.checkEntryPoints(buildConfig); + this.checkBuildConfig(buildConfig); + this.checkDependencies(); + this.checkRnxKitConfig(); + await catalogCheck; + + // report the results for the custom linting + this.handleResult(this.issues > 0 ? 1 : 0, 'custom package rules'); + + // wait for any queued ops to finish + await Promise.all(runningOps); + + // write changes if in fix mode + if (this.fix && this.changed) { + this.projRoot.writeManifest(); + console.log('Updated package.json for ', this.projRoot.manifest.name); + } + + return this.result; + } + + private handleResult(code: number, source: string) { + if (code !== 0) { + console.error(`lint-package: ${source} failed with code`, code); + this.result = code; + } + } + + private async startDependencyCheck() { + const runner = new DepCheckRunner({ + verbose: false, + fixErrors: this.fix, + fixWarnings: this.fixDepWarnings, + dryRun: false, + }); + const result = await runner.execute(); + if (this.fix && runner.madeChanges()) { + this.changed = true; + } + this.handleResult(result, 'depcheck'); + } + + private async startAlignDepsCheck() { + if (!this.isScripts && this.projRoot.manifest['rnx-kit']?.alignDeps) { + const result = await runAlignDeps(this.projRoot.root, this.fix); + if (this.fix) { + this.changed = this.projRoot.reloadManifest(); + } + this.handleResult(result, 'align-deps'); + } + } + + private checkManifest() { + const manifest = this.projRoot.manifest; + this.warnIf(!manifest.description, 'Package is missing a description field'); + this.errorIf(manifest.typings !== undefined, 'typings field is deprecated; use types instead', () => { + if (manifest.types === undefined && manifest.typings !== undefined) { + this.projRoot.setManifestEntry('types', manifest.typings); + } + this.projRoot.clearManifestEntry('typings'); + }); + } + + private checkDependencies() { + const manifest = this.projRoot.manifest; + if (manifest['rnx-kit']?.kitType === 'app') { + return; + } + const dependencies = manifest.dependencies || {}; + this.errorIf(dependencies.react !== undefined, 'react should be a peerDependency, not a dependency'); + this.errorIf(dependencies['react-native'] !== undefined, 'react-native should be a peerDependency, not a dependency'); + this.errorIf(dependencies['react-native-macos'] !== undefined, 'react-native-macos should be a peerDependency, not a dependency'); + this.errorIf(dependencies['react-native-windows'] !== undefined, 'react-native-windows should be a peerDependency, not a dependency'); + this.errorIf( + dependencies['@office-iss/react-native-win32'] !== undefined, + '@office-iss/react-native-win32 should be a peerDependency, not a dependency', + ); + const devDependencies = manifest.devDependencies || {}; + if (manifest.furn?.packageType !== 'tooling') { + this.errorIf( + devDependencies['@fluentui-react-native/kit-config'] === undefined, + 'Missing devDependency on @fluentui-react-native/kit-config', + () => { + this.projRoot.updateRecordEntry('devDependencies', '@fluentui-react-native/kit-config', 'workspace:*'); + }, + ); + } + } + + private checkRnxKitConfig() { + const projRoot = this.projRoot; + const manifest = projRoot.manifest; + if (manifest.furn?.packageType === 'tooling') { + return; + } + const rnxKitIssues: string[] = []; + if (manifest['rnx-kit'] === undefined) { + rnxKitIssues.push('- Missing rnx-kit configuration'); + } + const rnxKitConfig = manifest['rnx-kit'] || {}; + if (rnxKitConfig.kitType === undefined) { + rnxKitIssues.push('- Missing rnx-kit.kitType field'); + rnxKitConfig.kitType = 'library'; + } + if (rnxKitConfig.extends === undefined) { + rnxKitIssues.push('- Missing rnx-kit.extends field'); + rnxKitConfig.extends = '@fluentui-react-native/kit-config'; + } + if (!rnxKitConfig.alignDeps) { + rnxKitIssues.push('- Missing rnx-kit.alignDeps field'); + rnxKitConfig.alignDeps = {}; + } + const alignDeps = rnxKitConfig.alignDeps || {}; + if (alignDeps.presets !== undefined) { + rnxKitIssues.push('- rnx-kit.alignDeps.presets should come from the root configuration'); + delete alignDeps.presets; + } + const capabilities: string[] = alignDeps.capabilities || []; + if (!capabilities.includes('tools-core')) { + rnxKitIssues.push('- rnx-kit.alignDeps.capabilities is missing "tools-core"'); + capabilities.push('tools-core'); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + alignDeps.capabilities = capabilities.sort() as any[]; + } + this.errorIf(rnxKitIssues.length > 0, rnxKitIssues.join('\n'), () => { + projRoot.setManifestEntry('rnx-kit', rnxKitConfig); + }); + } + + private async checkCatalogs() { + const catalog = await getCatalog(); + this.checkCatalogUsage('dependencies', catalog); + this.checkCatalogUsage('devDependencies', catalog); + } + + private checkCatalogUsage(key: 'dependencies' | 'devDependencies', catalog: Record) { + const depSet = this.projRoot.manifest[key] || {}; + for (const depName of Object.keys(depSet)) { + if (catalog[depName] !== undefined) { + this.errorIf(depSet[depName] !== 'catalog:', `- ${key}: ${depName} should use "catalog:" version specifier`, () => { + this.projRoot.updateRecordEntry(key, depName, 'catalog:'); + }); + } + } + } + + private checkScripts() { + const scripts = this.projRoot.manifest.scripts || {}; + this.warnIf(scripts['just'] !== undefined, 'just script is deprecated, can invoke by calling yarn fluentui-scripts instead', () => { + this.projRoot.updateRecordEntry('scripts', 'just', undefined); + }); + this.warnIf(scripts['prettier-fix'] !== undefined, 'prettier-fix script is deprecated, use prettier --fix instead', () => { + this.projRoot.updateRecordEntry('scripts', 'prettier-fix', undefined); + }); + } + + private validateEntryPoint(collection: T, key: K, expectedOutDir: string, otherOutDir: string) { + const entryPoint = typeof collection[key] === 'string' ? (collection[key] as string) : undefined; + if (entryPoint) { + const normalizedEntry = removeDotPrefix(entryPoint) + '/'; + const expected = `${expectedOutDir}/`; + const notExpected = `${otherOutDir}/`; + this.errorIf( + normalizedEntry.startsWith(notExpected), + `Entry point ${String(key)} (${entryPoint}) should not be in output ${expectedOutDir}`, + () => { + collection[key] = entryPoint.replace(notExpected, expected) as T[K]; + }, + ); + } + } + + private validateExportsGroup(manifest: PackageManifest, groupName: string, isDefault: boolean, buildConfig: ResolvedBuildConfig) { + const exports = manifest.exports; + if (!exports) { + return; + } + + const groupEntry = exports[groupName]; + const group = typeof groupEntry === 'object' && !Array.isArray(groupEntry) ? groupEntry : undefined; + if (group || isDefault) { + const updated = { ...group }; + const keys = Object.keys(updated); + const errors: string[] = []; + if (!group) { + errors.push(`Missing required exports group ${groupName}`); + } + if (updated.types && keys[0] !== 'types') { + errors.push(`'types' entry should be first in exports for ${groupName}`); + } + if (isDefault) { + const manifestTypes = manifest.types ? toDotPrefix(manifest.types) : undefined; + const manifestModule = manifest.module ? toDotPrefix(manifest.module) : undefined; + const manifestMain = manifest.main ? toDotPrefix(manifest.main) : undefined; + if (manifestTypes && updated.types !== manifestTypes) { + errors.push(`'types' entry in exports does not match manifest.types`); + updated.types = manifestTypes; + } + if (manifestModule && updated.import !== manifestModule) { + errors.push(`'import' entry in exports does not match manifest.module`); + updated.import = manifestModule; + } + if (manifestMain && updated.require !== manifestMain) { + errors.push(`'require' entry in exports does not match manifest.main`); + updated.require = manifestMain; + } + } + const esmDir = buildConfig.typescript.esmDir; + const cjsDir = buildConfig.typescript.cjsDir; + this.validateEntryPoint(updated, 'import', esmDir, cjsDir); + this.validateEntryPoint(updated, 'require', cjsDir, esmDir); + if (updated.import && updated.require && keys.indexOf('import') > keys.indexOf('require')) { + errors.push(`'import' entry should come before 'require' in exports for ${groupName}`); + } + if (updated.default && keys[keys.length - 1] !== 'default') { + errors.push(`'default' entry should be last in exports for ${groupName}`); + } + this.errorIf(errors.length > 0, errors.join('\n'), () => { + const { types, import: imp, require: req, default: def, ...rest } = updated; + // restructure the group to have types, , import, require, default in order + exports[groupName] = { + ...(types && { types }), + ...rest, + ...(imp && { import: imp }), + ...(req && { require: req }), + ...(def && { default: def }), + }; + }); + } + } + + private checkEntryPoints(buildConfig: ResolvedBuildConfig) { + const manifest = this.projRoot.manifest; + const { main, module, private: isPrivate } = manifest; + const { cjsDir, esmDir } = buildConfig.typescript; + this.validateEntryPoint(manifest, 'main', cjsDir, esmDir); + this.validateEntryPoint(manifest, 'module', esmDir, cjsDir); + if (!isPrivate) { + this.errorIf(Boolean(!manifest.exports && (main || module)), 'Missing exports field for public package', () => { + const newExports = { '.': {} }; + this.projRoot.setManifestEntry('exports', newExports); + }); + } + const exports = manifest.exports; + if (exports) { + const defaultExport = exports['.']; + // this is really only ok for packages that only have a single build output and no types like a config package + const validStringExport = typeof defaultExport === 'string' && !(main && module && main !== module && manifest.types === undefined); + if (typeof defaultExport !== 'string' || !validStringExport) { + this.validateExportsGroup(manifest, '.', true, buildConfig); + } + for (const key of Object.keys(exports)) { + if (key !== '.') { + this.validateExportsGroup(manifest, key, false, buildConfig); + } + } + } + } + + private checkBuildConfig(buildConfig: ResolvedBuildConfig) { + const { cjsScript, esmScript } = buildConfig.typescript; + const hasBuilds = Boolean(cjsScript || esmScript); + const scripts = this.projRoot.manifest.scripts || {}; + + const buildScriptText = this.getFluentScriptsText('build'); + this.errorIf(hasBuilds && scripts.build !== buildScriptText, 'Missing or incorrect build script', () => { + this.projRoot.updateRecordEntry('scripts', 'build', buildScriptText); + }); + if (cjsScript) { + this.errorIf(scripts['build-cjs'] !== cjsScript, 'Missing or incorrect build-cjs script', () => { + this.projRoot.updateRecordEntry('scripts', 'build-cjs', cjsScript); + }); + } else { + this.errorIf(scripts['build-cjs'] !== undefined, 'Extraneous build-cjs script', () => { + this.projRoot.updateRecordEntry('scripts', 'build-cjs', undefined); + }); + } + if (esmScript) { + this.errorIf(scripts['build-esm'] !== esmScript, 'Missing or incorrect build-esm script', () => { + this.projRoot.updateRecordEntry('scripts', 'build-esm', esmScript); + }); + } else { + this.errorIf(scripts['build-esm'] !== undefined, 'Extraneous build-esm script', () => { + this.projRoot.updateRecordEntry('scripts', 'build-esm', undefined); + }); + } + } + + private warnIf(check: boolean, message: string, fixFn?: () => void) { + if (check) { + if (this.fix && fixFn) { + fixFn(); + this.changed = true; + console.log(`- Fixed: ${message}`); + } else { + console.warn(`- Warning: ${message}`); + } + } + } + + private errorIf(check: boolean, message: string, fixFn?: () => void) { + if (check) { + if (this.fix && fixFn) { + fixFn(); + this.changed = true; + console.log(`- Fixed: ${message}`); + } else { + console.error(`- Error: ${message}`); + this.issues++; + } + } + } + + private getFluentScriptsText(command: string) { + return this.isScripts ? `node ./src/cli.mjs ${command}` : `fluentui-scripts ${command}`; + } +} + +function toDotPrefix(path: string) { + return path.startsWith('./') ? path : `./${path}`; +} + +function removeDotPrefix(path: string) { + return path.startsWith('./') ? path.slice(2) : path; +} diff --git a/scripts/src/tasks/prettier.js b/scripts/src/tasks/prettier.js index f046da1ede..1192256e21 100644 --- a/scripts/src/tasks/prettier.js +++ b/scripts/src/tasks/prettier.js @@ -2,6 +2,7 @@ import { Command, Option } from 'clipanion'; import { runScript } from '../utils/runScript.js'; +import { isFixMode } from '../utils/env.ts'; export class PrettierCommand extends Command { /** @override */ @@ -19,7 +20,7 @@ export class PrettierCommand extends Command { }); async execute() { - const fixOrCheck = this.fix ? '--write' : '--check'; + const fixOrCheck = isFixMode(this.fix) ? '--write' : '--check'; return await runScript( 'prettier', fixOrCheck, diff --git a/scripts/src/tasks/runAlignDeps.ts b/scripts/src/tasks/runAlignDeps.ts new file mode 100644 index 0000000000..624f29d816 --- /dev/null +++ b/scripts/src/tasks/runAlignDeps.ts @@ -0,0 +1,21 @@ +import { scriptsDir } from '../utils/ispnpm.ts'; +import { spawn } from 'node:child_process'; +import { yarnVerb } from '../utils/runScript.js'; +import path from 'node:path'; + +export async function runAlignDeps(targetDir: string, fixMode: boolean): Promise { + const spawnArgs = ['exec', 'rnx-align-deps', '--no-unmanaged']; + if (fixMode) { + spawnArgs.push('--write'); + } + spawnArgs.push(path.resolve(targetDir)); + return new Promise((resolve) => { + spawn(yarnVerb, spawnArgs, { + cwd: scriptsDir(), + stdio: 'inherit', + shell: true, + }).on('close', (code) => { + resolve(code ?? -1); + }); + }); +} diff --git a/scripts/src/utils/buildConfig.ts b/scripts/src/utils/buildConfig.ts new file mode 100644 index 0000000000..0532b2f726 --- /dev/null +++ b/scripts/src/utils/buildConfig.ts @@ -0,0 +1,64 @@ +import { getPackageInfoFromPath } from '@rnx-kit/tools-packages'; +import { type RepoBuildConfig, type ProjectRoot, type ResolvedBuildConfig } from './projectRoot.ts'; +import { readTypeScriptConfig } from '@rnx-kit/tools-typescript'; +import fs from 'node:fs'; +import path from 'node:path'; +import type ts from 'typescript'; + +/** + * Get a fully resolved build config for this package. + * @param projRoot project root for this package + * @param analyze whether to parse required config files for deeper analysis. Defaults to false. + */ +export function getResolvedConfig(projRoot: ProjectRoot, analyze?: boolean): ResolvedBuildConfig { + const buildConfig = projRoot.buildConfig; + return { + packageType: buildConfig.packageType ?? 'library', + typescript: getTypescriptBuildConfig(projRoot, buildConfig, analyze), + depcheck: buildConfig.depcheck ?? {}, + }; +} + +function getTypescriptBuildConfig( + projRoot: ProjectRoot, + buildConfig: RepoBuildConfig, + analyze?: boolean, +): ResolvedBuildConfig['typescript'] { + const buildTsConfig = buildConfig.typescript || {}; + const { cjsDir = 'lib-commonjs', esmDir = 'lib', engine = 'tsgo', extraArgs } = buildTsConfig; + const scripts = projRoot.manifest.scripts || {}; + let cjsScript = scripts['build-cjs'] ?? buildTsConfig.cjsScript ?? ''; + let esmScript = scripts['build-esm'] ?? buildTsConfig.esmScript ?? ''; + if (analyze) { + // helper to build up the correct build command + function getScript(options: ts.CompilerOptions, outDir: string, isDefaultType: boolean, moduleType: 'commonjs' | 'esnext'): string { + const parts: string[] = [engine]; + if (!options.noEmit) { + if (outDir !== options.outDir) { + parts.push('--outDir', outDir); + } + if (!isDefaultType) { + parts.push('--module', moduleType, '--moduleResolution', 'bundler'); + } + } + if (extraArgs) { + parts.push(extraArgs); + } + return parts.join(' '); + } + + if (!fs.existsSync(path.join(projRoot.root, 'tsconfig.json'))) { + // no tsconfig.json means no TypeScript build + cjsScript = ''; + esmScript = ''; + } else { + const pkgInfo = getPackageInfoFromPath(projRoot.root); + const tsConfig = readTypeScriptConfig(pkgInfo); + const options = tsConfig.options; + const isModule = pkgInfo.manifest.type === 'module'; + cjsScript = getScript(options, cjsDir, !isModule, 'commonjs'); + esmScript = getScript(options, esmDir, isModule, 'esnext'); + } + } + return { engine, cjsDir, esmDir, cjsScript, esmScript, extraArgs }; +} diff --git a/scripts/src/utils/env.ts b/scripts/src/utils/env.ts new file mode 100644 index 0000000000..76b9a9a792 --- /dev/null +++ b/scripts/src/utils/env.ts @@ -0,0 +1,5 @@ +export const FIX_ENV_VAR = 'FURN_FIX_MODE'; + +export function isFixMode(fromParam?: boolean): boolean { + return fromParam || Boolean(process.env[FIX_ENV_VAR]); +} diff --git a/scripts/src/utils/getCatalog.ts b/scripts/src/utils/getCatalog.ts new file mode 100644 index 0000000000..359af98f3e --- /dev/null +++ b/scripts/src/utils/getCatalog.ts @@ -0,0 +1,25 @@ +import { exec } from 'node:child_process'; +import { scriptsDir } from './ispnpm.ts'; + +export async function getCatalog(): Promise> { + const command = 'yarn config get catalog --json'; + const output = await execWithOutput(command); + return JSON.parse(output) as Record; +} + +function execWithOutput(command: string): Promise { + return new Promise((resolve, reject) => { + const options = { cwd: scriptsDir() }; + exec(command, options, (error, stdout, stderr) => { + if (error) { + reject(error); + return; + } + if (stderr) { + reject(new Error(stderr)); + return; + } + resolve(stdout); + }); + }); +} diff --git a/scripts/src/utils/getReporter.js b/scripts/src/utils/getReporter.ts similarity index 55% rename from scripts/src/utils/getReporter.js rename to scripts/src/utils/getReporter.ts index 5e4f41b2df..dfa8c9289c 100644 --- a/scripts/src/utils/getReporter.js +++ b/scripts/src/utils/getReporter.ts @@ -1,4 +1,4 @@ -import { createReporter } from '@rnx-kit/reporter'; +import { createReporter, type Reporter } from '@rnx-kit/reporter'; const reporter = createReporter({ name: 'fluentui-scripts reporter', @@ -7,8 +7,7 @@ const reporter = createReporter({ /** * Get the reporter instance for logging. - * @returns {import('@rnx-kit/reporter').Reporter} The reporter instance. */ -export function getReporter() { +export function getReporter(): Reporter { return reporter; } diff --git a/scripts/src/utils/ispnpm.js b/scripts/src/utils/ispnpm.js deleted file mode 100644 index 36edc9fab7..0000000000 --- a/scripts/src/utils/ispnpm.js +++ /dev/null @@ -1,19 +0,0 @@ -import path from 'node:path'; -import fs from 'node:fs'; -import { fileURLToPath } from 'node:url'; - -/** @type {boolean | undefined} */ -let isPnpmModeCached = undefined; - -function checkPnpmMode() { - const __filename = fileURLToPath(import.meta.url); - const __dirname = path.dirname(__filename); - const yarnConfigPath = path.resolve(__dirname, '../../../.yarnrc.yml'); - const yarnConfig = fs.readFileSync(yarnConfigPath, { encoding: 'utf-8' }); - return yarnConfig.includes('nodeLinker: pnpm'); -} - -export function isPnpmMode() { - isPnpmModeCached ??= checkPnpmMode(); - return isPnpmModeCached; -} diff --git a/scripts/src/utils/ispnpm.ts b/scripts/src/utils/ispnpm.ts new file mode 100644 index 0000000000..ca36357f18 --- /dev/null +++ b/scripts/src/utils/ispnpm.ts @@ -0,0 +1,27 @@ +import path from 'node:path'; +import fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; + +export const scriptsDir = (() => { + let scriptDir: string | undefined = undefined; + return () => { + if (!scriptDir) { + const __filename = fileURLToPath(import.meta.url); + const __dirname = path.dirname(__filename); + scriptDir = path.resolve(__dirname, '../..'); + } + return scriptDir as string; + }; +})(); + +export const isPnpmMode = () => { + let isPnpmModeCached: boolean | undefined = undefined; + return () => { + if (isPnpmModeCached === undefined) { + const yarnConfigPath = path.resolve(scriptsDir(), '../.yarnrc.yml'); + const yarnConfig = fs.readFileSync(yarnConfigPath, { encoding: 'utf-8' }); + isPnpmModeCached = yarnConfig.includes('nodeLinker: pnpm'); + } + return isPnpmModeCached as boolean; + }; +}; diff --git a/scripts/src/utils/projectRoot.js b/scripts/src/utils/projectRoot.js deleted file mode 100644 index 2e5ba2dcb3..0000000000 --- a/scripts/src/utils/projectRoot.js +++ /dev/null @@ -1,150 +0,0 @@ -import Module from 'node:module'; -import { fileURLToPath } from 'node:url'; -import path from 'node:path'; -import fs from 'node:fs'; - -/** - * @typedef {{default?: string, types?: string, import?: string, require?: string}} ExportSet - * @typedef {string | ExportSet} ExportEntry - * @typedef {{'.': ExportEntry, [key: string]: ExportEntry}} Exports - * - * @typedef {{name: string, version: string, private?: boolean, bin?: string | Record, scripts?: Record}} PkgManifestBase - * @typedef {{main?: string, module?: string, types?: string, type?: string, exports?: Exports}} PkgModuleInfo - * @typedef {{dependencies?: Record, devDependencies?: Record, peerDependencies?: Record}} PkgDependencyInfo - * @typedef {string | boolean | string[] | Record | undefined} PkgCustomField - * - * @typedef {PkgManifestBase & PkgModuleInfo & PkgDependencyInfo & Record} PackageManifest - */ - -const scriptPath = normalizePath(path.join(path.dirname(fileURLToPath(import.meta.url)), '../..')); -const rootPath = path.dirname(scriptPath); - -/** @type {Record} */ -const rootCache = {}; - -/** - * Normalize a file path by replacing backslashes with forward slashes. - * @param {string} p - The file path to normalize. - * @returns {string} - The normalized file path. - */ -export function normalizePath(p) { - return path.normalize(p).replaceAll('\\', '/'); -} - -/** - * Returns a project root for the given path. This will load from a cache if available, and will throw if a package.json - * cannot be found at the given path. - * @param {string} [rootPath=process.cwd()] - * @returns {ProjectRoot} - */ -export function getProjectRoot(rootPath = process.cwd()) { - const normalized = normalizePath(rootPath); - return (rootCache[normalized] ??= new ProjectRoot(normalized)); -} - -/** - * @returns {ProjectRoot} - */ -export function getScriptProjectRoot() { - return getProjectRoot(scriptPath); -} - -/** - * @returns {ProjectRoot} - */ -export function getRepoProjectRoot() { - return getProjectRoot(rootPath); -} - -/** - * Utilities for looking up information about a given package. This helps loading things like package.json multiple times - * in a single process and centralizes some functionality. - */ -export class ProjectRoot { - /** @type {string} */ - root; - - /** @type {PackageManifest} */ - manifest; - - /** @type {NodeRequire | undefined} */ - cachedRequire = undefined; - - /** - * @param {string} rootPath - root path of the project - */ - constructor(rootPath) { - const pkgJsonPath = path.join(rootPath, 'package.json'); - if (!fs.existsSync(pkgJsonPath)) { - throw new Error(`No package.json found at ${pkgJsonPath}`); - } - this.manifest = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf-8')); - this.root = rootPath; - } - - /** @returns {NodeRequire} - built on demand and cached require function */ - get require() { - return (this.cachedRequire ??= Module.createRequire(this.root)); - } - - /** - * Adds dependencies to the project manifest. - * @param {Record} depsToAdd - * @param {'dependencies' | 'devDependencies'} depType - */ - addDependencies(depsToAdd, depType = 'dependencies') { - // add the dependencies to the manifest, outputting the dependencies in sorted order - const existingDeps = (this.manifest[depType] ??= {}); - const newDeps = { ...existingDeps, ...depsToAdd }; - const depKeys = Object.keys(newDeps).sort((a, b) => a.localeCompare(b)); - this.manifest[depType] = Object.fromEntries(depKeys.map((key) => [key, newDeps[key]])); - } - - /** - * Removes dependencies from the project manifest. - * @param {string[]} depsToRemove - * @param {'dependencies' | 'devDependencies'} depType - */ - removeDependencies(depsToRemove, depType = 'dependencies') { - // remove the dependencies from the manifest - if (this.manifest[depType]) { - for (const dep of depsToRemove) { - if (this.manifest[depType][dep]) { - delete this.manifest[depType][dep]; - } - } - } - } - - writeManifest() { - // write the manifest to disk - const pkgJsonPath = path.join(this.root, 'package.json'); - fs.writeFileSync(pkgJsonPath, JSON.stringify(this.manifest, null, 2) + '\n', 'utf-8'); - } - - /** - * Open a module relative to this project root - * @param {string} moduleName - name of the module to require - * @return {ProjectRoot} - a project root opened at the root of the given module - */ - openModule(moduleName) { - const pkgJsonPath = this.require.resolve(`${moduleName}/package.json`, { paths: [this.root] }); - return getProjectRoot(path.dirname(pkgJsonPath)); - } - - /** - * Get the path to a bin entry for a js package. - * @param {string} command - * @returns {string | undefined} - */ - getBinPath(command) { - const bin = this.manifest.bin; - if (bin) { - const binRelative = typeof bin === 'string' ? bin : bin[command]; - if (binRelative) { - return normalizePath(path.join(this.root, binRelative)); - } - } - return undefined; - } -} diff --git a/scripts/src/utils/projectRoot.ts b/scripts/src/utils/projectRoot.ts new file mode 100644 index 0000000000..b87215e2de --- /dev/null +++ b/scripts/src/utils/projectRoot.ts @@ -0,0 +1,457 @@ +import Module from 'node:module'; +import { fileURLToPath } from 'node:url'; +import path from 'node:path'; +import fs from 'node:fs'; +import type { KitConfig } from '@rnx-kit/config'; + +export type ExportSet = { + default?: string; + types?: string; + import?: string; + require?: string; +}; + +export type ExportEntry = string | ExportSet; + +export type Exports = Record; + +export type PackageType = 'library' | 'component' | 'app' | 'tooling'; + +export type ResolvedBuildConfig = { + packageType: PackageType; + typescript: { + /** whether to use tsc or tsgo to build this package */ + engine: 'tsc' | 'tsgo'; + /** cjs outDir - defaults to lib-commonjs */ + cjsDir: string; + /** esm outDir - defaults to lib */ + esmDir: string; + /** extra arguments to pass to the TypeScript compiler */ + extraArgs?: string; + /** script to run for cjs build */ + cjsScript: string; + /** script to run for esm build */ + esmScript: string; + }; + depcheck: { + ignoreMatches?: string[]; + ignorePatterns?: string[]; + }; +}; + +export type RepoBuildConfig = Partial & { typescript: Partial }>; + +export type PackageManifest = { + // Most canonical identity and metadata fields + name: string; + version: string; + private?: boolean; + description?: string; + keywords?: string[]; + license?: string; + author?: string; + contributors?: string[]; + homepage?: string; + + // Repository and issue tracking + repository?: string | Record; + bugs?: Record | string; + + // Package type and entry points + type?: string; + main?: string; + module?: string; + types?: string; + typings?: string; // deprecated, use types instead + exports?: Exports; + + // files, side effects, and bin + files?: string[]; + sideEffects?: boolean; + bin?: string | Record; + + // scripts + scripts?: Record; + + // dependencies + dependencies?: Record; + optionalDependencies?: Record; + peerDependencies?: Record; + peerDependenciesMeta?: Record; + devDependencies?: Record; + + // package manager, tools and environment + packageManager?: string; + engines?: Record; + os?: string[]; + cpu?: string[]; + + // monorepo management + workspaces?: string[] | { packages: string[] }; + resolutions?: Record; + + // tool configurations + furn?: RepoBuildConfig; + 'rnx-kit'?: KitConfig; + eslintConfig?: Record; + jest?: Record; + prettier?: Record; + babel?: Record; + lage?: Record; + + // publishing and distribution + publishConfig?: Record; +}; + +const defaultKeyOrder: string[] = [ + '$schema', + 'name', + 'displayName', + 'version', + 'stableVersion', + 'private', + 'description', + 'categories', + 'keywords', + 'homepage', + 'bugs', + 'repository', + 'funding', + 'license', + 'qna', + 'author', + 'maintainers', + 'contributors', + 'publisher', + 'sideEffects', + 'type', + 'imports', + 'exports', + 'main', + 'svelte', + 'umd:main', + 'jsdelivr', + 'unpkg', + 'module', + 'source', + 'jsnext:main', + 'browser', + 'react-native', + 'types', + 'typesVersions', + 'typings', + 'style', + 'example', + 'examplestyle', + 'assets', + 'bin', + 'man', + 'directories', + 'files', + 'workspaces', + 'binary', + 'scripts', + 'betterScripts', + 'l10n', + 'contributes', + 'activationEvents', + 'husky', + 'simple-git-hooks', + 'pre-commit', + 'commitlint', + 'lint-staged', + 'nano-staged', + 'config', + 'nodemonConfig', + 'browserify', + 'babel', + 'browserslist', + 'xo', + 'prettier', + 'eslintConfig', + 'eslintIgnore', + 'npmpkgjsonlint', + 'npmPackageJsonLintConfig', + 'npmpackagejsonlint', + 'release', + 'remarkConfig', + 'stylelint', + 'ava', + 'jest', + 'jest-junit', + 'jest-stare', + 'mocha', + 'nyc', + 'c8', + 'tap', + 'oclif', + 'resolutions', + 'overrides', + 'dependencies', + 'devDependencies', + 'dependenciesMeta', + 'peerDependencies', + 'peerDependenciesMeta', + 'optionalDependencies', + 'bundledDependencies', + 'bundleDependencies', + 'extensionPack', + 'extensionDependencies', + 'furn', + 'rnx-kit', + 'lage', + 'flat', + 'packageManager', + 'engines', + 'engineStrict', + 'devEngines', + 'volta', + 'languageName', + 'os', + 'cpu', + 'preferGlobal', + 'publishConfig', + 'icon', + 'badges', + 'galleryBanner', + 'preview', + 'markdown', + 'pnpm', +]; + +export type PackageRecordKeys = Extract< + keyof PackageManifest, + | 'dependencies' + | 'devDependencies' + | 'peerDependencies' + | 'peerDependenciesMeta' + | 'scripts' + | 'optionalDependencies' + | 'resolutions' + | 'exports' +>; + +const recordKeys: PackageRecordKeys[] = [ + 'dependencies', + 'devDependencies', + 'peerDependencies', + 'peerDependenciesMeta', + 'scripts', + 'optionalDependencies', + 'resolutions', + 'exports', +] as const; +type RecordValueType = T extends Record ? TValue : never; + +const scriptPath = normalizePath(path.join(path.dirname(fileURLToPath(import.meta.url)), '../..')); +const rootPath = path.dirname(scriptPath); + +const rootCache: Record = {}; + +/** + * Normalize a file path by replacing backslashes with forward slashes. + */ +export function normalizePath(p: string): string { + return path.normalize(p).replaceAll('\\', '/'); +} + +/** + * Returns a project root for the given path. This will load from a cache if available, and will throw if a package.json + * cannot be found at the given path. + * @param {string} [rootPath=process.cwd()] + * @returns {ProjectRoot} + */ +export function getProjectRoot(rootPath: string = process.cwd()): ProjectRoot { + const normalized = normalizePath(rootPath); + return (rootCache[normalized] ??= new ProjectRoot(normalized)); +} + +/** + * @returns {ProjectRoot} + */ +export function getScriptProjectRoot() { + return getProjectRoot(scriptPath); +} + +/** + * @returns {ProjectRoot} + */ +export function getRepoProjectRoot() { + return getProjectRoot(rootPath); +} + +/** + * Utilities for looking up information about a given package. This helps loading things like package.json multiple times + * in a single process and centralizes some functionality. + */ +export class ProjectRoot { + root: string; + + private _manifestText: string; + private _manifest: PackageManifest; + private _manifestKeys: string[]; + + cachedRequire: ReturnType | undefined = undefined; + + constructor(rootPath: string) { + const pkgJsonPath = path.join(rootPath, 'package.json'); + if (!fs.existsSync(pkgJsonPath)) { + throw new Error(`No package.json found at ${pkgJsonPath}`); + } + this._manifestText = fs.readFileSync(pkgJsonPath, 'utf-8'); + this._manifest = JSON.parse(this._manifestText) ?? {}; + this._manifestKeys = this.initKeys(this._manifest); + this.root = rootPath; + } + + get manifest(): Readonly { + return this._manifest; + } + + /** @returns {NodeRequire} - built on demand and cached require function */ + get require() { + return (this.cachedRequire ??= Module.createRequire(this.root)); + } + + /** + * Reload the manifest from disk. Returns true if the manifest changed since the last reload. + */ + reloadManifest(): boolean { + const pkgJsonPath = path.join(this.root, 'package.json'); + const newText = fs.readFileSync(pkgJsonPath, 'utf-8'); + const changed = newText !== this._manifestText; + if (changed) { + this._manifestText = newText; + this._manifest = JSON.parse(this._manifestText) ?? {}; + this._manifestKeys = this.initKeys(this._manifest); + } + return changed; + } + + /** + * Add or update an entry in the project manifest, maintaining key order. + */ + setManifestEntry(key: K, value: Required[K]): Required[K] { + this._manifest[key] = value; + if (!this._manifestKeys.includes(key)) { + const idealIndex = defaultKeyOrder.indexOf(key as string); + if (idealIndex >= 0) { + // find the first key after idealIndex that exists in _manifestKeys + for (let i = idealIndex + 1; i < defaultKeyOrder.length; i++) { + const nextKey = defaultKeyOrder[i]; + const existingIndex = this._manifestKeys.indexOf(nextKey); + if (existingIndex >= 0) { + // insert before existingIndex + this._manifestKeys.splice(existingIndex, 0, key); + return value; + } + } + } + // otherwise add the key to the end + this._manifestKeys.push(key); + } + return value; + } + + /** + * Remove an entry in the project manifest + */ + clearManifestEntry(key: K) { + delete this._manifest[key]; + const index = this._manifestKeys.indexOf(key); + if (index >= 0) { + this._manifestKeys.splice(index, 1); + } + } + + updateRecordEntry(recordKey: K, valueKey: string, value: RecordValueType | undefined) { + if (value !== undefined) { + const record = this.manifest[recordKey] ?? this.setManifestEntry(recordKey, {}); + record[valueKey] = value; + } else { + const existing = this.manifest[recordKey]; + if (existing && valueKey in existing) { + delete existing[valueKey]; + } + } + } + + writeManifest() { + // write the manifest to disk + const pkgJsonPath = path.join(this.root, 'package.json'); + this.prepManifestForWrite(); + fs.writeFileSync(pkgJsonPath, JSON.stringify(this._manifest, null, 2) + '\n', 'utf-8'); + } + + /** + * Open a module relative to this project root + */ + openModule(moduleName: string): ProjectRoot { + const pkgJsonPath = this.require.resolve(`${moduleName}/package.json`, { paths: [this.root] }); + return getProjectRoot(path.dirname(pkgJsonPath)); + } + + /** + * Get the path to a bin entry for a js package. + */ + getBinPath(command: string): string | undefined { + const bin = this.manifest.bin; + if (bin) { + const binRelative = typeof bin === 'string' ? bin : bin[command]; + if (binRelative) { + return normalizePath(path.join(this.root, binRelative)); + } + } + return undefined; + } + + private initKeys(manifest: PackageManifest) { + const keys: string[] = []; + for (const key of defaultKeyOrder) { + if (key in manifest) { + keys.push(key); + } + } + let prevIndex = -1; + for (const key of Object.keys(manifest)) { + const currentIndex = keys.indexOf(key); + if (!keys.includes(key)) { + // insert key in the first position after prevIndex + prevIndex++; + keys.splice(prevIndex, 0, key); + } else { + prevIndex = currentIndex; + } + } + return keys; + } + + get buildConfig(): RepoBuildConfig { + return { ...this.manifest.furn }; + } + + private prepManifestForWrite() { + for (const key of recordKeys) { + this.prepRecordEntryForWrite(key); + } + const reordered: Record = {}; + for (const key of this._manifestKeys) { + reordered[key] = this._manifest[key as keyof PackageManifest]; + } + this._manifest = reordered as PackageManifest; + } + + prepRecordEntryForWrite(key: K) { + const existingRecord = this.manifest[key]; + if (existingRecord) { + const keys = Object.keys(existingRecord); + if (keys.length === 0) { + this.clearManifestEntry(key); + return; + } + const orderedKeys = Object.keys(existingRecord).sort((a, b) => a.localeCompare(b)); + const newObj = Object.fromEntries(orderedKeys.map((key) => [key, existingRecord[key]])) as Required[K]; + this.setManifestEntry(key, newObj); + } + } +} diff --git a/scripts/src/utils/runScript.js b/scripts/src/utils/runScript.js index 468bbb223e..49e5dae321 100644 --- a/scripts/src/utils/runScript.js +++ b/scripts/src/utils/runScript.js @@ -1,10 +1,10 @@ // @ts-check import { spawn } from 'node:child_process'; -import { getProjectRoot } from './projectRoot.js'; +import { getProjectRoot } from './projectRoot.ts'; import os from 'node:os'; -const yarnVerb = os.platform() === 'win32' ? 'yarn.cmd' : 'yarn'; +export const yarnVerb = os.platform() === 'win32' ? 'yarn.cmd' : 'yarn'; /** @type {Record} */ const cmdToModule = { @@ -32,6 +32,25 @@ export async function runScript(command, ...args) { const verb = binPath ? process.execPath : yarnVerb; const spawnArgs = binPath ? [binPath, ...args] : ['exec', command, ...args]; + return new Promise((resolve) => { + spawn(verb, spawnArgs, { + cwd: process.cwd(), + stdio: 'inherit', + shell: verb.endsWith('.cmd') || verb.endsWith('.bat') ? true : undefined, + }).on('close', (code) => { + resolve(code ?? -1); + }); + }); +} + +/** + * @param {string} command + * @param {...string} args + * @returns {Promise} + */ +export async function runYarn(command, ...args) { + const verb = yarnVerb; + const spawnArgs = [command, ...args]; return new Promise((resolve) => { spawn(verb, spawnArgs, { cwd: process.cwd(), diff --git a/yarn.lock b/yarn.lock index a72ef914d7..53b739e03c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1967,7 +1967,17 @@ __metadata: languageName: node linkType: hard -"@emnapi/runtime@npm:^1.7.0": +"@emnapi/core@npm:^1.7.1": + version: 1.8.1 + resolution: "@emnapi/core@npm:1.8.1" + dependencies: + "@emnapi/wasi-threads": "npm:1.1.0" + tslib: "npm:^2.4.0" + checksum: 10c0/2c242f4b49779bac403e1cbcc98edacdb1c8ad36562408ba9a20663824669e930bc8493be46a2522d9dc946b8d96cd7073970bae914928c7671b5221c85b432e + languageName: node + linkType: hard + +"@emnapi/runtime@npm:^1.7.0, @emnapi/runtime@npm:^1.7.1": version: 1.8.1 resolution: "@emnapi/runtime@npm:1.8.1" dependencies: @@ -1976,6 +1986,22 @@ __metadata: languageName: node linkType: hard +"@emnapi/wasi-threads@npm:1.1.0": + version: 1.1.0 + resolution: "@emnapi/wasi-threads@npm:1.1.0" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/e6d54bf2b1e64cdd83d2916411e44e579b6ae35d5def0dea61a3c452d9921373044dff32a8b8473ae60c80692bdc39323e98b96a3f3d87ba6886b24dd0ef7ca1 + languageName: node + linkType: hard + +"@epic-web/invariant@npm:^1.0.0": + version: 1.0.0 + resolution: "@epic-web/invariant@npm:1.0.0" + checksum: 10c0/72dbeb026e4e4eb3bc9c65739b91408ca77ab7d603a2494fa2eff3790ec22892c4caba751cffdf30f5ccf0e7ba79c1e9c96cf0a357404b9432bf1365baac23ca + languageName: node + linkType: hard + "@esbuild/aix-ppc64@npm:0.25.5": version: 0.25.5 resolution: "@esbuild/aix-ppc64@npm:0.25.5" @@ -2333,7 +2359,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0, @eslint-community/eslint-utils@npm:^4.7.0": +"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.7.0 resolution: "@eslint-community/eslint-utils@npm:4.7.0" dependencies: @@ -2344,13 +2370,31 @@ __metadata: languageName: node linkType: hard -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.11.0, @eslint-community/regexpp@npm:^4.12.1": +"@eslint-community/eslint-utils@npm:^4.8.0, @eslint-community/eslint-utils@npm:^4.9.1": + version: 4.9.1 + resolution: "@eslint-community/eslint-utils@npm:4.9.1" + dependencies: + eslint-visitor-keys: "npm:^3.4.3" + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: 10c0/dc4ab5e3e364ef27e33666b11f4b86e1a6c1d7cbf16f0c6ff87b1619b3562335e9201a3d6ce806221887ff780ec9d828962a290bb910759fd40a674686503f02 + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.11.0, @eslint-community/regexpp@npm:^4.12.1": version: 4.12.1 resolution: "@eslint-community/regexpp@npm:4.12.1" checksum: 10c0/a03d98c246bcb9109aec2c08e4d10c8d010256538dcb3f56610191607214523d4fb1b00aa81df830b6dffb74c5fa0be03642513a289c567949d3e550ca11cdf6 languageName: node linkType: hard +"@eslint-community/regexpp@npm:^4.12.2": + version: 4.12.2 + resolution: "@eslint-community/regexpp@npm:4.12.2" + checksum: 10c0/fddcbc66851b308478d04e302a4d771d6917a0b3740dc351513c0da9ca2eab8a1adf99f5e0aa7ab8b13fa0df005c81adeee7e63a92f3effd7d367a163b721c2d + languageName: node + linkType: hard + "@eslint/config-array@npm:^0.21.0": version: 0.21.0 resolution: "@eslint/config-array@npm:0.21.0" @@ -2362,6 +2406,17 @@ __metadata: languageName: node linkType: hard +"@eslint/config-array@npm:^0.21.1": + version: 0.21.1 + resolution: "@eslint/config-array@npm:0.21.1" + dependencies: + "@eslint/object-schema": "npm:^2.1.7" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 10c0/2f657d4edd6ddcb920579b72e7a5b127865d4c3fb4dda24f11d5c4f445a93ca481aebdbd6bf3291c536f5d034458dbcbb298ee3b698bc6c9dd02900fe87eec3c + languageName: node + linkType: hard + "@eslint/config-helpers@npm:^0.3.0": version: 0.3.0 resolution: "@eslint/config-helpers@npm:0.3.0" @@ -2369,6 +2424,15 @@ __metadata: languageName: node linkType: hard +"@eslint/config-helpers@npm:^0.4.2": + version: 0.4.2 + resolution: "@eslint/config-helpers@npm:0.4.2" + dependencies: + "@eslint/core": "npm:^0.17.0" + checksum: 10c0/92efd7a527b2d17eb1a148409d71d80f9ac160b565ac73ee092252e8bf08ecd08670699f46b306b94f13d22e88ac88a612120e7847570dd7cdc72f234d50dcb4 + languageName: node + linkType: hard + "@eslint/core@npm:^0.14.0": version: 0.14.0 resolution: "@eslint/core@npm:0.14.0" @@ -2387,6 +2451,15 @@ __metadata: languageName: node linkType: hard +"@eslint/core@npm:^0.17.0": + version: 0.17.0 + resolution: "@eslint/core@npm:0.17.0" + dependencies: + "@types/json-schema": "npm:^7.0.15" + checksum: 10c0/9a580f2246633bc752298e7440dd942ec421860d1946d0801f0423830e67887e4aeba10ab9a23d281727a978eb93d053d1922a587d502942a713607f40ed704e + languageName: node + linkType: hard + "@eslint/eslintrc@npm:^3.3.1": version: 3.3.1 resolution: "@eslint/eslintrc@npm:3.3.1" @@ -2411,6 +2484,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:9.39.2": + version: 9.39.2 + resolution: "@eslint/js@npm:9.39.2" + checksum: 10c0/00f51c52b04ac79faebfaa65a9652b2093b9c924e945479f1f3945473f78aee83cbc76c8d70bbffbf06f7024626575b16d97b66eab16182e1d0d39daff2f26f5 + languageName: node + linkType: hard + "@eslint/object-schema@npm:^2.1.6": version: 2.1.6 resolution: "@eslint/object-schema@npm:2.1.6" @@ -2418,6 +2498,13 @@ __metadata: languageName: node linkType: hard +"@eslint/object-schema@npm:^2.1.7": + version: 2.1.7 + resolution: "@eslint/object-schema@npm:2.1.7" + checksum: 10c0/936b6e499853d1335803f556d526c86f5fe2259ed241bc665000e1d6353828edd913feed43120d150adb75570cae162cf000b5b0dfc9596726761c36b82f4e87 + languageName: node + linkType: hard + "@eslint/plugin-kit@npm:^0.3.1": version: 0.3.3 resolution: "@eslint/plugin-kit@npm:0.3.3" @@ -2428,6 +2515,16 @@ __metadata: languageName: node linkType: hard +"@eslint/plugin-kit@npm:^0.4.1": + version: 0.4.1 + resolution: "@eslint/plugin-kit@npm:0.4.1" + dependencies: + "@eslint/core": "npm:^0.17.0" + levn: "npm:^0.4.1" + checksum: 10c0/51600f78b798f172a9915dffb295e2ffb44840d583427bc732baf12ecb963eb841b253300e657da91d890f4b323d10a1bd12934bf293e3018d8bb66fdce5217b + languageName: node + linkType: hard + "@fluentui-react-native/adapters@npm:*, @fluentui-react-native/adapters@workspace:*, @fluentui-react-native/adapters@workspace:packages/utils/adapters": version: 0.0.0-use.local resolution: "@fluentui-react-native/adapters@workspace:packages/utils/adapters" @@ -2436,6 +2533,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" "@react-native/babel-preset": "npm:^0.74.0" @@ -2471,6 +2569,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" @@ -2512,6 +2611,7 @@ __metadata: "@fluentui-react-native/experimental-appearance-additions": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" @@ -2551,8 +2651,10 @@ __metadata: "@fluentui-react-native/badge": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" "@fluentui-react-native/theming-utils": "workspace:*" @@ -2614,8 +2716,10 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/experimental-shadow": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -2663,9 +2767,11 @@ __metadata: "@fluentui-react-native/experimental-activity-indicator": "workspace:*" "@fluentui-react-native/experimental-shadow": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/styling-utils": "workspace:*" @@ -2716,6 +2822,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" @@ -2755,8 +2862,10 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/styling-utils": "workspace:*" @@ -2806,9 +2915,11 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -2851,10 +2962,11 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@types/jscodeshift": "npm:^0.11.11" - "@types/node": "npm:^22.0.0" + "@types/node": "catalog:" jscodeshift: "npm:^17.0.0" yargs: "npm:^17.0.0" bin: @@ -2871,6 +2983,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/use-slots": "workspace:*" "@fluentui-react-native/use-styling": "workspace:*" @@ -2897,9 +3010,11 @@ __metadata: "@fluentui-react-native/callout": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -2946,6 +3061,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" @@ -3107,8 +3223,10 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -3150,8 +3268,10 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" "@fluentui-react-native/use-styling": "workspace:*" @@ -3191,7 +3311,9 @@ __metadata: "@fluentui-react-native/callout": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -3229,6 +3351,7 @@ __metadata: "@babel/runtime": "npm:^7.8.0" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" "@office-iss/rex-win32": "npm:0.73.11-devmain.16.0.17615.15030" @@ -3237,7 +3360,7 @@ __metadata: "@react-native/metro-config": "npm:^0.74.0" "@rnx-kit/metro-config": "npm:^2.0.0" "@types/jasmine": "catalog:" - "@types/node": "npm:^22.2.0" + "@types/node": "catalog:" "@types/react": "npm:^18.2.0" "@wdio/appium-service": "catalog:" "@wdio/cli": "catalog:" @@ -3253,29 +3376,43 @@ __metadata: appium-uiautomator2-driver: "catalog:" appium-windows-driver: "catalog:" appium-xcuitest-driver: "catalog:" - cross-env: "npm:^7.0.3" + cross-env: "catalog:" expect-webdriverio: "catalog:" metro-config: "npm:^0.80.3" react: "npm:18.2.0" react-native: "npm:^0.74.0" react-native-macos: "npm:^0.74.0" react-native-windows: "npm:^0.74.0" - rimraf: "npm:^5.0.1" + rimraf: "catalog:" ts-node: "npm:^10.7.0" webdriverio: "catalog:" + peerDependencies: + "@office-iss/react-native-win32": ^0.73.0 || ^0.74.0 + react: 18.2.0 + react-native: ^0.73.0 || ^0.74.0 + react-native-macos: ^0.73.0 || ^0.74.0 + react-native-windows: ^0.73.0 || ^0.74.0 + peerDependenciesMeta: + "@office-iss/react-native-win32": + optional: true + react-native-macos: + optional: true + react-native-windows: + optional: true languageName: unknown linkType: soft -"@fluentui-react-native/eslint-config-rules@workspace:*, @fluentui-react-native/eslint-config-rules@workspace:packages/framework/eslint-config-rules": +"@fluentui-react-native/eslint-config-rules@workspace:*, @fluentui-react-native/eslint-config-rules@workspace:packages/configs/eslint-config-rules": version: 0.0.0-use.local - resolution: "@fluentui-react-native/eslint-config-rules@workspace:packages/framework/eslint-config-rules" + resolution: "@fluentui-react-native/eslint-config-rules@workspace:packages/configs/eslint-config-rules" dependencies: + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@microsoft/eslint-plugin-sdl": "npm:^1.1.0" - "@rnx-kit/eslint-plugin": "npm:^0.8.6" - "@types/eslint": "npm:^9.0.0" - "@types/node": "npm:^22.0.0" - eslint: "npm:^9.0.0" + "@rnx-kit/eslint-plugin": "catalog:" + "@types/eslint": "npm:^9.6.1" + "@types/node": "catalog:" + eslint: "npm:^9.39.2" languageName: unknown linkType: soft @@ -3286,6 +3423,8 @@ __metadata: "@babel/core": "npm:^7.20.0" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3321,6 +3460,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3355,6 +3495,8 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3391,6 +3533,8 @@ __metadata: "@fluentui-react-native/checkbox": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" "@react-native/babel-preset": "npm:^0.74.0" @@ -3426,6 +3570,8 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3460,7 +3606,9 @@ __metadata: "@fluentui-react-native/contextual-menu": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" @@ -3498,6 +3646,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3516,6 +3665,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -3538,6 +3688,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" @@ -3575,7 +3726,9 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theming-utils": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -3617,7 +3770,9 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/text": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -3658,6 +3813,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" "@react-native/babel-preset": "npm:^0.74.0" @@ -3697,6 +3853,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" "@react-native/babel-preset": "npm:^0.74.0" @@ -3734,11 +3891,14 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@types/jest": "npm:^29.0.0" - "@types/node": "npm:^22.0.0" + "@types/node": "catalog:" "@types/react": "npm:^18.2.0" react: "npm:18.2.0" + peerDependencies: + react: 18.2.0 languageName: unknown linkType: soft @@ -3752,6 +3912,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-types": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -3795,6 +3956,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -3833,9 +3995,16 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@types/jest": "npm:^29.0.0" - "@types/node": "npm:^22.0.0" + "@types/node": "catalog:" + react: "npm:18.2.0" + peerDependencies: + react: 18.2.0 + peerDependenciesMeta: + react: + optional: true languageName: unknown linkType: soft @@ -3847,9 +4016,11 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/styling-utils": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" @@ -3894,6 +4065,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" @@ -3933,7 +4105,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" - "@rnx-kit/jest-preset": "npm:^0.2.1" + "@rnx-kit/jest-preset": "catalog:" "@types/node": "npm:^22.0.0" babel-jest: "npm:^29.0.0" jest: "npm:^29.2.1" @@ -3942,6 +4114,16 @@ __metadata: languageName: unknown linkType: soft +"@fluentui-react-native/kit-config@workspace:*, @fluentui-react-native/kit-config@workspace:packages/configs/kit-config": + version: 0.0.0-use.local + resolution: "@fluentui-react-native/kit-config@workspace:packages/configs/kit-config" + dependencies: + "@rnx-kit/align-deps": "npm:^3.4.0" + "@rnx-kit/config": "npm:^0.7.4" + "@rnx-kit/tsconfig": "npm:^2.1.1" + languageName: unknown + linkType: soft + "@fluentui-react-native/link@npm:*, @fluentui-react-native/link@workspace:*, @fluentui-react-native/link@workspace:packages/components/Link": version: 0.0.0-use.local resolution: "@fluentui-react-native/link@workspace:packages/components/Link" @@ -3951,8 +4133,10 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -3993,10 +4177,17 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@types/jest": "npm:^29.0.0" - "@types/node": "npm:^22.0.0" + "@types/node": "catalog:" + react: "npm:18.2.0" tslib: "npm:^2.3.1" + peerDependencies: + react: 18.2.0 + peerDependenciesMeta: + react: + optional: true languageName: unknown linkType: soft @@ -4009,8 +4200,10 @@ __metadata: "@fluentui-react-native/button": "workspace:*" "@fluentui-react-native/contextual-menu": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" @@ -4056,9 +4249,11 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -4069,7 +4264,7 @@ __metadata: "@office-iss/react-native-win32": "npm:^0.74.0" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" - "@types/node": "npm:^22.0.0" + "@types/node": "catalog:" "@types/react": "npm:~18.2.0" "@types/react-test-renderer": "npm:^18.2.0" react: "npm:18.2.0" @@ -4103,15 +4298,16 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" - "@react-native/metro-config": "npm:^0.74.0" "@types/jest": "npm:^29.0.0" react: "npm:18.2.0" - react-native: "npm:^0.74.0" peerDependencies: react: 18.2.0 - react-native: ^0.73.0 || ^0.74.0 + peerDependenciesMeta: + react: + optional: true languageName: unknown linkType: soft @@ -4127,9 +4323,11 @@ __metadata: "@fluentui-react-native/experimental-appearance-additions": "workspace:*" "@fluentui-react-native/experimental-shadow": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" @@ -4176,6 +4374,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/menu": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" @@ -4216,6 +4415,8 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -4256,6 +4457,8 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/persona-coin": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -4295,6 +4498,8 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -4328,6 +4533,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -4364,8 +4570,10 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/pressable": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" @@ -4417,12 +4625,13 @@ __metadata: "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-babel-transformer": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" - "@rnx-kit/align-deps": "npm:^3.0.0" - "@rnx-kit/lint-lockfile": "npm:^0.1.0" + "@rnx-kit/align-deps": "catalog:" + "@rnx-kit/lint-lockfile": "catalog:" babel-jest: "npm:^29.7.0" beachball: "npm:^2.20.0" - eslint: "npm:^9.0.0" - eslint-plugin-import: "npm:^2.27.5" + cross-env: "catalog:" + eslint: "npm:^9.39.2" + eslint-plugin-import: "npm:^2.32.0" lage: "npm:^2.0.0" markdown-link-check: "npm:^3.8.7" prettier: "npm:^2.4.1" @@ -4437,14 +4646,18 @@ __metadata: resolution: "@fluentui-react-native/scripts@workspace:scripts" dependencies: "@eslint/js": "npm:^9.0.0" - "@rnx-kit/eslint-plugin": "npm:^0.8.6" - "@rnx-kit/jest-preset": "npm:^0.2.1" - "@rnx-kit/reporter": "npm:^0.1.0" - "@rnx-kit/tools-packages": "npm:^0.1.1" - "@rnx-kit/tools-typescript": "npm:^0.1.1" - "@rnx-kit/tsconfig": "npm:^2.1.1" + "@fluentui-react-native/kit-config": "workspace:*" + "@rnx-kit/align-deps": "catalog:" + "@rnx-kit/config": "catalog:" + "@rnx-kit/eslint-plugin": "catalog:" + "@rnx-kit/jest-preset": "catalog:" + "@rnx-kit/reporter": "catalog:" + "@rnx-kit/tools-packages": "catalog:" + "@rnx-kit/tools-typescript": "catalog:" + "@rnx-kit/tsconfig": "catalog:" "@types/micromatch": "npm:^4.0.9" - "@types/node": "npm:^22.0.0" + "@types/node": "catalog:" + "@typescript/native-preview": "npm:7.0.0-dev.20260113.1" chalk: "npm:^4.0.0" clipanion: "npm:^4.0.0-rc.4" depcheck: "npm:^1.0.0" @@ -4452,6 +4665,7 @@ __metadata: eslint: "npm:^9.0.0" find-up: "npm:^5.0.0" jest: "npm:^29.2.1" + knip: "catalog:" micromatch: "npm:^4.0.8" react: "npm:18.2.0" react-native: "npm:^0.74.0" @@ -4470,7 +4684,9 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" "@fluentui-react-native/use-styling": "workspace:*" @@ -4508,6 +4724,8 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/text": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" @@ -4546,7 +4764,9 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/text": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -4586,6 +4806,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -4606,8 +4827,10 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -4650,9 +4873,11 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/text": "workspace:*" @@ -4694,6 +4919,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-types": "workspace:*" "@types/jest": "npm:^29.0.0" @@ -4714,6 +4940,7 @@ __metadata: dependencies: "@babel/core": "npm:^7.20.0" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tester": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" @@ -4732,7 +4959,7 @@ __metadata: react-native-svg: "npm:>=15.4.0 <15.13.0" react-native-svg-transformer: "npm:^1.0.0" react-test-renderer: "npm:18.2.0" - rimraf: "npm:^5.0.1" + rimraf: "catalog:" peerDependencies: "@office-iss/react-native-win32": ^0.74.0 peerDependenciesMeta: @@ -4750,6 +4977,7 @@ __metadata: "@fluentui-react-native/android-theme": "workspace:*" "@fluentui-react-native/apple-theme": "workspace:*" "@fluentui-react-native/avatar": "workspace:*" + "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/badge": "workspace:*" "@fluentui-react-native/button": "workspace:*" "@fluentui-react-native/callout": "workspace:*" @@ -4776,6 +5004,7 @@ __metadata: "@fluentui-react-native/icon": "workspace:*" "@fluentui-react-native/input": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/menu": "workspace:*" "@fluentui-react-native/menu-button": "workspace:*" "@fluentui-react-native/notification": "workspace:*" @@ -4815,8 +5044,8 @@ __metadata: "@rnx-kit/cli": "npm:^0.18.14" "@rnx-kit/metro-config": "npm:^2.1.0" "@rnx-kit/metro-resolver-symlinks": "npm:^0.2.5" - "@types/jasmine": "npm:5.1.4" - "@types/node": "npm:^22.0.0" + "@types/jasmine": "catalog:" + "@types/node": "catalog:" "@types/react": "npm:~18.2.0" "@types/react-test-renderer": "npm:^18.2.0" "@wdio/cli": "catalog:" @@ -4851,8 +5080,10 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" + "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" @@ -4894,6 +5125,7 @@ __metadata: "@fluentui-react-native/design-tokens-win32": "npm:^0.53.0" "@fluentui-react-native/design-tokens-windows": "npm:^0.53.0" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-types": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" @@ -4914,6 +5146,7 @@ __metadata: "@babel/core": "npm:^7.20.0" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -4935,6 +5168,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/theme-types": "workspace:*" @@ -4957,6 +5191,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -4978,6 +5213,7 @@ __metadata: "@fluentui-react-native/design-tokens-windows": "npm:^0.53.0" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-types": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" @@ -5012,6 +5248,7 @@ __metadata: "@fluentui-react-native/adapters": "workspace:*" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-types": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" @@ -5048,6 +5285,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" @@ -5086,6 +5324,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/metro-config": "npm:^0.74.0" "@types/jest": "npm:^29.0.0" @@ -5109,6 +5348,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/use-slot": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" @@ -5133,6 +5373,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/use-tokens": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" @@ -5158,6 +5399,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -5181,7 +5423,9 @@ __metadata: "@fluentui-react-native/adapters": "workspace:*" "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" + "@office-iss/react-native-win32": "npm:^0.74.0" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" "@types/react": "npm:~18.2.0" @@ -5190,7 +5434,7 @@ __metadata: react-native-macos: "npm:^0.74.0" react-native-windows: "npm:^0.74.0" peerDependencies: - "@office-iss/react-native-win32": ^0.74.0 + "@office-iss/react-native-win32": ^0.73.0 || ^0.74.0 react: 18.2.0 react-native: ^0.73.0 || ^0.74.0 react-native-macos: ^0.73.0 || ^0.74.0 @@ -5216,6 +5460,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme": "workspace:*" "@fluentui-react-native/theme-tokens": "workspace:*" @@ -5272,6 +5517,7 @@ __metadata: "@fluentui-react-native/focus-zone": "workspace:*" "@fluentui-react-native/interactive-hooks": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/link": "workspace:*" "@fluentui-react-native/menu-button": "workspace:*" "@fluentui-react-native/persona": "workspace:*" @@ -6315,6 +6561,17 @@ __metadata: languageName: node linkType: hard +"@napi-rs/wasm-runtime@npm:^1.1.1": + version: 1.1.1 + resolution: "@napi-rs/wasm-runtime@npm:1.1.1" + dependencies: + "@emnapi/core": "npm:^1.7.1" + "@emnapi/runtime": "npm:^1.7.1" + "@tybys/wasm-util": "npm:^0.10.1" + checksum: 10c0/04d57b67e80736e41fe44674a011878db0a8ad893f4d44abb9d3608debb7c174224cba2796ed5b0c1d367368159f3ca6be45f1c59222f70e32ddc880f803d447 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -6519,6 +6776,148 @@ __metadata: languageName: node linkType: hard +"@oxc-resolver/binding-android-arm-eabi@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-android-arm-eabi@npm:11.16.3" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@oxc-resolver/binding-android-arm64@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-android-arm64@npm:11.16.3" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-darwin-arm64@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-darwin-arm64@npm:11.16.3" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-darwin-x64@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-darwin-x64@npm:11.16.3" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-freebsd-x64@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-freebsd-x64@npm:11.16.3" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.16.3" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm-musleabihf@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-arm-musleabihf@npm:11.16.3" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm64-gnu@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-arm64-gnu@npm:11.16.3" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-arm64-musl@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-arm64-musl@npm:11.16.3" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-ppc64-gnu@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-ppc64-gnu@npm:11.16.3" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-riscv64-gnu@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-riscv64-gnu@npm:11.16.3" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-riscv64-musl@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-riscv64-musl@npm:11.16.3" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-s390x-gnu@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-s390x-gnu@npm:11.16.3" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-x64-gnu@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-x64-gnu@npm:11.16.3" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-resolver/binding-linux-x64-musl@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-linux-x64-musl@npm:11.16.3" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxc-resolver/binding-openharmony-arm64@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-openharmony-arm64@npm:11.16.3" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-wasm32-wasi@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-wasm32-wasi@npm:11.16.3" + dependencies: + "@napi-rs/wasm-runtime": "npm:^1.1.1" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@oxc-resolver/binding-win32-arm64-msvc@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-win32-arm64-msvc@npm:11.16.3" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-resolver/binding-win32-ia32-msvc@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-win32-ia32-msvc@npm:11.16.3" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@oxc-resolver/binding-win32-x64-msvc@npm:11.16.3": + version: 11.16.3 + resolution: "@oxc-resolver/binding-win32-x64-msvc@npm:11.16.3" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -7118,12 +7517,12 @@ __metadata: languageName: node linkType: hard -"@rnx-kit/align-deps@npm:^3.0.0, @rnx-kit/align-deps@npm:^3.1.0": - version: 3.3.2 - resolution: "@rnx-kit/align-deps@npm:3.3.2" +"@rnx-kit/align-deps@npm:^3.1.0, @rnx-kit/align-deps@npm:^3.4.0": + version: 3.4.0 + resolution: "@rnx-kit/align-deps@npm:3.4.0" bin: rnx-align-deps: lib/index.js - checksum: 10c0/e68bffaaadb59f74dd8172dea629caa11cbd6998044bd60e6ed0c25e8047d29b548ac94b31c9cead5f38c269e1e1cf674c11619f9517eae5ffc7c30fbe6ea5ce + checksum: 10c0/db917363b7e8b4b24c55f5b10184f1e425820651c7650a8a2a16affc29de281dd804464dae17631594f217df11d98e1f548d0967073ffcf6a28b521aecc92cba languageName: node linkType: hard @@ -7198,49 +7597,49 @@ __metadata: languageName: node linkType: hard -"@rnx-kit/eslint-plugin@npm:^0.8.6": - version: 0.8.6 - resolution: "@rnx-kit/eslint-plugin@npm:0.8.6" +"@rnx-kit/eslint-plugin@npm:^0.9.5": + version: 0.9.5 + resolution: "@rnx-kit/eslint-plugin@npm:0.9.5" dependencies: "@react-native/eslint-plugin": "npm:^0.76.0" enhanced-resolve: "npm:^5.8.3" eslint-plugin-react: "npm:^7.35.2" - eslint-plugin-react-hooks: "npm:^5.0.0" + eslint-plugin-react-hooks: "npm:^5.2.0" typescript-eslint: "npm:^8.0.0" peerDependencies: eslint: ">=8.57.0" - checksum: 10c0/a0a6d87ce1bc2aba8127f95994a7d2df5b7e5d303e43c280cb473542b9d18df6f71d29f70278cd2c9c6beba1e5442543a342f351217645f3f55135007f9f4341 + checksum: 10c0/6b81c331a9ec8690a0f421af72171b1bc1c38f9a7586a0dee86db5bdc752c9adbc19745c4d2fa370b014a4cd15f60a14132e1601a28b1407c65e2ea16c694a76 languageName: node linkType: hard -"@rnx-kit/jest-preset@npm:^0.2.1": - version: 0.2.1 - resolution: "@rnx-kit/jest-preset@npm:0.2.1" +"@rnx-kit/jest-preset@npm:^0.3.1": + version: 0.3.1 + resolution: "@rnx-kit/jest-preset@npm:0.3.1" dependencies: "@babel/core": "npm:^7.0.0" "@babel/preset-env": "npm:^7.0.0" "@babel/preset-typescript": "npm:^7.0.0" - "@rnx-kit/tools-react-native": "npm:^2.0.3" + "@rnx-kit/tools-react-native": "npm:^2.3.2" find-up: "npm:^5.0.0" peerDependencies: - react-native: ^0.0.0-0 || >=0.63 + react-native: ^0.0.0-0 || >=0.73 peerDependenciesMeta: react-native: optional: true - checksum: 10c0/2d5c71423e90f1361a826f56bc5ec1ec4a6e4bf7937adaebd24917842c79e1e1a71759149479a7ca22959eff671b2604d05b54223858cc7e2e38f2d564a22c7f + checksum: 10c0/db49a32389617e5f2f5f2b8a95768e913cd97de643febab21d4bbd37b0ed3fa862adcccc798b0fdc33662b087ea9f92859ff0a3c65de18e8fe62bc0128c7a33e languageName: node linkType: hard -"@rnx-kit/lint-lockfile@npm:^0.1.0": - version: 0.1.0 - resolution: "@rnx-kit/lint-lockfile@npm:0.1.0" +"@rnx-kit/lint-lockfile@npm:^0.1.2": + version: 0.1.2 + resolution: "@rnx-kit/lint-lockfile@npm:0.1.2" dependencies: "@rnx-kit/config": "npm:^0.7.4" "@rnx-kit/tools-workspaces": "npm:^0.2.3" - js-yaml: "npm:^4.1.0" + js-yaml: "npm:^4.1.1" bin: lint-lockfile: lib/cli.js - checksum: 10c0/534491cdf8c058a63862fd5e38209eee5a5ed8fe725a5e6d085076ed1b8a1b4f8ed08578b9174044c53f1ddebb197624d0b767c744b7565f36b6d3cfb13b0668 + checksum: 10c0/778d5f320601ad6d3d4ec40730f4babc6d77c30dd0efa7dc0b5c1dec44306b431c6d16a58f2cb4b9376c33e7575caaf723aaf62758b440abd7949dcc5383b121 languageName: node linkType: hard @@ -7427,10 +7826,10 @@ __metadata: languageName: node linkType: hard -"@rnx-kit/tools-node@npm:^3.0.0, @rnx-kit/tools-node@npm:^3.0.1, @rnx-kit/tools-node@npm:^3.0.2": - version: 3.0.2 - resolution: "@rnx-kit/tools-node@npm:3.0.2" - checksum: 10c0/ea8cfc264e3adea18511316a7a90cacad18087561464177c5291f54fca0befe37fde88f3facbb7a102e7fa45a0816137aaa2eee30f0bcf320e35c60895e8286c +"@rnx-kit/tools-node@npm:^3.0.0, @rnx-kit/tools-node@npm:^3.0.1, @rnx-kit/tools-node@npm:^3.0.2, @rnx-kit/tools-node@npm:^3.0.3": + version: 3.0.3 + resolution: "@rnx-kit/tools-node@npm:3.0.3" + checksum: 10c0/5fa2123cb156fc6d268c95b2fa094b3ccf5f264ff5dcfd08f024454f45972093144e5745d4bcbe84e8f731faf01b7bfb6d3bca3e7c97ec89da3fc2e3e1121959 languageName: node linkType: hard @@ -7444,12 +7843,12 @@ __metadata: languageName: node linkType: hard -"@rnx-kit/tools-react-native@npm:^2.0.0, @rnx-kit/tools-react-native@npm:^2.0.3, @rnx-kit/tools-react-native@npm:^2.2.0, @rnx-kit/tools-react-native@npm:^2.3.0": - version: 2.3.1 - resolution: "@rnx-kit/tools-react-native@npm:2.3.1" +"@rnx-kit/tools-react-native@npm:^2.0.0, @rnx-kit/tools-react-native@npm:^2.0.3, @rnx-kit/tools-react-native@npm:^2.2.0, @rnx-kit/tools-react-native@npm:^2.3.0, @rnx-kit/tools-react-native@npm:^2.3.2": + version: 2.3.2 + resolution: "@rnx-kit/tools-react-native@npm:2.3.2" dependencies: - "@rnx-kit/tools-node": "npm:^3.0.0" - checksum: 10c0/60f463e6929657731f07caf7e2a7136957d083636c1bc6baf81e78b5faac6fd2047d2c78744ed58b83c9b480a918ebcd70b65b6c741a5e4f7dbfecbdacd59ba3 + "@rnx-kit/tools-node": "npm:^3.0.3" + checksum: 10c0/eb12603e0a036d953689e2fb1db4995830cb74eb28847bf1f7d0600ab771b7c5b12388c0b93277690ae8d9bce03a13c56bbff099e867a957659bb1b14d888c2b languageName: node linkType: hard @@ -7800,6 +8199,15 @@ __metadata: languageName: node linkType: hard +"@tybys/wasm-util@npm:^0.10.1": + version: 0.10.1 + resolution: "@tybys/wasm-util@npm:0.10.1" + dependencies: + tslib: "npm:^2.4.0" + checksum: 10c0/b255094f293794c6d2289300c5fbcafbb5532a3aed3a5ffd2f8dc1828e639b88d75f6a376dd8f94347a44813fd7a7149d8463477a9a49525c8b2dcaa38c2d1e8 + languageName: node + linkType: hard + "@types/babel__core@npm:^7.1.14": version: 7.20.5 resolution: "@types/babel__core@npm:7.20.5" @@ -7848,7 +8256,7 @@ __metadata: languageName: node linkType: hard -"@types/eslint@npm:^9.0.0": +"@types/eslint@npm:^9.6.1": version: 9.6.1 resolution: "@types/eslint@npm:9.6.1" dependencies: @@ -7913,13 +8321,6 @@ __metadata: languageName: node linkType: hard -"@types/jasmine@npm:5.1.4": - version: 5.1.4 - resolution: "@types/jasmine@npm:5.1.4" - checksum: 10c0/4b8d27182e62f5003db1f1f174a810ace704e411cbfd0bc41edbaacf307246aec1f9bd20812846700198fc881268834ffde1d5301f819b1ba7caac9662534ceb - languageName: node - linkType: hard - "@types/jest@npm:^29.0.0": version: 29.5.13 resolution: "@types/jest@npm:29.5.13" @@ -8006,7 +8407,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^22.0.0, @types/node@npm:^22.2.0": +"@types/node@npm:^22.0.0": version: 22.16.5 resolution: "@types/node@npm:22.16.5" dependencies: @@ -8015,6 +8416,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^22.19.7": + version: 22.19.7 + resolution: "@types/node@npm:22.19.7" + dependencies: + undici-types: "npm:~6.21.0" + checksum: 10c0/0a4b13fd51306a72393f145693063e074be1bf884bdc642c879436d2c053ac9d573cc0a0d69867f60b14d3f1b9d03317e8ec0e4377f7527cb645e7b2a5d34045 + languageName: node + linkType: hard + "@types/normalize-package-data@npm:^2.4.0, @types/normalize-package-data@npm:^2.4.1": version: 2.4.4 resolution: "@types/normalize-package-data@npm:2.4.4" @@ -8131,7 +8541,7 @@ __metadata: languageName: node linkType: hard -"@types/yargs@npm:^17.0.33, @types/yargs@npm:^17.0.8": +"@types/yargs@npm:^17.0.33": version: 17.0.35 resolution: "@types/yargs@npm:17.0.35" dependencies: @@ -8140,6 +8550,15 @@ __metadata: languageName: node linkType: hard +"@types/yargs@npm:^17.0.8": + version: 17.0.22 + resolution: "@types/yargs@npm:17.0.22" + dependencies: + "@types/yargs-parser": "npm:*" + checksum: 10c0/1c5ed11692e495c49caf3c7cb2ec2aa973634cc7298ce4ecf8255177d908040cf51ced53731553380727a42299f06645c24d3c6eaa38cbd5d910ed0e332c9530 + languageName: node + linkType: hard + "@types/yauzl@npm:^2.9.1": version: 2.10.0 resolution: "@types/yauzl@npm:2.10.0" @@ -8149,140 +8568,219 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.38.0" +"@typescript-eslint/eslint-plugin@npm:8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/eslint-plugin@npm:8.53.1" dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.38.0" - "@typescript-eslint/type-utils": "npm:8.38.0" - "@typescript-eslint/utils": "npm:8.38.0" - "@typescript-eslint/visitor-keys": "npm:8.38.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^7.0.0" + "@eslint-community/regexpp": "npm:^4.12.2" + "@typescript-eslint/scope-manager": "npm:8.53.1" + "@typescript-eslint/type-utils": "npm:8.53.1" + "@typescript-eslint/utils": "npm:8.53.1" + "@typescript-eslint/visitor-keys": "npm:8.53.1" + ignore: "npm:^7.0.5" natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.1.0" + ts-api-utils: "npm:^2.4.0" peerDependencies: - "@typescript-eslint/parser": ^8.38.0 + "@typescript-eslint/parser": ^8.53.1 eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/199b82e9f0136baecf515df7c31bfed926a7c6d4e6298f64ee1a77c8bdd7a8cb92a2ea55a5a345c9f2948a02f7be6d72530efbe803afa1892b593fbd529d0c27 + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/d24e41d0117ef841cc05e4c52d33277de2e57981fa38412f93034082a3467f804201c180f1baca9f967388c7e5965ffcc61e445cf726a0064b8ed71a84f59aa2 languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/parser@npm:8.38.0" +"@typescript-eslint/parser@npm:8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/parser@npm:8.53.1" dependencies: - "@typescript-eslint/scope-manager": "npm:8.38.0" - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/typescript-estree": "npm:8.38.0" - "@typescript-eslint/visitor-keys": "npm:8.38.0" - debug: "npm:^4.3.4" + "@typescript-eslint/scope-manager": "npm:8.53.1" + "@typescript-eslint/types": "npm:8.53.1" + "@typescript-eslint/typescript-estree": "npm:8.53.1" + "@typescript-eslint/visitor-keys": "npm:8.53.1" + debug: "npm:^4.4.3" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/5580c2a328f0c15f85e4a0961a07584013cc0aca85fe868486187f7c92e9e3f6602c6e3dab917b092b94cd492ed40827c6f5fea42730bef88eb17592c947adf4 + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/fb7602dc3ea45b838f4da2d0173161b222442ed2007487dfce57d6ce24ff16606ec99de9eb6ac114a815e11a47248303d941dca1a7bf13f70350372cee509886 languageName: node linkType: hard -"@typescript-eslint/project-service@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/project-service@npm:8.38.0" +"@typescript-eslint/project-service@npm:8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/project-service@npm:8.53.1" dependencies: - "@typescript-eslint/tsconfig-utils": "npm:^8.38.0" - "@typescript-eslint/types": "npm:^8.38.0" - debug: "npm:^4.3.4" + "@typescript-eslint/tsconfig-utils": "npm:^8.53.1" + "@typescript-eslint/types": "npm:^8.53.1" + debug: "npm:^4.4.3" peerDependencies: - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/87d2f55521e289bbcdc666b1f4587ee2d43039cee927310b05abaa534b528dfb1b5565c1545bb4996d7fbdf9d5a3b0aa0e6c93a8f1289e3fcfd60d246364a884 + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/eecc7ad86b45c6969a05e984e645a4ece2a1cc27d825af046efb6ed369cab32062c17f33a1154ab6dcab349099885db7b39945f1b318753395630f3dfa1e5895 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/scope-manager@npm:8.38.0" +"@typescript-eslint/scope-manager@npm:8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/scope-manager@npm:8.53.1" dependencies: - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/visitor-keys": "npm:8.38.0" - checksum: 10c0/ceaf489ea1f005afb187932a7ee363dfe1e0f7cc3db921283991e20e4c756411a5e25afbec72edd2095d6a4384f73591f4c750cf65b5eaa650c90f64ef9fe809 + "@typescript-eslint/types": "npm:8.53.1" + "@typescript-eslint/visitor-keys": "npm:8.53.1" + checksum: 10c0/d971eb115f2a2c4c25c79df9eee68b93354b32d7cc1174c167241cd2ebbc77858fe7a032c7ecdbacef936b56e8317b56037d21461cb83b4789f7e764e9faa455 languageName: node linkType: hard -"@typescript-eslint/tsconfig-utils@npm:8.38.0, @typescript-eslint/tsconfig-utils@npm:^8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/tsconfig-utils@npm:8.38.0" +"@typescript-eslint/tsconfig-utils@npm:8.53.1, @typescript-eslint/tsconfig-utils@npm:^8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.53.1" peerDependencies: - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/1a90da16bf1f7cfbd0303640a8ead64a0080f2b1d5969994bdac3b80abfa1177f0c6fbf61250bae082e72cf5014308f2f5cc98edd6510202f13420a7ffd07a84 + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/e2bfa91f9306dbfa82bdcb64bfcf634fee6313b03e93b35b0010907983c9ffc73c732264deff870896dea18f34b872d39d90d32f7631fd4618e4a6866ffff578 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/type-utils@npm:8.38.0" +"@typescript-eslint/type-utils@npm:8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/type-utils@npm:8.53.1" dependencies: - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/typescript-estree": "npm:8.38.0" - "@typescript-eslint/utils": "npm:8.38.0" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^2.1.0" + "@typescript-eslint/types": "npm:8.53.1" + "@typescript-eslint/typescript-estree": "npm:8.53.1" + "@typescript-eslint/utils": "npm:8.53.1" + debug: "npm:^4.4.3" + ts-api-utils: "npm:^2.4.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/27795c4bd0be395dda3424e57d746639c579b7522af1c17731b915298a6378fd78869e8e141526064b6047db2c86ba06444469ace19c98cda5779d06f4abd37c + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/d97ac3bf901eeeb1ad01a423409db654f849d49f8ce7a2b0d482e093d5c8c9cab9ed810554d130a1eaf4921ddb2d98dbe9a8d22bfd08fd6c8ab004fb640a3fbe languageName: node linkType: hard -"@typescript-eslint/types@npm:8.38.0, @typescript-eslint/types@npm:^8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/types@npm:8.38.0" - checksum: 10c0/f0ac0060c98c0f3d1871f107177b6ae25a0f1846ca8bd8cfc7e1f1dd0ddce293cd8ac4a5764d6a767de3503d5d01defcd68c758cb7ba6de52f82b209a918d0d2 +"@typescript-eslint/types@npm:8.53.1, @typescript-eslint/types@npm:^8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/types@npm:8.53.1" + checksum: 10c0/fa49f5f60de6851de45a9aff0a3ba3c4d00a0991100414e8af1a5d6f32764a48b6b7c0f65748a651f0da0e57df0745cdb8f11c590fa0fb22dd0e54e4c6b5c878 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.38.0" +"@typescript-eslint/typescript-estree@npm:8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/typescript-estree@npm:8.53.1" dependencies: - "@typescript-eslint/project-service": "npm:8.38.0" - "@typescript-eslint/tsconfig-utils": "npm:8.38.0" - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/visitor-keys": "npm:8.38.0" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^2.1.0" + "@typescript-eslint/project-service": "npm:8.53.1" + "@typescript-eslint/tsconfig-utils": "npm:8.53.1" + "@typescript-eslint/types": "npm:8.53.1" + "@typescript-eslint/visitor-keys": "npm:8.53.1" + debug: "npm:^4.4.3" + minimatch: "npm:^9.0.5" + semver: "npm:^7.7.3" + tinyglobby: "npm:^0.2.15" + ts-api-utils: "npm:^2.4.0" peerDependencies: - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/00a00f6549877f4ae5c2847fa5ac52bf42cbd59a87533856c359e2746e448ed150b27a6137c92fd50c06e6a4b39e386d6b738fac97d80d05596e81ce55933230 + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/e1b48990ba90f0ee5c9630fe91e2d5123c55348e374e586de6cf25e6e03e6e8274bf15317794d171a2e82d9dc663c229807e603ecc661dbe70d61bd23d0c37c4 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/utils@npm:8.38.0" +"@typescript-eslint/utils@npm:8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/utils@npm:8.53.1" dependencies: - "@eslint-community/eslint-utils": "npm:^4.7.0" - "@typescript-eslint/scope-manager": "npm:8.38.0" - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/typescript-estree": "npm:8.38.0" + "@eslint-community/eslint-utils": "npm:^4.9.1" + "@typescript-eslint/scope-manager": "npm:8.53.1" + "@typescript-eslint/types": "npm:8.53.1" + "@typescript-eslint/typescript-estree": "npm:8.53.1" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/e97a45bf44f315f9ed8c2988429e18c88e3369c9ee3227ee86446d2d49f7325abebbbc9ce801e178f676baa986d3e1fd4b5391f1640c6eb8944c123423ae43bb + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/9a2a11c00b97eb9a053782e303cc384649807779e9adeb0b645bc198c83f54431f7ca56d4b38411dcf7ed06a2c2d9aa129874c20c037de2393a4cd0fa3b93c25 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:8.53.1": + version: 8.53.1 + resolution: "@typescript-eslint/visitor-keys@npm:8.53.1" + dependencies: + "@typescript-eslint/types": "npm:8.53.1" + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10c0/73a21d34052bcb0b46ed738f8fddb76ae8f56a0c27932616b49022cf8603c3e36bb6ab30acd709f9bc05c673708180527b4c4aaffcb858acfc66d8fb39cc6c29 + languageName: node + linkType: hard + +"@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20260113.1": + version: 7.0.0-dev.20260113.1 + resolution: "@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20260113.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/native-preview-darwin-x64@npm:7.0.0-dev.20260113.1": + version: 7.0.0-dev.20260113.1 + resolution: "@typescript/native-preview-darwin-x64@npm:7.0.0-dev.20260113.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@typescript/native-preview-linux-arm64@npm:7.0.0-dev.20260113.1": + version: 7.0.0-dev.20260113.1 + resolution: "@typescript/native-preview-linux-arm64@npm:7.0.0-dev.20260113.1" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/native-preview-linux-arm@npm:7.0.0-dev.20260113.1": + version: 7.0.0-dev.20260113.1 + resolution: "@typescript/native-preview-linux-arm@npm:7.0.0-dev.20260113.1" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@typescript/native-preview-linux-x64@npm:7.0.0-dev.20260113.1": + version: 7.0.0-dev.20260113.1 + resolution: "@typescript/native-preview-linux-x64@npm:7.0.0-dev.20260113.1" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@typescript/native-preview-win32-arm64@npm:7.0.0-dev.20260113.1": + version: 7.0.0-dev.20260113.1 + resolution: "@typescript/native-preview-win32-arm64@npm:7.0.0-dev.20260113.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/native-preview-win32-x64@npm:7.0.0-dev.20260113.1": + version: 7.0.0-dev.20260113.1 + resolution: "@typescript/native-preview-win32-x64@npm:7.0.0-dev.20260113.1" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.38.0" +"@typescript/native-preview@npm:7.0.0-dev.20260113.1": + version: 7.0.0-dev.20260113.1 + resolution: "@typescript/native-preview@npm:7.0.0-dev.20260113.1" dependencies: - "@typescript-eslint/types": "npm:8.38.0" - eslint-visitor-keys: "npm:^4.2.1" - checksum: 10c0/071a756e383f41a6c9e51d78c8c64bd41cd5af68b0faef5fbaec4fa5dbd65ec9e4cd610c2e2cdbe9e2facc362995f202850622b78e821609a277b5b601a1d4ec + "@typescript/native-preview-darwin-arm64": "npm:7.0.0-dev.20260113.1" + "@typescript/native-preview-darwin-x64": "npm:7.0.0-dev.20260113.1" + "@typescript/native-preview-linux-arm": "npm:7.0.0-dev.20260113.1" + "@typescript/native-preview-linux-arm64": "npm:7.0.0-dev.20260113.1" + "@typescript/native-preview-linux-x64": "npm:7.0.0-dev.20260113.1" + "@typescript/native-preview-win32-arm64": "npm:7.0.0-dev.20260113.1" + "@typescript/native-preview-win32-x64": "npm:7.0.0-dev.20260113.1" + dependenciesMeta: + "@typescript/native-preview-darwin-arm64": + optional: true + "@typescript/native-preview-darwin-x64": + optional: true + "@typescript/native-preview-linux-arm": + optional: true + "@typescript/native-preview-linux-arm64": + optional: true + "@typescript/native-preview-linux-x64": + optional: true + "@typescript/native-preview-win32-arm64": + optional: true + "@typescript/native-preview-win32-x64": + optional: true + bin: + tsgo: bin/tsgo.js + checksum: 10c0/96e224aabdf4775e3d6cd375de6fc5cb407ee4876498e8f4902246a5551162cb9a554743f765fc1b7ca75d8401ee51b1929cee60c5a36a5b6f04e9d1c75d6af9 languageName: node linkType: hard @@ -8293,6 +8791,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/metro-config": "npm:^0.74.0" "@types/jest": "npm:^29.0.0" @@ -8314,6 +8813,7 @@ __metadata: "@fluentui-react-native/default-theme": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/theme-types": "workspace:*" "@office-iss/react-native-win32": "npm:^0.74.0" @@ -8353,6 +8853,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -8374,12 +8875,14 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/tokens": "workspace:*" + "@office-iss/react-native-win32": "npm:^0.74.0" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" "@types/jest": "npm:^29.0.0" - "@types/node": "npm:^22.0.0" + "@types/node": "catalog:" "@types/react": "npm:^18.2.0" "@uifabricshared/foundation-settings": "workspace:*" react: "npm:18.2.0" @@ -8387,7 +8890,7 @@ __metadata: react-native-macos: "npm:^0.74.0" react-native-windows: "npm:^0.74.0" peerDependencies: - "@office-iss/react-native-win32": ^0.74.0 + "@office-iss/react-native-win32": ^0.73.0 || ^0.74.0 react: 18.2.0 react-native: ^0.73.0 || ^0.74.0 react-native-macos: ^0.73.0 || ^0.74.0 @@ -8411,6 +8914,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" @@ -8432,11 +8936,12 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" "@react-native/metro-config": "npm:^0.74.0" "@types/jest": "npm:^29.0.0" - "@types/node": "npm:^22.0.0" + "@types/node": "catalog:" "@uifabricshared/foundation-settings": "workspace:*" react: "npm:18.2.0" react-native: "npm:^0.74.0" @@ -8454,6 +8959,7 @@ __metadata: "@fluentui-react-native/eslint-config-rules": "workspace:*" "@fluentui-react-native/framework-base": "workspace:*" "@fluentui-react-native/jest-config": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/test-tools": "workspace:*" "@fluentui-react-native/theme-types": "workspace:*" @@ -8477,6 +8983,7 @@ __metadata: "@fluentui-react-native/babel-config": "workspace:*" "@fluentui-react-native/default-theme": "workspace:*" "@fluentui-react-native/eslint-config-rules": "workspace:*" + "@fluentui-react-native/kit-config": "workspace:*" "@fluentui-react-native/scripts": "workspace:*" "@fluentui-react-native/win32-theme": "workspace:*" "@react-native/babel-preset": "npm:^0.74.0" @@ -9638,6 +10145,22 @@ __metadata: languageName: node linkType: hard +"array-includes@npm:^3.1.9": + version: 3.1.9 + resolution: "array-includes@npm:3.1.9" + dependencies: + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.24.0" + es-object-atoms: "npm:^1.1.1" + get-intrinsic: "npm:^1.3.0" + is-string: "npm:^1.1.1" + math-intrinsics: "npm:^1.1.0" + checksum: 10c0/0235fa69078abeac05ac4250699c44996bc6f774a9cbe45db48674ce6bd142f09b327d31482ff75cf03344db4ea03eae23edb862d59378b484b47ed842574856 + languageName: node + linkType: hard + "array-union@npm:^1.0.1": version: 1.0.2 resolution: "array-union@npm:1.0.2" @@ -9675,33 +10198,34 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlastindex@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" +"array.prototype.findlastindex@npm:^1.2.6": + version: 1.2.6 + resolution: "array.prototype.findlastindex@npm:1.2.6" dependencies: - call-bind: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" + es-abstract: "npm:^1.23.9" es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/962189487728b034f3134802b421b5f39e42ee2356d13b42d2ddb0e52057ffdcc170b9524867f4f0611a6f638f4c19b31e14606e8bcbda67799e26685b195aa3 + es-object-atoms: "npm:^1.1.1" + es-shim-unscopables: "npm:^1.1.0" + checksum: 10c0/82559310d2e57ec5f8fc53d7df420e3abf0ba497935de0a5570586035478ba7d07618cb18e2d4ada2da514c8fb98a034aaf5c06caa0a57e2f7f4c4adedef5956 languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flat@npm:1.3.2" +"array.prototype.flat@npm:^1.3.3": + version: 1.3.3 + resolution: "array.prototype.flat@npm:1.3.3" dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/a578ed836a786efbb6c2db0899ae80781b476200617f65a44846cb1ed8bd8b24c8821b83703375d8af639c689497b7b07277060024b9919db94ac3e10dc8a49b + call-bind: "npm:^1.0.8" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.5" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10c0/d90e04dfbc43bb96b3d2248576753d1fb2298d2d972e29ca7ad5ec621f0d9e16ff8074dae647eac4f31f4fb7d3f561a7ac005fb01a71f51705a13b5af06a7d8a languageName: node linkType: hard -"array.prototype.flatmap@npm:^1.3.2, array.prototype.flatmap@npm:^1.3.3": +"array.prototype.flatmap@npm:^1.3.3": version: 1.3.3 resolution: "array.prototype.flatmap@npm:1.3.3" dependencies: @@ -10394,7 +10918,7 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.2, call-bind@npm:^1.0.7, call-bind@npm:^1.0.8": +"call-bind@npm:^1.0.7, call-bind@npm:^1.0.8": version: 1.0.8 resolution: "call-bind@npm:1.0.8" dependencies: @@ -11178,15 +11702,16 @@ __metadata: languageName: node linkType: hard -"cross-env@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-env@npm:7.0.3" +"cross-env@npm:^10.1.0": + version: 10.1.0 + resolution: "cross-env@npm:10.1.0" dependencies: - cross-spawn: "npm:^7.0.1" + "@epic-web/invariant": "npm:^1.0.0" + cross-spawn: "npm:^7.0.6" bin: - cross-env: src/bin/cross-env.js - cross-env-shell: src/bin/cross-env-shell.js - checksum: 10c0/f3765c25746c69fcca369655c442c6c886e54ccf3ab8c16847d5ad0e91e2f337d36eedc6599c1227904bf2a228d721e690324446876115bc8e7b32a866735ecf + cross-env: dist/bin/cross-env.js + cross-env-shell: dist/bin/cross-env-shell.js + checksum: 10c0/834a862db456ba1fedf6c6da43436b123ae38f514fa286d6f0937c14fa83f13469f77f70f2812db041ae2d84f82bac627040b8686030aca27fbdf113dfa38b63 languageName: node linkType: hard @@ -11203,7 +11728,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6": version: 7.0.6 resolution: "cross-spawn@npm:7.0.6" dependencies: @@ -11366,15 +11891,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.4.0, debug@npm:^4.4.1, debug@npm:^4.4.3": - version: 4.4.3 - resolution: "debug@npm:4.4.3" +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.4.1": + version: 4.4.1 + resolution: "debug@npm:4.4.1" dependencies: ms: "npm:^2.1.3" peerDependenciesMeta: supports-color: optional: true - checksum: 10c0/d79136ec6c83ecbefd0f6a5593da6a9c91ec4d7ddc4b54c883d6e71ec9accb5f67a1a5e96d00a328196b5b5c86d365e98d8a3a70856aaf16b4e7b1985e67f5a6 + checksum: 10c0/d2b44bc1afd912b49bb7ebb0d50a860dc93a4dd7d946e8de94abc957bb63726b7dd5aa48c18c2386c379ec024c46692e15ed3ed97d481729f929201e671fcd55 languageName: node linkType: hard @@ -11387,6 +11912,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.4.0, debug@npm:^4.4.3": + version: 4.4.3 + resolution: "debug@npm:4.4.3" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/d79136ec6c83ecbefd0f6a5593da6a9c91ec4d7ddc4b54c883d6e71ec9accb5f67a1a5e96d00a328196b5b5c86d365e98d8a3a70856aaf16b4e7b1985e67f5a6 + languageName: node + linkType: hard + "decamelize@npm:^1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" @@ -11468,7 +12005,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -11980,7 +12517,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.22.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9": +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9": version: 1.24.0 resolution: "es-abstract@npm:1.24.0" dependencies: @@ -12042,6 +12579,68 @@ __metadata: languageName: node linkType: hard +"es-abstract@npm:^1.24.0": + version: 1.24.1 + resolution: "es-abstract@npm:1.24.1" + dependencies: + array-buffer-byte-length: "npm:^1.0.2" + arraybuffer.prototype.slice: "npm:^1.0.4" + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" + data-view-buffer: "npm:^1.0.2" + data-view-byte-length: "npm:^1.0.2" + data-view-byte-offset: "npm:^1.0.1" + es-define-property: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.1.1" + es-set-tostringtag: "npm:^2.1.0" + es-to-primitive: "npm:^1.3.0" + function.prototype.name: "npm:^1.1.8" + get-intrinsic: "npm:^1.3.0" + get-proto: "npm:^1.0.1" + get-symbol-description: "npm:^1.1.0" + globalthis: "npm:^1.0.4" + gopd: "npm:^1.2.0" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.2.0" + has-symbols: "npm:^1.1.0" + hasown: "npm:^2.0.2" + internal-slot: "npm:^1.1.0" + is-array-buffer: "npm:^3.0.5" + is-callable: "npm:^1.2.7" + is-data-view: "npm:^1.0.2" + is-negative-zero: "npm:^2.0.3" + is-regex: "npm:^1.2.1" + is-set: "npm:^2.0.3" + is-shared-array-buffer: "npm:^1.0.4" + is-string: "npm:^1.1.1" + is-typed-array: "npm:^1.1.15" + is-weakref: "npm:^1.1.1" + math-intrinsics: "npm:^1.1.0" + object-inspect: "npm:^1.13.4" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.7" + own-keys: "npm:^1.0.1" + regexp.prototype.flags: "npm:^1.5.4" + safe-array-concat: "npm:^1.1.3" + safe-push-apply: "npm:^1.0.0" + safe-regex-test: "npm:^1.1.0" + set-proto: "npm:^1.0.0" + stop-iteration-iterator: "npm:^1.1.0" + string.prototype.trim: "npm:^1.2.10" + string.prototype.trimend: "npm:^1.0.9" + string.prototype.trimstart: "npm:^1.0.8" + typed-array-buffer: "npm:^1.0.3" + typed-array-byte-length: "npm:^1.0.3" + typed-array-byte-offset: "npm:^1.0.4" + typed-array-length: "npm:^1.0.7" + unbox-primitive: "npm:^1.1.0" + which-typed-array: "npm:^1.1.19" + checksum: 10c0/fca062ef8b5daacf743732167d319a212d45cb655b0bb540821d38d715416ae15b04b84fc86da9e2c89135aa7b337337b6c867f84dcde698d75d55688d5d765c + languageName: node + linkType: hard + "es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1": version: 1.0.1 resolution: "es-define-property@npm:1.0.1" @@ -12101,7 +12700,7 @@ __metadata: languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": +"es-shim-unscopables@npm:^1.0.2": version: 1.0.2 resolution: "es-shim-unscopables@npm:1.0.2" dependencies: @@ -12110,6 +12709,15 @@ __metadata: languageName: node linkType: hard +"es-shim-unscopables@npm:^1.1.0": + version: 1.1.0 + resolution: "es-shim-unscopables@npm:1.1.0" + dependencies: + hasown: "npm:^2.0.2" + checksum: 10c0/1b9702c8a1823fc3ef39035a4e958802cf294dd21e917397c561d0b3e195f383b978359816b1732d02b255ccf63e1e4815da0065b95db8d7c992037be3bbbcdb + languageName: node + linkType: hard + "es-to-primitive@npm:^1.3.0": version: 1.3.0 resolution: "es-to-primitive@npm:1.3.0" @@ -12378,15 +12986,15 @@ __metadata: languageName: node linkType: hard -"eslint-module-utils@npm:^2.12.0": - version: 2.12.0 - resolution: "eslint-module-utils@npm:2.12.0" +"eslint-module-utils@npm:^2.12.1": + version: 2.12.1 + resolution: "eslint-module-utils@npm:2.12.1" dependencies: debug: "npm:^3.2.7" peerDependenciesMeta: eslint: optional: true - checksum: 10c0/4d8b46dcd525d71276f9be9ffac1d2be61c9d54cc53c992e6333cf957840dee09381842b1acbbb15fc6b255ebab99cd481c5007ab438e5455a14abe1a0468558 + checksum: 10c0/6f4efbe7a91ae49bf67b4ab3644cb60bc5bd7db4cb5521de1b65be0847ffd3fb6bce0dd68f0995e1b312d137f768e2a1f842ee26fe73621afa05f850628fdc40 languageName: node linkType: hard @@ -12403,32 +13011,32 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-import@npm:^2.27.5": - version: 2.31.0 - resolution: "eslint-plugin-import@npm:2.31.0" +"eslint-plugin-import@npm:^2.32.0": + version: 2.32.0 + resolution: "eslint-plugin-import@npm:2.32.0" dependencies: "@rtsao/scc": "npm:^1.1.0" - array-includes: "npm:^3.1.8" - array.prototype.findlastindex: "npm:^1.2.5" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" + array-includes: "npm:^3.1.9" + array.prototype.findlastindex: "npm:^1.2.6" + array.prototype.flat: "npm:^1.3.3" + array.prototype.flatmap: "npm:^1.3.3" debug: "npm:^3.2.7" doctrine: "npm:^2.1.0" eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.12.0" + eslint-module-utils: "npm:^2.12.1" hasown: "npm:^2.0.2" - is-core-module: "npm:^2.15.1" + is-core-module: "npm:^2.16.1" is-glob: "npm:^4.0.3" minimatch: "npm:^3.1.2" object.fromentries: "npm:^2.0.8" object.groupby: "npm:^1.0.3" - object.values: "npm:^1.2.0" + object.values: "npm:^1.2.1" semver: "npm:^6.3.1" - string.prototype.trimend: "npm:^1.0.8" + string.prototype.trimend: "npm:^1.0.9" tsconfig-paths: "npm:^3.15.0" peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - checksum: 10c0/e21d116ddd1900e091ad120b3eb68c5dd5437fe2c930f1211781cd38b246f090a6b74d5f3800b8255a0ed29782591521ad44eb21c5534960a8f1fb4040fd913a + checksum: 10c0/bfb1b8fc8800398e62ddfefbf3638d185286edfed26dfe00875cc2846d954491b4f5112457831588b757fa789384e1ae585f812614c4797f0499fa234fd4a48b languageName: node linkType: hard @@ -12450,7 +13058,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^5.0.0": +"eslint-plugin-react-hooks@npm:^5.2.0": version: 5.2.0 resolution: "eslint-plugin-react-hooks@npm:5.2.0" peerDependencies: @@ -12598,6 +13206,55 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^9.39.2": + version: 9.39.2 + resolution: "eslint@npm:9.39.2" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.8.0" + "@eslint-community/regexpp": "npm:^4.12.1" + "@eslint/config-array": "npm:^0.21.1" + "@eslint/config-helpers": "npm:^0.4.2" + "@eslint/core": "npm:^0.17.0" + "@eslint/eslintrc": "npm:^3.3.1" + "@eslint/js": "npm:9.39.2" + "@eslint/plugin-kit": "npm:^0.4.1" + "@humanfs/node": "npm:^0.16.6" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@humanwhocodes/retry": "npm:^0.4.2" + "@types/estree": "npm:^1.0.6" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.6" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.4.0" + eslint-visitor-keys: "npm:^4.2.1" + espree: "npm:^10.4.0" + esquery: "npm:^1.5.0" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true + bin: + eslint: bin/eslint.js + checksum: 10c0/bb88ca8fd16bb7e1ac3e13804c54d41c583214460c0faa7b3e7c574e69c5600c7122295500fb4b0c06067831111db740931e98da1340329527658e1cf80073d3 + languageName: node + linkType: hard + "espree@npm:^10.0.1, espree@npm:^10.4.0": version: 10.4.0 resolution: "espree@npm:10.4.0" @@ -12925,7 +13582,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.1, fast-glob@npm:^3.3.2": +"fast-glob@npm:^3.2.7, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.1, fast-glob@npm:^3.3.2, fast-glob@npm:^3.3.3": version: 3.3.3 resolution: "fast-glob@npm:3.3.3" dependencies: @@ -13006,6 +13663,15 @@ __metadata: languageName: node linkType: hard +"fd-package-json@npm:^2.0.0": + version: 2.0.0 + resolution: "fd-package-json@npm:2.0.0" + dependencies: + walk-up-path: "npm:^4.0.0" + checksum: 10c0/a0a48745257bc09c939486608dad9f2ced238f0c64266222cc881618ed4c8f6aa0ccfe45a1e6d4f9ce828509e8d617cec60e2a114851bebb1ff4886dc5ed5112 + languageName: node + linkType: hard + "fd-slicer@npm:~1.1.0": version: 1.1.0 resolution: "fd-slicer@npm:1.1.0" @@ -13015,6 +13681,18 @@ __metadata: languageName: node linkType: hard +"fdir@npm:^6.5.0": + version: 6.5.0 + resolution: "fdir@npm:6.5.0" + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + checksum: 10c0/e345083c4306b3aed6cb8ec551e26c36bab5c511e99ea4576a16750ddc8d3240e63826cc624f5ae17ad4dc82e68a253213b60d556c11bfad064b7607847ed07f + languageName: node + linkType: hard + "fecha@npm:^4.2.0": version: 4.2.3 resolution: "fecha@npm:4.2.3" @@ -13247,6 +13925,17 @@ __metadata: languageName: node linkType: hard +"formatly@npm:^0.3.0": + version: 0.3.0 + resolution: "formatly@npm:0.3.0" + dependencies: + fd-package-json: "npm:^2.0.0" + bin: + formatly: bin/index.mjs + checksum: 10c0/ef9dbd3cdaee649e9604ea060d8d62d8131eb81117634336592ee2193fc7c98a3f1f1b5d09a045dbd36287ba88edf868ef179d39fbda2f34fbe2be70c42dd014 + languageName: node + linkType: hard + "forwarded@npm:0.2.0": version: 0.2.0 resolution: "forwarded@npm:0.2.0" @@ -13639,7 +14328,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.3.7, glob@npm:^10.5.0": +"glob@npm:^10.0.0, glob@npm:^10.2.2, glob@npm:^10.5.0": version: 10.5.0 resolution: "glob@npm:10.5.0" dependencies: @@ -13777,13 +14466,6 @@ __metadata: languageName: node linkType: hard -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10c0/e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31 - languageName: node - linkType: hard - "handle-thing@npm:^2.0.0": version: 2.0.1 resolution: "handle-thing@npm:2.0.1" @@ -14148,7 +14830,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^7.0.0": +"ignore@npm:^7.0.5": version: 7.0.5 resolution: "ignore@npm:7.0.5" checksum: 10c0/ae00db89fe873064a093b8999fe4cc284b13ef2a178636211842cceb650b9c3e390d3339191acb145d81ed5379d2074840cf0c33a20bdbd6f32821f79eb4ad5d @@ -14418,7 +15100,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.16.0, is-core-module@npm:^2.8.1": +"is-core-module@npm:^2.12.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.16.0, is-core-module@npm:^2.16.1, is-core-module@npm:^2.8.1": version: 2.16.1 resolution: "is-core-module@npm:2.16.1" dependencies: @@ -15445,6 +16127,15 @@ __metadata: languageName: node linkType: hard +"jiti@npm:^2.6.0": + version: 2.6.1 + resolution: "jiti@npm:2.6.1" + bin: + jiti: lib/jiti-cli.mjs + checksum: 10c0/79b2e96a8e623f66c1b703b98ec1b8be4500e1d217e09b09e343471bbb9c105381b83edbb979d01cef18318cc45ce6e153571b6c83122170eefa531c64b6789b + languageName: node + linkType: hard + "jju@npm:^1.4.0": version: 1.4.0 resolution: "jju@npm:1.4.0" @@ -15484,14 +16175,14 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^4.0.0, js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" +"js-yaml@npm:^4.0.0, js-yaml@npm:^4.1.0, js-yaml@npm:^4.1.1": + version: 4.1.1 + resolution: "js-yaml@npm:4.1.1" dependencies: argparse: "npm:^2.0.1" bin: js-yaml: bin/js-yaml.js - checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f + checksum: 10c0/561c7d7088c40a9bb53cc75becbfb1df6ae49b34b5e6e5a81744b14ae8667ec564ad2527709d1a6e7d5e5fa6d483aa0f373a50ad98d42fde368ec4a190d4fae7 languageName: node linkType: hard @@ -15777,6 +16468,32 @@ __metadata: languageName: node linkType: hard +"knip@npm:^5.81.0": + version: 5.81.0 + resolution: "knip@npm:5.81.0" + dependencies: + "@nodelib/fs.walk": "npm:^1.2.3" + fast-glob: "npm:^3.3.3" + formatly: "npm:^0.3.0" + jiti: "npm:^2.6.0" + js-yaml: "npm:^4.1.1" + minimist: "npm:^1.2.8" + oxc-resolver: "npm:^11.15.0" + picocolors: "npm:^1.1.1" + picomatch: "npm:^4.0.1" + smol-toml: "npm:^1.5.2" + strip-json-comments: "npm:5.0.3" + zod: "npm:^4.1.11" + peerDependencies: + "@types/node": ">=18" + typescript: ">=5.0.4 <7" + bin: + knip: bin/knip.js + knip-bun: bin/knip-bun.js + checksum: 10c0/f403863d87ac0c0fedee124ed0e5f2d5fd8ece756192a62e62917898895cf38c7555088307915d2ae2e3e0f77c74ae1b0e45048daf4b46b22b2a2bb082025c84 + languageName: node + linkType: hard + "koffi@npm:^2.8.1": version: 2.8.5 resolution: "koffi@npm:2.8.5" @@ -16748,7 +17465,7 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.0, minimist@npm:^1.2.6": +"minimist@npm:^1.2.0, minimist@npm:^1.2.6, minimist@npm:^1.2.8": version: 1.2.8 resolution: "minimist@npm:1.2.8" checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 @@ -17383,7 +18100,7 @@ __metadata: languageName: node linkType: hard -"object.values@npm:^1.2.0, object.values@npm:^1.2.1": +"object.values@npm:^1.2.1": version: 1.2.1 resolution: "object.values@npm:1.2.1" dependencies: @@ -17549,6 +18266,75 @@ __metadata: languageName: node linkType: hard +"oxc-resolver@npm:^11.15.0": + version: 11.16.3 + resolution: "oxc-resolver@npm:11.16.3" + dependencies: + "@oxc-resolver/binding-android-arm-eabi": "npm:11.16.3" + "@oxc-resolver/binding-android-arm64": "npm:11.16.3" + "@oxc-resolver/binding-darwin-arm64": "npm:11.16.3" + "@oxc-resolver/binding-darwin-x64": "npm:11.16.3" + "@oxc-resolver/binding-freebsd-x64": "npm:11.16.3" + "@oxc-resolver/binding-linux-arm-gnueabihf": "npm:11.16.3" + "@oxc-resolver/binding-linux-arm-musleabihf": "npm:11.16.3" + "@oxc-resolver/binding-linux-arm64-gnu": "npm:11.16.3" + "@oxc-resolver/binding-linux-arm64-musl": "npm:11.16.3" + "@oxc-resolver/binding-linux-ppc64-gnu": "npm:11.16.3" + "@oxc-resolver/binding-linux-riscv64-gnu": "npm:11.16.3" + "@oxc-resolver/binding-linux-riscv64-musl": "npm:11.16.3" + "@oxc-resolver/binding-linux-s390x-gnu": "npm:11.16.3" + "@oxc-resolver/binding-linux-x64-gnu": "npm:11.16.3" + "@oxc-resolver/binding-linux-x64-musl": "npm:11.16.3" + "@oxc-resolver/binding-openharmony-arm64": "npm:11.16.3" + "@oxc-resolver/binding-wasm32-wasi": "npm:11.16.3" + "@oxc-resolver/binding-win32-arm64-msvc": "npm:11.16.3" + "@oxc-resolver/binding-win32-ia32-msvc": "npm:11.16.3" + "@oxc-resolver/binding-win32-x64-msvc": "npm:11.16.3" + dependenciesMeta: + "@oxc-resolver/binding-android-arm-eabi": + optional: true + "@oxc-resolver/binding-android-arm64": + optional: true + "@oxc-resolver/binding-darwin-arm64": + optional: true + "@oxc-resolver/binding-darwin-x64": + optional: true + "@oxc-resolver/binding-freebsd-x64": + optional: true + "@oxc-resolver/binding-linux-arm-gnueabihf": + optional: true + "@oxc-resolver/binding-linux-arm-musleabihf": + optional: true + "@oxc-resolver/binding-linux-arm64-gnu": + optional: true + "@oxc-resolver/binding-linux-arm64-musl": + optional: true + "@oxc-resolver/binding-linux-ppc64-gnu": + optional: true + "@oxc-resolver/binding-linux-riscv64-gnu": + optional: true + "@oxc-resolver/binding-linux-riscv64-musl": + optional: true + "@oxc-resolver/binding-linux-s390x-gnu": + optional: true + "@oxc-resolver/binding-linux-x64-gnu": + optional: true + "@oxc-resolver/binding-linux-x64-musl": + optional: true + "@oxc-resolver/binding-openharmony-arm64": + optional: true + "@oxc-resolver/binding-wasm32-wasi": + optional: true + "@oxc-resolver/binding-win32-arm64-msvc": + optional: true + "@oxc-resolver/binding-win32-ia32-msvc": + optional: true + "@oxc-resolver/binding-win32-x64-msvc": + optional: true + checksum: 10c0/b64f306dc38d8fd973af077dcaf836b6dc9e8e5b9dbec22819fda5b7f3a2e602ce0159206e59c4a74a7206b5711af77cedef88d8489e6710291e971f63f063db + languageName: node + linkType: hard + "p-defer@npm:^1.0.0": version: 1.0.0 resolution: "p-defer@npm:1.0.0" @@ -17959,7 +18745,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^4.0.2": +"picomatch@npm:^4.0.1, picomatch@npm:^4.0.2, picomatch@npm:^4.0.3": version: 4.0.3 resolution: "picomatch@npm:4.0.3" checksum: 10c0/9582c951e95eebee5434f59e426cddd228a7b97a0161a375aed4be244bd3fe8e3a31b846808ea14ef2c8a2527a6eeab7b3946a67d5979e81694654f939473ae2 @@ -19208,18 +19994,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^5.0.1": - version: 5.0.10 - resolution: "rimraf@npm:5.0.10" - dependencies: - glob: "npm:^10.3.7" - bin: - rimraf: dist/esm/bin.mjs - checksum: 10c0/7da4fd0e15118ee05b918359462cfa1e7fe4b1228c7765195a45b55576e8c15b95db513b8466ec89129666f4af45ad978a3057a02139afba1a63512a2d9644cc - languageName: node - linkType: hard - -"rimraf@npm:^6.0.1": +"rimraf@npm:^6.0.1, rimraf@npm:^6.1.2": version: 6.1.2 resolution: "rimraf@npm:6.1.2" dependencies: @@ -19845,6 +20620,13 @@ __metadata: languageName: node linkType: hard +"smol-toml@npm:^1.5.2": + version: 1.6.0 + resolution: "smol-toml@npm:1.6.0" + checksum: 10c0/baf33bb6cd914d481329e31998a12829cd126541458ba400791212c80f1245d5b27dac04a56a52c02b287d2a494f1628c05fc19643286b258b2e0bb9fe67747c + languageName: node + linkType: hard + "snake-case@npm:^3.0.4": version: 3.0.4 resolution: "snake-case@npm:3.0.4" @@ -20240,7 +21022,7 @@ __metadata: languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.8, string.prototype.trimend@npm:^1.0.9": +"string.prototype.trimend@npm:^1.0.9": version: 1.0.9 resolution: "string.prototype.trimend@npm:1.0.9" dependencies: @@ -20350,6 +21132,13 @@ __metadata: languageName: node linkType: hard +"strip-json-comments@npm:5.0.3": + version: 5.0.3 + resolution: "strip-json-comments@npm:5.0.3" + checksum: 10c0/daaf20b29f69fb51112698f4a9a662490dbb78d5baf6127c75a0a83c2ac6c078a8c0f74b389ad5e0519d6fc359c4a57cb9971b1ae201aef62ce45a13247791e0 + languageName: node + linkType: hard + "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -20615,6 +21404,16 @@ __metadata: languageName: node linkType: hard +"tinyglobby@npm:^0.2.15": + version: 0.2.15 + resolution: "tinyglobby@npm:0.2.15" + dependencies: + fdir: "npm:^6.5.0" + picomatch: "npm:^4.0.3" + checksum: 10c0/869c31490d0d88eedb8305d178d4c75e7463e820df5a9b9d388291daf93e8b1eb5de1dad1c1e139767e4269fe75f3b10d5009b2cc14db96ff98986920a186844 + languageName: node + linkType: hard + "tinyrainbow@npm:^1.2.0": version: 1.2.0 resolution: "tinyrainbow@npm:1.2.0" @@ -20698,12 +21497,12 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^2.1.0": - version: 2.1.0 - resolution: "ts-api-utils@npm:2.1.0" +"ts-api-utils@npm:^2.4.0": + version: 2.4.0 + resolution: "ts-api-utils@npm:2.4.0" peerDependencies: typescript: ">=4.8.4" - checksum: 10c0/9806a38adea2db0f6aa217ccc6bc9c391ddba338a9fe3080676d0d50ed806d305bb90e8cef0276e793d28c8a929f400abb184ddd7ff83a416959c0f4d2ce754f + checksum: 10c0/ed185861aef4e7124366a3f6561113557a57504267d4d452a51e0ba516a9b6e713b56b4aeaab9fa13de9db9ab755c65c8c13a777dba9133c214632cb7b65c083 languageName: node linkType: hard @@ -20919,17 +21718,17 @@ __metadata: linkType: hard "typescript-eslint@npm:^8.0.0": - version: 8.38.0 - resolution: "typescript-eslint@npm:8.38.0" + version: 8.53.1 + resolution: "typescript-eslint@npm:8.53.1" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.38.0" - "@typescript-eslint/parser": "npm:8.38.0" - "@typescript-eslint/typescript-estree": "npm:8.38.0" - "@typescript-eslint/utils": "npm:8.38.0" + "@typescript-eslint/eslint-plugin": "npm:8.53.1" + "@typescript-eslint/parser": "npm:8.53.1" + "@typescript-eslint/typescript-estree": "npm:8.53.1" + "@typescript-eslint/utils": "npm:8.53.1" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/486b9862ee08f7827d808a2264ce03b58087b11c4c646c0da3533c192a67ae3fcb4e68d7a1e69d0f35a1edc274371a903a50ecfe74012d5eaa896cb9d5a81e0b + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/520d68df8e1e1bba99c2713029b63837b101370c460bf5e75b8065fb0a6bc1ac9c6eb967432dbc220464479fe981630a6b2eddf31cfb378441ee8b8a43c0eb5a languageName: node linkType: hard @@ -21300,6 +22099,13 @@ __metadata: languageName: node linkType: hard +"walk-up-path@npm:^4.0.0": + version: 4.0.0 + resolution: "walk-up-path@npm:4.0.0" + checksum: 10c0/fabe344f91387d1d41df230af962ef18bf703dd4178006d55cd6412caacd187b54440002d4d53a982d4f7f0455567dcffb6d3884533c8b2268928eca3ebd8a19 + languageName: node + linkType: hard + "walker@npm:^1.0.7, walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -22004,3 +22810,10 @@ __metadata: checksum: 10c0/50f2fb30327fb9d09879abf7ae2493705313adf403e794b030151aaae00009162419d60d0519e807673ec04d442e140c8879ca14314df0a0192de3b233e8f28b languageName: node linkType: hard + +"zod@npm:^4.1.11": + version: 4.3.5 + resolution: "zod@npm:4.3.5" + checksum: 10c0/5a2db7e59177a3d7e202543f5136cb87b97b047b77c8a3d824098d3fa8b80d3aa40a0a5f296965c3b82dfdccdd05dbbfacce91347f16a39c675680fd7b1ab109 + languageName: node + linkType: hard