@viewfly/platform-browser 0.0.13 → 0.0.15

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,4 +1,4 @@
1
- import { Viewfly, RootNode } from '@viewfly/core';
1
+ import { Viewfly, JSXInternal } from '@viewfly/core';
2
2
  /**
3
3
  * 创建一个 Viewfly 实例
4
4
  * @param host 应用根节点
@@ -15,4 +15,4 @@ import { Viewfly, RootNode } from '@viewfly/core';
15
15
  * renderer.refresh() // 手动更新视图
16
16
  * ```
17
17
  */
18
- export declare function createApp(host: HTMLElement, root: RootNode, autoUpdate?: boolean): Viewfly;
18
+ export declare function createApp(host: HTMLElement, root: JSXInternal.JSXChildNode, autoUpdate?: boolean): Viewfly;
package/bundles/fork.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { RootNode, Viewfly } from '@viewfly/core';
2
- export declare function fork(root: RootNode): Viewfly;
1
+ import { JSXInternal, Viewfly } from '@viewfly/core';
2
+ export declare function fork(root: JSXInternal.Element): Viewfly;
@@ -1,5 +1,5 @@
1
1
  import * as CSS from 'csstype';
2
- import { ViewTypes } from '@viewfly/core';
2
+ import { JSXInternal } from '@viewfly/core';
3
3
  export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> {
4
4
  /**
5
5
  * The index signature was removed to enable closed typing for style
@@ -200,9 +200,9 @@ interface AriaAttributes {
200
200
  'aria-valuetext'?: string;
201
201
  }
202
202
  export type StyleValue = string | CSSProperties | null;
203
- export interface HTMLAttributes<T extends object> extends AriaAttributes, EventHandlers<Events>, ViewTypes.RefAttributes<T> {
203
+ export interface HTMLAttributes<T> extends AriaAttributes, EventHandlers<Events>, JSXInternal.RefAttributes<T> {
204
204
  innerHTML?: string;
205
- class?: ViewTypes.ClassNames;
205
+ class?: JSXInternal.ClassNames;
206
206
  style?: StyleValue;
207
207
  accesskey?: string;
208
208
  contenteditable?: Booleanish | 'inherit';
@@ -247,7 +247,7 @@ export interface HTMLAttributes<T extends object> extends AriaAttributes, EventH
247
247
  [k: string]: any;
248
248
  }
249
249
  type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
250
- export interface AnchorHTMLAttributes<T extends object> extends HTMLAttributes<T> {
250
+ export interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
251
251
  download?: any;
252
252
  href?: string;
253
253
  hreflang?: string;
@@ -258,7 +258,7 @@ export interface AnchorHTMLAttributes<T extends object> extends HTMLAttributes<T
258
258
  type?: string;
259
259
  referrerpolicy?: HTMLAttributeReferrerPolicy;
260
260
  }
261
- export interface AreaHTMLAttributes<T extends object> extends HTMLAttributes<T> {
261
+ export interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
262
262
  alt?: string;
263
263
  coords?: string;
264
264
  download?: any;
@@ -270,16 +270,16 @@ export interface AreaHTMLAttributes<T extends object> extends HTMLAttributes<T>
270
270
  shape?: string;
271
271
  target?: string;
272
272
  }
273
- export interface AudioHTMLAttributes<T extends object> extends MediaHTMLAttributes<T> {
273
+ export interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {
274
274
  }
275
- export interface BaseHTMLAttributes<T extends object> extends HTMLAttributes<T> {
275
+ export interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
276
276
  href?: string;
277
277
  target?: string;
278
278
  }
279
- export interface BlockquoteHTMLAttributes<T extends object> extends HTMLAttributes<T> {
279
+ export interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
280
280
  cite?: string;
281
281
  }
282
- export interface ButtonHTMLAttributes<T extends object> extends HTMLAttributes<T> {
282
+ export interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
283
283
  autofocus?: Booleanish;
284
284
  disabled?: Booleanish;
285
285
  form?: string;
@@ -292,42 +292,42 @@ export interface ButtonHTMLAttributes<T extends object> extends HTMLAttributes<T
292
292
  type?: 'submit' | 'reset' | 'button';
293
293
  value?: string | string[] | number;
294
294
  }
295
- export interface CanvasHTMLAttributes<T extends object> extends HTMLAttributes<T> {
295
+ export interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
296
296
  height?: Numberish;
297
297
  width?: Numberish;
298
298
  }
299
- export interface ColHTMLAttributes<T extends object> extends HTMLAttributes<T> {
299
+ export interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
300
300
  span?: Numberish;
301
301
  width?: Numberish;
302
302
  }
303
- export interface ColgroupHTMLAttributes<T extends object> extends HTMLAttributes<T> {
303
+ export interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
304
304
  span?: Numberish;
305
305
  }
306
- export interface DataHTMLAttributes<T extends object> extends HTMLAttributes<T> {
306
+ export interface DataHTMLAttributes<T> extends HTMLAttributes<T> {
307
307
  value?: string | string[] | number;
308
308
  }
309
- export interface DetailsHTMLAttributes<T extends object> extends HTMLAttributes<T> {
309
+ export interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
310
310
  open?: Booleanish;
311
311
  }
312
- export interface DelHTMLAttributes<T extends object> extends HTMLAttributes<T> {
312
+ export interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
313
313
  cite?: string;
314
314
  datetime?: string;
315
315
  }
316
- export interface DialogHTMLAttributes<T extends object> extends HTMLAttributes<T> {
316
+ export interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
317
317
  open?: Booleanish;
318
318
  }
319
- export interface EmbedHTMLAttributes<T extends object> extends HTMLAttributes<T> {
319
+ export interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
320
320
  height?: Numberish;
321
321
  src?: string;
322
322
  type?: string;
323
323
  width?: Numberish;
324
324
  }
325
- export interface FieldsetHTMLAttributes<T extends object> extends HTMLAttributes<T> {
325
+ export interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
326
326
  disabled?: Booleanish;
327
327
  form?: string;
328
328
  name?: string;
329
329
  }
330
- export interface FormHTMLAttributes<T extends object> extends HTMLAttributes<T> {
330
+ export interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
331
331
  acceptcharset?: string;
332
332
  action?: string;
333
333
  autocomplete?: string;
@@ -337,10 +337,10 @@ export interface FormHTMLAttributes<T extends object> extends HTMLAttributes<T>
337
337
  novalidate?: Booleanish;
338
338
  target?: string;
339
339
  }
340
- export interface HtmlHTMLAttributes<T extends object> extends HTMLAttributes<T> {
340
+ export interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
341
341
  manifest?: string;
342
342
  }
343
- export interface IframeHTMLAttributes<T extends object> extends HTMLAttributes<T> {
343
+ export interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
344
344
  allow?: string;
345
345
  allowfullscreen?: Booleanish;
346
346
  allowtransparency?: Booleanish;
@@ -357,7 +357,7 @@ export interface IframeHTMLAttributes<T extends object> extends HTMLAttributes<T
357
357
  srcdoc?: string;
358
358
  width?: Numberish;
359
359
  }
360
- export interface ImgHTMLAttributes<T extends object> extends HTMLAttributes<T> {
360
+ export interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
361
361
  alt?: string;
362
362
  crossorigin?: 'anonymous' | 'use-credentials' | '';
363
363
  decoding?: 'async' | 'auto' | 'sync';
@@ -369,11 +369,11 @@ export interface ImgHTMLAttributes<T extends object> extends HTMLAttributes<T> {
369
369
  usemap?: string;
370
370
  width?: Numberish;
371
371
  }
372
- export interface InsHTMLAttributes<T extends object> extends HTMLAttributes<T> {
372
+ export interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
373
373
  cite?: string;
374
374
  datetime?: string;
375
375
  }
376
- export interface InputHTMLAttributes<T extends object> extends HTMLAttributes<T> {
376
+ export interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
377
377
  accept?: string;
378
378
  alt?: string;
379
379
  autocomplete?: string;
@@ -408,7 +408,7 @@ export interface InputHTMLAttributes<T extends object> extends HTMLAttributes<T>
408
408
  value?: any;
409
409
  width?: Numberish;
410
410
  }
411
- export interface KeygenHTMLAttributes<T extends object> extends HTMLAttributes<T> {
411
+ export interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
412
412
  autofocus?: Booleanish;
413
413
  challenge?: string;
414
414
  disabled?: Booleanish;
@@ -417,14 +417,14 @@ export interface KeygenHTMLAttributes<T extends object> extends HTMLAttributes<T
417
417
  keyparams?: string;
418
418
  name?: string;
419
419
  }
420
- export interface LabelHTMLAttributes<T extends object> extends HTMLAttributes<T> {
420
+ export interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
421
421
  for?: string;
422
422
  form?: string;
423
423
  }
424
- export interface LiHTMLAttributes<T extends object> extends HTMLAttributes<T> {
424
+ export interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
425
425
  value?: string | string[] | number;
426
426
  }
427
- export interface LinkHTMLAttributes<T extends object> extends HTMLAttributes<T> {
427
+ export interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
428
428
  as?: string;
429
429
  crossorigin?: string;
430
430
  href?: string;
@@ -436,13 +436,13 @@ export interface LinkHTMLAttributes<T extends object> extends HTMLAttributes<T>
436
436
  sizes?: string;
437
437
  type?: string;
438
438
  }
439
- export interface MapHTMLAttributes<T extends object> extends HTMLAttributes<T> {
439
+ export interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
440
440
  name?: string;
441
441
  }
442
- export interface MenuHTMLAttributes<T extends object> extends HTMLAttributes<T> {
442
+ export interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
443
443
  type?: string;
444
444
  }
445
- export interface MediaHTMLAttributes<T extends object> extends HTMLAttributes<T> {
445
+ export interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
446
446
  autoplay?: Booleanish;
447
447
  controls?: Booleanish;
448
448
  controlslist?: string;
@@ -454,13 +454,13 @@ export interface MediaHTMLAttributes<T extends object> extends HTMLAttributes<T>
454
454
  preload?: string;
455
455
  src?: string;
456
456
  }
457
- export interface MetaHTMLAttributes<T extends object> extends HTMLAttributes<T> {
457
+ export interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
458
458
  charset?: string;
459
459
  content?: string;
460
460
  httpequiv?: string;
461
461
  name?: string;
462
462
  }
463
- export interface MeterHTMLAttributes<T extends object> extends HTMLAttributes<T> {
463
+ export interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
464
464
  form?: string;
465
465
  high?: Numberish;
466
466
  low?: Numberish;
@@ -469,10 +469,10 @@ export interface MeterHTMLAttributes<T extends object> extends HTMLAttributes<T>
469
469
  optimum?: Numberish;
470
470
  value?: string | string[] | number;
471
471
  }
472
- export interface QuoteHTMLAttributes<T extends object> extends HTMLAttributes<T> {
472
+ export interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
473
473
  cite?: string;
474
474
  }
475
- export interface ObjectHTMLAttributes<T extends object> extends HTMLAttributes<T> {
475
+ export interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
476
476
  classid?: string;
477
477
  data?: string;
478
478
  form?: string;
@@ -483,35 +483,35 @@ export interface ObjectHTMLAttributes<T extends object> extends HTMLAttributes<T
483
483
  width?: Numberish;
484
484
  wmode?: string;
485
485
  }
486
- export interface OlHTMLAttributes<T extends object> extends HTMLAttributes<T> {
486
+ export interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
487
487
  reversed?: Booleanish;
488
488
  start?: Numberish;
489
489
  type?: '1' | 'a' | 'A' | 'i' | 'I';
490
490
  }
491
- export interface OptgroupHTMLAttributes<T extends object> extends HTMLAttributes<T> {
491
+ export interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
492
492
  disabled?: Booleanish;
493
493
  label?: string;
494
494
  }
495
- export interface OptionHTMLAttributes<T extends object> extends HTMLAttributes<T> {
495
+ export interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
496
496
  disabled?: Booleanish;
497
497
  label?: string;
498
498
  selected?: Booleanish;
499
499
  value?: string;
500
500
  }
501
- export interface OutputHTMLAttributes<T extends object> extends HTMLAttributes<T> {
501
+ export interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
502
502
  for?: string;
503
503
  form?: string;
504
504
  name?: string;
505
505
  }
506
- export interface ParamHTMLAttributes<T extends object> extends HTMLAttributes<T> {
506
+ export interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
507
507
  name?: string;
508
508
  value?: string | string[] | number;
509
509
  }
510
- export interface ProgressHTMLAttributes<T extends object> extends HTMLAttributes<T> {
510
+ export interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
511
511
  max?: Numberish;
512
512
  value?: string | string[] | number;
513
513
  }
514
- export interface ScriptHTMLAttributes<T extends object> extends HTMLAttributes<T> {
514
+ export interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
515
515
  async?: Booleanish;
516
516
  charset?: string;
517
517
  crossorigin?: string;
@@ -523,7 +523,7 @@ export interface ScriptHTMLAttributes<T extends object> extends HTMLAttributes<T
523
523
  src?: string;
524
524
  type?: string;
525
525
  }
526
- export interface SelectHTMLAttributes<T extends object> extends HTMLAttributes<T> {
526
+ export interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
527
527
  autocomplete?: string;
528
528
  autofocus?: Booleanish;
529
529
  disabled?: Booleanish;
@@ -534,25 +534,25 @@ export interface SelectHTMLAttributes<T extends object> extends HTMLAttributes<T
534
534
  size?: Numberish;
535
535
  value?: string;
536
536
  }
537
- export interface SourceHTMLAttributes<T extends object> extends HTMLAttributes<T> {
537
+ export interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
538
538
  media?: string;
539
539
  sizes?: string;
540
540
  src?: string;
541
541
  srcset?: string;
542
542
  type?: string;
543
543
  }
544
- export interface StyleHTMLAttributes<T extends object> extends HTMLAttributes<T> {
544
+ export interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
545
545
  media?: string;
546
546
  nonce?: string;
547
547
  scoped?: Booleanish;
548
548
  type?: string;
549
549
  }
550
- export interface TableHTMLAttributes<T extends object> extends HTMLAttributes<T> {
550
+ export interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
551
551
  cellpadding?: Numberish;
552
552
  cellspacing?: Numberish;
553
553
  summary?: string;
554
554
  }
555
- export interface TextareaHTMLAttributes<T extends object> extends HTMLAttributes<T> {
555
+ export interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
556
556
  autocomplete?: string;
557
557
  autofocus?: Booleanish;
558
558
  cols?: Numberish;
@@ -569,7 +569,7 @@ export interface TextareaHTMLAttributes<T extends object> extends HTMLAttributes
569
569
  value?: string | string[] | number;
570
570
  wrap?: string;
571
571
  }
572
- export interface TdHTMLAttributes<T extends object> extends HTMLAttributes<T> {
572
+ export interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
573
573
  align?: 'left' | 'center' | 'right' | 'justify' | 'char';
574
574
  colspan?: Numberish;
575
575
  headers?: string;
@@ -577,31 +577,31 @@ export interface TdHTMLAttributes<T extends object> extends HTMLAttributes<T> {
577
577
  scope?: string;
578
578
  valign?: 'top' | 'middle' | 'bottom' | 'baseline';
579
579
  }
580
- export interface ThHTMLAttributes<T extends object> extends HTMLAttributes<T> {
580
+ export interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
581
581
  align?: 'left' | 'center' | 'right' | 'justify' | 'char';
582
582
  colspan?: Numberish;
583
583
  headers?: string;
584
584
  rowspan?: Numberish;
585
585
  scope?: string;
586
586
  }
587
- export interface TimeHTMLAttributes<T extends object> extends HTMLAttributes<T> {
587
+ export interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
588
588
  datetime?: string;
589
589
  }
590
- export interface TrackHTMLAttributes<T extends object> extends HTMLAttributes<T> {
590
+ export interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
591
591
  default?: Booleanish;
592
592
  kind?: string;
593
593
  label?: string;
594
594
  src?: string;
595
595
  srclang?: string;
596
596
  }
597
- export interface VideoHTMLAttributes<T extends object> extends MediaHTMLAttributes<T> {
597
+ export interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
598
598
  height?: Numberish;
599
599
  playsinline?: Booleanish;
600
600
  poster?: string;
601
601
  width?: Numberish;
602
602
  disablePictureInPicture?: Booleanish;
603
603
  }
604
- export interface WebViewHTMLAttributes<T extends object> extends HTMLAttributes<T> {
604
+ export interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
605
605
  allowfullscreen?: Booleanish;
606
606
  allowpopups?: Booleanish;
607
607
  autoFocus?: Booleanish;
@@ -620,13 +620,13 @@ export interface WebViewHTMLAttributes<T extends object> extends HTMLAttributes<
620
620
  useragent?: string;
621
621
  webpreferences?: string;
622
622
  }
623
- export interface SVGAttributes<T extends object> extends AriaAttributes, EventHandlers<Events>, ViewTypes.RefAttributes<T> {
623
+ export interface SVGAttributes<T> extends AriaAttributes, EventHandlers<Events>, JSXInternal.RefAttributes<T> {
624
624
  innerHTML?: string;
625
625
  /**
626
626
  * SVG Styling Attributes
627
627
  * @see https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling
628
628
  */
629
- class?: ViewTypes.ClassNames;
629
+ class?: JSXInternal.ClassNames;
630
630
  style?: string | CSSProperties;
631
631
  color?: string;
632
632
  height?: Numberish;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewfly/platform-browser",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "This project is used to enable the Viewfly framework to run in a browser.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -13,7 +13,7 @@
13
13
  "keywords": [],
14
14
  "dependencies": {
15
15
  "@tanbo/di": "^1.1.5",
16
- "@viewfly/core": "^0.0.13",
16
+ "@viewfly/core": "^0.0.15",
17
17
  "csstype": "^3.1.2",
18
18
  "reflect-metadata": "^0.1.13"
19
19
  },
@@ -35,5 +35,5 @@
35
35
  "bugs": {
36
36
  "url": "https://github.com/viewfly/viewfly.git/issues"
37
37
  },
38
- "gitHead": "fbfaa99daf471f60ffe119241ca38ccedf8ba5f5"
38
+ "gitHead": "993944f270a1a0abd095bcda0d9080c4bfebc655"
39
39
  }