@01.software/sdk 0.15.0 → 0.16.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.
@@ -1,7 +1,7 @@
1
1
  import { R as RealtimeEvent } from './realtime-D7HtUpqt.cjs';
2
2
  export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.cjs';
3
- import { P as PublicCollection } from './const-9RunqFfj.cjs';
4
- import './payload-types-Cjbr7XZZ.cjs';
3
+ import { P as PublicCollection } from './const-BLwHrFZ-.cjs';
4
+ import './payload-types-DRvL_bS2.cjs';
5
5
 
6
6
  interface UseRealtimeQueryOptions {
7
7
  /** Filter events to specific collections. Empty/undefined = all collections. */
@@ -1,7 +1,7 @@
1
1
  import { R as RealtimeEvent } from './realtime-D7HtUpqt.js';
2
2
  export { a as RealtimeConnection, b as RealtimeListener } from './realtime-D7HtUpqt.js';
3
- import { P as PublicCollection } from './const-ovU3MmND.js';
4
- import './payload-types-Cjbr7XZZ.js';
3
+ import { P as PublicCollection } from './const-RMD3ZVaS.js';
4
+ import './payload-types-DRvL_bS2.js';
5
5
 
6
6
  interface UseRealtimeQueryOptions {
7
7
  /** Filter events to specific collections. Empty/undefined = all collections. */
@@ -417,15 +417,9 @@ function useQuickJS() {
417
417
  }
418
418
 
419
419
  // src/ui/Canvas/template-compiler.ts
420
+ var WIRE_FORMAT_VERSION = 1;
420
421
  var MAX_CACHE_SIZE = 100;
421
422
  var MAX_MATERIALIZE_DEPTH = 20;
422
- var IFRAME_BLOCKED_PROPS = /* @__PURE__ */ new Set([
423
- "srcdoc",
424
- "allow",
425
- "allowpaymentrequest",
426
- "name",
427
- "sandbox"
428
- ]);
429
423
  var ALLOWED_ELEMENTS = /* @__PURE__ */ new Set([
430
424
  "div",
431
425
  "span",
@@ -459,8 +453,7 @@ var ALLOWED_ELEMENTS = /* @__PURE__ */ new Set([
459
453
  "path",
460
454
  "g",
461
455
  "circle",
462
- "rect",
463
- "iframe"
456
+ "rect"
464
457
  ]);
465
458
  var BLOCKED_PATTERNS = [
466
459
  /\bdocument\s*\./,
@@ -492,7 +485,7 @@ var VM_SETUP = `
492
485
  var React = {
493
486
  createElement: function(type, props) {
494
487
  var args = Array.prototype.slice.call(arguments, 2);
495
- return { $$t: 'el', type: String(type), props: props || {}, ch: args };
488
+ return { $$t: 'el', $$v: 1, type: String(type), props: props || {}, ch: args };
496
489
  },
497
490
  Fragment: '__frag__'
498
491
  };
@@ -584,6 +577,7 @@ function materialize(node, depth = 0) {
584
577
  }
585
578
  if (typeof node !== "object") return null;
586
579
  const d = node;
580
+ if (d.$$v !== WIRE_FORMAT_VERSION) return null;
587
581
  if (d.$$t === "frag") {
588
582
  const ch = Array.isArray(d.ch) ? d.ch : [];
589
583
  return import_react4.default.createElement(
@@ -601,7 +595,6 @@ function materialize(node, depth = 0) {
601
595
  for (const [k, v] of Object.entries(props)) {
602
596
  if (k.startsWith("on")) continue;
603
597
  if (k === "dangerouslySetInnerHTML" || k === "ref") continue;
604
- if (type === "iframe" && IFRAME_BLOCKED_PROPS.has(k)) continue;
605
598
  if ((k === "src" || k === "href") && !isSafeUrl(v)) continue;
606
599
  if (k === "style") {
607
600
  safeProps[k] = sanitizeStyle(v);
@@ -609,9 +602,6 @@ function materialize(node, depth = 0) {
609
602
  }
610
603
  safeProps[k] = v;
611
604
  }
612
- if (type === "iframe") {
613
- safeProps["sandbox"] = "allow-scripts allow-same-origin";
614
- }
615
605
  const children = ch.map((c) => materialize(c, depth + 1));
616
606
  return import_react4.default.createElement(type, safeProps, ...children);
617
607
  }