From bb6af25e418885679ef9fef77c225366a52ac497 Mon Sep 17 00:00:00 2001 From: Jason Morse Date: Fri, 27 Feb 2026 13:30:03 -0800 Subject: [PATCH 1/4] add typescript default exports and clean up build ordering --- apps/E2E/package.json | 5 ++-- apps/fluent-tester/package.json | 5 ++-- apps/tester-core/package.json | 5 ++-- apps/win32-81/package.json | 5 ++-- apps/win32/package.json | 5 ++-- lage.config.js | 17 ++++++----- package.json | 2 +- packages/codemods/package.json | 5 ++-- packages/components/Avatar/package.json | 5 ++-- packages/components/Badge/package.json | 5 ++-- packages/components/Button/package.json | 5 ++-- packages/components/Callout/package.json | 5 ++-- packages/components/Checkbox/package.json | 5 ++-- packages/components/Chip/package.json | 5 ++-- .../components/ContextualMenu/package.json | 5 ++-- packages/components/Divider/package.json | 5 ++-- .../components/FocusTrapZone/package.json | 5 ++-- packages/components/FocusZone/package.json | 5 ++-- packages/components/Icon/package.json | 5 ++-- packages/components/Input/package.json | 5 ++-- packages/components/Link/package.json | 5 ++-- packages/components/Menu/package.json | 5 ++-- packages/components/MenuButton/package.json | 5 ++-- packages/components/Notification/package.json | 5 ++-- packages/components/Persona/package.json | 5 ++-- packages/components/PersonaCoin/package.json | 5 ++-- packages/components/Pressable/package.json | 5 ++-- packages/components/RadioGroup/package.json | 5 ++-- packages/components/Separator/package.json | 5 ++-- packages/components/Stack/package.json | 5 ++-- packages/components/Switch/package.json | 5 ++-- packages/components/TabList/package.json | 5 ++-- packages/components/Text/package.json | 5 ++-- .../configs/eslint-config-rules/package.json | 5 ++-- packages/configs/jest-config/package.json | 5 ++-- packages/configs/kit-config/package.json | 3 +- .../foundation-composable/package.json | 5 ++-- .../foundation-compose/package.json | 5 ++-- .../foundation-settings/package.json | 5 ++-- .../deprecated/foundation-tokens/package.json | 5 ++-- .../deprecated/theme-registry/package.json | 5 ++-- .../deprecated/themed-settings/package.json | 5 ++-- packages/deprecated/theming-ramp/package.json | 5 ++-- .../theming-react-native/package.json | 5 ++-- .../ActivityIndicator/package.json | 5 ++-- .../AppearanceAdditions/package.json | 5 ++-- packages/experimental/Avatar/package.json | 5 ++-- packages/experimental/Checkbox/package.json | 5 ++-- packages/experimental/Drawer/package.json | 5 ++-- packages/experimental/Dropdown/package.json | 5 ++-- packages/experimental/Expander/package.json | 5 ++-- packages/experimental/MenuButton/package.json | 5 ++-- .../NativeDatePicker/package.json | 5 ++-- .../NativeFontMetrics/package.json | 5 ++-- packages/experimental/Overflow/package.json | 5 ++-- packages/experimental/Popover/package.json | 5 ++-- packages/experimental/Shadow/package.json | 5 ++-- packages/experimental/Shimmer/package.json | 5 ++-- packages/experimental/Spinner/package.json | 5 ++-- packages/experimental/Stack/package.json | 5 ++-- packages/experimental/Tooltip/package.json | 5 ++-- .../experimental/VibrancyView/package.json | 5 ++-- packages/framework-base/package.json | 8 +++-- packages/framework/composition/package.json | 5 ++-- packages/framework/framework/package.json | 5 ++-- .../framework/immutable-merge/package.json | 5 ++-- packages/framework/memo-cache/package.json | 5 ++-- packages/framework/merge-props/package.json | 5 ++-- packages/framework/theme/package.json | 5 ++-- .../framework/themed-stylesheet/package.json | 5 ++-- packages/framework/use-slot/package.json | 5 ++-- packages/framework/use-slots/package.json | 5 ++-- packages/framework/use-styling/package.json | 5 ++-- packages/framework/use-tokens/package.json | 5 ++-- packages/libraries/core/package.json | 5 ++-- packages/theming/android-theme/package.json | 5 ++-- packages/theming/apple-theme/package.json | 5 ++-- packages/theming/default-theme/package.json | 5 ++-- packages/theming/theme-tokens/package.json | 5 ++-- packages/theming/theme-types/package.json | 5 ++-- packages/theming/theming-utils/package.json | 5 ++-- packages/theming/win32-theme/package.json | 5 ++-- packages/utils/adapters/package.json | 5 ++-- packages/utils/interactive-hooks/package.json | 5 ++-- packages/utils/styling/package.json | 5 ++-- packages/utils/test-tools/package.json | 5 ++-- packages/utils/tokens/package.json | 5 ++-- scripts/package.json | 5 ++-- scripts/src/tasks/lintPackage.ts | 30 ++++++++++++++----- scripts/src/utils/buildConfig.ts | 20 ++++++++----- scripts/src/utils/projectRoot.ts | 2 ++ 91 files changed, 302 insertions(+), 200 deletions(-) diff --git a/apps/E2E/package.json b/apps/E2E/package.json index 9738dec15f..26be4851aa 100644 --- a/apps/E2E/package.json +++ b/apps/E2E/package.json @@ -19,13 +19,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "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", diff --git a/apps/fluent-tester/package.json b/apps/fluent-tester/package.json index 813bd0e473..2f75270529 100644 --- a/apps/fluent-tester/package.json +++ b/apps/fluent-tester/package.json @@ -17,14 +17,15 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "android": "rnx-cli run --platform android", "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "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", diff --git a/apps/tester-core/package.json b/apps/tester-core/package.json index 3d5c8b06f5..09159e985e 100644 --- a/apps/tester-core/package.json +++ b/apps/tester-core/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/apps/win32-81/package.json b/apps/win32-81/package.json index 9226b9240a..382891b401 100644 --- a/apps/win32-81/package.json +++ b/apps/win32-81/package.json @@ -14,13 +14,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle-dev": "rnx-cli bundle", "clean": "fluentui-scripts clean", diff --git a/apps/win32/package.json b/apps/win32/package.json index 3dfad10f52..72e242ac32 100644 --- a/apps/win32/package.json +++ b/apps/win32/package.json @@ -14,13 +14,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "bundle": "rnx-cli bundle --dev false", "bundle-dev": "rnx-cli bundle", "clean": "fluentui-scripts clean", diff --git a/lage.config.js b/lage.config.js index 826f3b8d6f..43b23a6c63 100644 --- a/lage.config.js +++ b/lage.config.js @@ -3,21 +3,24 @@ const config = { npmClient: 'yarn', pipeline: { 'build-cjs': { - dependsOn: ['^build-cjs'], + // cjs builds need to wait for the esm builds to produce the type definitions + dependsOn: ['^build-core', '^build-cjs'], inputs: ['*', 'src/**/*', 'assets/**/*'], outputs: ['lib-commonjs/**/*'], }, - 'build-esm': { - dependsOn: ['^build-esm'], + 'build-core': { + // the core build does esm builds (which produce type definitions used by both cjs and esm builds) + // this also handles noEmit packages which should be run in sequence with other packages + dependsOn: ['^build-core'], inputs: ['*', 'src/**/*', 'assets/**/*'], outputs: ['lib/**/*'], }, - 'build-dual': { - dependsOn: ['build-cjs', 'build-esm'], + 'build-all': { + dependsOn: ['build-core', 'build-cjs'], inputs: ['*', 'src/**/*', 'assets/**/*'], outputs: ['lib/**/*', 'lib-commonjs/**/*'], }, - buildci: ['build-dual', 'test', 'lint', 'lint-package'], + buildci: ['build-all', 'test', 'lint', 'lint-package'], bundle: { inputs: ['**/*', '!node_modules/**/*', '!dist/**/*', '!lib/**/*', '!lib-commonjs/**/*'], outputs: ['dist/**/*'], @@ -39,7 +42,7 @@ const config = { }, 'pr-check': ['buildci', 'lint-package', 'lint-lockfile', 'format:check'], test: { - dependsOn: ['build-dual'], + dependsOn: ['build-all'], inputs: [], outputs: [], }, diff --git a/package.json b/package.json index c310811530..01d6cdc940 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "scripts" ], "scripts": { - "build": "lage build-dual", + "build": "lage build-all", "buildci": "lage buildci", "clean-all": "node ./scripts/src/preinstall/clean-all.js", "docs": "yarn workspace fluent-rn-website start", diff --git a/packages/codemods/package.json b/packages/codemods/package.json index b267c79f18..f442edda7d 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -20,13 +20,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Avatar/package.json b/packages/components/Avatar/package.json index 84130e3b42..e975cab2f0 100644 --- a/packages/components/Avatar/package.json +++ b/packages/components/Avatar/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Badge/package.json b/packages/components/Badge/package.json index e2493d2c30..8f5df7f9a6 100644 --- a/packages/components/Badge/package.json +++ b/packages/components/Badge/package.json @@ -13,13 +13,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Button/package.json b/packages/components/Button/package.json index 139b12f4fa..7ab57bc646 100644 --- a/packages/components/Button/package.json +++ b/packages/components/Button/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Callout/package.json b/packages/components/Callout/package.json index 201be310b6..8aaeae7ab6 100644 --- a/packages/components/Callout/package.json +++ b/packages/components/Callout/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Checkbox/package.json b/packages/components/Checkbox/package.json index 10d0a8c0af..5cb7b55652 100644 --- a/packages/components/Checkbox/package.json +++ b/packages/components/Checkbox/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Chip/package.json b/packages/components/Chip/package.json index 92f3e300f5..4cae32ec40 100644 --- a/packages/components/Chip/package.json +++ b/packages/components/Chip/package.json @@ -12,13 +12,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/ContextualMenu/package.json b/packages/components/ContextualMenu/package.json index ee17ecf5dc..e42adf2d5a 100644 --- a/packages/components/ContextualMenu/package.json +++ b/packages/components/ContextualMenu/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Divider/package.json b/packages/components/Divider/package.json index 7e83526727..ff85f13fdb 100644 --- a/packages/components/Divider/package.json +++ b/packages/components/Divider/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/FocusTrapZone/package.json b/packages/components/FocusTrapZone/package.json index 0b03a76a09..24af75e5ba 100644 --- a/packages/components/FocusTrapZone/package.json +++ b/packages/components/FocusTrapZone/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/FocusZone/package.json b/packages/components/FocusZone/package.json index 5ce985292f..e2a375ff04 100644 --- a/packages/components/FocusZone/package.json +++ b/packages/components/FocusZone/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Icon/package.json b/packages/components/Icon/package.json index 33d2f63f30..b62f5a40f1 100644 --- a/packages/components/Icon/package.json +++ b/packages/components/Icon/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Input/package.json b/packages/components/Input/package.json index 26d8bce01a..adb5811deb 100644 --- a/packages/components/Input/package.json +++ b/packages/components/Input/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Link/package.json b/packages/components/Link/package.json index 6378072e44..e9d8e3a62d 100644 --- a/packages/components/Link/package.json +++ b/packages/components/Link/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Menu/package.json b/packages/components/Menu/package.json index bf6708501f..aa0e4a92be 100644 --- a/packages/components/Menu/package.json +++ b/packages/components/Menu/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/MenuButton/package.json b/packages/components/MenuButton/package.json index d454536e6a..ffc466dbb5 100644 --- a/packages/components/MenuButton/package.json +++ b/packages/components/MenuButton/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Notification/package.json b/packages/components/Notification/package.json index cca24daa2b..580bf2681f 100644 --- a/packages/components/Notification/package.json +++ b/packages/components/Notification/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Persona/package.json b/packages/components/Persona/package.json index 0eb267f342..8dc2aa0c65 100644 --- a/packages/components/Persona/package.json +++ b/packages/components/Persona/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/PersonaCoin/package.json b/packages/components/PersonaCoin/package.json index 9e02ebb03c..e35085c5e9 100644 --- a/packages/components/PersonaCoin/package.json +++ b/packages/components/PersonaCoin/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Pressable/package.json b/packages/components/Pressable/package.json index ebba551bbc..6bc311e5c2 100644 --- a/packages/components/Pressable/package.json +++ b/packages/components/Pressable/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/RadioGroup/package.json b/packages/components/RadioGroup/package.json index d2c07a76b6..0fecc669b2 100644 --- a/packages/components/RadioGroup/package.json +++ b/packages/components/RadioGroup/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Separator/package.json b/packages/components/Separator/package.json index bd895d1850..1916b919ed 100644 --- a/packages/components/Separator/package.json +++ b/packages/components/Separator/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Stack/package.json b/packages/components/Stack/package.json index df8d426d84..cc916aa886 100644 --- a/packages/components/Stack/package.json +++ b/packages/components/Stack/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Switch/package.json b/packages/components/Switch/package.json index 6b6828c258..6d325031f8 100644 --- a/packages/components/Switch/package.json +++ b/packages/components/Switch/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/TabList/package.json b/packages/components/TabList/package.json index 4f2da8dfdc..cbb93e42ba 100644 --- a/packages/components/TabList/package.json +++ b/packages/components/TabList/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/components/Text/package.json b/packages/components/Text/package.json index d26ff703b9..022c030d36 100644 --- a/packages/components/Text/package.json +++ b/packages/components/Text/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/configs/eslint-config-rules/package.json b/packages/configs/eslint-config-rules/package.json index 46be6d3b09..98e445cc91 100644 --- a/packages/configs/eslint-config-rules/package.json +++ b/packages/configs/eslint-config-rules/package.json @@ -14,9 +14,8 @@ "./eslint.config.js": "./eslint.config.js" }, "scripts": { - "build": "fluentui-scripts build", - "build-cjs": "tsgo", - "build-esm": "tsgo", + "build": "tsgo", + "build-core": "tsgo", "lint-package": "fluentui-scripts lint-package" }, "dependencies": { diff --git a/packages/configs/jest-config/package.json b/packages/configs/jest-config/package.json index ee6d64f835..d4ec751eef 100644 --- a/packages/configs/jest-config/package.json +++ b/packages/configs/jest-config/package.json @@ -21,9 +21,8 @@ "./package.json": "./package.json" }, "scripts": { - "build": "fluentui-scripts build", - "build-cjs": "tsgo", - "build-esm": "tsgo", + "build": "tsgo", + "build-core": "tsgo", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", "lint-package": "fluentui-scripts lint-package" diff --git a/packages/configs/kit-config/package.json b/packages/configs/kit-config/package.json index 09a79e3b8f..cac852e084 100644 --- a/packages/configs/kit-config/package.json +++ b/packages/configs/kit-config/package.json @@ -17,8 +17,7 @@ }, "scripts": { "build": "tsgo", - "build-cjs": "tsgo", - "build-esm": "tsgo" + "build-core": "tsgo" }, "dependencies": { "@rnx-kit/align-deps": "^3.4.0", diff --git a/packages/deprecated/foundation-composable/package.json b/packages/deprecated/foundation-composable/package.json index 5e7f22e01a..12a5c06e84 100644 --- a/packages/deprecated/foundation-composable/package.json +++ b/packages/deprecated/foundation-composable/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/foundation-compose/package.json b/packages/deprecated/foundation-compose/package.json index 83bebd0066..f4e98b6e63 100644 --- a/packages/deprecated/foundation-compose/package.json +++ b/packages/deprecated/foundation-compose/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/foundation-settings/package.json b/packages/deprecated/foundation-settings/package.json index e1f11e39c6..66e579c5a8 100644 --- a/packages/deprecated/foundation-settings/package.json +++ b/packages/deprecated/foundation-settings/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/foundation-tokens/package.json b/packages/deprecated/foundation-tokens/package.json index ed4bb1e591..647c66a76f 100644 --- a/packages/deprecated/foundation-tokens/package.json +++ b/packages/deprecated/foundation-tokens/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/theme-registry/package.json b/packages/deprecated/theme-registry/package.json index 51b76eb17e..ab6716c584 100644 --- a/packages/deprecated/theme-registry/package.json +++ b/packages/deprecated/theme-registry/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/themed-settings/package.json b/packages/deprecated/themed-settings/package.json index d85f979840..ccff58faa3 100644 --- a/packages/deprecated/themed-settings/package.json +++ b/packages/deprecated/themed-settings/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/theming-ramp/package.json b/packages/deprecated/theming-ramp/package.json index 6c41060b8e..b0ac082372 100644 --- a/packages/deprecated/theming-ramp/package.json +++ b/packages/deprecated/theming-ramp/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/deprecated/theming-react-native/package.json b/packages/deprecated/theming-react-native/package.json index 8f0047c41e..4a391c6182 100644 --- a/packages/deprecated/theming-react-native/package.json +++ b/packages/deprecated/theming-react-native/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/ActivityIndicator/package.json b/packages/experimental/ActivityIndicator/package.json index 8cc40165b8..c8c212b8aa 100644 --- a/packages/experimental/ActivityIndicator/package.json +++ b/packages/experimental/ActivityIndicator/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/AppearanceAdditions/package.json b/packages/experimental/AppearanceAdditions/package.json index 7f1ea278d6..4167b4ebb0 100644 --- a/packages/experimental/AppearanceAdditions/package.json +++ b/packages/experimental/AppearanceAdditions/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Avatar/package.json b/packages/experimental/Avatar/package.json index 609ec4eec3..11d96dc52a 100644 --- a/packages/experimental/Avatar/package.json +++ b/packages/experimental/Avatar/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Checkbox/package.json b/packages/experimental/Checkbox/package.json index abd80ff38c..12ad8f5db0 100644 --- a/packages/experimental/Checkbox/package.json +++ b/packages/experimental/Checkbox/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Drawer/package.json b/packages/experimental/Drawer/package.json index 19d6ce0d6c..6da5b71812 100644 --- a/packages/experimental/Drawer/package.json +++ b/packages/experimental/Drawer/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Dropdown/package.json b/packages/experimental/Dropdown/package.json index c9ddfbb4b9..b39dc0c55c 100644 --- a/packages/experimental/Dropdown/package.json +++ b/packages/experimental/Dropdown/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Expander/package.json b/packages/experimental/Expander/package.json index 5cf0172eb8..2364519174 100644 --- a/packages/experimental/Expander/package.json +++ b/packages/experimental/Expander/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/MenuButton/package.json b/packages/experimental/MenuButton/package.json index 474b802367..55ed9ab131 100644 --- a/packages/experimental/MenuButton/package.json +++ b/packages/experimental/MenuButton/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/NativeDatePicker/package.json b/packages/experimental/NativeDatePicker/package.json index 6aa635eda7..ca13ea0b1e 100644 --- a/packages/experimental/NativeDatePicker/package.json +++ b/packages/experimental/NativeDatePicker/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/NativeFontMetrics/package.json b/packages/experimental/NativeFontMetrics/package.json index a6f2799cca..009667ef2c 100644 --- a/packages/experimental/NativeFontMetrics/package.json +++ b/packages/experimental/NativeFontMetrics/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Overflow/package.json b/packages/experimental/Overflow/package.json index 4b98022e0b..176b1be674 100644 --- a/packages/experimental/Overflow/package.json +++ b/packages/experimental/Overflow/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Popover/package.json b/packages/experimental/Popover/package.json index 160f7093a1..157b32e165 100644 --- a/packages/experimental/Popover/package.json +++ b/packages/experimental/Popover/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Shadow/package.json b/packages/experimental/Shadow/package.json index cb4c9a0c41..52b024f095 100644 --- a/packages/experimental/Shadow/package.json +++ b/packages/experimental/Shadow/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Shimmer/package.json b/packages/experimental/Shimmer/package.json index 012936e45b..b0633e670c 100644 --- a/packages/experimental/Shimmer/package.json +++ b/packages/experimental/Shimmer/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Spinner/package.json b/packages/experimental/Spinner/package.json index 9e7a71a314..24214876fa 100644 --- a/packages/experimental/Spinner/package.json +++ b/packages/experimental/Spinner/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Stack/package.json b/packages/experimental/Stack/package.json index 2973cc1326..f42e756156 100644 --- a/packages/experimental/Stack/package.json +++ b/packages/experimental/Stack/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/Tooltip/package.json b/packages/experimental/Tooltip/package.json index 13cf27c6a2..6dea1f3dce 100644 --- a/packages/experimental/Tooltip/package.json +++ b/packages/experimental/Tooltip/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/experimental/VibrancyView/package.json b/packages/experimental/VibrancyView/package.json index fba9600404..08a793fe1b 100644 --- a/packages/experimental/VibrancyView/package.json +++ b/packages/experimental/VibrancyView/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework-base/package.json b/packages/framework-base/package.json index 00719bd223..2f1e11adf3 100644 --- a/packages/framework-base/package.json +++ b/packages/framework-base/package.json @@ -17,18 +17,20 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" }, "./jsx-runtime": { "types": "./lib/jsx-runtime.d.ts", "import": "./lib/jsx-runtime.js", - "require": "./lib-commonjs/jsx-runtime.js" + "require": "./lib-commonjs/jsx-runtime.js", + "default": "./src/jsx-runtime.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/composition/package.json b/packages/framework/composition/package.json index a1bfe1524e..fbd51a084d 100644 --- a/packages/framework/composition/package.json +++ b/packages/framework/composition/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/framework/package.json b/packages/framework/framework/package.json index 017b374ed9..55c1372c22 100644 --- a/packages/framework/framework/package.json +++ b/packages/framework/framework/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/immutable-merge/package.json b/packages/framework/immutable-merge/package.json index 2554e1f1d0..ff3a11462a 100644 --- a/packages/framework/immutable-merge/package.json +++ b/packages/framework/immutable-merge/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/memo-cache/package.json b/packages/framework/memo-cache/package.json index 7f4c699b43..a9fe2feb8c 100644 --- a/packages/framework/memo-cache/package.json +++ b/packages/framework/memo-cache/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/merge-props/package.json b/packages/framework/merge-props/package.json index 2c8fa440f5..41201ae016 100644 --- a/packages/framework/merge-props/package.json +++ b/packages/framework/merge-props/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/theme/package.json b/packages/framework/theme/package.json index eb38dac8fc..024bea2c2d 100644 --- a/packages/framework/theme/package.json +++ b/packages/framework/theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/themed-stylesheet/package.json b/packages/framework/themed-stylesheet/package.json index f52daf432f..f7c04e7a6c 100644 --- a/packages/framework/themed-stylesheet/package.json +++ b/packages/framework/themed-stylesheet/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/use-slot/package.json b/packages/framework/use-slot/package.json index 49946ed185..6902809675 100644 --- a/packages/framework/use-slot/package.json +++ b/packages/framework/use-slot/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/use-slots/package.json b/packages/framework/use-slots/package.json index 25ddef7fe1..e1e214a7d3 100644 --- a/packages/framework/use-slots/package.json +++ b/packages/framework/use-slots/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/use-styling/package.json b/packages/framework/use-styling/package.json index 0e2451efb5..f62ddb42cc 100644 --- a/packages/framework/use-styling/package.json +++ b/packages/framework/use-styling/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/framework/use-tokens/package.json b/packages/framework/use-tokens/package.json index 0f0d7043f9..8b7a7cdb6b 100644 --- a/packages/framework/use-tokens/package.json +++ b/packages/framework/use-tokens/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/libraries/core/package.json b/packages/libraries/core/package.json index b712c1973e..787e17ac07 100644 --- a/packages/libraries/core/package.json +++ b/packages/libraries/core/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/android-theme/package.json b/packages/theming/android-theme/package.json index 940a2b0d03..71b36805df 100644 --- a/packages/theming/android-theme/package.json +++ b/packages/theming/android-theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/apple-theme/package.json b/packages/theming/apple-theme/package.json index 989a6af6e0..c97629f78b 100644 --- a/packages/theming/apple-theme/package.json +++ b/packages/theming/apple-theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/default-theme/package.json b/packages/theming/default-theme/package.json index 94313dfe5d..08f947020c 100644 --- a/packages/theming/default-theme/package.json +++ b/packages/theming/default-theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/theme-tokens/package.json b/packages/theming/theme-tokens/package.json index 3638da2418..dccaef1ac1 100644 --- a/packages/theming/theme-tokens/package.json +++ b/packages/theming/theme-tokens/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/theme-types/package.json b/packages/theming/theme-types/package.json index 95d9fb5bae..aff9032e1f 100644 --- a/packages/theming/theme-types/package.json +++ b/packages/theming/theme-types/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/theming-utils/package.json b/packages/theming/theming-utils/package.json index 8a27bb233f..194ff04ca5 100644 --- a/packages/theming/theming-utils/package.json +++ b/packages/theming/theming-utils/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/theming/win32-theme/package.json b/packages/theming/win32-theme/package.json index eaf3626d3a..4524c26711 100644 --- a/packages/theming/win32-theme/package.json +++ b/packages/theming/win32-theme/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/adapters/package.json b/packages/utils/adapters/package.json index 90e163debd..22f52433a0 100644 --- a/packages/utils/adapters/package.json +++ b/packages/utils/adapters/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/interactive-hooks/package.json b/packages/utils/interactive-hooks/package.json index 16171cd787..0d26989abe 100644 --- a/packages/utils/interactive-hooks/package.json +++ b/packages/utils/interactive-hooks/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/styling/package.json b/packages/utils/styling/package.json index 125d194f23..d171f9fb3c 100644 --- a/packages/utils/styling/package.json +++ b/packages/utils/styling/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/test-tools/package.json b/packages/utils/test-tools/package.json index 8549608fc8..cbb4f2ac07 100644 --- a/packages/utils/test-tools/package.json +++ b/packages/utils/test-tools/package.json @@ -17,13 +17,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/packages/utils/tokens/package.json b/packages/utils/tokens/package.json index 5ac058aca0..74dd60fcdc 100644 --- a/packages/utils/tokens/package.json +++ b/packages/utils/tokens/package.json @@ -16,13 +16,14 @@ ".": { "types": "./lib/index.d.ts", "import": "./lib/index.js", - "require": "./lib-commonjs/index.js" + "require": "./lib-commonjs/index.js", + "default": "./src/index.ts" } }, "scripts": { "build": "fluentui-scripts build", "build-cjs": "tsgo --outDir lib-commonjs", - "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler", + "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", "clean": "fluentui-scripts clean", "depcheck": "fluentui-scripts depcheck", "lint": "fluentui-scripts eslint", diff --git a/scripts/package.json b/scripts/package.json index 68f4d49e1b..acca5d88d5 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -14,9 +14,8 @@ "type": "module", "main": "./src/index.js", "scripts": { - "build": "node ./src/cli.mjs build", - "build-cjs": "tsgo", - "build-esm": "tsgo", + "build": "tsgo", + "build-core": "tsgo", "bundlesize": "bundlesize --debug", "depcheck": "node ./src/cli.mjs depcheck", "lint": "node ./src/cli.mjs lint", diff --git a/scripts/src/tasks/lintPackage.ts b/scripts/src/tasks/lintPackage.ts index 2ea4c95732..c36c45c0e2 100644 --- a/scripts/src/tasks/lintPackage.ts +++ b/scripts/src/tasks/lintPackage.ts @@ -314,6 +314,10 @@ export class LintPackageCommand extends Command { } private validateExportsGroup(manifest: PackageManifest, groupName: string, isDefault: boolean, buildConfig: ResolvedBuildConfig) { + const noExportsRequired = Boolean(manifest.private || buildConfig.typescript.checkScript); + this.errorIf(!manifest.exports && !noExportsRequired, 'Missing exports field for package with no build script', () => { + this.projRoot.setManifestEntry('exports', {}); + }); const exports = manifest.exports; if (!exports) { return; @@ -358,6 +362,14 @@ export class LintPackageCommand extends Command { if (updated.default && keys[keys.length - 1] !== 'default') { errors.push(`'default' entry should be last in exports for ${groupName}`); } + if (updated.import) { + const importInSrc = updated.import.startsWith('./src'); + const defaultExport = importInSrc ? updated.import : updated.import.replace(esmDir, 'src').replace(/\.js$/, '.ts'); + if (!updated.default || updated.default !== defaultExport) { + errors.push(`'default' entry in exports does not match the expected default export`); + updated.default = defaultExport; + } + } 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 @@ -401,11 +413,12 @@ export class LintPackageCommand extends Command { } private checkBuildConfig(buildConfig: ResolvedBuildConfig) { - const { cjsScript, esmScript } = buildConfig.typescript; - const hasBuilds = Boolean(cjsScript || esmScript); + const { cjsScript, esmScript, checkScript } = buildConfig.typescript; + const hasJsBuilds = Boolean(cjsScript || esmScript); + const hasBuilds = hasJsBuilds || Boolean(checkScript); const scripts = this.projRoot.manifest.scripts || {}; - const buildScriptText = this.getFluentScriptsText('build'); + const buildScriptText = hasJsBuilds ? this.getFluentScriptsText('build') : checkScript; this.errorIf(hasBuilds && scripts.build !== buildScriptText, 'Missing or incorrect build script', () => { this.projRoot.updateRecordEntry('scripts', 'build', buildScriptText); }); @@ -418,13 +431,14 @@ export class LintPackageCommand extends Command { 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); + const coreScript = esmScript || checkScript; + if (esmScript || checkScript) { + this.errorIf(scripts['build-core'] !== coreScript, 'Missing or incorrect build-core script', () => { + this.projRoot.updateRecordEntry('scripts', 'build-core', coreScript); }); } else { - this.errorIf(scripts['build-esm'] !== undefined, 'Extraneous build-esm script', () => { - this.projRoot.updateRecordEntry('scripts', 'build-esm', undefined); + this.errorIf(scripts['build-core'] !== undefined, 'Extraneous build-core script', () => { + this.projRoot.updateRecordEntry('scripts', 'build-core', undefined); }); } } diff --git a/scripts/src/utils/buildConfig.ts b/scripts/src/utils/buildConfig.ts index 0532b2f726..6d32cf04e9 100644 --- a/scripts/src/utils/buildConfig.ts +++ b/scripts/src/utils/buildConfig.ts @@ -29,17 +29,19 @@ function getTypescriptBuildConfig( const scripts = projRoot.manifest.scripts || {}; let cjsScript = scripts['build-cjs'] ?? buildTsConfig.cjsScript ?? ''; let esmScript = scripts['build-esm'] ?? buildTsConfig.esmScript ?? ''; + let checkScript = scripts['build-check'] ?? buildTsConfig.checkScript ?? ''; 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 (options.noEmit) { + return ''; + } + if (outDir !== options.outDir) { + parts.push('--outDir', outDir); + } + if (!isDefaultType) { + parts.push('--module', moduleType, '--moduleResolution', 'bundler'); } if (extraArgs) { parts.push(extraArgs); @@ -51,6 +53,7 @@ function getTypescriptBuildConfig( // no tsconfig.json means no TypeScript build cjsScript = ''; esmScript = ''; + checkScript = ''; } else { const pkgInfo = getPackageInfoFromPath(projRoot.root); const tsConfig = readTypeScriptConfig(pkgInfo); @@ -58,7 +61,8 @@ function getTypescriptBuildConfig( const isModule = pkgInfo.manifest.type === 'module'; cjsScript = getScript(options, cjsDir, !isModule, 'commonjs'); esmScript = getScript(options, esmDir, isModule, 'esnext'); + checkScript = options.noEmit ? engine : ''; } } - return { engine, cjsDir, esmDir, cjsScript, esmScript, extraArgs }; + return { engine, cjsDir, esmDir, cjsScript, esmScript, checkScript, extraArgs }; } diff --git a/scripts/src/utils/projectRoot.ts b/scripts/src/utils/projectRoot.ts index b87215e2de..2412cdfb9b 100644 --- a/scripts/src/utils/projectRoot.ts +++ b/scripts/src/utils/projectRoot.ts @@ -32,6 +32,8 @@ export type ResolvedBuildConfig = { cjsScript: string; /** script to run for esm build */ esmScript: string; + /** check script */ + checkScript: string; }; depcheck: { ignoreMatches?: string[]; From 8c71e8be41a4ba52e1d0ea333690d9d2aad841ab Mon Sep 17 00:00:00 2001 From: Jason Morse Date: Fri, 27 Feb 2026 16:29:41 -0800 Subject: [PATCH 2/4] fix callout, contextual menu, focus zone, and avatar specs --- .vscode/settings.json | 8 ++- docs/pages/Components/Callout.md | 2 +- packages/components/Button/SPEC.md | 4 +- .../Callout/macos/FRNCalloutManager.m | 2 +- .../Callout/src/Callout.settings.macos.ts | 2 +- .../Callout/src/Callout.settings.ts | 2 +- .../components/Callout/src/Callout.types.ts | 39 +---------- .../src/CalloutNativeComponent.macos.ts | 66 +++++++++++++++++-- .../Callout/src/CalloutNativeComponent.ts | 60 ++++++++++++++++- .../src/CalloutNativeComponent.types.macos.ts | 31 --------- .../src/CalloutNativeComponent.types.ts | 31 --------- .../src/CalloutNativeComponent.win32.ts | 11 ---- .../components/Callout/src/codegenTypes.d.ts | 2 - packages/components/Callout/src/index.ts | 2 +- .../src/ContextualMenu.settings.macos.ts | 2 +- .../src/ContextualMenu.settings.ts | 2 +- .../src/FocusTrapZoneNativeComponent.ts | 6 +- .../FocusZone/src/FocusZoneNativeComponent.ts | 8 +-- .../FocusZone/src/codegenTypes.d.ts | 2 - .../Avatar/src/AvatarNative.types.ts | 13 ---- .../Avatar/src/AvatarNativeComponent.ios.ts | 0 .../Avatar/src/AvatarNativeComponent.macos.ts | 5 -- .../Avatar/src/AvatarNativeComponent.ts | 17 ++++- .../experimental/Avatar/src/codegenTypes.d.ts | 2 - 24 files changed, 159 insertions(+), 160 deletions(-) delete mode 100644 packages/components/Callout/src/CalloutNativeComponent.types.macos.ts delete mode 100644 packages/components/Callout/src/CalloutNativeComponent.types.ts delete mode 100644 packages/components/Callout/src/CalloutNativeComponent.win32.ts delete mode 100644 packages/components/Callout/src/codegenTypes.d.ts delete mode 100644 packages/components/FocusZone/src/codegenTypes.d.ts delete mode 100644 packages/experimental/Avatar/src/AvatarNative.types.ts delete mode 100644 packages/experimental/Avatar/src/AvatarNativeComponent.ios.ts delete mode 100644 packages/experimental/Avatar/src/AvatarNativeComponent.macos.ts delete mode 100644 packages/experimental/Avatar/src/codegenTypes.d.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index ff320b97c0..10b015de73 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,9 +7,15 @@ "editor.codeActionsOnSave": { "source.fixAll.eslint": "explicit" }, + "prettier.singleQuote": true, + "prettier.tabWidth": 2, + "prettier.printWidth": 140, + "prettier.trailingComma": "all", "eslint.enable": true, - "eslint.workingDirectories": [{ "pattern": "./packages/framework/eslint-config-rules" }], // use the common eslint config file + "eslint.workingDirectories": [ + { "pattern": "./packages/framework/eslint-config-rules" } + ], // use the common eslint config file "explorer.fileNesting.enabled": true, "explorer.fileNesting.patterns": { diff --git a/docs/pages/Components/Callout.md b/docs/pages/Components/Callout.md index d0e23949ab..46b333bb96 100644 --- a/docs/pages/Components/Callout.md +++ b/docs/pages/Components/Callout.md @@ -128,7 +128,7 @@ type DirectionalHint = | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' - | 'bottonLeftEdge' + | 'bottomLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge'; diff --git a/packages/components/Button/SPEC.md b/packages/components/Button/SPEC.md index e0220ddfa3..206628807b 100644 --- a/packages/components/Button/SPEC.md +++ b/packages/components/Button/SPEC.md @@ -309,8 +309,8 @@ It is possible to override key behaviors by specifying `onKeyUp` or `onKeyDown`, #### Cursor interaction -- Cursor moves onto botton: Should immediately change the styling of the `Button` so that it appears to be hovered. -- Cursor moves out of botton: Should immediately remove the hovered styling of the `Button`. +- Cursor moves onto bottom: Should immediately change the styling of the `Button` so that it appears to be hovered. +- Cursor moves out of bottom: Should immediately remove the hovered styling of the `Button`. - Mouse click: Should execute the `Button` and move focus to its target. #### Touch interaction diff --git a/packages/components/Callout/macos/FRNCalloutManager.m b/packages/components/Callout/macos/FRNCalloutManager.m index 0d9bae2be9..8d22276683 100644 --- a/packages/components/Callout/macos/FRNCalloutManager.m +++ b/packages/components/Callout/macos/FRNCalloutManager.m @@ -28,7 +28,7 @@ + (NSRect)screenRect:(id)json @"rightTopEdge": @(NSRectEdgeMaxX), @"rightCenter": @(NSRectEdgeMaxX), @"rightBottomEdge": @(NSRectEdgeMaxX), - @"bottonLeftEdge": @(NSRectEdgeMinY), + @"bottomLeftEdge": @(NSRectEdgeMinY), @"bottomAutoEdge": @(NSRectEdgeMinY), @"bottomCenter": @(NSRectEdgeMinY), @"bottomRightEdge": @(NSRectEdgeMinY), diff --git a/packages/components/Callout/src/Callout.settings.macos.ts b/packages/components/Callout/src/Callout.settings.macos.ts index 9ba96a9912..eaeac88d7e 100644 --- a/packages/components/Callout/src/Callout.settings.macos.ts +++ b/packages/components/Callout/src/Callout.settings.macos.ts @@ -10,7 +10,7 @@ export const settings: IComposeSettings = [ borderColor: 'transparent', borderWidth: 0, borderRadius: 5, - directionalHint: 'bottonLeftEdge', + directionalHint: 'bottomLeftEdge', }, root: { style: { diff --git a/packages/components/Callout/src/Callout.settings.ts b/packages/components/Callout/src/Callout.settings.ts index 917feb0a0d..6b21d133bf 100644 --- a/packages/components/Callout/src/Callout.settings.ts +++ b/packages/components/Callout/src/Callout.settings.ts @@ -10,7 +10,7 @@ export const settings: IComposeSettings = [ beakWidth: 20, borderColor: 'bodyFrameBackground', borderWidth: 1, - directionalHint: 'bottonLeftEdge', + directionalHint: 'bottomLeftEdge', gapSpace: 0, minPadding: 0, }, diff --git a/packages/components/Callout/src/Callout.types.ts b/packages/components/Callout/src/Callout.types.ts index af0990f12a..c2afec5e46 100644 --- a/packages/components/Callout/src/Callout.types.ts +++ b/packages/components/Callout/src/Callout.types.ts @@ -1,15 +1,13 @@ import type * as React from 'react'; -import type { KeyboardMetrics, ViewStyle, ViewProps } from 'react-native'; +import type { KeyboardMetrics, ViewStyle } from 'react-native'; import type { IViewProps } from '@fluentui-react-native/adapters'; import type { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens'; import type { IRenderData } from '@uifabricshared/foundation-composable'; -import type { CalloutNativeCommands } from './CalloutNativeComponent.types'; +import type { CalloutNativeCommands } from './CalloutNativeComponent'; export const calloutName = 'Callout'; -import type { DirectEventHandler, Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes'; - /** * Properties and Tokens for FluentUI React Native Callout */ @@ -25,7 +23,7 @@ export type DirectionalHint = | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' - | 'bottonLeftEdge' + | 'bottomLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge'; @@ -227,34 +225,3 @@ export interface ICalloutType { slotProps: ICalloutSlotProps; tokens: ICalloutTokens; } - -type AnchorRect = { - screenX: Double; - screenY: Double; - width: Double; - height: Double; -}; - -/** - * Shared native props specific to Callout native component - */ -export interface NativePropsBase extends ViewProps { - accessibilityLabel?: string; - accessibilityOnShowAnnouncement?: string; - anchorRect?: AnchorRect; - - dismissBehaviors?: string[]; - doNotTakePointerCapture?: boolean; - focusable?: boolean; - isBeakVisible?: boolean; - maxHeight?: Int32; - maxWidth?: Int32; - setInitialFocus?: boolean; - - // targetAnchor?: string; // Win32 only Callout can target an anchor registered in the anchor registry // Can be a node id or an anchor ID - This need to be reworked as Mixed types are not supported going forward - testID?: string; - - onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>; - onDismiss?: DirectEventHandler<{ target: Int32 }>; - onShow?: DirectEventHandler<{ target: Int32 }>; -} diff --git a/packages/components/Callout/src/CalloutNativeComponent.macos.ts b/packages/components/Callout/src/CalloutNativeComponent.macos.ts index b6563d4490..bd9028d578 100644 --- a/packages/components/Callout/src/CalloutNativeComponent.macos.ts +++ b/packages/components/Callout/src/CalloutNativeComponent.macos.ts @@ -1,12 +1,68 @@ import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; -import { requireNativeComponent } from 'react-native'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type { NativeProps, CalloutComponentType, CalloutNativeCommands } from './CalloutNativeComponent.types.macos'; +import type { HostComponent, ViewProps } from 'react-native'; +import type { WithDefault, UnsafeMixed, Int32, DirectEventHandler, Double } from 'react-native/Libraries/Types/CodegenTypes'; + +interface AnchorRect { + screenX: Double; + screenY: Double; + width: Double; + height: Double; +} + +/** + * Shared native props specific to Callout native component + */ +export interface NativeProps extends ViewProps { + accessibilityLabel?: string; + accessibilityOnShowAnnouncement?: string; + anchorRect?: AnchorRect; + + dismissBehaviors?: string[]; + doNotTakePointerCapture?: boolean; + focusable?: boolean; + isBeakVisible?: boolean; + maxHeight?: Int32; + maxWidth?: Int32; + setInitialFocus?: boolean; + + // targetAnchor?: string; // Win32 only Callout can target an anchor registered in the anchor registry // Can be a node id or an anchor ID - This need to be reworked as Mixed types are not supported going forward + testID?: string; + + onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>; + onDismiss?: DirectEventHandler<{ target: Int32 }>; + onShow?: DirectEventHandler<{ target: Int32 }>; + + directionalHint?: WithDefault< + | 'leftTopEdge' + | 'leftCenter' + | 'leftBottomEdge' + | 'topLeftEdge' + | 'topAutoEdge' + | 'topCenter' + | 'topRightEdge' + | 'rightTopEdge' + | 'rightCenter' + | 'rightBottomEdge' + | 'bottomLeftEdge' + | 'bottomAutoEdge' + | 'bottomCenter' + | 'bottomRightEdge', + 'topleftEdge' + >; + target?: UnsafeMixed; +} + +export type CalloutComponentType = HostComponent; + +export interface CalloutNativeCommands { + focusWindow: (viewRef: React.ElementRef) => void; + blurWindow: (viewRef: React.ElementRef) => void; +} export const Commands: CalloutNativeCommands = codegenNativeCommands({ supportedCommands: ['blurWindow', 'focusWindow'], }); -// no fabric for macOS, just use requireNativeComponent -// macOS uses FRNCallout (registered by FRNCalloutManager), not RCTCallout -export default requireNativeComponent('FRNCallout') as CalloutComponentType; +export default codegenNativeComponent('FRNCallout') as CalloutComponentType; diff --git a/packages/components/Callout/src/CalloutNativeComponent.ts b/packages/components/Callout/src/CalloutNativeComponent.ts index 90da7721f3..41e0e73d5b 100644 --- a/packages/components/Callout/src/CalloutNativeComponent.ts +++ b/packages/components/Callout/src/CalloutNativeComponent.ts @@ -1,7 +1,65 @@ import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type { NativeProps, CalloutComponentType, CalloutNativeCommands } from './CalloutNativeComponent.types'; +import type { HostComponent, ViewProps } from 'react-native'; +import type { WithDefault, UnsafeMixed, Int32, DirectEventHandler, Double } from 'react-native/Libraries/Types/CodegenTypes'; + +interface AnchorRect { + screenX: Double; + screenY: Double; + width: Double; + height: Double; +} + +/** + * Shared native props specific to Callout native component + */ +export interface NativeProps extends ViewProps { + accessibilityLabel?: string; + accessibilityOnShowAnnouncement?: string; + anchorRect?: AnchorRect; + + dismissBehaviors?: string[]; + doNotTakePointerCapture?: boolean; + focusable?: boolean; + isBeakVisible?: boolean; + maxHeight?: Int32; + maxWidth?: Int32; + setInitialFocus?: boolean; + + // targetAnchor?: string; // Win32 only Callout can target an anchor registered in the anchor registry // Can be a node id or an anchor ID - This need to be reworked as Mixed types are not supported going forward + testID?: string; + + onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>; + onDismiss?: DirectEventHandler<{ target: Int32 }>; + onShow?: DirectEventHandler<{ target: Int32 }>; + + directionalHint?: WithDefault< + | 'leftTopEdge' + | 'leftCenter' + | 'leftBottomEdge' + | 'topLeftEdge' + | 'topAutoEdge' + | 'topCenter' + | 'topRightEdge' + | 'rightTopEdge' + | 'rightCenter' + | 'rightBottomEdge' + | 'bottomLeftEdge' + | 'bottomAutoEdge' + | 'bottomCenter' + | 'bottomRightEdge', + 'bottomLeftEdge' + >; + target?: UnsafeMixed; +} + +export type CalloutComponentType = HostComponent; + +export interface CalloutNativeCommands { + focusWindow: (viewRef: React.ElementRef) => void; + blurWindow: (viewRef: React.ElementRef) => void; +} export const Commands: CalloutNativeCommands = codegenNativeCommands({ supportedCommands: ['blurWindow', 'focusWindow'], diff --git a/packages/components/Callout/src/CalloutNativeComponent.types.macos.ts b/packages/components/Callout/src/CalloutNativeComponent.types.macos.ts deleted file mode 100644 index 9eda89be10..0000000000 --- a/packages/components/Callout/src/CalloutNativeComponent.types.macos.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { HostComponent } from 'react-native'; -import type { WithDefault, Int32 } from 'react-native/Libraries/Types/CodegenTypes'; -import type { NativePropsBase } from './Callout.types'; - -export interface NativeProps extends NativePropsBase { - directionalHint?: WithDefault< - | 'leftTopEdge' - | 'leftCenter' - | 'leftBottomEdge' - | 'topLeftEdge' - | 'topAutoEdge' - | 'topCenter' - | 'topRightEdge' - | 'rightTopEdge' - | 'rightCenter' - | 'rightBottomEdge' - | 'bottonLeftEdge' - | 'bottomAutoEdge' - | 'bottomCenter' - | 'bottomRightEdge', - 'topLeftEdge' - >; - target?: Int32; -} - -// making these explicit as codegen can't always handle complex typescript types and fails silently -export type CalloutComponentType = HostComponent; -export type CalloutNativeCommands = { - focusWindow: (viewRef: React.ElementRef) => void; - blurWindow: (viewRef: React.ElementRef) => void; -}; diff --git a/packages/components/Callout/src/CalloutNativeComponent.types.ts b/packages/components/Callout/src/CalloutNativeComponent.types.ts deleted file mode 100644 index f690006bb8..0000000000 --- a/packages/components/Callout/src/CalloutNativeComponent.types.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { HostComponent } from 'react-native'; -import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes'; -import type { UnsafeMixed } from './codegenTypes'; -import type { NativePropsBase } from './Callout.types'; - -export interface NativeProps extends NativePropsBase { - directionalHint?: WithDefault< - | 'leftTopEdge' - | 'leftCenter' - | 'leftBottomEdge' - | 'topLeftEdge' - | 'topAutoEdge' - | 'topCenter' - | 'topRightEdge' - | 'rightTopEdge' - | 'rightCenter' - | 'rightBottomEdge' - | 'bottonLeftEdge' - | 'bottomAutoEdge' - | 'bottomCenter' - | 'bottomRightEdge', - 'bottonLeftEdge' - >; - target?: UnsafeMixed; -} - -export type CalloutComponentType = HostComponent; -export type CalloutNativeCommands = { - focusWindow: (viewRef: React.ElementRef) => void; - blurWindow: (viewRef: React.ElementRef) => void; -}; diff --git a/packages/components/Callout/src/CalloutNativeComponent.win32.ts b/packages/components/Callout/src/CalloutNativeComponent.win32.ts deleted file mode 100644 index 8f7e9ed540..0000000000 --- a/packages/components/Callout/src/CalloutNativeComponent.win32.ts +++ /dev/null @@ -1,11 +0,0 @@ -import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands'; -import { requireNativeComponent } from 'react-native'; - -import type { NativeProps, CalloutComponentType, CalloutNativeCommands } from './CalloutNativeComponent.types'; - -export const Commands: CalloutNativeCommands = codegenNativeCommands({ - supportedCommands: ['blurWindow', 'focusWindow'], -}); - -// no fabric for Win32, just use requireNativeComponent -export default requireNativeComponent('RCTCallout') as CalloutComponentType; diff --git a/packages/components/Callout/src/codegenTypes.d.ts b/packages/components/Callout/src/codegenTypes.d.ts deleted file mode 100644 index 407f2834a2..0000000000 --- a/packages/components/Callout/src/codegenTypes.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Separate .d.ts file to fool codegen, since UnsafeMixed does not existing in the TS types of RN currently. -export type UnsafeMixed = any; diff --git a/packages/components/Callout/src/index.ts b/packages/components/Callout/src/index.ts index 26a47fc1ff..3e08ddab36 100644 --- a/packages/components/Callout/src/index.ts +++ b/packages/components/Callout/src/index.ts @@ -9,5 +9,5 @@ export type { ICalloutType, RestoreFocusEvent, } from './Callout.types'; -export type { CalloutNativeCommands } from './CalloutNativeComponent.types'; +export type { CalloutNativeCommands } from './CalloutNativeComponent'; export { Callout } from './Callout'; diff --git a/packages/components/ContextualMenu/src/ContextualMenu.settings.macos.ts b/packages/components/ContextualMenu/src/ContextualMenu.settings.macos.ts index 9b474c0786..16992a0a5b 100644 --- a/packages/components/ContextualMenu/src/ContextualMenu.settings.macos.ts +++ b/packages/components/ContextualMenu/src/ContextualMenu.settings.macos.ts @@ -8,7 +8,7 @@ import { contextualMenuName } from './ContextualMenu.types'; export const settings: IComposeSettings = [ { tokens: { - directionalHint: I18nManager.isRTL ? 'bottomRightEdge' : 'bottonLeftEdge', + directionalHint: I18nManager.isRTL ? 'bottomRightEdge' : 'bottomLeftEdge', }, container: { style: { diff --git a/packages/components/ContextualMenu/src/ContextualMenu.settings.ts b/packages/components/ContextualMenu/src/ContextualMenu.settings.ts index 6c88a1f22d..e1f21bdbd8 100644 --- a/packages/components/ContextualMenu/src/ContextualMenu.settings.ts +++ b/packages/components/ContextualMenu/src/ContextualMenu.settings.ts @@ -10,7 +10,7 @@ export const settings: IComposeSettings = [ beakWidth: 20, borderColor: 'buttonBorder', borderWidth: 1, - directionalHint: 'bottonLeftEdge', + directionalHint: 'bottomLeftEdge', gapSpace: 0, minPadding: 0, }, diff --git a/packages/components/FocusTrapZone/src/FocusTrapZoneNativeComponent.ts b/packages/components/FocusTrapZone/src/FocusTrapZoneNativeComponent.ts index b19bdf23e0..7b81e95675 100644 --- a/packages/components/FocusTrapZone/src/FocusTrapZoneNativeComponent.ts +++ b/packages/components/FocusTrapZone/src/FocusTrapZoneNativeComponent.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. * @format */ - -import { requireNativeComponent, type HostComponent, type ViewProps } from 'react-native'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +import type { HostComponent, ViewProps } from 'react-native'; export interface NativeProps extends ViewProps { /** @@ -36,4 +36,4 @@ export interface NativeProps extends ViewProps { forceFocusInsideTrap?: boolean; } -export default requireNativeComponent('RCTFocusTrapZone') as HostComponent; +export default codegenNativeComponent('RCTFocusTrapZone') as HostComponent; diff --git a/packages/components/FocusZone/src/FocusZoneNativeComponent.ts b/packages/components/FocusZone/src/FocusZoneNativeComponent.ts index 398bca1823..b6c7cf2ae5 100644 --- a/packages/components/FocusZone/src/FocusZoneNativeComponent.ts +++ b/packages/components/FocusZone/src/FocusZoneNativeComponent.ts @@ -3,13 +3,11 @@ * Licensed under the MIT License. * @format */ +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { ViewProps } from 'react-native'; +import type { WithDefault, UnsafeMixed } from 'react-native/Libraries/Types/CodegenTypes'; -import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes'; -import { requireNativeComponent } from 'react-native'; - -import type { UnsafeMixed } from './codegenTypes'; // Should be: // import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes'; @@ -23,4 +21,4 @@ export interface NativeProps extends ViewProps { isTabNavigation?: boolean; } -export default requireNativeComponent('RCTFocusZone'); +export default codegenNativeComponent('RCTFocusZone'); diff --git a/packages/components/FocusZone/src/codegenTypes.d.ts b/packages/components/FocusZone/src/codegenTypes.d.ts deleted file mode 100644 index 407f2834a2..0000000000 --- a/packages/components/FocusZone/src/codegenTypes.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Separate .d.ts file to fool codegen, since UnsafeMixed does not existing in the TS types of RN currently. -export type UnsafeMixed = any; diff --git a/packages/experimental/Avatar/src/AvatarNative.types.ts b/packages/experimental/Avatar/src/AvatarNative.types.ts deleted file mode 100644 index 4dbfd51fbd..0000000000 --- a/packages/experimental/Avatar/src/AvatarNative.types.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { ColorValue, ViewProps } from 'react-native'; - -import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes'; - -import type { ImageSource } from './codegenTypes'; - -export interface NativeProps extends ViewProps { - primaryText?: string; - secondaryText?: string; - imageSource?: ImageSource; - backgroundColor?: ColorValue; - size?: WithDefault<'size16' | 'size20' | 'size24' | 'size32' | 'size40' | 'size56' | 'size72', undefined>; -} diff --git a/packages/experimental/Avatar/src/AvatarNativeComponent.ios.ts b/packages/experimental/Avatar/src/AvatarNativeComponent.ios.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/experimental/Avatar/src/AvatarNativeComponent.macos.ts b/packages/experimental/Avatar/src/AvatarNativeComponent.macos.ts deleted file mode 100644 index 7ead367b2e..0000000000 --- a/packages/experimental/Avatar/src/AvatarNativeComponent.macos.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { HostComponent } from 'react-native'; -import type { NativeProps } from './AvatarNative.types'; -import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; - -export default codegenNativeComponent('FRNAvatarView') as HostComponent; diff --git a/packages/experimental/Avatar/src/AvatarNativeComponent.ts b/packages/experimental/Avatar/src/AvatarNativeComponent.ts index 7f04c61c81..380dead2af 100644 --- a/packages/experimental/Avatar/src/AvatarNativeComponent.ts +++ b/packages/experimental/Avatar/src/AvatarNativeComponent.ts @@ -1,5 +1,16 @@ +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { HostComponent } from 'react-native'; -import type { NativeProps } from './AvatarNative.types'; -import { requireNativeComponent } from 'react-native'; -export default requireNativeComponent('FRNAvatarView') as HostComponent; +import type { ColorValue, ViewProps, ImageURISource } from 'react-native'; + +import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes'; + +export interface NativeProps extends ViewProps { + primaryText?: string; + secondaryText?: string; + imageSource?: ImageURISource; + backgroundColor?: ColorValue; + size?: WithDefault<'size16' | 'size20' | 'size24' | 'size32' | 'size40' | 'size56' | 'size72', undefined>; +} + +export default codegenNativeComponent('FRNAvatarView') as HostComponent; diff --git a/packages/experimental/Avatar/src/codegenTypes.d.ts b/packages/experimental/Avatar/src/codegenTypes.d.ts deleted file mode 100644 index 2ee4e0427e..0000000000 --- a/packages/experimental/Avatar/src/codegenTypes.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Separate .d.ts file to fool codegen, since ImageSource does not exist in the TS types of RN currently. -export type { ImageURISource as ImageSource } from 'react-native/Libraries/Image/ImageSource'; From a3bb282aabf6b880c14242b276c6dc42bdda06fa Mon Sep 17 00:00:00 2001 From: Jason Morse Date: Fri, 27 Feb 2026 16:43:57 -0800 Subject: [PATCH 3/4] fix menu button, tooltip and vibrancy view --- .../src/MacOSMenuButtonNativeComponent.ts | 6 ++--- .../MenuButton/src/codegenTypes.d.ts | 3 --- .../Tooltip/src/TooltipNativeComponent.ts | 7 +++-- .../src/TooltipNativeComponent.win32.ts | 7 +++-- .../src/VibrancyViewNativeComponent.macos.ts | 26 +++++++++++++++++-- .../src/VibrancyViewNativeComponent.ts | 25 +++++++++++++++++- 6 files changed, 61 insertions(+), 13 deletions(-) delete mode 100644 packages/components/MenuButton/src/codegenTypes.d.ts diff --git a/packages/components/MenuButton/src/MacOSMenuButtonNativeComponent.ts b/packages/components/MenuButton/src/MacOSMenuButtonNativeComponent.ts index 891d10c7aa..67caf9f895 100644 --- a/packages/components/MenuButton/src/MacOSMenuButtonNativeComponent.ts +++ b/packages/components/MenuButton/src/MacOSMenuButtonNativeComponent.ts @@ -4,12 +4,12 @@ * @format */ -import type { HostComponent, ViewProps } from 'react-native'; +import type { HostComponent, ViewProps, ImageURISource } from 'react-native'; -import type { BubblingEventHandler, Int32 } from 'react-native/Libraries/Types/CodegenTypes'; +import type { BubblingEventHandler, Int32, UnsafeMixed } from 'react-native/Libraries/Types/CodegenTypes'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; -import type { ImageSource, UnsafeMixed } from './codegenTypes'; +type ImageSource = ImageURISource; /* interface MenuItem { diff --git a/packages/components/MenuButton/src/codegenTypes.d.ts b/packages/components/MenuButton/src/codegenTypes.d.ts deleted file mode 100644 index a183b13dd1..0000000000 --- a/packages/components/MenuButton/src/codegenTypes.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Separate .d.ts file to fool codegen, since ImageSource does not exist in the TS types of RN currently. -export type { ImageURISource as ImageSource } from 'react-native/Libraries/Image/ImageSource'; -export type UnsafeMixed = any; diff --git a/packages/experimental/Tooltip/src/TooltipNativeComponent.ts b/packages/experimental/Tooltip/src/TooltipNativeComponent.ts index dc1ff03199..0ff09320d0 100644 --- a/packages/experimental/Tooltip/src/TooltipNativeComponent.ts +++ b/packages/experimental/Tooltip/src/TooltipNativeComponent.ts @@ -4,9 +4,12 @@ * @format */ -import type { HostComponent } from 'react-native'; -import type { NativeProps } from './Tooltip.types'; +import type { HostComponent, ViewProps } from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export interface NativeProps extends ViewProps { + content?: string; +} + export default codegenNativeComponent('RCTTooltip') as HostComponent; diff --git a/packages/experimental/Tooltip/src/TooltipNativeComponent.win32.ts b/packages/experimental/Tooltip/src/TooltipNativeComponent.win32.ts index 29d34186eb..be485806ca 100644 --- a/packages/experimental/Tooltip/src/TooltipNativeComponent.win32.ts +++ b/packages/experimental/Tooltip/src/TooltipNativeComponent.win32.ts @@ -1,6 +1,9 @@ -import type { HostComponent } from 'react-native'; -import type { NativeProps } from './Tooltip.types'; +import type { HostComponent, ViewProps } from 'react-native'; import { requireNativeComponent } from 'react-native'; +export interface NativeProps extends ViewProps { + content?: string; +} + export default requireNativeComponent('RCTTooltip') as HostComponent; diff --git a/packages/experimental/VibrancyView/src/VibrancyViewNativeComponent.macos.ts b/packages/experimental/VibrancyView/src/VibrancyViewNativeComponent.macos.ts index 8332e9b13f..ea2d1c6d09 100644 --- a/packages/experimental/VibrancyView/src/VibrancyViewNativeComponent.macos.ts +++ b/packages/experimental/VibrancyView/src/VibrancyViewNativeComponent.macos.ts @@ -1,5 +1,27 @@ -import type { HostComponent } from 'react-native'; -import type { NativeProps } from './VibrancyView.types'; +import type { HostComponent, ViewProps } from 'react-native'; +import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; +export interface NativeProps extends ViewProps { + material?: WithDefault< + | 'titlebar' + | 'selection' + | 'menu' + | 'popover' + | 'sidebar' + | 'headerview' + | 'sheet' + | 'windowbackground' + | 'hudWindow' + | 'fullScreenUI' + | 'toolTip' + | 'contentBackground' + | 'underWindowBackground' + | 'underPageBackground', + 'menu' + >; + blendingMode?: WithDefault<'behindWindow' | 'withinWindow', 'behindWindow'>; + state?: WithDefault<'followsWindowActiveState' | 'active' | 'inactive', 'followsWindowActiveState'>; +} + export default codegenNativeComponent('FRNVibrancyView') as HostComponent; diff --git a/packages/experimental/VibrancyView/src/VibrancyViewNativeComponent.ts b/packages/experimental/VibrancyView/src/VibrancyViewNativeComponent.ts index 612869c70c..91028c47f0 100644 --- a/packages/experimental/VibrancyView/src/VibrancyViewNativeComponent.ts +++ b/packages/experimental/VibrancyView/src/VibrancyViewNativeComponent.ts @@ -1,4 +1,27 @@ -import type { NativeProps } from './VibrancyView.types'; +import type { ViewProps } from 'react-native'; +import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes'; import { requireNativeComponent } from 'react-native'; +export interface NativeProps extends ViewProps { + material?: WithDefault< + | 'titlebar' + | 'selection' + | 'menu' + | 'popover' + | 'sidebar' + | 'headerview' + | 'sheet' + | 'windowbackground' + | 'hudWindow' + | 'fullScreenUI' + | 'toolTip' + | 'contentBackground' + | 'underWindowBackground' + | 'underPageBackground', + 'menu' + >; + blendingMode?: WithDefault<'behindWindow' | 'withinWindow', 'behindWindow'>; + state?: WithDefault<'followsWindowActiveState' | 'active' | 'inactive', 'followsWindowActiveState'>; +} + export default requireNativeComponent('FRNVibrancyView'); From 7f526e8472f3438d0bbab6592ee901eff3444f51 Mon Sep 17 00:00:00 2001 From: Jason Morse Date: Fri, 27 Feb 2026 16:45:22 -0800 Subject: [PATCH 4/4] docs(changeset): Fix codegen definitions for native components in repo --- .changeset/funny-news-smell.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .changeset/funny-news-smell.md diff --git a/.changeset/funny-news-smell.md b/.changeset/funny-news-smell.md new file mode 100644 index 0000000000..fe5b9e5d60 --- /dev/null +++ b/.changeset/funny-news-smell.md @@ -0,0 +1,13 @@ +--- +"@fluentui-react-native/contextual-menu": patch +"@fluentui-react-native/vibrancy-view": patch +"@fluentui-react-native/focus-trap-zone": patch +"@fluentui-react-native/menu-button": patch +"@fluentui-react-native/focus-zone": patch +"@fluentui-react-native/tooltip": patch +"@fluentui-react-native/experimental-avatar": patch +"@fluentui-react-native/callout": patch +"@fluentui-react-native/button": patch +--- + +Fix codegen definitions for native components in repo