Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dev-docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/backend/pkg/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions packages/document-methods/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/frontend/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let

pnpmDeps = pkgs.fetchPnpmDeps {
# see ../../dev-docs/fixing-hash-mismatches.md
hash = "sha256-INfSKk7wf37D3HVs8QXzx9YV0VwuDmfwnnppviLlXNQ=";
hash = "sha256-Aa8ncSnlBJVhtIiGZnbUYIsSqGT5XAZ0lQJrkp+o5Nw=";

pname = name;
fetcherVersion = 2;
Expand Down
7 changes: 7 additions & 0 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
"@corvu/popover": "^0.2.0",
"@corvu/resizable": "^0.2.5",
"@corvu/tooltip": "^0.2.2",
"@hashintel/ds-components": "^0.2.1",
"@hashintel/ds-helpers": "^0.2.1",
"@hashintel/petrinaut": "^0.0.15",
"@mdx-js/rollup": "^3.1.0",
"@modular-forms/solid": "^0.24.1",
"@qubit-rs/client": "^0.4.5",
Expand Down Expand Up @@ -70,6 +73,8 @@
"prosemirror-state": "^1.4.3",
"prosemirror-transform": "^1.10.4",
"prosemirror-view": "^1.40.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"solid-firebase": "^0.3.0",
"solid-js": "^1.9.10",
"tiny-invariant": "^1.3.3",
Expand All @@ -81,6 +86,8 @@
"@types/html-escaper": "^3.0.4",
"@types/mdx": "^2.0.13",
"@types/node": "^24.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint-plugin-solid": "^0.14.5",
"rehype-katex": "^7.0.1",
"rehype-raw": "^7.0.0",
Expand Down
116 changes: 116 additions & 0 deletions packages/frontend/patches/@hashintel__ds-helpers@0.2.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
diff --git a/styled-system/css/index.d.ts b/styled-system/css/index.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a675f25512572a798ba45e59959e502e0e9cf76b
--- /dev/null
+++ b/styled-system/css/index.d.ts
@@ -0,0 +1,41 @@
+// Minimal type declarations matching the runtime shim in `./index.mjs`.
+// Mirrors a subset of PandaCSS's generated types. Real types come from the
+// (missing) upstream generation; this is just enough to satisfy TS callers.
+
+export type SystemStyleObject = Record<string, unknown>;
+
+export interface CssFunction {
+ (styles?: SystemStyleObject): string;
+ raw: (styles?: SystemStyleObject) => SystemStyleObject;
+}
+
+export const css: CssFunction;
+
+export function cx(...names: Array<string | false | null | undefined>): string;
+
+export interface RecipeRuntimeFn<Variants extends Record<string, unknown> = Record<string, unknown>> {
+ (props?: Partial<Variants>): string;
+ raw: (props?: Partial<Variants>) => Partial<Variants>;
+ variantKeys: string[];
+ variantMap: Record<string, string[]>;
+ splitVariantProps: <P extends Partial<Variants>>(props: P) => [Partial<Variants>, Omit<P, keyof Variants>];
+}
+
+export function cva<Variants extends Record<string, unknown> = Record<string, unknown>>(
+ config: unknown,
+): RecipeRuntimeFn<Variants>;
+
+export interface SlotRecipeRuntimeFn<
+ Slots extends string = string,
+ Variants extends Record<string, unknown> = Record<string, unknown>,
+> {
+ (props?: Partial<Variants>): Record<Slots, string>;
+ raw: (props?: Partial<Variants>) => Partial<Variants>;
+ variantKeys: string[];
+ splitVariantProps: <P extends Partial<Variants>>(props: P) => [Partial<Variants>, Omit<P, keyof Variants>];
+}
+
+export function sva<
+ Slots extends string = string,
+ Variants extends Record<string, unknown> = Record<string, unknown>,
+>(config: unknown): SlotRecipeRuntimeFn<Slots, Variants>;
diff --git a/styled-system/css/index.mjs b/styled-system/css/index.mjs
new file mode 100644
index 0000000000000000000000000000000000000000..d414a8e6a7b39f151021df9ac4007bff6a9dd895
--- /dev/null
+++ b/styled-system/css/index.mjs
@@ -0,0 +1,63 @@
+// Minimal runtime shim for `@hashintel/ds-helpers/css`.
+//
+// The published 0.2.0 tarball is missing its generated `styled-system/`
+// directory (PandaCSS codegen output) entirely. Until upstream republishes
+// with the generated files included, this shim provides just enough surface
+// area for `@hashintel/ds-components` (and transitively `@hashintel/petrinaut`)
+// to resolve and evaluate. The functions are stubs — they return reasonable
+// no-op values so import-time module evaluation succeeds; the result is that
+// the Petrinaut UI will render without PandaCSS-generated styling.
+//
+// See: upstream packaging issue at hashintel/hash @hashintel/ds-helpers.
+
+const NOOP_CLASS = "";
+
+/** Generate a class name from a style object. Real impl emits atomic classes
+ * and registers the corresponding CSS; here we just return an empty string
+ * so callers that build a `className` end up with no class. */
+export function css(/* styles */) {
+ return NOOP_CLASS;
+}
+
+/** Pull `.raw(styles)` access onto the function itself, mimicking PandaCSS. */
+css.raw = function cssRaw(styles) {
+ return styles ?? {};
+};
+
+/** Concatenate class names, ignoring falsy values. */
+export function cx(...names) {
+ return names.filter(Boolean).join(" ");
+}
+
+/** PandaCSS `cva` (class-variance-authority style). Returns a function that,
+ * when called with props, returns a class string. We stub to always return
+ * an empty class so component variants don't crash. */
+export function cva(config) {
+ function recipe(/* props */) {
+ return NOOP_CLASS;
+ }
+ recipe.raw = (props) => props ?? {};
+ recipe.variantKeys = Object.keys(config?.variants ?? {});
+ recipe.variantMap = Object.fromEntries(
+ Object.entries(config?.variants ?? {}).map(([k, v]) => [k, Object.keys(v)]),
+ );
+ recipe.splitVariantProps = (props) => [{}, props ?? {}];
+ return recipe;
+}
+
+/** PandaCSS slot recipes. Returns a function that maps every slot to "" so
+ * `recipe(props).<slotName>` is always a no-op class. */
+export function sva(config) {
+ const slots = config?.slots ?? [];
+ function recipe(/* props */) {
+ const result = {};
+ for (const slot of slots) {
+ result[slot] = NOOP_CLASS;
+ }
+ return result;
+ }
+ recipe.raw = (props) => props ?? {};
+ recipe.variantKeys = Object.keys(config?.variants ?? {});
+ recipe.splitVariantProps = (props) => [{}, props ?? {}];
+ return recipe;
+}
Loading
Loading