@vunk/plus 1.3.12 → 1.3.13

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.
@@ -2,9 +2,9 @@ import { E as ExtensionType, B as BufferUsage, w as warn, D as DOMAdapter, K as
2
2
  import { S as State, b as localUniformBitGl } from './colorToUniform.mjs';
3
3
  import { e as ensureAttributes, G as GpuStencilModesToPixi, c as createUboSyncFunction, b as uboSyncFunctionsSTD40, U as UboSystem, R as RenderTargetSystem, B as BufferResource, d as uniformParsers, f as textureBitGl, S as SharedSystems, a as SharedRenderPipes } from './SharedSystems.mjs';
4
4
  import 'vue';
5
- import './_commonjsHelpers.mjs';
6
5
  import '@vunk/shared/enum';
7
6
  import './browser.mjs';
7
+ import './_commonjsHelpers.mjs';
8
8
  import './_plugin-vue_export-helper.mjs';
9
9
 
10
10
  class GlBatchAdaptor {
@@ -2,9 +2,9 @@ import { g as getTextureBatchBindGroup, E as ExtensionType, f as fastCopy, D as
2
2
  import { S as State, l as localUniformBitGroup2, a as localUniformBit } from './colorToUniform.mjs';
3
3
  import { c as createUboSyncFunction, u as uboSyncFunctionsWGSL, U as UboSystem, B as BufferResource, G as GpuStencilModesToPixi, e as ensureAttributes, R as RenderTargetSystem, t as textureBit, S as SharedSystems, a as SharedRenderPipes } from './SharedSystems.mjs';
4
4
  import 'vue';
5
- import './_commonjsHelpers.mjs';
6
5
  import '@vunk/shared/enum';
7
6
  import './browser.mjs';
7
+ import './_commonjsHelpers.mjs';
8
8
  import './_plugin-vue_export-helper.mjs';
9
9
 
10
10
  const tempState = State.for2d();
@@ -1,9 +1,9 @@
1
1
  import { P as Point, r as removeItems, E as ExtensionType, T as Ticker, U as UPDATE_PRIORITY, a as EventEmitter, w as warn, e as extensions, C as Container } from './index2.mjs';
2
2
  import './init.mjs';
3
3
  import 'vue';
4
- import './_commonjsHelpers.mjs';
5
4
  import '@vunk/shared/enum';
6
5
  import './browser.mjs';
6
+ import './_commonjsHelpers.mjs';
7
7
  import './_plugin-vue_export-helper.mjs';
8
8
  import './colorToUniform.mjs';
9
9
 
@@ -1,7 +1,7 @@
1
- import { inject, provide, defineComponent, ref, onMounted, createElementBlock, openBlock, Fragment, createBlock, renderSlot, createCommentVNode, Teleport, createElementVNode, watchEffect, onBeforeUnmount, resolveComponent, withCtx, createVNode, mergeProps } from 'vue';
2
- import { g as getDefaultExportFromCjs } from './_commonjsHelpers.mjs';
1
+ import { inject, provide, defineComponent, watchEffect, ref, onBeforeUnmount, renderSlot, onMounted, createElementBlock, openBlock, resolveComponent, createBlock, withCtx, createVNode, mergeProps } from 'vue';
3
2
  import { TickerStatus } from '@vunk/shared/enum';
4
3
  import { c as consola } from './browser.mjs';
4
+ import { g as getDefaultExportFromCjs } from './_commonjsHelpers.mjs';
5
5
  import { _ as _export_sfc } from './_plugin-vue_export-helper.mjs';
6
6
 
7
7
  var ExtensionType = /* @__PURE__ */ ((ExtensionType2) => {
@@ -20995,73 +20995,6 @@ extensions.handle(ExtensionType.Asset, (extension) => {
20995
20995
 
20996
20996
  extensions.add(browserExt, webworkerExt);
20997
20997
 
20998
- const appInjectKey = Symbol("appInjectKey");
20999
- function initPixiApp() {
21000
- const app = new Application();
21001
- provide(appInjectKey, app);
21002
- return app;
21003
- }
21004
- function usePixiApp() {
21005
- const app = inject(appInjectKey);
21006
- if (!app) {
21007
- throw new Error("Pixi app not provided");
21008
- }
21009
- return app;
21010
- }
21011
-
21012
- var _sfc_main$2 = /* @__PURE__ */ defineComponent({
21013
- __name: "app",
21014
- props: {
21015
- appendTo: null,
21016
- defaultOptions: {
21017
- type: Object,
21018
- default: () => ({})
21019
- }
21020
- },
21021
- setup(__props) {
21022
- const props = __props;
21023
- const app = initPixiApp();
21024
- const appRef = ref();
21025
- const ready = ref(false);
21026
- onMounted(async () => {
21027
- await app.init({
21028
- resizeTo: appRef.value,
21029
- background: "#1099bb",
21030
- ...props.defaultOptions
21031
- });
21032
- appRef.value.appendChild(app.canvas);
21033
- ready.value = true;
21034
- });
21035
- return (_ctx, _cache) => {
21036
- return openBlock(), createElementBlock(
21037
- Fragment,
21038
- null,
21039
- [
21040
- (openBlock(), createBlock(Teleport, {
21041
- to: __props.appendTo,
21042
- disabled: !__props.appendTo
21043
- }, [
21044
- createElementVNode(
21045
- "div",
21046
- {
21047
- ref_key: "appRef",
21048
- ref: appRef,
21049
- class: "vk-pixi-frame"
21050
- },
21051
- null,
21052
- 512
21053
- /* NEED_PATCH */
21054
- )
21055
- ], 8, ["to", "disabled"])),
21056
- ready.value ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
21057
- ],
21058
- 64
21059
- /* STABLE_FRAGMENT */
21060
- );
21061
- };
21062
- }
21063
- });
21064
-
21065
20998
  const props = {
21066
20999
  data: {
21067
21000
  type: Array,
@@ -21088,7 +21021,21 @@ const emits = {
21088
21021
  "update:data": null
21089
21022
  };
21090
21023
 
21091
- var _sfc_main$1 = /* @__PURE__ */ defineComponent({
21024
+ const appInjectKey = Symbol("appInjectKey");
21025
+ function initPixiApp() {
21026
+ const app = new Application();
21027
+ provide(appInjectKey, app);
21028
+ return app;
21029
+ }
21030
+ function usePixiApp() {
21031
+ const app = inject(appInjectKey);
21032
+ if (!app) {
21033
+ throw new Error("Pixi app not provided");
21034
+ }
21035
+ return app;
21036
+ }
21037
+
21038
+ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
21092
21039
  __name: "core",
21093
21040
  props: props,
21094
21041
  emits,
@@ -21182,26 +21129,72 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
21182
21129
  }
21183
21130
  });
21184
21131
 
21132
+ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
21133
+ __name: "provider",
21134
+ setup(__props) {
21135
+ initPixiApp();
21136
+ return (_ctx, _cache) => {
21137
+ return renderSlot(_ctx.$slots, "default");
21138
+ };
21139
+ }
21140
+ });
21141
+
21142
+ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
21143
+ __name: "view",
21144
+ props: {
21145
+ defaultOptions: {
21146
+ type: Object,
21147
+ default: () => ({})
21148
+ }
21149
+ },
21150
+ setup(__props) {
21151
+ const props = __props;
21152
+ const app = usePixiApp();
21153
+ const appRef = ref();
21154
+ onMounted(async () => {
21155
+ await app.init({
21156
+ resizeTo: appRef.value,
21157
+ background: "#1099bb",
21158
+ ...props.defaultOptions
21159
+ });
21160
+ appRef.value.appendChild(app.canvas);
21161
+ });
21162
+ return (_ctx, _cache) => {
21163
+ return openBlock(), createElementBlock(
21164
+ "div",
21165
+ {
21166
+ ref_key: "appRef",
21167
+ ref: appRef,
21168
+ class: "vk-pixi-frame"
21169
+ },
21170
+ null,
21171
+ 512
21172
+ /* NEED_PATCH */
21173
+ );
21174
+ };
21175
+ }
21176
+ });
21177
+
21185
21178
  var _sfc_main = defineComponent({
21186
21179
  name: "VkPixiFrame",
21187
21180
  components: {
21188
- AppView: _sfc_main$2,
21189
- CoreView: _sfc_main$1
21181
+ CoreComp: _sfc_main$3,
21182
+ ProviderComp: _sfc_main$2,
21183
+ ViewComp: _sfc_main$1
21190
21184
  },
21191
21185
  props,
21192
- emits,
21193
- setup() {
21194
- return {};
21195
- }
21186
+ emits
21196
21187
  });
21197
21188
 
21198
21189
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
21199
- const _component_CoreView = resolveComponent("CoreView");
21200
- const _component_AppView = resolveComponent("AppView");
21201
- return openBlock(), createBlock(_component_AppView, null, {
21190
+ const _component_ViewComp = resolveComponent("ViewComp");
21191
+ const _component_CoreComp = resolveComponent("CoreComp");
21192
+ const _component_ProviderComp = resolveComponent("ProviderComp");
21193
+ return openBlock(), createBlock(_component_ProviderComp, null, {
21202
21194
  default: withCtx(() => [
21195
+ createVNode(_component_ViewComp),
21203
21196
  createVNode(
21204
- _component_CoreView,
21197
+ _component_CoreComp,
21205
21198
  mergeProps(_ctx.$props, {
21206
21199
  "onUpdate:status": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:status", $event))
21207
21200
  }),
@@ -21224,4 +21217,4 @@ VkPixiFrame.install = (app) => {
21224
21217
  app.component(VkPixiFrame.name || "VkPixiFrame", VkPixiFrame);
21225
21218
  };
21226
21219
 
21227
- export { VERSION as $, AbstractRenderer as A, BufferUsage as B, Container as C, DOMAdapter as D, ExtensionType as E, Bounds as F, GpuProgram as G, TexturePool as H, FilterEffect as I, Sprite as J, getAttributeInfoFromFormat as K, unsafeEvalSupported as L, Matrix as M, uid as N, Rectangle as O, Point as P, SystemRunner as Q, RendererType as R, STENCIL_MODES as S, Ticker as T, UPDATE_PRIORITY as U, multiplyColors as V, UPDATE_VISIBLE as W, UPDATE_COLOR as X, UPDATE_BLEND as Y, Color as Z, getLocalBounds as _, EventEmitter as a, deprecation as a0, v8_0_0 as a1, RendererInitHook as a2, Geometry as a3, compileHighShaderGlProgram as a4, colorBitGl as a5, generateTextureBatchBitGl as a6, roundPixelsBitGl as a7, getBatchSamplersUniformGroup as a8, ViewContainer as a9, GraphicsContext as aa, TextStyle as ab, generateTextStyleKey as ac, BatchableGraphics as ad, getAdjustedBlendModeBlend as ae, ViewableBuffer as af, TextureStyle as ag, BitmapFontManager as ah, getBitmapTextLayout as ai, Cache as aj, updateQuadBounds as ak, CanvasTextMetrics as al, nextPow2 as am, fontStringFromTextStyle as an, getCanvasFillStyle as ao, GraphicsContextSystem as ap, VkPixiFrame as aq, _sfc_main$1 as ar, _sfc_main$2 as as, types as at, Buffer as b, BindGroup as c, createIdFromString as d, extensions as e, fastCopy as f, getTextureBatchBindGroup as g, CLEAR as h, CanvasSource as i, TextureSource as j, UniformGroup as k, CanvasPool as l, compileHighShaderGpuProgram as m, colorBit as n, generateTextureBatchBit as o, roundPixelsBit as p, getMaxTexturesPerBatch as q, removeItems as r, Shader as s, Texture as t, GlProgram as u, TextureMatrix as v, warn as w, DefaultBatcher as x, BigPool as y, getGlobalBounds as z };
21220
+ export { VERSION as $, AbstractRenderer as A, BufferUsage as B, Container as C, DOMAdapter as D, ExtensionType as E, Bounds as F, GpuProgram as G, TexturePool as H, FilterEffect as I, Sprite as J, getAttributeInfoFromFormat as K, unsafeEvalSupported as L, Matrix as M, uid as N, Rectangle as O, Point as P, SystemRunner as Q, RendererType as R, STENCIL_MODES as S, Ticker as T, UPDATE_PRIORITY as U, multiplyColors as V, UPDATE_VISIBLE as W, UPDATE_COLOR as X, UPDATE_BLEND as Y, Color as Z, getLocalBounds as _, EventEmitter as a, deprecation as a0, v8_0_0 as a1, RendererInitHook as a2, Geometry as a3, compileHighShaderGlProgram as a4, colorBitGl as a5, generateTextureBatchBitGl as a6, roundPixelsBitGl as a7, getBatchSamplersUniformGroup as a8, ViewContainer as a9, GraphicsContext as aa, TextStyle as ab, generateTextStyleKey as ac, BatchableGraphics as ad, getAdjustedBlendModeBlend as ae, ViewableBuffer as af, TextureStyle as ag, BitmapFontManager as ah, getBitmapTextLayout as ai, Cache as aj, updateQuadBounds as ak, CanvasTextMetrics as al, nextPow2 as am, fontStringFromTextStyle as an, getCanvasFillStyle as ao, GraphicsContextSystem as ap, _sfc_main$3 as aq, _sfc_main$2 as ar, _sfc_main$1 as as, VkPixiFrame as at, types as au, Buffer as b, BindGroup as c, createIdFromString as d, extensions as e, fastCopy as f, getTextureBatchBindGroup as g, CLEAR as h, CanvasSource as i, TextureSource as j, UniformGroup as k, CanvasPool as l, compileHighShaderGpuProgram as m, colorBit as n, generateTextureBatchBit as o, roundPixelsBit as p, getMaxTexturesPerBatch as q, removeItems as r, Shader as s, Texture as t, GlProgram as u, TextureMatrix as v, warn as w, DefaultBatcher as x, BigPool as y, getGlobalBounds as z };
@@ -1,7 +1,8 @@
1
- import VkPixiFrameWrapper from './src/app.vue';
2
1
  import VkPixiFrameCore from './src/core.vue';
3
2
  import VkPixiFrame from './src/index.vue';
3
+ import VkPixiFrameProvider from './src/provider.vue';
4
+ import VkPixiFrameView from './src/view.vue';
4
5
  export * as __VkPixiFrame from './src/types';
5
6
  export { TickerStatus } from '@vunk/shared/enum';
6
- export { VkPixiFrame, VkPixiFrameCore, VkPixiFrameWrapper, };
7
+ export { VkPixiFrameCore, VkPixiFrameProvider, VkPixiFrameView, };
7
8
  export default VkPixiFrame;
@@ -1,6 +1,6 @@
1
- export { aq as VkPixiFrame, ar as VkPixiFrameCore, as as VkPixiFrameWrapper, at as __VkPixiFrame, aq as default } from '../index2.mjs';
1
+ export { aq as VkPixiFrameCore, ar as VkPixiFrameProvider, as as VkPixiFrameView, au as __VkPixiFrame, at as default } from '../index2.mjs';
2
2
  export { TickerStatus } from '@vunk/shared/enum';
3
3
  import 'vue';
4
- import '../_commonjsHelpers.mjs';
5
4
  import '../browser.mjs';
5
+ import '../_commonjsHelpers.mjs';
6
6
  import '../_plugin-vue_export-helper.mjs';
@@ -70,33 +70,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
70
70
  loop: boolean;
71
71
  frameRate: number;
72
72
  }, {}, {
73
- AppView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
74
- appendTo: null;
75
- defaultOptions: {
76
- type: import("vue").PropType<Partial<import("pixi.js").ApplicationOptions>>;
77
- default: () => {};
78
- };
79
- }>, {
80
- props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
81
- appendTo: null;
82
- defaultOptions: {
83
- type: import("vue").PropType<Partial<import("pixi.js").ApplicationOptions>>;
84
- default: () => {};
85
- };
86
- }>> & Readonly<{}> & {}>;
87
- app: import("pixi.js").Application<import("pixi.js").Renderer>;
88
- appRef: import("vue").Ref<HTMLDivElement, HTMLDivElement>;
89
- ready: import("vue").Ref<boolean, boolean>;
90
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
91
- appendTo: null;
92
- defaultOptions: {
93
- type: import("vue").PropType<Partial<import("pixi.js").ApplicationOptions>>;
94
- default: () => {};
95
- };
96
- }>> & Readonly<{}>, {
97
- defaultOptions: Partial<import("pixi.js").ApplicationOptions>;
98
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
99
- CoreView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
73
+ CoreComp: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
100
74
  data: {
101
75
  type: {
102
76
  (arrayLength: number): string[];
@@ -214,5 +188,28 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
214
188
  loop: boolean;
215
189
  frameRate: number;
216
190
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
191
+ ProviderComp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
192
+ ViewComp: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
193
+ defaultOptions: {
194
+ type: import("vue").PropType<Partial<import("pixi.js").ApplicationOptions>>;
195
+ default: () => {};
196
+ };
197
+ }>, {
198
+ props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
199
+ defaultOptions: {
200
+ type: import("vue").PropType<Partial<import("pixi.js").ApplicationOptions>>;
201
+ default: () => {};
202
+ };
203
+ }>> & Readonly<{}> & {}>;
204
+ app: import("pixi.js").Application<import("pixi.js").Renderer>;
205
+ appRef: import("vue").Ref<HTMLDivElement, HTMLDivElement>;
206
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
207
+ defaultOptions: {
208
+ type: import("vue").PropType<Partial<import("pixi.js").ApplicationOptions>>;
209
+ default: () => {};
210
+ };
211
+ }>> & Readonly<{}>, {
212
+ defaultOptions: Partial<import("pixi.js").ApplicationOptions>;
213
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
217
214
  }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
218
215
  export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,14 +1,12 @@
1
1
  import type { ApplicationOptions } from 'pixi.js';
2
2
  import type { PropType, Ref } from 'vue';
3
3
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
- appendTo: null;
5
4
  defaultOptions: {
6
5
  type: PropType<Partial<ApplicationOptions>>;
7
6
  default: () => {};
8
7
  };
9
8
  }>, {
10
9
  props: import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
11
- appendTo: null;
12
10
  defaultOptions: {
13
11
  type: PropType<Partial<ApplicationOptions>>;
14
12
  default: () => {};
@@ -16,9 +14,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
16
14
  }>> & Readonly<{}> & {}>;
17
15
  app: import("pixi.js").Application<import("pixi.js").Renderer>;
18
16
  appRef: Ref<HTMLDivElement, HTMLDivElement>;
19
- ready: Ref<boolean, boolean>;
20
17
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
21
- appendTo: null;
22
18
  defaultOptions: {
23
19
  type: PropType<Partial<ApplicationOptions>>;
24
20
  default: () => {};
@@ -2,7 +2,7 @@ import './init.mjs';
2
2
  import './index2.mjs';
3
3
  import './colorToUniform.mjs';
4
4
  import 'vue';
5
- import './_commonjsHelpers.mjs';
6
5
  import '@vunk/shared/enum';
7
6
  import './browser.mjs';
7
+ import './_commonjsHelpers.mjs';
8
8
  import './_plugin-vue_export-helper.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vunk/plus",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC",