pixel-react 1.13.74 → 1.13.76

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/lib/index.d.ts CHANGED
@@ -2151,6 +2151,7 @@ type TreeNodeProps = {
2151
2151
  expandedAll?: boolean;
2152
2152
  hideResources?: boolean;
2153
2153
  hidePreOrPost?: boolean;
2154
+ isScript?: boolean;
2154
2155
  };
2155
2156
 
2156
2157
  interface NewNode {
@@ -4229,11 +4230,17 @@ interface MediaViewerModalProps {
4229
4230
  onClose: () => void;
4230
4231
  isPlaying: boolean;
4231
4232
  onTogglePlay?: () => void;
4232
- mediaType: 'image' | 'video';
4233
+ mediaType: 'video' | 'image';
4233
4234
  src: string;
4234
- headerTitle: string;
4235
+ headerTitle?: string;
4235
4236
  onDownload?: () => void;
4236
4237
  onExpand?: () => void;
4238
+ showHeader?: boolean;
4239
+ showDownload?: boolean;
4240
+ showExpand?: boolean;
4241
+ width?: string;
4242
+ height?: string;
4243
+ showControls?: boolean;
4237
4244
  }
4238
4245
 
4239
4246
  declare const MediaViewerModal: React__default.FC<MediaViewerModalProps>;
@@ -5214,7 +5221,7 @@ declare const handleTreeExpandAllCollapseAll: (data: TreeNodeProps[], key: strin
5214
5221
 
5215
5222
  declare const scrollToView: (id: string | null) => void;
5216
5223
 
5217
- declare function togglePrePostConditions(data: TreeNodeProps[], isHide: boolean): TreeNodeProps[];
5224
+ declare function togglePrePostConditions(data: TreeNodeProps[], isHide: boolean, isScript: boolean): TreeNodeProps[];
5218
5225
 
5219
5226
  declare function getTopVisibleNodeKey(scrollContainerWrapper: HTMLDivElement, treeData: TreeNodeProps[]): string | null;
5220
5227
 
@@ -1,4 +1,4 @@
1
- import { __exports as beautifier } from '../../../../../_virtual/beautifier3.js';
1
+ import { __exports as beautifier } from '../../../../../_virtual/beautifier2.js';
2
2
  import { __require as requireOptions } from './options.js';
3
3
  import { __require as requireOutput } from '../core/output.js';
4
4
  import { __require as requireInputscanner } from '../core/inputscanner.js';
@@ -1,4 +1,4 @@
1
- import { __module as css } from '../../../../../_virtual/index11.js';
1
+ import { __module as css } from '../../../../../_virtual/index9.js';
2
2
  import { __require as requireBeautifier } from './beautifier.js';
3
3
  import { __require as requireOptions } from './options.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __exports as options } from '../../../../../_virtual/options3.js';
1
+ import { __exports as options } from '../../../../../_virtual/options.js';
2
2
  import { __require as requireOptions$1 } from '../core/options.js';
3
3
 
4
4
  /*jshint node:true */
@@ -1,4 +1,4 @@
1
- import { __exports as beautifier } from '../../../../../_virtual/beautifier.js';
1
+ import { __exports as beautifier } from '../../../../../_virtual/beautifier3.js';
2
2
  import { __require as requireOptions } from './options.js';
3
3
  import { __require as requireOutput } from '../core/output.js';
4
4
  import { __require as requireTokenizer } from './tokenizer.js';
@@ -1,4 +1,4 @@
1
- import { __module as html } from '../../../../../_virtual/index9.js';
1
+ import { __module as html } from '../../../../../_virtual/index11.js';
2
2
  import { __require as requireBeautifier } from './beautifier.js';
3
3
  import { __require as requireOptions } from './options.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __exports as options } from '../../../../../_virtual/options.js';
1
+ import { __exports as options } from '../../../../../_virtual/options3.js';
2
2
  import { __require as requireOptions$1 } from '../core/options.js';
3
3
 
4
4
  /*jshint node:true */
@@ -1,4 +1,4 @@
1
- import { __exports as tokenizer } from '../../../../../_virtual/tokenizer.js';
1
+ import { __exports as tokenizer } from '../../../../../_virtual/tokenizer2.js';
2
2
  import { __require as requireTokenizer$1 } from '../core/tokenizer.js';
3
3
  import { __require as requireDirectives } from '../core/directives.js';
4
4
  import { __require as requireTemplatablepattern } from '../core/templatablepattern.js';
@@ -1,4 +1,4 @@
1
- import { __exports as beautifier } from '../../../../../_virtual/beautifier2.js';
1
+ import { __exports as beautifier } from '../../../../../_virtual/beautifier.js';
2
2
  import { __require as requireOutput } from '../core/output.js';
3
3
  import { __require as requireToken } from '../core/token.js';
4
4
  import { __require as requireAcorn } from './acorn.js';
@@ -1,4 +1,4 @@
1
- import { __exports as tokenizer } from '../../../../../_virtual/tokenizer2.js';
1
+ import { __exports as tokenizer } from '../../../../../_virtual/tokenizer.js';
2
2
  import { __require as requireInputscanner } from '../core/inputscanner.js';
3
3
  import { __require as requireTokenizer$1 } from '../core/tokenizer.js';
4
4
  import { __require as requireDirectives } from '../core/directives.js';
@@ -1,2 +1,2 @@
1
1
  import { TreeNodeProps as TreeNode } from '../../ComponentProps/TreeNodeProps';
2
- export declare function togglePrePostConditions(data: TreeNode[], isHide: boolean): TreeNode[];
2
+ export declare function togglePrePostConditions(data: TreeNode[], isHide: boolean, isScript: boolean): TreeNode[];
@@ -1,8 +1,9 @@
1
- function togglePrePostConditions(data, isHide) {
1
+ function togglePrePostConditions(data, isHide, isScript) {
2
2
  if (!Array.isArray(data)) {
3
3
  throw new Error('Input data must be an array of TreeNode objects.');
4
4
  }
5
- return data.map(node => ['PRE', 'POST'].includes(node.entityType ?? '') ? {
5
+ const hideTypeArray = isScript ? ['Script'] : ['PRE', 'POST'];
6
+ return data.map(node => hideTypeArray.includes(node.entityType ?? '') ? {
6
7
  ...node,
7
8
  hide: isHide
8
9
  } : node);
@@ -1 +1 @@
1
- {"version":3,"file":"togglePrePostCondition.js","sources":["../../../src/utils/togglePrePostCondition/togglePrePostCondition.ts"],"sourcesContent":[null],"names":["togglePrePostConditions","data","isHide","Array","isArray","Error","map","node","includes","entityType","hide"],"mappings":"AACgB,SAAAA,uBAAuBA,CACrCC,IAAgB,EAChBC,MAAe,EAAA;AAEf,EAAA,IAAI,CAACC,KAAK,CAACC,OAAO,CAACH,IAAI,CAAC,EAAE;AACxB,IAAA,MAAM,IAAII,KAAK,CAAC,kDAAkD,CAAC;AACrE;EACA,OAAOJ,IAAI,CAACK,GAAG,CAAEC,IAAI,IACnB,CAAC,KAAK,EAAE,MAAM,CAAC,CAACC,QAAQ,CAACD,IAAI,CAACE,UAAU,IAAI,EAAE,CAAC,GAAG;AAAE,IAAA,GAAGF,IAAI;AAAEG,IAAAA,IAAI,EAAER;GAAQ,GAAGK,IAAI,CACnF;AACH;;;;"}
1
+ {"version":3,"file":"togglePrePostCondition.js","sources":["../../../src/utils/togglePrePostCondition/togglePrePostCondition.ts"],"sourcesContent":[null],"names":["togglePrePostConditions","data","isHide","isScript","Array","isArray","Error","hideTypeArray","map","node","includes","entityType","hide"],"mappings":"SACgBA,uBAAuBA,CACrCC,IAAgB,EAChBC,MAAe,EACfC,QAAiB,EAAA;AAEjB,EAAA,IAAI,CAACC,KAAK,CAACC,OAAO,CAACJ,IAAI,CAAC,EAAE;AACxB,IAAA,MAAM,IAAIK,KAAK,CAAC,kDAAkD,CAAC;AACrE;AAEA,EAAA,MAAMC,aAAa,GAAGJ,QAAQ,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC;AAE7D,EAAA,OAAOF,IAAI,CAACO,GAAG,CAAEC,IAAI,IACnBF,aAAa,CAACG,QAAQ,CAACD,IAAI,CAACE,UAAU,IAAI,EAAE,CAAC,GACzC;AAAE,IAAA,GAAGF,IAAI;AAAEG,IAAAA,IAAI,EAAEV;GAAQ,GACzBO,IAAI,CACT;AACH;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.13.74",
4
+ "version": "1.13.76",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",
7
7
  "types": "lib/index.d.ts",