Skip to content

Update dependencies #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
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,338 changes: 3,079 additions & 2,259 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,31 @@
},
"license": "MIT",
"devDependencies": {
"@playwright/test": "^1.19.0",
"@playwright/test": "^1.35.1",
"@stackblitz/sdk": "^1.6.0",
"@types/node": "^17.0.21",
"@types/node": "^20.3.1",
"@typescript-eslint/eslint-plugin": "^5.14.0",
"@typescript-eslint/parser": "^5.14.0",
"c8": "^7.11.0",
"eslint": "^8.8.0",
"fuse.js": "^6.5.3",
"fuse.js": "^6.6.2",
"happy-dom": "^2.31.1",
"prettier": "2.6.0",
"shiki": "^0.10.1",
"solid-app-router": "^0.2.1",
"solid-js": "^1.3.2",
"solid-transition-group": "0.0.8",
"tinykeys": "^1.4.0",
"ts-node": "^10.5.0",
"typescript": "^4.6.2",
"vite": "^2.7.10",
"vite-plugin-solid": "^2.2.1",
"vitest": "^0.3.2"
"solid-js": "^1.7.6",
"solid-transition-group": "^0.2.2",
"tinykeys": "^2.1.0",
"ts-node": "^10.9.1",
"typescript": "^5.1.3",
"vite": "^4.3.9",
"vite-plugin-solid": "^2.7.0",
"vitest": "^0.32.2"
},
"peerDependencies": {
"fuse.js": "^6.5.3",
"solid-js": "^1.3.2",
"solid-transition-group": "0.0.8",
"tinykeys": "^1.4.0"
"solid-transition-group": "^0.2.2",
"tinykeys": "^2.1.0"
},
"files": [
"pkg-dist"
Expand All @@ -83,5 +82,8 @@
"search bar",
"solidhack",
"best_ecosystem"
]
],
"dependencies": {
"@solidjs/router": "^0.8.2"
}
}
4 changes: 1 addition & 3 deletions snippets/api-root.snippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,15 @@ import { Root } from 'solid-command-palette';
[myAction.id]: myAction,
/* ... other actions ... */
}}

/* share App's signals and methods with actions */
actionsContext={{
count,
incrementCount,
deleteMessage,
}}

/* Custom components to render in palette */
components={{
/* content for action in search result list */
ResultContent,
}}
/>
/>;
2 changes: 1 addition & 1 deletion src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component, lazy } from 'solid-js';
import { RouteDefinition, useRoutes } from 'solid-app-router';
import AppShellView from './views/app/AppShell.view';
import DocsShellView from './views/docs/DocsShell/DocsShell.view';
import DocsView from './views/docs/Docs.view';
import ApiView from './views/docs/Api/Api.view';
import HomeView from './views/home/Home.view';
import { RouteDefinition, useRoutes } from '@solidjs/router';

const routes: Array<RouteDefinition> = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render } from 'solid-js/web';
import { Router } from 'solid-app-router';

import App from './App';
import { Router } from '@solidjs/router';

const appRender = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/app/AppShell.view.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component, Show } from 'solid-js';
import { Link, NavLink, NavLinkProps, Outlet, useMatch, useNavigate } from 'solid-app-router';
import { Root, CommandPalette } from '../../../lib';
import { SocialIcon, socialsData } from './SocialIcons';
import { actions } from './actions';
import utilStyles from '../../utils.module.css';
import styles from './AppShell.module.css';
import { Link, NavLink, NavLinkProps, Outlet, useMatch, useNavigate } from '@solidjs/router';

const HeaderNavLink: Component<NavLinkProps> = (p) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/demo/Demo.view.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, createSignal, Show } from 'solid-js';
import { useSearchParams } from 'solid-app-router';
import { Root, CommandPalette, KbdShortcut } from '../../../lib';
import { actions } from './actions';
import { NestedActionDemo } from './NestedActionDemo/NestedActionDemo';
Expand All @@ -9,6 +8,7 @@ import { Profile } from './types';
import utilStyles from '../../utils.module.css';
import demoStyles from './demoUtils.module.css';
import styles from './Demo.module.css';
import { useSearchParams } from '@solidjs/router';

const DemoView: Component = () => {
const [count, setCount] = createSignal(0);
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/docs/Api/Api.view.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Navigate } from 'solid-app-router';
import { Navigate } from '@solidjs/router';
import { Component } from 'solid-js';

