@just-web/presets-browser 4.0.2 → 5.0.0-beta.1
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.
- package/cjs/index.d.ts +1 -0
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +15 -0
- package/cjs/index.js.map +1 -1
- package/cjs/package.json +1 -1
- package/cjs/presetsBrowserPlugin.d.ts +1 -1
- package/cjs/presetsBrowserPlugin.d.ts.map +1 -1
- package/cjs/presetsBrowserPlugin.js +4 -2
- package/cjs/presetsBrowserPlugin.js.map +1 -1
- package/cjs/presets_browser_gizmo.d.ts +14 -0
- package/cjs/presets_browser_gizmo.d.ts.map +1 -0
- package/cjs/presets_browser_gizmo.js +20 -0
- package/cjs/presets_browser_gizmo.js.map +1 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/presetsBrowserPlugin.d.ts +1 -1
- package/esm/presetsBrowserPlugin.d.ts.map +1 -1
- package/esm/presetsBrowserPlugin.js +4 -2
- package/esm/presetsBrowserPlugin.js.map +1 -1
- package/esm/presets_browser_gizmo.d.ts +14 -0
- package/esm/presets_browser_gizmo.d.ts.map +1 -0
- package/esm/presets_browser_gizmo.js +17 -0
- package/esm/presets_browser_gizmo.js.map +1 -0
- package/package.json +37 -29
- package/ts/index.ts +1 -0
- package/ts/presetsBrowserPlugin.ts +12 -10
- package/ts/presets_browser_gizmo.ts +31 -0
package/cjs/index.d.ts
CHANGED
package/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC1G,cAAc,4BAA4B,CAAA"}
|
package/cjs/index.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
18
|
};
|
|
@@ -6,4 +20,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
20
|
exports.default = void 0;
|
|
7
21
|
var presetsBrowserPlugin_js_1 = require("./presetsBrowserPlugin.js");
|
|
8
22
|
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(presetsBrowserPlugin_js_1).default; } });
|
|
23
|
+
__exportStar(require("./presets_browser_gizmo.js"), exports);
|
|
9
24
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,qEAAmD;AAA1C,mIAAA,OAAO,OAAA;AAEhB,6DAA0C","sourcesContent":["export { default } from './presetsBrowserPlugin.js'\nexport type { BrowserHistory, PresetsBrowserContext, ReadonlyErrorStore } from './presetsBrowserPlugin.js'\nexport * from './presets_browser_gizmo.js'\n"]}
|
package/cjs/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
|
1
|
+
{ "type": "commonjs" }
|
|
@@ -5,7 +5,7 @@ import type { LogContext } from '@just-web/log';
|
|
|
5
5
|
import { AppBaseContext, PluginContext } from '@just-web/types';
|
|
6
6
|
export type { ReadonlyErrorStore } from '@just-web/browser';
|
|
7
7
|
export type { BrowserHistory } from 'history';
|
|
8
|
-
declare const presetsBrowserPlugin: (options?: (BrowserOptions & HistoryOptions) | undefined) => import("@just-web/types").PluginModule.TypeB<AppBaseContext & LogContext
|
|
8
|
+
declare const presetsBrowserPlugin: (options?: (BrowserOptions & HistoryOptions) | undefined) => import("@just-web/types").PluginModule.TypeB<AppBaseContext & LogContext & CommandsContext & Partial<{
|
|
9
9
|
keyboard: {
|
|
10
10
|
keyBindingContributions: import("@just-web/keyboard").KeyBindingContributionRegistry;
|
|
11
11
|
};
|
|
@@ -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;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;;;;;;;;;
|
|
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;;;;;;;;;EAavB,CAAA;AAEH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE9E,eAAe,oBAAoB,CAAA"}
|
|
@@ -13,10 +13,12 @@ const presetsBrowserPlugin = (0, types_1.definePlugin)((options) => ({
|
|
|
13
13
|
const [browser] = (0, browser_1.default)(options).init(ctx);
|
|
14
14
|
(0, browser_preferences_1.default)().init(ctx);
|
|
15
15
|
const [history] = (0, history_1.default)(options).init(ctx);
|
|
16
|
-
return [
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
17
18
|
...browser,
|
|
18
19
|
...history
|
|
19
|
-
}
|
|
20
|
+
}
|
|
21
|
+
];
|
|
20
22
|
}
|
|
21
23
|
}));
|
|
22
24
|
exports.default = presetsBrowserPlugin;
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACzF,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,CAAC,GAA6E,EAAE,EAAE;QACvF,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;YACN;gBACC,GAAG,OAAO;gBACV,GAAG,OAAO;aACV;SACD,CAAA;IACF,CAAC;CACD,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\tname: '@just-web/presets-browser',\n\tinit: (ctx: AppBaseContext & LogContext & CommandsContext & Partial<KeyboardContext>) => {\n\t\tconst [browser] = browserPlugin(options).init(ctx)\n\t\tbrowserPreferencesPlugin().init(ctx)\n\t\tconst [history] = historyPlugin(options).init(ctx)\n\t\treturn [\n\t\t\t{\n\t\t\t\t...browser,\n\t\t\t\t...history\n\t\t\t}\n\t\t]\n\t}\n}))\n\nexport type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>\n\nexport default presetsBrowserPlugin\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { define, type DepBuilder, type GizmoStatic, type IdGizmo } from '@just-web/app';
|
|
2
|
+
import { type BrowserGizmo, type BrowserGizmoOptions } from '@just-web/browser';
|
|
3
|
+
import type { CommandsGizmo } from '@just-web/commands';
|
|
4
|
+
import { type HistoryGizmo, type HistoryGizmoOptions } from '@just-web/history';
|
|
5
|
+
import type { KeyboardGizmo } from '@just-web/keyboard';
|
|
6
|
+
import type { LogGizmo } from '@just-web/log';
|
|
7
|
+
export type { ReadonlyErrorStore } from '@just-web/browser';
|
|
8
|
+
export type { BrowserHistory } from 'history';
|
|
9
|
+
export declare const presetsBrowserGizmoFn: (options?: {
|
|
10
|
+
browser?: BrowserGizmoOptions;
|
|
11
|
+
history?: HistoryGizmoOptions;
|
|
12
|
+
}) => GizmoStatic<DepBuilder<IdGizmo & LogGizmo & CommandsGizmo, KeyboardGizmo>, BrowserGizmo & HistoryGizmo>;
|
|
13
|
+
export type PresetsBrowserGizmo = define.Infer<typeof presetsBrowserGizmoFn>;
|
|
14
|
+
//# sourceMappingURL=presets_browser_gizmo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets_browser_gizmo.d.ts","sourceRoot":"","sources":["../ts/presets_browser_gizmo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AACvF,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE/F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC/F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,eAAO,MAAM,qBAAqB,EAAE,CAAC,OAAO,CAAC,EAAE;IAC9C,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAC7B,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC7B,KAAK,WAAW,CAChB,UAAU,CAAC,OAAO,GAAG,QAAQ,GAAG,aAAa,EAAE,aAAa,CAAC,EAC7D,YAAY,GAAG,YAAY,CAYzB,CAAA;AAEH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.presetsBrowserGizmoFn = void 0;
|
|
4
|
+
const app_1 = require("@just-web/app");
|
|
5
|
+
const browser_1 = require("@just-web/browser");
|
|
6
|
+
const browser_preferences_1 = require("@just-web/browser-preferences");
|
|
7
|
+
const history_1 = require("@just-web/history");
|
|
8
|
+
exports.presetsBrowserGizmoFn = (0, app_1.define)((options) => ({
|
|
9
|
+
static: app_1.define.require().require().require().optional(),
|
|
10
|
+
async create(ctx) {
|
|
11
|
+
const browser = await ctx.with((0, browser_1.browserGizmoFn)(options === null || options === void 0 ? void 0 : options.browser));
|
|
12
|
+
await ctx.with(browser_preferences_1.browserPreferencesGizmo);
|
|
13
|
+
const history = await ctx.with((0, history_1.historyGizmoFn)(options === null || options === void 0 ? void 0 : options.history));
|
|
14
|
+
return {
|
|
15
|
+
...browser,
|
|
16
|
+
...history
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
//# sourceMappingURL=presets_browser_gizmo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets_browser_gizmo.js","sourceRoot":"","sources":["../ts/presets_browser_gizmo.ts"],"names":[],"mappings":";;;AAAA,uCAAuF;AACvF,+CAA+F;AAC/F,uEAAuE;AAEvE,+CAA+F;AAOlF,QAAA,qBAAqB,GAM9B,IAAA,YAAM,EAAC,CAAC,OAA0E,EAAE,EAAE,CAAC,CAAC;IAC3F,MAAM,EAAE,YAAM,CAAC,OAAO,EAAW,CAAC,OAAO,EAAY,CAAC,OAAO,EAAiB,CAAC,QAAQ,EAAiB;IACxG,KAAK,CAAC,MAAM,CAAC,GAAG;QACf,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,IAAA,wBAAc,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,CAAC,CAAA;QAChE,MAAM,GAAG,CAAC,IAAI,CAAC,6CAAuB,CAAC,CAAA;QACvC,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,IAAA,wBAAc,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,CAAC,CAAA;QAChE,OAAO;YACN,GAAG,OAAO;YACV,GAAG,OAAO;SACV,CAAA;IACF,CAAC;CACD,CAAC,CAAC,CAAA","sourcesContent":["import { define, type DepBuilder, type GizmoStatic, type IdGizmo } from '@just-web/app'\nimport { browserGizmoFn, type BrowserGizmo, type BrowserGizmoOptions } from '@just-web/browser'\nimport { browserPreferencesGizmo } from '@just-web/browser-preferences'\nimport type { CommandsGizmo } from '@just-web/commands'\nimport { historyGizmoFn, type HistoryGizmo, type HistoryGizmoOptions } from '@just-web/history'\nimport type { KeyboardGizmo } from '@just-web/keyboard'\nimport type { LogGizmo } from '@just-web/log'\n\nexport type { ReadonlyErrorStore } from '@just-web/browser'\nexport type { BrowserHistory } from 'history'\n\nexport const presetsBrowserGizmoFn: (options?: {\n\tbrowser?: BrowserGizmoOptions\n\thistory?: HistoryGizmoOptions\n}) => GizmoStatic<\n\tDepBuilder<IdGizmo & LogGizmo & CommandsGizmo, KeyboardGizmo>,\n\tBrowserGizmo & HistoryGizmo\n> = define((options?: { browser?: BrowserGizmoOptions; history?: HistoryGizmoOptions }) => ({\n\tstatic: define.require<IdGizmo>().require<LogGizmo>().require<CommandsGizmo>().optional<KeyboardGizmo>(),\n\tasync create(ctx) {\n\t\tconst browser = await ctx.with(browserGizmoFn(options?.browser))\n\t\tawait ctx.with(browserPreferencesGizmo)\n\t\tconst history = await ctx.with(historyGizmoFn(options?.history))\n\t\treturn {\n\t\t\t...browser,\n\t\t\t...history\n\t\t}\n\t}\n}))\n\nexport type PresetsBrowserGizmo = define.Infer<typeof presetsBrowserGizmoFn>\n"]}
|
package/esm/index.d.ts
CHANGED
package/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC1G,cAAc,4BAA4B,CAAA"}
|
package/esm/index.js
CHANGED
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA","sourcesContent":["export { default } from './presetsBrowserPlugin.js'\nexport type { BrowserHistory, PresetsBrowserContext, ReadonlyErrorStore } from './presetsBrowserPlugin.js'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,cAAc,4BAA4B,CAAA","sourcesContent":["export { default } from './presetsBrowserPlugin.js'\nexport type { BrowserHistory, PresetsBrowserContext, ReadonlyErrorStore } from './presetsBrowserPlugin.js'\nexport * from './presets_browser_gizmo.js'\n"]}
|
|
@@ -5,7 +5,7 @@ import type { LogContext } from '@just-web/log';
|
|
|
5
5
|
import { AppBaseContext, PluginContext } from '@just-web/types';
|
|
6
6
|
export type { ReadonlyErrorStore } from '@just-web/browser';
|
|
7
7
|
export type { BrowserHistory } from 'history';
|
|
8
|
-
declare const presetsBrowserPlugin: (options?: (BrowserOptions & HistoryOptions) | undefined) => import("@just-web/types").PluginModule.TypeB<AppBaseContext & LogContext
|
|
8
|
+
declare const presetsBrowserPlugin: (options?: (BrowserOptions & HistoryOptions) | undefined) => import("@just-web/types").PluginModule.TypeB<AppBaseContext & LogContext & CommandsContext & Partial<{
|
|
9
9
|
keyboard: {
|
|
10
10
|
keyBindingContributions: import("@just-web/keyboard").KeyBindingContributionRegistry;
|
|
11
11
|
};
|
|
@@ -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;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;;;;;;;;;
|
|
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;;;;;;;;;EAavB,CAAA;AAEH,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE9E,eAAe,oBAAoB,CAAA"}
|
|
@@ -8,10 +8,12 @@ const presetsBrowserPlugin = definePlugin((options) => ({
|
|
|
8
8
|
const [browser] = browserPlugin(options).init(ctx);
|
|
9
9
|
browserPreferencesPlugin().init(ctx);
|
|
10
10
|
const [history] = historyPlugin(options).init(ctx);
|
|
11
|
-
return [
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
12
13
|
...browser,
|
|
13
14
|
...history
|
|
14
|
-
}
|
|
15
|
+
}
|
|
16
|
+
];
|
|
15
17
|
}
|
|
16
18
|
}));
|
|
17
19
|
export default presetsBrowserPlugin;
|
|
@@ -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;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;
|
|
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;IACzF,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,CAAC,GAA6E,EAAE,EAAE;QACvF,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;YACN;gBACC,GAAG,OAAO;gBACV,GAAG,OAAO;aACV;SACD,CAAA;IACF,CAAC;CACD,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\tname: '@just-web/presets-browser',\n\tinit: (ctx: AppBaseContext & LogContext & CommandsContext & Partial<KeyboardContext>) => {\n\t\tconst [browser] = browserPlugin(options).init(ctx)\n\t\tbrowserPreferencesPlugin().init(ctx)\n\t\tconst [history] = historyPlugin(options).init(ctx)\n\t\treturn [\n\t\t\t{\n\t\t\t\t...browser,\n\t\t\t\t...history\n\t\t\t}\n\t\t]\n\t}\n}))\n\nexport type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>\n\nexport default presetsBrowserPlugin\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { define, type DepBuilder, type GizmoStatic, type IdGizmo } from '@just-web/app';
|
|
2
|
+
import { type BrowserGizmo, type BrowserGizmoOptions } from '@just-web/browser';
|
|
3
|
+
import type { CommandsGizmo } from '@just-web/commands';
|
|
4
|
+
import { type HistoryGizmo, type HistoryGizmoOptions } from '@just-web/history';
|
|
5
|
+
import type { KeyboardGizmo } from '@just-web/keyboard';
|
|
6
|
+
import type { LogGizmo } from '@just-web/log';
|
|
7
|
+
export type { ReadonlyErrorStore } from '@just-web/browser';
|
|
8
|
+
export type { BrowserHistory } from 'history';
|
|
9
|
+
export declare const presetsBrowserGizmoFn: (options?: {
|
|
10
|
+
browser?: BrowserGizmoOptions;
|
|
11
|
+
history?: HistoryGizmoOptions;
|
|
12
|
+
}) => GizmoStatic<DepBuilder<IdGizmo & LogGizmo & CommandsGizmo, KeyboardGizmo>, BrowserGizmo & HistoryGizmo>;
|
|
13
|
+
export type PresetsBrowserGizmo = define.Infer<typeof presetsBrowserGizmoFn>;
|
|
14
|
+
//# sourceMappingURL=presets_browser_gizmo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets_browser_gizmo.d.ts","sourceRoot":"","sources":["../ts/presets_browser_gizmo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,eAAe,CAAA;AACvF,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE/F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC/F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC3D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,eAAO,MAAM,qBAAqB,EAAE,CAAC,OAAO,CAAC,EAAE;IAC9C,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAC7B,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC7B,KAAK,WAAW,CAChB,UAAU,CAAC,OAAO,GAAG,QAAQ,GAAG,aAAa,EAAE,aAAa,CAAC,EAC7D,YAAY,GAAG,YAAY,CAYzB,CAAA;AAEH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { define } from '@just-web/app';
|
|
2
|
+
import { browserGizmoFn } from '@just-web/browser';
|
|
3
|
+
import { browserPreferencesGizmo } from '@just-web/browser-preferences';
|
|
4
|
+
import { historyGizmoFn } from '@just-web/history';
|
|
5
|
+
export const presetsBrowserGizmoFn = define((options) => ({
|
|
6
|
+
static: define.require().require().require().optional(),
|
|
7
|
+
async create(ctx) {
|
|
8
|
+
const browser = await ctx.with(browserGizmoFn(options === null || options === void 0 ? void 0 : options.browser));
|
|
9
|
+
await ctx.with(browserPreferencesGizmo);
|
|
10
|
+
const history = await ctx.with(historyGizmoFn(options === null || options === void 0 ? void 0 : options.history));
|
|
11
|
+
return {
|
|
12
|
+
...browser,
|
|
13
|
+
...history
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}));
|
|
17
|
+
//# sourceMappingURL=presets_browser_gizmo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets_browser_gizmo.js","sourceRoot":"","sources":["../ts/presets_browser_gizmo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAmD,MAAM,eAAe,CAAA;AACvF,OAAO,EAAE,cAAc,EAA+C,MAAM,mBAAmB,CAAA;AAC/F,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAEvE,OAAO,EAAE,cAAc,EAA+C,MAAM,mBAAmB,CAAA;AAO/F,MAAM,CAAC,MAAM,qBAAqB,GAM9B,MAAM,CAAC,CAAC,OAA0E,EAAE,EAAE,CAAC,CAAC;IAC3F,MAAM,EAAE,MAAM,CAAC,OAAO,EAAW,CAAC,OAAO,EAAY,CAAC,OAAO,EAAiB,CAAC,QAAQ,EAAiB;IACxG,KAAK,CAAC,MAAM,CAAC,GAAG;QACf,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,CAAC,CAAA;QAChE,MAAM,GAAG,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA;QACvC,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,CAAC,CAAA;QAChE,OAAO;YACN,GAAG,OAAO;YACV,GAAG,OAAO;SACV,CAAA;IACF,CAAC;CACD,CAAC,CAAC,CAAA","sourcesContent":["import { define, type DepBuilder, type GizmoStatic, type IdGizmo } from '@just-web/app'\nimport { browserGizmoFn, type BrowserGizmo, type BrowserGizmoOptions } from '@just-web/browser'\nimport { browserPreferencesGizmo } from '@just-web/browser-preferences'\nimport type { CommandsGizmo } from '@just-web/commands'\nimport { historyGizmoFn, type HistoryGizmo, type HistoryGizmoOptions } from '@just-web/history'\nimport type { KeyboardGizmo } from '@just-web/keyboard'\nimport type { LogGizmo } from '@just-web/log'\n\nexport type { ReadonlyErrorStore } from '@just-web/browser'\nexport type { BrowserHistory } from 'history'\n\nexport const presetsBrowserGizmoFn: (options?: {\n\tbrowser?: BrowserGizmoOptions\n\thistory?: HistoryGizmoOptions\n}) => GizmoStatic<\n\tDepBuilder<IdGizmo & LogGizmo & CommandsGizmo, KeyboardGizmo>,\n\tBrowserGizmo & HistoryGizmo\n> = define((options?: { browser?: BrowserGizmoOptions; history?: HistoryGizmoOptions }) => ({\n\tstatic: define.require<IdGizmo>().require<LogGizmo>().require<CommandsGizmo>().optional<KeyboardGizmo>(),\n\tasync create(ctx) {\n\t\tconst browser = await ctx.with(browserGizmoFn(options?.browser))\n\t\tawait ctx.with(browserPreferencesGizmo)\n\t\tconst history = await ctx.with(historyGizmoFn(options?.history))\n\t\treturn {\n\t\t\t...browser,\n\t\t\t...history\n\t\t}\n\t}\n}))\n\nexport type PresetsBrowserGizmo = define.Infer<typeof presetsBrowserGizmoFn>\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@just-web/presets-browser",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-beta.1",
|
|
4
4
|
"description": "just-web presets for browser related features",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"just-web",
|
|
@@ -24,14 +24,20 @@
|
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"type": "module",
|
|
26
26
|
"exports": {
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
".": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./esm/index.d.ts",
|
|
30
|
+
"default": "./esm/index.js"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./cjs/index.d.ts",
|
|
34
|
+
"require": "./cjs/index.js"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
31
37
|
},
|
|
32
38
|
"main": "./cjs/index.js",
|
|
33
39
|
"module": "./esm/index.js",
|
|
34
|
-
"types": "./
|
|
40
|
+
"types": "./cjs/index.d.ts",
|
|
35
41
|
"files": [
|
|
36
42
|
"cjs",
|
|
37
43
|
"esm",
|
|
@@ -39,41 +45,42 @@
|
|
|
39
45
|
"!**/*.{spec,test,unit,accept,integrate,system}.*"
|
|
40
46
|
],
|
|
41
47
|
"dependencies": {
|
|
42
|
-
"@just-web/browser": "^
|
|
43
|
-
"@just-web/browser-preferences": "^
|
|
44
|
-
"@just-web/history": "^
|
|
48
|
+
"@just-web/browser": "^7.0.0-beta.1",
|
|
49
|
+
"@just-web/browser-preferences": "^7.0.0-beta.1",
|
|
50
|
+
"@just-web/history": "^2.0.0-beta.1"
|
|
45
51
|
},
|
|
46
52
|
"devDependencies": {
|
|
47
|
-
"@just-web/app": "^6.0.2",
|
|
48
|
-
"@just-web/commands": "^6.0.2",
|
|
49
|
-
"@just-web/keyboard": "^6.0.2",
|
|
50
|
-
"@just-web/log": "^6.0.2",
|
|
51
|
-
"@just-web/repo-scripts": "^0.2.0",
|
|
52
|
-
"@just-web/types": "^6.0.2",
|
|
53
53
|
"@repobuddy/jest": "^3.0.0",
|
|
54
54
|
"@size-limit/preset-small-lib": "~8.2.0",
|
|
55
55
|
"@types/jest": "^29.2.3",
|
|
56
56
|
"cross-env": "^7.0.3",
|
|
57
57
|
"depcheck": "~1.4.3",
|
|
58
58
|
"eslint": "^8.11.0",
|
|
59
|
-
"eslint-plugin-harmony": "^7.1.
|
|
59
|
+
"eslint-plugin-harmony": "^7.1.2",
|
|
60
60
|
"history": "^5.3.0",
|
|
61
|
-
"jest": "^29.
|
|
62
|
-
"jest-validate": "^29.
|
|
61
|
+
"jest": "^29.5.0",
|
|
62
|
+
"jest-validate": "^29.5.0",
|
|
63
63
|
"jest-watch-suspend": "^1.1.2",
|
|
64
|
-
"jest-watch-toggle-config": "^2.0
|
|
65
|
-
"jest-watch-typeahead": "^2.2.
|
|
64
|
+
"jest-watch-toggle-config-2": "^2.1.0",
|
|
65
|
+
"jest-watch-typeahead": "^2.2.2",
|
|
66
66
|
"ncp": "^2.0.0",
|
|
67
67
|
"npm-run-all": "^4.1.5",
|
|
68
|
-
"rimraf": "~
|
|
68
|
+
"rimraf": "~5.0.0",
|
|
69
69
|
"size-limit": "~8.2.0",
|
|
70
|
-
"ts-jest": "^29.0
|
|
71
|
-
"type-plus": "^
|
|
72
|
-
"typescript": "^
|
|
70
|
+
"ts-jest": "^29.1.0",
|
|
71
|
+
"type-plus": "^6.6.0",
|
|
72
|
+
"typescript": "^5.0.0",
|
|
73
|
+
"@just-web/app": "^7.0.0-beta.1",
|
|
74
|
+
"@just-web/commands": "^7.0.0-beta.1",
|
|
75
|
+
"@just-web/keyboard": "^7.0.0-beta.1",
|
|
76
|
+
"@just-web/log": "^7.0.0-beta.1",
|
|
77
|
+
"@just-web/repo-scripts": "^0.2.0",
|
|
78
|
+
"@just-web/types": "^7.0.0-beta.1"
|
|
73
79
|
},
|
|
74
80
|
"peerDependencies": {
|
|
75
|
-
"@just-web/
|
|
76
|
-
"@just-web/
|
|
81
|
+
"@just-web/app": "^7.0.0-beta.1",
|
|
82
|
+
"@just-web/commands": "^7.0.0-beta.1",
|
|
83
|
+
"@just-web/keyboard": "^7.0.0-beta.1"
|
|
77
84
|
},
|
|
78
85
|
"peerDependenciesMeta": {
|
|
79
86
|
"@just-web/keyboard": {
|
|
@@ -89,14 +96,15 @@
|
|
|
89
96
|
"build:cjs": "tsc -p tsconfig.cjs.json && ncp ../../config/package.cjs.json cjs/package.json",
|
|
90
97
|
"build:esm": "tsc",
|
|
91
98
|
"build:watch": "tsc -w",
|
|
92
|
-
"clean": "rimraf cjs esm coverage lib *.tsbuildinfo",
|
|
93
|
-
"coverage": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
|
99
|
+
"clean": "rimraf cjs esm coverage lib --glob *.tsbuildinfo",
|
|
100
|
+
"coverage": "cross-env NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 jest --coverage",
|
|
94
101
|
"depcheck": "depcheck",
|
|
95
102
|
"lint": "cross-env TIMING=1 eslint --ext=ts,tsx,js,yaml,yml .",
|
|
96
103
|
"nuke": "rimraf node_modules",
|
|
97
104
|
"size": "size-limit",
|
|
98
105
|
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
|
|
99
|
-
"test:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --watch",
|
|
106
|
+
"test:watch": "cross-env NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 jest --watch",
|
|
107
|
+
"w": "pnpm test:watch",
|
|
100
108
|
"verify": "npm-run-all -p build lint coverage depcheck -p size"
|
|
101
109
|
}
|
|
102
110
|
}
|
package/ts/index.ts
CHANGED
|
@@ -10,16 +10,18 @@ export type { ReadonlyErrorStore } from '@just-web/browser'
|
|
|
10
10
|
export type { BrowserHistory } from 'history'
|
|
11
11
|
|
|
12
12
|
const presetsBrowserPlugin = definePlugin((options?: BrowserOptions & HistoryOptions) => ({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
name: '@just-web/presets-browser',
|
|
14
|
+
init: (ctx: AppBaseContext & LogContext & CommandsContext & Partial<KeyboardContext>) => {
|
|
15
|
+
const [browser] = browserPlugin(options).init(ctx)
|
|
16
|
+
browserPreferencesPlugin().init(ctx)
|
|
17
|
+
const [history] = historyPlugin(options).init(ctx)
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
...browser,
|
|
21
|
+
...history
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
23
25
|
}))
|
|
24
26
|
|
|
25
27
|
export type PresetsBrowserContext = PluginContext<typeof presetsBrowserPlugin>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { define, type DepBuilder, type GizmoStatic, type IdGizmo } from '@just-web/app'
|
|
2
|
+
import { browserGizmoFn, type BrowserGizmo, type BrowserGizmoOptions } from '@just-web/browser'
|
|
3
|
+
import { browserPreferencesGizmo } from '@just-web/browser-preferences'
|
|
4
|
+
import type { CommandsGizmo } from '@just-web/commands'
|
|
5
|
+
import { historyGizmoFn, type HistoryGizmo, type HistoryGizmoOptions } from '@just-web/history'
|
|
6
|
+
import type { KeyboardGizmo } from '@just-web/keyboard'
|
|
7
|
+
import type { LogGizmo } from '@just-web/log'
|
|
8
|
+
|
|
9
|
+
export type { ReadonlyErrorStore } from '@just-web/browser'
|
|
10
|
+
export type { BrowserHistory } from 'history'
|
|
11
|
+
|
|
12
|
+
export const presetsBrowserGizmoFn: (options?: {
|
|
13
|
+
browser?: BrowserGizmoOptions
|
|
14
|
+
history?: HistoryGizmoOptions
|
|
15
|
+
}) => GizmoStatic<
|
|
16
|
+
DepBuilder<IdGizmo & LogGizmo & CommandsGizmo, KeyboardGizmo>,
|
|
17
|
+
BrowserGizmo & HistoryGizmo
|
|
18
|
+
> = define((options?: { browser?: BrowserGizmoOptions; history?: HistoryGizmoOptions }) => ({
|
|
19
|
+
static: define.require<IdGizmo>().require<LogGizmo>().require<CommandsGizmo>().optional<KeyboardGizmo>(),
|
|
20
|
+
async create(ctx) {
|
|
21
|
+
const browser = await ctx.with(browserGizmoFn(options?.browser))
|
|
22
|
+
await ctx.with(browserPreferencesGizmo)
|
|
23
|
+
const history = await ctx.with(historyGizmoFn(options?.history))
|
|
24
|
+
return {
|
|
25
|
+
...browser,
|
|
26
|
+
...history
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}))
|
|
30
|
+
|
|
31
|
+
export type PresetsBrowserGizmo = define.Infer<typeof presetsBrowserGizmoFn>
|