@platforma-sdk/ui-vue 1.94.0 → 1.96.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.
- package/.turbo/turbo-build.log +5 -5
- package/.turbo/turbo-formatter$colon$check.log +1 -1
- package/.turbo/turbo-linter$colon$check.log +1 -1
- package/CHANGELOG.md +27 -0
- package/dist/defineApp.d.ts.map +1 -1
- package/dist/defineApp.js +25 -23
- package/dist/defineApp.js.map +1 -1
- package/dist/lib.d.ts +1 -0
- package/dist/lib.d.ts.map +1 -1
- package/package.json +7 -6
- package/src/defineApp.ts +5 -2
- package/src/lib.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -36,7 +36,7 @@ transforming...
|
|
|
36
36
|
rendering chunks...
|
|
37
37
|
[32m
|
|
38
38
|
[36m[unplugin:dts][32m Start generate declaration files...[39m
|
|
39
|
-
[32m[36m[unplugin:dts][32m Declaration files built in
|
|
39
|
+
[32m[36m[unplugin:dts][32m Declaration files built in 5254ms.
|
|
40
40
|
[39m
|
|
41
41
|
computing gzip size...
|
|
42
42
|
dist/components/PlAnnotations/components/PlAnnotations.vue_vue_type_style_index_0_lang.css 0.04 kB │ gzip: 0.06 kB
|
|
@@ -230,11 +230,11 @@ dist/components/PlBtnExportArchive/Summary.vue_vue_type_script_setup_true_lang.j
|
|
|
230
230
|
dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue_vue_type_script_setup_true_lang.js 1.60 kB │ gzip: 0.79 kB │ map: 3.58 kB
|
|
231
231
|
dist/components/PlBtnExportArchive/Item.vue_vue_type_script_setup_true_lang.js 1.67 kB │ gzip: 0.66 kB │ map: 3.43 kB
|
|
232
232
|
dist/AgGridVue/createAgGridColDef.js 1.72 kB │ gzip: 0.74 kB │ map: 9.60 kB
|
|
233
|
-
dist/defineApp.js 1.75 kB │ gzip: 0.91 kB │ map: 7.32 kB
|
|
234
233
|
dist/components/PlAnnotations/components/PlAnnotationsModal.vue_vue_type_script_setup_true_lang.js 1.77 kB │ gzip: 0.76 kB │ map: 2.21 kB
|
|
235
234
|
dist/components/PlAdvancedFilter/constants.js 1.78 kB │ gzip: 0.54 kB │ map: 3.77 kB
|
|
236
235
|
dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue_vue_type_script_setup_true_lang.js 1.80 kB │ gzip: 0.86 kB │ map: 3.52 kB
|
|
237
236
|
dist/components/PlTableFastSearch/PlTableFastSearch.vue_vue_type_script_setup_true_lang.js 1.84 kB │ gzip: 0.92 kB │ map: 2.57 kB
|
|
237
|
+
dist/defineApp.js 1.85 kB │ gzip: 0.95 kB │ map: 7.50 kB
|
|
238
238
|
dist/plugins/Monetization/UserCabinetCard.vue_vue_type_script_setup_true_lang.js 2.04 kB │ gzip: 0.98 kB │ map: 4.81 kB
|
|
239
239
|
dist/components/PlAgRowNumHeader.vue_vue_type_script_setup_true_lang.js 2.08 kB │ gzip: 0.89 kB │ map: 4.35 kB
|
|
240
240
|
dist/components/BlockLayout.vue_vue_type_script_setup_true_lang.js 2.23 kB │ gzip: 1.05 kB │ map: 4.42 kB
|
|
@@ -267,10 +267,10 @@ dist/components/PlAdvancedFilter/PlAdvancedFilter.vue_vue_type_script_setup_true
|
|
|
267
267
|
dist/components/PlAdvancedFilter/FilterEditor.vue_vue_type_script_setup_true_lang.js 11.71 kB │ gzip: 3.31 kB │ map: 28.56 kB
|
|
268
268
|
dist/components/PlAgDataTable/PlAgDataTableV2.vue_vue_type_script_setup_true_lang.js 12.75 kB │ gzip: 4.05 kB │ map: 35.01 kB
|
|
269
269
|
|
|
270
|
-
[32m✓ built in 6.
|
|
271
|
-
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 6.0s of this 6.
|
|
270
|
+
[32m✓ built in 6.06s[39m
|
|
271
|
+
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 6.0s of this 6.1s build (99%).
|
|
272
272
|
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
|
|
273
|
-
- plugin unplugin-dts buildStart (
|
|
273
|
+
- plugin unplugin-dts buildStart (83%, 5.0s, 1 call)
|
|
274
274
|
Additional callback time came from the callbacks below and from callbacks under 1s.
|
|
275
275
|
2 callbacks are listed without a time. Their calls overlapped, so the time inside one call includes work from other calls. To find their cost, profile the build with `node --cpu-prof`:
|
|
276
276
|
- plugin sourcemaps load (144 calls)
|
|
@@ -4,5 +4,5 @@ $ ts-builder linter --check
|
|
|
4
4
|
Linting project...
|
|
5
5
|
↳ oxlint --config /home/runner/_work/platforma/platforma/sdk/ui-vue/.oxlintrc.json --deny-warnings
|
|
6
6
|
Found 0 warnings and 0 errors.
|
|
7
|
-
Finished in
|
|
7
|
+
Finished in 25ms on 143 files with 108 rules using 16 threads.
|
|
8
8
|
Linting completed successfully
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @platforma-sdk/ui-vue
|
|
2
2
|
|
|
3
|
+
## 1.96.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0db8cea: Block UIs can play trackpad haptics with `navigator.playHaptics?.(effect, intensity)`, the imperative API of the WICG Web Haptics proposal. Effects: `hint`, `edge`, `tick`, `align`, `success`, `error`. Intensity is 0.0 to 1.0 (default 1.0); a host may ignore it.
|
|
8
|
+
|
|
9
|
+
- The new `@milaboratories/web-haptics-polyfill` package defines `navigator.playHaptics` over a bridge function that the host exposes under `window[HAPTICS_BRIDGE_KEY]`, and types it on `Navigator`.
|
|
10
|
+
- `defineAppV3` installs the polyfill. The method exists only where the host exposes the bridge (the desktop app on macOS, once it ships the bridge), so the optional call is the feature check.
|
|
11
|
+
- The method returns `undefined` and never throws. Nothing plays before the page has had user activation.
|
|
12
|
+
- `@platforma-sdk/ui-vue` exports the `HapticEffect` type.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [0db8cea]
|
|
17
|
+
- @milaboratories/web-haptics-polyfill@0.1.0
|
|
18
|
+
|
|
19
|
+
## 1.95.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [0f8e73f]
|
|
24
|
+
- @milaboratories/pl-model-common@1.59.0
|
|
25
|
+
- @platforma-sdk/model@1.95.0
|
|
26
|
+
- @milaboratories/columns-collection-driver@0.3.3
|
|
27
|
+
- @milaboratories/pf-spec-driver@1.6.5
|
|
28
|
+
- @milaboratories/uikit@2.18.2
|
|
29
|
+
|
|
3
30
|
## 1.94.0
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/dist/defineApp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineApp.d.ts","sourceRoot":"","sources":["../src/defineApp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defineApp.d.ts","sourceRoot":"","sources":["../src/defineApp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,0BAA0B,EAC1B,UAAU,IAAI,aAAa,EAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,GAAG,IAAI,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAU,MAAM,SAAS,CAAC;AAGnE,eAAO,MAAM,aAAa,eAA+B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,wBAAgB,YAAY,IAAI,SAAS,CAExC;AAED,wBAAgB,eAAe,+BAG9B;AAED,wBAAgB,WAAW,CACzB,IAAI,GAAG,OAA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E,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,GAC3D,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,SAAS,CAAA;CAAE,CAAC;AAMpF,MAAM,MAAM,WAAW,CACrB,IAAI,GAAG,OAAO,EACd,IAAI,GAAG,OAAO,EACd,OAAO,SAAS,gBAAgB,GAAG,gBAAgB,EACnD,IAAI,SAAS,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,EACxC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,KAAK,SAAS,cAAc,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,EACzD,UAAU,SAAS,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,IAChE;IACF,UAAU,EAAE,CAAC,CAAC;IACd,YAAY,EAAE,0BAA0B,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,KAAK,KAAK,CAC3C,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,OAAO,EACP,KAAK,EACL,UAAU,CACX,CAAC;IACF,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC"}
|
package/dist/defineApp.js
CHANGED
|
@@ -3,52 +3,54 @@ import "./lib/util/helpers/dist/index.js";
|
|
|
3
3
|
import { columnLinksKey as t } from "./columnLinks.js";
|
|
4
4
|
import { createAppV3 as n } from "./internal/createAppV3.js";
|
|
5
5
|
import { inject as r, markRaw as i, reactive as a } from "vue";
|
|
6
|
-
import {
|
|
6
|
+
import { installWebHapticsPolyfill as o } from "@milaboratories/web-haptics-polyfill";
|
|
7
|
+
import { getPlatformaApiVersion as s, unwrapResult as c } from "@platforma-sdk/model";
|
|
7
8
|
// src/defineApp.ts
|
|
8
|
-
var
|
|
9
|
-
function u() {
|
|
10
|
-
return r(c);
|
|
11
|
-
}
|
|
9
|
+
var l = Symbol("sdk-vue"), u = Symbol("plugin-data-access");
|
|
12
10
|
function d() {
|
|
13
|
-
return
|
|
11
|
+
return r(l);
|
|
12
|
+
}
|
|
13
|
+
function f() {
|
|
14
|
+
return d().featureFlags;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
function p(r, d, f = {}) {
|
|
17
|
+
o();
|
|
18
|
+
let p, m, h = s(), g = async () => {
|
|
19
|
+
if (h !== 3) throw Error(`Block requested API version ${h} but runtime API version is 3.
|
|
18
20
|
Please update the desktop app to use the latest API version.`);
|
|
19
21
|
await r.loadBlockState().then((e) => {
|
|
20
|
-
let a =
|
|
21
|
-
|
|
22
|
-
let { app: o, pluginAccess:
|
|
23
|
-
if (!
|
|
24
|
-
|
|
25
|
-
let h =
|
|
22
|
+
let a = c(e);
|
|
23
|
+
_.loaded = !0;
|
|
24
|
+
let { app: o, pluginAccess: s, columnLinks: l } = n(a, r, f);
|
|
25
|
+
if (!m) throw Error("Plugin data injection failed: Vue app instance not captured during install()");
|
|
26
|
+
m.provide(u, s), m.provide(t, l);
|
|
27
|
+
let h = d(o), g = Object.fromEntries(Object.entries(h.routes).map(([e, t]) => {
|
|
26
28
|
let n = typeof t == "function" ? t() : t;
|
|
27
29
|
return [e, i(n)];
|
|
28
30
|
}));
|
|
29
|
-
|
|
31
|
+
p = Object.assign(o, {
|
|
30
32
|
...h,
|
|
31
33
|
getRoute(e) {
|
|
32
|
-
return
|
|
34
|
+
return g[e];
|
|
33
35
|
}
|
|
34
36
|
});
|
|
35
37
|
});
|
|
36
|
-
},
|
|
38
|
+
}, _ = a({
|
|
37
39
|
apiVersion: 3,
|
|
38
40
|
featureFlags: r.blockModelInfo.featureFlags,
|
|
39
41
|
loaded: !1,
|
|
40
42
|
error: void 0,
|
|
41
43
|
useApp() {
|
|
42
|
-
return e(
|
|
44
|
+
return e(p, "App is not loaded");
|
|
43
45
|
},
|
|
44
46
|
install(e) {
|
|
45
|
-
|
|
46
|
-
console.error("load initial state error", e),
|
|
47
|
+
m = e, e.provide(l, this), g().catch((e) => {
|
|
48
|
+
console.error("load initial state error", e), _.error = e;
|
|
47
49
|
});
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
|
-
return
|
|
52
|
+
return _;
|
|
51
53
|
}
|
|
52
|
-
export { t as columnLinksKey,
|
|
54
|
+
export { t as columnLinksKey, p as defineAppV3, u as pluginDataKey, f as useFeatureFlags, d as useSdkPlugin };
|
|
53
55
|
|
|
54
56
|
//# sourceMappingURL=defineApp.js.map
|
package/dist/defineApp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineApp.js","names":["pluginKey","pluginDataKey","useSdkPlugin","inject","useFeatureFlags","defineAppV3","app","vueAppInstance","blockRequestedApiVersion","getPlatformaApiVersion","loadApp","platforma","state","unwrapResult","stateOrError","baseApp","createAppV3","settings","pluginAccess","columnLinksKey","columnLinks","localState","extendApp","routes","href","component","
|
|
1
|
+
{"version":3,"file":"defineApp.js","names":["pluginKey","pluginDataKey","useSdkPlugin","inject","useFeatureFlags","defineAppV3","app","vueAppInstance","blockRequestedApiVersion","getPlatformaApiVersion","loadApp","platforma","state","unwrapResult","stateOrError","baseApp","createAppV3","settings","pluginAccess","columnLinksKey","columnLinks","localState","extendApp","routes","href","component","resolvedComponent","markRaw","plugin","reactive","notEmpty","err"],"sources":["../src/defineApp.ts"],"sourcesContent":["import { notEmpty } from \"@milaboratories/helpers\";\nimport { installWebHapticsPolyfill } from \"@milaboratories/web-haptics-polyfill\";\nimport type {\n PlatformaV3,\n BlockCodeKnownFeatureFlags,\n UiServices as AllUiServices,\n} from \"@platforma-sdk/model\";\nimport {\n getPlatformaApiVersion,\n unwrapResult,\n type BlockOutputsBase,\n type BlockModelInfo,\n} from \"@platforma-sdk/model\";\nimport type { App as VueApp, Component, Reactive } from \"vue\";\nimport { inject, markRaw, reactive } from \"vue\";\nimport { columnLinksKey } from \"./columnLinks\";\nimport { createAppV3, type BaseAppV3 } from \"./internal/createAppV3\";\nimport type { AppSettings, ExtendSettings, Routes } from \"./types\";\n\nconst pluginKey = Symbol(\"sdk-vue\");\nexport const pluginDataKey = Symbol(\"plugin-data-access\");\nexport { columnLinksKey };\n\nexport function useSdkPlugin(): SdkPlugin {\n return inject(pluginKey)!;\n}\n\nexport function useFeatureFlags() {\n const sdk = useSdkPlugin();\n return sdk.featureFlags;\n}\n\nexport function defineAppV3<\n Data = unknown,\n Args = unknown,\n Outputs extends BlockOutputsBase = BlockOutputsBase,\n Href extends `/${string}` = `/${string}`,\n Plugins extends Record<string, unknown> = Record<string, unknown>,\n UiServices extends Partial<AllUiServices> = Partial<AllUiServices>,\n Extend extends ExtendSettings<Href> = ExtendSettings<Href>,\n>(\n platforma: PlatformaV3<Data, Args, Outputs, Href, Plugins, UiServices> & {\n blockModelInfo: BlockModelInfo;\n },\n extendApp: (app: BaseAppV3<Data, Args, Outputs, Href, Plugins, UiServices>) => Extend,\n settings: AppSettings = {},\n): SdkPluginV3<Data, Args, Outputs, Href, Plugins, Extend, UiServices> {\n installWebHapticsPolyfill();\n\n let app: AppV3<Data, Args, Outputs, Href, Plugins, Extend, UiServices> | undefined = undefined;\n\n // Captured during install() so V3 can provide plugin data access after async load\n let vueAppInstance: VueApp | undefined;\n\n const runtimeApiVersion = 3;\n const blockRequestedApiVersion = getPlatformaApiVersion();\n\n const loadApp = async () => {\n if (blockRequestedApiVersion !== runtimeApiVersion) {\n throw new Error(`Block requested API version ${blockRequestedApiVersion} but runtime API version is ${runtimeApiVersion}.\n Please update the desktop app to use the latest API version.`);\n }\n\n await platforma.loadBlockState().then((stateOrError) => {\n const state = unwrapResult(stateOrError);\n plugin.loaded = true;\n const {\n app: baseApp,\n pluginAccess,\n columnLinks,\n } = createAppV3<Data, Args, Outputs, Href, Plugins, UiServices>(state, platforma, settings);\n\n if (!vueAppInstance) {\n throw new Error(\n \"Plugin data injection failed: Vue app instance not captured during install()\",\n );\n }\n vueAppInstance.provide(pluginDataKey, pluginAccess);\n vueAppInstance.provide(columnLinksKey, columnLinks);\n\n const localState = extendApp(baseApp);\n\n const routes = Object.fromEntries(\n Object.entries(localState.routes as Routes<Href>).map(([href, component]) => {\n const resolvedComponent = typeof component === \"function\" ? component() : component;\n return [href, markRaw(resolvedComponent as Component)];\n }),\n );\n\n app = Object.assign(baseApp, {\n ...localState,\n getRoute(href: Href): Component | undefined {\n return routes[href];\n },\n } as AppV3<Data, Args, Outputs, Href, Plugins, Extend, UiServices>);\n });\n };\n\n const plugin = reactive({\n apiVersion: 3,\n featureFlags: platforma.blockModelInfo.featureFlags,\n loaded: false,\n error: undefined,\n useApp<PageHref extends Href = Href>() {\n return notEmpty(app, \"App is not loaded\") as AppV3<\n Data,\n Args,\n Outputs,\n PageHref,\n Plugins,\n Extend,\n UiServices\n >;\n },\n install(app: VueApp) {\n vueAppInstance = app;\n app.provide(pluginKey, this);\n loadApp().catch((err) => {\n console.error(\"load initial state error\", err);\n plugin.error = err;\n });\n },\n });\n\n return plugin as SdkPluginV3<Data, Args, Outputs, Href, Plugins, Extend, UiServices>;\n}\n\nexport type AppV3<\n Data = unknown,\n Args = unknown,\n Outputs extends BlockOutputsBase = NonNullable<unknown>,\n Href extends `/${string}` = `/${string}`,\n Plugins extends Record<string, unknown> = Record<string, unknown>,\n Local extends ExtendSettings<Href> = ExtendSettings<Href>,\n UiServices extends Partial<AllUiServices> = Partial<AllUiServices>,\n> = BaseAppV3<Data, Args, Outputs, Href, Plugins, UiServices> &\n Reactive<Omit<Local, \"routes\">> & { getRoute(href: Href): Component | undefined };\n\n// ---------------------------------------------------------------------------\n// SdkPlugin types\n// ---------------------------------------------------------------------------\n\nexport type SdkPluginV3<\n Data = unknown,\n Args = unknown,\n Outputs extends BlockOutputsBase = BlockOutputsBase,\n Href extends `/${string}` = `/${string}`,\n Plugins extends Record<string, unknown> = Record<string, unknown>,\n Local extends ExtendSettings<Href> = ExtendSettings<Href>,\n UiServices extends Partial<AllUiServices> = Partial<AllUiServices>,\n> = {\n apiVersion: 3;\n featureFlags: BlockCodeKnownFeatureFlags;\n loaded: boolean;\n error: unknown;\n useApp<PageHref extends Href = Href>(): AppV3<\n Data,\n Args,\n Outputs,\n PageHref,\n Plugins,\n Local,\n UiServices\n >;\n install(app: VueApp): void;\n};\n\nexport type SdkPlugin = SdkPluginV3;\n"],"mappings":";;;;;;;;AAmBA,IAAMA,IAAY,OAAO,SAAS,GACrBC,IAAgB,OAAO,oBAAoB;AAGxD,SAAgBC,IAA0B;CACxC,OAAOC,EAAOH,CAAS;AACzB;AAEA,SAAgBI,IAAkB;CAEhC,OADYF,EACL,CAAA,CAAI;AACb;AAEA,SAAgBG,EASd,GAGA,GACA,IAAwB,CAAC,GAC4C;CACrE,EAA0B;CAE1B,IAAIC,GAGAC,GAGEC,IAA2BC,EAAuB,GAElDC,IAAU,YAAY;EAC1B,IAAIF,MAA6B,GAC/B,MAAU,MAAM,+BAA+BA,EAAyB;mEACX;EAG/D,MAAMG,EAAU,eAAe,CAAC,CAAC,MAAM,MAAiB;GACtD,IAAMC,IAAQC,EAAaC,CAAY;GACvC,EAAO,SAAS;GAChB,IAAM,EACJ,KAAKC,GACL,iBACA,mBACEC,EAA4DJ,GAAOD,GAAWM,CAAQ;GAE1F,IAAI,CAACV,GACH,MAAU,MACR,8EACF;GAGF,AADAA,EAAe,QAAQN,GAAeiB,CAAY,GAClDX,EAAe,QAAQY,GAAgBC,CAAW;GAElD,IAAMC,IAAaC,EAAUP,CAAO,GAE9BQ,IAAS,OAAO,YACpB,OAAO,QAAQF,EAAW,MAAsB,CAAC,CAAC,KAAK,CAACG,GAAMC,OAAe;IAC3E,IAAMC,IAAoB,OAAOD,KAAc,aAAaA,EAAU,IAAIA;IAC1E,OAAO,CAACD,GAAMG,EAAQD,CAA8B,CAAC;GACvD,CAAC,CACH;GAEA,IAAM,OAAO,OAAOX,GAAS;IAC3B,GAAGM;IACH,SAAS,GAAmC;KAC1C,OAAOE,EAAOC;IAChB;GACF,CAAkE;EACpE,CAAC;CACH,GAEMI,IAASC,EAAS;EACtB,YAAY;EACZ,cAAclB,EAAU,eAAe;EACvC,QAAQ;EACR,OAAO,KAAA;EACP,SAAuC;GACrC,OAAOmB,EAASxB,GAAK,mBAAmB;EAS1C;EACA,QAAQ,GAAa;GAGnB,AAFA,IAAiBA,GACjBA,EAAI,QAAQN,GAAW,IAAI,GAC3BU,EAAQ,CAAC,CAAC,OAAO,MAAQ;IAEvB,AADA,QAAQ,MAAM,4BAA4BqB,CAAG,GAC7C,EAAO,QAAQA;GACjB,CAAC;EACH;CACF,CAAC;CAED,OAAOH;AACT"}
|
package/dist/lib.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './components/PlBlockDependencies';
|
|
|
23
23
|
export * from './components/PlColumnValueDropdown';
|
|
24
24
|
export * from './components/PlBlockName';
|
|
25
25
|
export * from './defineApp';
|
|
26
|
+
export type { HapticEffect } from '@milaboratories/web-haptics-polyfill';
|
|
26
27
|
export { usePlugin } from './composition/usePlugin';
|
|
27
28
|
export type { PluginState } from './composition/usePlugin';
|
|
28
29
|
export { useOpenBlock } from './composition/useOpenBlock';
|
package/dist/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,OAAO,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96.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@milaboratories/columns-collection-driver": "0.3.
|
|
15
|
-
"@milaboratories/pf-spec-driver": "1.6.
|
|
16
|
-
"@milaboratories/pl-model-common": "1.
|
|
17
|
-
"@milaboratories/uikit": "2.18.
|
|
18
|
-
"@
|
|
14
|
+
"@milaboratories/columns-collection-driver": "0.3.3",
|
|
15
|
+
"@milaboratories/pf-spec-driver": "1.6.5",
|
|
16
|
+
"@milaboratories/pl-model-common": "1.59.0",
|
|
17
|
+
"@milaboratories/uikit": "2.18.2",
|
|
18
|
+
"@milaboratories/web-haptics-polyfill": "0.1.0",
|
|
19
|
+
"@platforma-sdk/model": "1.95.0",
|
|
19
20
|
"@types/d3-format": "^3.0.4",
|
|
20
21
|
"@types/node": "~24.19.2",
|
|
21
22
|
"@types/semver": "^7.7.0",
|
package/src/defineApp.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { notEmpty } from "@milaboratories/helpers";
|
|
2
|
+
import { installWebHapticsPolyfill } from "@milaboratories/web-haptics-polyfill";
|
|
2
3
|
import type {
|
|
3
4
|
PlatformaV3,
|
|
4
5
|
BlockCodeKnownFeatureFlags,
|
|
@@ -44,6 +45,8 @@ export function defineAppV3<
|
|
|
44
45
|
extendApp: (app: BaseAppV3<Data, Args, Outputs, Href, Plugins, UiServices>) => Extend,
|
|
45
46
|
settings: AppSettings = {},
|
|
46
47
|
): SdkPluginV3<Data, Args, Outputs, Href, Plugins, Extend, UiServices> {
|
|
48
|
+
installWebHapticsPolyfill();
|
|
49
|
+
|
|
47
50
|
let app: AppV3<Data, Args, Outputs, Href, Plugins, Extend, UiServices> | undefined = undefined;
|
|
48
51
|
|
|
49
52
|
// Captured during install() so V3 can provide plugin data access after async load
|
|
@@ -79,8 +82,8 @@ export function defineAppV3<
|
|
|
79
82
|
|
|
80
83
|
const routes = Object.fromEntries(
|
|
81
84
|
Object.entries(localState.routes as Routes<Href>).map(([href, component]) => {
|
|
82
|
-
const
|
|
83
|
-
return [href, markRaw(
|
|
85
|
+
const resolvedComponent = typeof component === "function" ? component() : component;
|
|
86
|
+
return [href, markRaw(resolvedComponent as Component)];
|
|
84
87
|
}),
|
|
85
88
|
);
|
|
86
89
|
|
package/src/lib.ts
CHANGED
|
@@ -41,6 +41,9 @@ export * from "./components/PlBlockName";
|
|
|
41
41
|
|
|
42
42
|
export * from "./defineApp";
|
|
43
43
|
|
|
44
|
+
// The only .d.ts reference to the polyfill: it carries the Navigator.playHaptics augmentation to blocks.
|
|
45
|
+
export type { HapticEffect } from "@milaboratories/web-haptics-polyfill";
|
|
46
|
+
|
|
44
47
|
export { usePlugin } from "./composition/usePlugin";
|
|
45
48
|
export type { PluginState } from "./composition/usePlugin";
|
|
46
49
|
export { useOpenBlock } from "./composition/useOpenBlock";
|