const ApiView: Component = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/docs/Api/ApiDefineAction.view.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from 'solid-js';
import { Link } from 'solid-app-router';
import { Snippet } from '../Snippet/Snippet';
import docsStyles from '../docsUtils.module.css';
import { Link } from '@solidjs/router';

const ApiRootView: Component = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/docs/Docs.view.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Navigate } from '@solidjs/router';
import { Component } from 'solid-js';
import { Navigate } from 'solid-app-router';

const DocsView: Component = () => {
return <Navigate href="/docs/overview" />;
Expand Down
9 changes: 6 additions & 3 deletions src/app/views/docs/DocsShell/DocsShell.view.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, Suspense } from 'solid-js';
import { NavLink, NavLinkProps, Outlet, useIsRouting } from 'solid-app-router';
import { Component, Show, Suspense } from 'solid-js';
import { Loader } from '../../../shared/Loader/Loader';
import styles from './DocsShell.module.css';
import { NavLink, NavLinkProps, useIsRouting } from '@solidjs/router';

const SidebarNavLink: Component<NavLinkProps> = (p) => {
return (
Expand Down Expand Up @@ -51,7 +51,10 @@ const DocsShellView: Component = () => {
</Show>
</aside>
<main class={styles.main}>
<Suspense fallback={<Loader size="large" />}>
<Suspense
fallback={<Loader size="large" />}
children={undefined}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be fixed - my IDE showed me an error here, but shouldn't the div below technically be considered to be children? 🤔

>
<div class={styles.mainContent}>
<Outlet />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/CommandPalette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Show,
} from 'solid-js';
import { Transition } from 'solid-transition-group';
import tinykeys from 'tinykeys';
import { tinykeys } from 'tinykeys';
import { useStore } from './StoreContext';
import { CommandPalettePortal } from './CommandPalettePortal';
import { KbdShortcut } from './KbdShortcut/KbdShortcut';
Expand Down Expand Up @@ -283,7 +283,7 @@ const CommandPaletteInternal: Component<CommandPaletteProps> = (p) => {
}}
>
<label
htmlFor={searchInputId}
for={searchInputId}
id={searchLabelId}
class={utilStyles.visuallyHidden}
>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/CommandPalettePortal.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, createRenderEffect, onCleanup } from 'solid-js';
import { Component, JSX, createRenderEffect, onCleanup } from 'solid-js';
import { Portal } from 'solid-js/web';

type PortalElem = undefined | HTMLDivElement;

export const CommandPalettePortal: Component = (p) => {
export const CommandPalettePortal: Component<{ children: JSX.Element }> = (p) => {
let portalElem: PortalElem;

createRenderEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Panel/Result/Result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ResultContent: Component<ResultContentProps> = (p) => {
{(shortcut) => (
<KbdShortcut
class={styles.resultShortcut}
shortcut={shortcut}
shortcut={shortcut()}
/>
)}
</Show>
Expand Down
1 change: 0 additions & 1 deletion src/lib/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const Root: Component<RootProps> = (p) => {
setState('searchText', newValue);
},
setActionsContext(actionId, newData) {
// @ts-expect-error need to figure out nested store setters.
setState('actionsContext', 'dynamic', actionId, newData);
},
resetActionsContext(actionId) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/createKbdShortcuts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { onMount, onCleanup } from 'solid-js';
import tinykeys from 'tinykeys';
import { tinykeys } from 'tinykeys';
import { useStore } from './StoreContext';
import { createActionList } from './createActionList';
import { getShortcutHandlersMap } from './actionUtils/actionUtils';
Expand Down
3 changes: 2 additions & 1 deletion src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from 'solid-js';
import { Component, JSX } from 'solid-js';
import { DeepReadonly, Store } from 'solid-js/store';

export type ActionId = string;
Expand Down Expand Up @@ -60,6 +60,7 @@ export interface RootProps {
actions: Actions;
actionsContext: ActionContext;
components?: Components;
children?: JSX.Element;
}

export interface StoreState {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/useControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ export function useControls() {
openPalette: storeMethods.openPalette,
closePalette: storeMethods.closePalette,
togglePalette: storeMethods.togglePalette,
}
};
}
4 changes: 3 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ export default defineConfig({
plugins: [solidPlugin()],
build: {
target: 'esnext',
polyfillDynamicImport: false,
},
test: {
environment: 'happy-dom',
clearMocks: true,
},
server: {
port: 3000,
},
});