@just-web/presets-browser 3.0.1 → 4.0.0

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.
@@ -1,21 +1,19 @@
1
1
  import { BrowserOptions } from '@just-web/browser';
2
2
  import type { CommandsContext } from '@just-web/commands';
3
+ import { HistoryOptions } from '@just-web/history';
3
4
  import type { LogContext } from '@just-web/log';
4
5
  import { AppBaseContext, PluginContext } from '@just-web/types';
5
- import { BrowserHistoryOptions } from 'history';
6
6
  export type { ReadonlyErrorStore } from '@just-web/browser';
7
7
  export type { BrowserHistory } from 'history';
8
- declare const presetsBrowserPlugin: (options?: (BrowserOptions & {
9
- history: BrowserHistoryOptions;
10
- }) | undefined) => import("@just-web/types").PluginModule.TypeB<AppBaseContext & LogContext<import("@just-web/log").LogMethodNames> & CommandsContext & {
8
+ declare const presetsBrowserPlugin: (options?: (BrowserOptions & HistoryOptions) | undefined) => import("@just-web/types").PluginModule.TypeB<AppBaseContext & LogContext<import("@just-web/log").LogMethodNames> & CommandsContext & Partial<{
11
9
  keyboard: {
12
10
  keyBindingContributions: import("@just-web/keyboard").KeyBindingContributionRegistry;
13
11
  };
14
- }, {
12
+ }>, {
13
+ history: import("history").History;
15
14
  browser: {
16
15
  errors: import("@just-web/browser").ReadonlyErrorStore;
17
16
  };
18
- history: import("history").BrowserHistory;
19
17
  }>;
20
18
  export type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>;
21
19
  export default presetsBrowserPlugin;
@@ -1 +1 @@
1
- {"version":3,"file":"presetsBrowserPlugin.d.ts","sourceRoot":"","sources":["../ts/presetsBrowserPlugin.ts"],"names":[],"mappings":"AAAA,OAAsB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAgB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EAAE,qBAAqB,EAAwB,MAAM,SAAS,CAAA;AAErE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,QAAA,MAAM,oBAAoB;aAAuD,qBAAqB;;;;;;;;;;EAUnG,CAAA;AAEH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE9E,eAAe,oBAAoB,CAAA"}
1
+ {"version":3,"file":"presetsBrowserPlugin.d.ts","sourceRoot":"","sources":["../ts/presetsBrowserPlugin.ts"],"names":[],"mappings":"AAAA,OAAsB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAsB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAgB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE7E,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,QAAA,MAAM,oBAAoB;;;;;;;;;EAWvB,CAAA;AAEH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE9E,eAAe,oBAAoB,CAAA"}
@@ -5,16 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const browser_1 = __importDefault(require("@just-web/browser"));
7
7
  const browser_preferences_1 = __importDefault(require("@just-web/browser-preferences"));
8
+ const history_1 = __importDefault(require("@just-web/history"));
8
9
  const types_1 = require("@just-web/types");
9
- const history_1 = require("history");
10
10
  const presetsBrowserPlugin = (0, types_1.definePlugin)((options) => ({
11
11
  name: '@just-web/presets-browser',
12
12
  init: (ctx) => {
13
- const [{ browser }] = (0, browser_1.default)(options).init(ctx);
13
+ const [browser] = (0, browser_1.default)(options).init(ctx);
14
14
  (0, browser_preferences_1.default)().init(ctx);
15
+ const [history] = (0, history_1.default)(options).init(ctx);
15
16
  return [{
16
- browser,
17
- history: (0, history_1.createBrowserHistory)(options === null || options === void 0 ? void 0 : options.history)
17
+ ...browser,
18
+ ...history
18
19
  }];
19
20
  }
20
21
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"presetsBrowserPlugin.js","sourceRoot":"","sources":["../ts/presetsBrowserPlugin.ts"],"names":[],"mappings":";;;;;AAAA,gEAAiE;AACjE,wFAAoE;AAIpE,2CAA6E;AAC7E,qCAAqE;AAKrE,MAAM,oBAAoB,GAAG,IAAA,oBAAY,EAAC,CAAC,OAA6D,EAAE,EAAE,CAAC,CAAC;IAC5G,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,CAAC,GAAoE,EAAE,EAAE;QAC7E,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,IAAA,iBAAa,EAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACtD,IAAA,6BAAwB,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACpC,OAAO,CAAC;gBACN,OAAO;gBACP,OAAO,EAAE,IAAA,8BAAoB,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;aAChD,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAC,CAAA;AAIH,kBAAe,oBAAoB,CAAA","sourcesContent":["import browserPlugin, { BrowserOptions } from '@just-web/browser'\nimport browserPreferencesPlugin from '@just-web/browser-preferences'\nimport type { CommandsContext } from '@just-web/commands'\nimport type { KeyboardContext } from '@just-web/keyboard'\nimport type { LogContext } from '@just-web/log'\nimport { AppBaseContext, definePlugin, PluginContext } from '@just-web/types'\nimport { BrowserHistoryOptions, createBrowserHistory } from 'history'\n\nexport type { ReadonlyErrorStore } from '@just-web/browser'\nexport type { BrowserHistory } from 'history'\n\nconst presetsBrowserPlugin = definePlugin((options?: BrowserOptions & { history: BrowserHistoryOptions }) => ({\n name: '@just-web/presets-browser',\n init: (ctx: AppBaseContext & LogContext & CommandsContext & KeyboardContext) => {\n const [{ browser }] = browserPlugin(options).init(ctx)\n browserPreferencesPlugin().init(ctx)\n return [{\n browser,\n history: createBrowserHistory(options?.history)\n }]\n }\n}))\n\nexport type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>\n\nexport default presetsBrowserPlugin\n"]}
1
+ {"version":3,"file":"presetsBrowserPlugin.js","sourceRoot":"","sources":["../ts/presetsBrowserPlugin.ts"],"names":[],"mappings":";;;;;AAAA,gEAAiE;AACjE,wFAAoE;AAEpE,gEAAiE;AAGjE,2CAA6E;AAK7E,MAAM,oBAAoB,GAAG,IAAA,oBAAY,EAAC,CAAC,OAAyC,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,CAAC,GAA6E,EAAE,EAAE;QACtF,MAAM,CAAC,OAAO,CAAC,GAAG,IAAA,iBAAa,EAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAClD,IAAA,6BAAwB,GAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACpC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAA,iBAAa,EAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAClD,OAAO,CAAC;gBACN,GAAG,OAAO;gBACV,GAAG,OAAO;aACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAC,CAAA;AAIH,kBAAe,oBAAoB,CAAA","sourcesContent":["import browserPlugin, { BrowserOptions } from '@just-web/browser'\nimport browserPreferencesPlugin from '@just-web/browser-preferences'\nimport type { CommandsContext } from '@just-web/commands'\nimport historyPlugin, { HistoryOptions } from '@just-web/history'\nimport type { KeyboardContext } from '@just-web/keyboard'\nimport type { LogContext } from '@just-web/log'\nimport { AppBaseContext, definePlugin, PluginContext } from '@just-web/types'\n\nexport type { ReadonlyErrorStore } from '@just-web/browser'\nexport type { BrowserHistory } from 'history'\n\nconst presetsBrowserPlugin = definePlugin((options?: BrowserOptions & HistoryOptions) => ({\n name: '@just-web/presets-browser',\n init: (ctx: AppBaseContext & LogContext & CommandsContext & Partial<KeyboardContext>) => {\n const [browser] = browserPlugin(options).init(ctx)\n browserPreferencesPlugin().init(ctx)\n const [history] = historyPlugin(options).init(ctx)\n return [{\n ...browser,\n ...history\n }]\n }\n}))\n\nexport type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>\n\nexport default presetsBrowserPlugin\n"]}
@@ -1,21 +1,19 @@
1
1
  import { BrowserOptions } from '@just-web/browser';
2
2
  import type { CommandsContext } from '@just-web/commands';
3
+ import { HistoryOptions } from '@just-web/history';
3
4
  import type { LogContext } from '@just-web/log';
4
5
  import { AppBaseContext, PluginContext } from '@just-web/types';
5
- import { BrowserHistoryOptions } from 'history';
6
6
  export type { ReadonlyErrorStore } from '@just-web/browser';
7
7
  export type { BrowserHistory } from 'history';
8
- declare const presetsBrowserPlugin: (options?: (BrowserOptions & {
9
- history: BrowserHistoryOptions;
10
- }) | undefined) => import("@just-web/types").PluginModule.TypeB<AppBaseContext & LogContext<import("@just-web/log").LogMethodNames> & CommandsContext & {
8
+ declare const presetsBrowserPlugin: (options?: (BrowserOptions & HistoryOptions) | undefined) => import("@just-web/types").PluginModule.TypeB<AppBaseContext & LogContext<import("@just-web/log").LogMethodNames> & CommandsContext & Partial<{
11
9
  keyboard: {
12
10
  keyBindingContributions: import("@just-web/keyboard").KeyBindingContributionRegistry;
13
11
  };
14
- }, {
12
+ }>, {
13
+ history: import("history").History;
15
14
  browser: {
16
15
  errors: import("@just-web/browser").ReadonlyErrorStore;
17
16
  };
18
- history: import("history").BrowserHistory;
19
17
  }>;
20
18
  export type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>;
21
19
  export default presetsBrowserPlugin;
@@ -1 +1 @@
1
- {"version":3,"file":"presetsBrowserPlugin.d.ts","sourceRoot":"","sources":["../ts/presetsBrowserPlugin.ts"],"names":[],"mappings":"AAAA,OAAsB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAgB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EAAE,qBAAqB,EAAwB,MAAM,SAAS,CAAA;AAErE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,QAAA,MAAM,oBAAoB;aAAuD,qBAAqB;;;;;;;;;;EAUnG,CAAA;AAEH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE9E,eAAe,oBAAoB,CAAA"}
1
+ {"version":3,"file":"presetsBrowserPlugin.d.ts","sourceRoot":"","sources":["../ts/presetsBrowserPlugin.ts"],"names":[],"mappings":"AAAA,OAAsB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAsB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAgB,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE7E,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,QAAA,MAAM,oBAAoB;;;;;;;;;EAWvB,CAAA;AAEH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE9E,eAAe,oBAAoB,CAAA"}
@@ -1,15 +1,16 @@
1
1
  import browserPlugin from '@just-web/browser';
2
2
  import browserPreferencesPlugin from '@just-web/browser-preferences';
3
+ import historyPlugin from '@just-web/history';
3
4
  import { definePlugin } from '@just-web/types';
4
- import { createBrowserHistory } from 'history';
5
5
  const presetsBrowserPlugin = definePlugin((options) => ({
6
6
  name: '@just-web/presets-browser',
7
7
  init: (ctx) => {
8
- const [{ browser }] = browserPlugin(options).init(ctx);
8
+ const [browser] = browserPlugin(options).init(ctx);
9
9
  browserPreferencesPlugin().init(ctx);
10
+ const [history] = historyPlugin(options).init(ctx);
10
11
  return [{
11
- browser,
12
- history: createBrowserHistory(options === null || options === void 0 ? void 0 : options.history)
12
+ ...browser,
13
+ ...history
13
14
  }];
14
15
  }
15
16
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"presetsBrowserPlugin.js","sourceRoot":"","sources":["../ts/presetsBrowserPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,aAAiC,MAAM,mBAAmB,CAAA;AACjE,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AAIpE,OAAO,EAAkB,YAAY,EAAiB,MAAM,iBAAiB,CAAA;AAC7E,OAAO,EAAyB,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKrE,MAAM,oBAAoB,GAAG,YAAY,CAAC,CAAC,OAA6D,EAAE,EAAE,CAAC,CAAC;IAC5G,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,CAAC,GAAoE,EAAE,EAAE;QAC7E,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACtD,wBAAwB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACpC,OAAO,CAAC;gBACN,OAAO;gBACP,OAAO,EAAE,oBAAoB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC;aAChD,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAC,CAAA;AAIH,eAAe,oBAAoB,CAAA","sourcesContent":["import browserPlugin, { BrowserOptions } from '@just-web/browser'\nimport browserPreferencesPlugin from '@just-web/browser-preferences'\nimport type { CommandsContext } from '@just-web/commands'\nimport type { KeyboardContext } from '@just-web/keyboard'\nimport type { LogContext } from '@just-web/log'\nimport { AppBaseContext, definePlugin, PluginContext } from '@just-web/types'\nimport { BrowserHistoryOptions, createBrowserHistory } from 'history'\n\nexport type { ReadonlyErrorStore } from '@just-web/browser'\nexport type { BrowserHistory } from 'history'\n\nconst presetsBrowserPlugin = definePlugin((options?: BrowserOptions & { history: BrowserHistoryOptions }) => ({\n name: '@just-web/presets-browser',\n init: (ctx: AppBaseContext & LogContext & CommandsContext & KeyboardContext) => {\n const [{ browser }] = browserPlugin(options).init(ctx)\n browserPreferencesPlugin().init(ctx)\n return [{\n browser,\n history: createBrowserHistory(options?.history)\n }]\n }\n}))\n\nexport type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>\n\nexport default presetsBrowserPlugin\n"]}
1
+ {"version":3,"file":"presetsBrowserPlugin.js","sourceRoot":"","sources":["../ts/presetsBrowserPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,aAAiC,MAAM,mBAAmB,CAAA;AACjE,OAAO,wBAAwB,MAAM,+BAA+B,CAAA;AAEpE,OAAO,aAAiC,MAAM,mBAAmB,CAAA;AAGjE,OAAO,EAAkB,YAAY,EAAiB,MAAM,iBAAiB,CAAA;AAK7E,MAAM,oBAAoB,GAAG,YAAY,CAAC,CAAC,OAAyC,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,CAAC,GAA6E,EAAE,EAAE;QACtF,MAAM,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAClD,wBAAwB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACpC,MAAM,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAClD,OAAO,CAAC;gBACN,GAAG,OAAO;gBACV,GAAG,OAAO;aACX,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAC,CAAA;AAIH,eAAe,oBAAoB,CAAA","sourcesContent":["import browserPlugin, { BrowserOptions } from '@just-web/browser'\nimport browserPreferencesPlugin from '@just-web/browser-preferences'\nimport type { CommandsContext } from '@just-web/commands'\nimport historyPlugin, { HistoryOptions } from '@just-web/history'\nimport type { KeyboardContext } from '@just-web/keyboard'\nimport type { LogContext } from '@just-web/log'\nimport { AppBaseContext, definePlugin, PluginContext } from '@just-web/types'\n\nexport type { ReadonlyErrorStore } from '@just-web/browser'\nexport type { BrowserHistory } from 'history'\n\nconst presetsBrowserPlugin = definePlugin((options?: BrowserOptions & HistoryOptions) => ({\n name: '@just-web/presets-browser',\n init: (ctx: AppBaseContext & LogContext & CommandsContext & Partial<KeyboardContext>) => {\n const [browser] = browserPlugin(options).init(ctx)\n browserPreferencesPlugin().init(ctx)\n const [history] = historyPlugin(options).init(ctx)\n return [{\n ...browser,\n ...history\n }]\n }\n}))\n\nexport type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>\n\nexport default presetsBrowserPlugin\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@just-web/presets-browser",
3
- "version": "3.0.1",
3
+ "version": "4.0.0",
4
4
  "description": "just-web presets for browser related features",
5
5
  "keywords": [
6
6
  "just-web",
@@ -36,20 +36,20 @@
36
36
  "cjs",
37
37
  "esm",
38
38
  "ts",
39
- "!**/*.spec.*"
39
+ "!**/*.{spec,test,unit,accept,integrate,system}.*"
40
40
  ],
41
41
  "dependencies": {
42
- "@just-web/browser": "^6.0.0",
43
- "@just-web/browser-preferences": "^6.0.0",
44
- "history": "^5.3.0"
42
+ "@just-web/browser": "^6.0.1",
43
+ "@just-web/browser-preferences": "^6.0.1",
44
+ "@just-web/history": "^1.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@just-web/app": "^6.0.0",
48
- "@just-web/commands": "^6.0.0",
49
- "@just-web/keyboard": "^6.0.0",
50
- "@just-web/log": "^6.0.0",
47
+ "@just-web/app": "^6.0.1",
48
+ "@just-web/commands": "^6.0.1",
49
+ "@just-web/keyboard": "^6.0.1",
50
+ "@just-web/log": "^6.0.1",
51
51
  "@just-web/repo-scripts": "^0.2.0",
52
- "@just-web/types": "^6.0.0",
52
+ "@just-web/types": "^6.0.1",
53
53
  "@repobuddy/jest": "^2.2.1",
54
54
  "@size-limit/preset-small-lib": "~8.1.0",
55
55
  "@types/jest": "^29.2.3",
@@ -57,6 +57,7 @@
57
57
  "depcheck": "~1.4.3",
58
58
  "eslint": "^8.11.0",
59
59
  "eslint-plugin-harmony": "^7.1.1",
60
+ "history": "^5.3.0",
60
61
  "jest": "^29.3.1",
61
62
  "jest-validate": "^29.3.1",
62
63
  "jest-watch-suspend": "^1.1.2",
@@ -71,8 +72,8 @@
71
72
  "typescript": "^4.9.3"
72
73
  },
73
74
  "peerDependencies": {
74
- "@just-web/commands": "^6.0.0",
75
- "@just-web/keyboard": "^6.0.0"
75
+ "@just-web/commands": "^6.0.1",
76
+ "@just-web/keyboard": "^6.0.1"
76
77
  },
77
78
  "peerDependenciesMeta": {
78
79
  "@just-web/keyboard": {
@@ -1,22 +1,23 @@
1
1
  import browserPlugin, { BrowserOptions } from '@just-web/browser'
2
2
  import browserPreferencesPlugin from '@just-web/browser-preferences'
3
3
  import type { CommandsContext } from '@just-web/commands'
4
+ import historyPlugin, { HistoryOptions } from '@just-web/history'
4
5
  import type { KeyboardContext } from '@just-web/keyboard'
5
6
  import type { LogContext } from '@just-web/log'
6
7
  import { AppBaseContext, definePlugin, PluginContext } from '@just-web/types'
7
- import { BrowserHistoryOptions, createBrowserHistory } from 'history'
8
8
 
9
9
  export type { ReadonlyErrorStore } from '@just-web/browser'
10
10
  export type { BrowserHistory } from 'history'
11
11
 
12
- const presetsBrowserPlugin = definePlugin((options?: BrowserOptions & { history: BrowserHistoryOptions }) => ({
12
+ const presetsBrowserPlugin = definePlugin((options?: BrowserOptions & HistoryOptions) => ({
13
13
  name: '@just-web/presets-browser',
14
- init: (ctx: AppBaseContext & LogContext & CommandsContext & KeyboardContext) => {
15
- const [{ browser }] = browserPlugin(options).init(ctx)
14
+ init: (ctx: AppBaseContext & LogContext & CommandsContext & Partial<KeyboardContext>) => {
15
+ const [browser] = browserPlugin(options).init(ctx)
16
16
  browserPreferencesPlugin().init(ctx)
17
+ const [history] = historyPlugin(options).init(ctx)
17
18
  return [{
18
- browser,
19
- history: createBrowserHistory(options?.history)
19
+ ...browser,
20
+ ...history
20
21
  }]
21
22
  }
22
23
  }))