@appshell/react 1.0.0-alpha.22 → 1.0.0-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,6 @@ export { default as outdated } from './outdated';
11
11
  export { activate, publish } from './publish';
12
12
  export type { PublishOptions, PublishResult } from './publish';
13
13
  export { default as sync } from './sync';
14
- export type { AppshellComposition, AppshellConfig, AppshellConfigRemote, AppshellIndex, AppshellManifest, AppshellRemote, AppshellTemplate, ComparisonResult, ComparisonResults, ComparisonTarget, Metadata, ModuleFederationPluginOptions, PackageSpec, ResolvedRemote, Schema, SharedConfig, SharedModuleSpec, } from './types';
14
+ export type { AppshellComposition, AppshellConfig, AppshellConfigRemote, AppshellIndex, AppshellManifest, AppshellRemote, AppshellTemplate, AppshellTokenUsage, ComparisonResult, ComparisonResults, ComparisonTarget, Metadata, ModuleFederationPluginOptions, PackageSpec, ResolvedRemote, Schema, SharedConfig, SharedModuleSpec, } from './types';
15
15
  export * as utils from './utils';
16
16
  export * as validators from './validators';
@@ -68,6 +68,7 @@ export type AppshellTemplate<TMetadata = Metadata> = {
68
68
  remotes?: Record<string, AppshellConfigRemote<TMetadata>>;
69
69
  module: ModuleFederationPluginOptions;
70
70
  vars?: Record<string, unknown>;
71
+ tokens?: Record<string, AppshellTokenUsage>;
71
72
  overrides?: AppshellOverrides;
72
73
  };
73
74
  /** Appshell manifest types */
@@ -83,10 +84,25 @@ export type AppshellRemote<TMetadata = Metadata> = {
83
84
  export type AppshellOverrides = {
84
85
  vars: Record<string, Record<string, string | number | undefined>>;
85
86
  };
87
+ /**
88
+ * Which design tokens a package's own output reaches for. Observed from the emitted
89
+ * assets rather than declared: the CSS already says it, and a hand-kept list is a copy
90
+ * that drifts the first time someone adds a token and forgets the yaml.
91
+ *
92
+ * `required` is a reference with no fallback — the package has no plan B. `optional` is
93
+ * `var(--appshell-x, something)`, which degrades on its own. That split is read off what
94
+ * the author wrote rather than asked of them.
95
+ */
96
+ export type AppshellTokenUsage = {
97
+ required: string[];
98
+ optional: string[];
99
+ };
86
100
  export type AppshellManifest<TMetadata = Metadata> = {
87
101
  remotes: Record<string, AppshellRemote<TMetadata>>;
88
102
  modules: Record<string, ModuleFederationPluginOptions>;
89
103
  vars: Record<string, Record<string, string | number | undefined>>;
104
+ /** Keyed by federation scope, so a merged manifest still says which package needs what. */
105
+ tokens?: Record<string, AppshellTokenUsage>;
90
106
  overrides?: AppshellOverrides;
91
107
  };
92
108
  export type AppshellIndex = Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appshell/react",
3
- "version": "1.0.0-alpha.22",
3
+ "version": "1.0.0-alpha.24",
4
4
  "description": "React utilities for building micro-frontends with Appshell and Module Federation",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/types/react/src/index.d.ts",
@@ -33,8 +33,8 @@
33
33
  "react": "^18.2.0",
34
34
  "react-dom": "^18.2.0"
35
35
  },
36
- "gitHead": "6f194cbc3e1c53146b827ca3eb38ece3ccd59797",
36
+ "gitHead": "41f2ce7eee90490c80273dfe4a5df46295730a0e",
37
37
  "dependencies": {
38
- "@appshell/runtime": "^1.0.0-alpha.22"
38
+ "@appshell/runtime": "^1.0.0-alpha.24"
39
39
  }
40
40
  }