hunk.code_window:               indexes[j] = tempIndexes![j];
                 indexes[j](j);
               }
             } else mapped[j] = createRoot(mapper);
           }
           // 3) in case the new set is shorter than the old, set the length of the mapped array
           len = mapped.length = newLen;
           // 4) save a copy of the mapped items for the next update
           items = newItems.slice(0);
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:           } else mapped[j] = createRoot(mapper, ctx);
  
hunk.file_path: packages/solid/src/reactive/array.ts
hunk.type: replace
file: import { css, CSSAttribute, setup as gooberSetup } from "goober";
  import { assignProps, splitProps, createContext, useContext, createComponent } from "solid-js";
  import { spread, ssr, ssrSpread, isServer } from "solid-js/web";
  
  declare module "goober" {
    function keyframes(
      tag: TemplateStringsArray | string,
      ...props: Array<string | number>
    ): string;
  }
  export { css, glob, extractCss, keyframes } from "goober";
  
  export function setup(prefixer: (key: string, value: any) => string) {
    gooberSetup(null, prefixer);
  }
  
  const ThemeContext = createContext();
  
  export function ThemeProvider<T extends { theme: any; children?: any }>(props: T) {
    return createComponent(ThemeContext.Provider, {
      value: props.theme,
      get children() {
        return props.children;
      }
    });
  }
  
  export function useTheme() {
    return useContext(ThemeContext);
  }
  
  type StyledTemplateArgs<T> = [
    CSSAttribute | TemplateStringsArray | string | ((props: T) => CSSAttribute | string),
    ...Array<string | number | ((props: T) => CSSAttribute | string | number | undefined)>
  ];
  
  export function styled<T extends keyof JSX.IntrinsicElements>(tag: T | ((props: any) => any)) {
    return <P>(
      ...args: StyledTemplateArgs<
        P & { theme?: any; as?: keyof JSX.IntrinsicElements; className?: any; children?: any }
      >
    ) => {
      return (
        props: P &
          JSX.IntrinsicElements[T] & {
            theme?: any;
            as?: keyof JSX.IntrinsicElements;
            className?: any;
            children?: any;
          }
      ): JSX.Element => {
        const theme = useContext(ThemeContext);
        const clone = assignProps({}, props, {
          get className(): string {
            const pClassName = props.className,
              append = "className" in props && /^go[0-9]+/.test(pClassName!);
  
            // Call `css` with the append flag and pass the props
            let className = css.apply(
              { target: (this as any).target, o: append, p: clone },
              args as [any, ...any[]]
            );
  
            return [pClassName, className].filter(Boolean).join(" ");
          }
        });
        theme && (clone.theme = theme);
        const [local, newProps] = splitProps(clone, ["as"]);
        const createTag = local.as || tag;
  
        let el;
        if (typeof createTag === "function") {
          el = createTag(newProps);
        } else if (isServer) {
          const [local, others] = splitProps(newProps, ["children"]);
          el = ssr(
            [`<${createTag} `, ">", `</${createTag}>`],
            ssrSpread(others),
            local.children || ""
          );
        } else {
          el = document.createElement(createTag as any);
          spread(el, newProps);
        }
  
        return el;
      };
    };
  }
  