@burger-editor/runtime 4.0.0-alpha.62 → 4.0.0-alpha.63

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.
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Image Modal Configuration
3
+ */
4
+ export interface ImageModalConfig {
5
+ /**
6
+ * CSS selector for target containers
7
+ * @default '[data-bge]'
8
+ */
9
+ selector?: string;
10
+ /**
11
+ * Close button label
12
+ * @default '閉じる'
13
+ */
14
+ closeButtonLabel?: string;
15
+ /**
16
+ * Dialog closedby attribute value
17
+ * Controls how the dialog can be closed
18
+ * - "any": ESC key or backdrop click (default)
19
+ * - "closerequest": ESC key only
20
+ * - "none": Programmatically only
21
+ * @default 'any'
22
+ */
23
+ closedby?: 'any' | 'closerequest' | 'none';
24
+ }
25
+ /**
26
+ * Initialize image modal functionality using Invoker Commands API
27
+ *
28
+ * This function creates dialog elements for each image with show-modal command
29
+ * and associates them with buttons using commandfor attribute.
30
+ * @param config - Configuration options
31
+ * @example
32
+ * ```typescript
33
+ * import { initImageModal } from '@burger-editor/runtime';
34
+ *
35
+ * // Basic usage
36
+ * initImageModal();
37
+ *
38
+ * // With custom configuration
39
+ * initImageModal({
40
+ * closeButtonLabel: '閉じる',
41
+ * closedby: 'closerequest' // ESC key only
42
+ * });
43
+ * ```
44
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API
45
+ */
46
+ export declare function initImageModal(config?: ImageModalConfig): void;
47
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/image-modal/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,cAAc,GAAG,MAAM,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,MAAM,GAAE,gBAAqB,GAAG,IAAI,CA2ClE"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Runtime library for BurgerEditor generated content in the browser.
3
+ * This package provides client-side functionality for interactive features
4
+ * like image modals.
5
+ */
6
+ export { initImageModal } from './image-modal/index.js';
7
+ export type { ImageModalConfig } from './image-modal/index.js';
8
+ export { autoInit, initBurgerEditorRuntime } from './init.js';
9
+ export type { BurgerEditorRuntimeConfig } from './types.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAG9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC"}
package/dist/init.d.ts ADDED
@@ -0,0 +1,51 @@
1
+ import { BurgerEditorRuntimeConfig } from './types.js';
2
+ /**
3
+ * Initialize BurgerEditor runtime with all features
4
+ *
5
+ * This is a convenience function that initializes all runtime features
6
+ * with a single call. You can also import and initialize features individually.
7
+ * @param config - Configuration options for runtime features
8
+ * @example
9
+ * ```typescript
10
+ * import { initBurgerEditorRuntime } from '@burger-editor/runtime';
11
+ *
12
+ * // Initialize all features with defaults
13
+ * initBurgerEditorRuntime();
14
+ *
15
+ * // Initialize with custom configuration
16
+ * initBurgerEditorRuntime({
17
+ * imageModal: {
18
+ * closeButtonLabel: '閉じる',
19
+ * }
20
+ * });
21
+ *
22
+ * // Disable a feature
23
+ * initBurgerEditorRuntime({
24
+ * imageModal: false,
25
+ * });
26
+ * ```
27
+ */
28
+ export declare function initBurgerEditorRuntime(config?: BurgerEditorRuntimeConfig): void;
29
+ /**
30
+ * Initialize runtime on DOMContentLoaded
31
+ *
32
+ * This is a convenience function that automatically initializes the runtime
33
+ * when the DOM is ready. Use this for simple setups.
34
+ * @param config - Configuration options for runtime features
35
+ * @example
36
+ * ```typescript
37
+ * import { autoInit } from '@burger-editor/runtime';
38
+ *
39
+ * // Auto-initialize with defaults
40
+ * autoInit();
41
+ *
42
+ * // Auto-initialize with custom configuration
43
+ * autoInit({
44
+ * imageModal: {
45
+ * closeButtonLabel: '閉じる',
46
+ * }
47
+ * });
48
+ * ```
49
+ */
50
+ export declare function autoInit(config?: BurgerEditorRuntimeConfig): void;
51
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAI5D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,GAAE,yBAA8B,GAAG,IAAI,CAQpF;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,GAAE,yBAA8B,GAAG,IAAI,CASrE"}
@@ -0,0 +1,12 @@
1
+ import { ImageModalConfig } from './image-modal/index.js';
2
+ /**
3
+ * BurgerEditor Runtime Configuration
4
+ */
5
+ export interface BurgerEditorRuntimeConfig {
6
+ /**
7
+ * Enable image modal functionality
8
+ * @default true
9
+ */
10
+ imageModal?: boolean | ImageModalConfig;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;CACxC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burger-editor/runtime",
3
- "version": "4.0.0-alpha.62",
3
+ "version": "4.0.0-alpha.63",
4
4
  "description": "Runtime library for BurgerEditor generated content in the browser",
5
5
  "author": "D-ZERO",
6
6
  "license": "MIT",
@@ -27,12 +27,12 @@
27
27
  "test:serve": "vite --config vite.config.test.ts"
28
28
  },
29
29
  "devDependencies": {
30
- "@burger-editor/blocks": "4.0.0-alpha.62",
31
- "@burger-editor/core": "4.0.0-alpha.62",
32
- "@burger-editor/css": "4.0.0-alpha.62",
30
+ "@burger-editor/blocks": "4.0.0-alpha.63",
31
+ "@burger-editor/core": "4.0.0-alpha.63",
32
+ "@burger-editor/css": "4.0.0-alpha.63",
33
33
  "typescript": "5.9.3",
34
34
  "vite": "7.3.1",
35
35
  "vite-plugin-dts": "4.5.4"
36
36
  },
37
- "gitHead": "643683e73e3cafd5d4a89da55900ef5538c1ff35"
37
+ "gitHead": "4ae044f9cff5133608170c22a3bf118d31feef89"
38
38
  }