|
| 1 | +--- |
| 2 | +source: packages/qwik/src/optimizer/core/src/test.rs |
| 3 | +assertion_line: 4299 |
| 4 | +expression: output |
| 5 | +snapshot_kind: text |
| 6 | +--- |
| 7 | +==INPUT== |
| 8 | + |
| 9 | + |
| 10 | + import { component$, useStore } from '@qwik.dev/core'; |
| 11 | + |
| 12 | + export default component$(() => { |
| 13 | + const panelStore = useStore(() => ({ |
| 14 | + active: 'Input', |
| 15 | + list: PANELS, |
| 16 | + })); |
| 17 | + |
| 18 | + return ( |
| 19 | + <div |
| 20 | + stuff={panelStore.active ? 'yes' : 'no'} |
| 21 | + class={{ |
| 22 | + 'too-long-to-wrap': true, |
| 23 | + 'examples-panel-input': panelStore.active === 'Input', |
| 24 | + 'examples-panel-output': panelStore.active === 'Output', |
| 25 | + 'examples-panel-console': panelStore.active === 'Console', |
| 26 | + }} |
| 27 | + /> |
| 28 | + ); |
| 29 | + }); |
| 30 | + export const PANELS: ActivePanel[] = ['Examples', 'Input', 'Output', 'Console']; |
| 31 | + |
| 32 | +============================= test.js == |
| 33 | + |
| 34 | +import { componentQrl } from "@qwik.dev/core"; |
| 35 | +import { qrl } from "@qwik.dev/core"; |
| 36 | +export default /*#__PURE__*/ componentQrl(/*#__PURE__*/ qrl(()=>import("./test.tsx_test_component_LUXeXe0DQrg"), "test_component_LUXeXe0DQrg")); |
| 37 | +export const PANELS = [ |
| 38 | + 'Examples', |
| 39 | + 'Input', |
| 40 | + 'Output', |
| 41 | + 'Console' |
| 42 | +]; |
| 43 | + |
| 44 | + |
| 45 | +Some("{\"version\":3,\"sources\":[\"/user/qwik/src/test.tsx\"],\"names\":[],\"mappings\":\";;AAGE,6BAAe,mHAiBZ;AACH,OAAO,MAAM,SAAwB;IAAC;IAAY;IAAS;IAAU;CAAU,CAAC\"}") |
| 46 | +============================= test.tsx_test_component_LUXeXe0DQrg.js (ENTRY POINT)== |
| 47 | + |
| 48 | +import { PANELS } from "./test"; |
| 49 | +import { _fnSignal } from "@qwik.dev/core"; |
| 50 | +import { _jsxSorted } from "@qwik.dev/core"; |
| 51 | +import { useStore } from "@qwik.dev/core"; |
| 52 | +export const test_component_LUXeXe0DQrg = ()=>{ |
| 53 | + const panelStore = useStore(()=>({ |
| 54 | + active: 'Input', |
| 55 | + list: PANELS |
| 56 | + })); |
| 57 | + return /*#__PURE__*/ _jsxSorted("div", { |
| 58 | + class: { |
| 59 | + 'too-long-to-wrap': true, |
| 60 | + 'examples-panel-input': panelStore.active === 'Input', |
| 61 | + 'examples-panel-output': panelStore.active === 'Output', |
| 62 | + 'examples-panel-console': panelStore.active === 'Console' |
| 63 | + } |
| 64 | + }, { |
| 65 | + stuff: _fnSignal((p0)=>p0.active ? 'yes' : 'no', [ |
| 66 | + panelStore |
| 67 | + ], 'p0.active?"yes":"no"') |
| 68 | + }, null, 3, "u6_0"); |
| 69 | +}; |
| 70 | + |
| 71 | + |
| 72 | +Some("{\"version\":3,\"sources\":[\"/user/qwik/src/test.tsx\"],\"names\":[],\"mappings\":\";;;;0CAG4B;IACzB,MAAM,aAAa,SAAS,IAAM,CAAC;YAClC,QAAQ;YACR,MAAM;QACP,CAAC;IAED,qBACC,WAAC;QAEA,OAAO;YACN,oBAAoB;YACpB,wBAAwB,WAAW,MAAM,KAAK;YAC9C,yBAAyB,WAAW,MAAM,KAAK;YAC/C,0BAA0B,WAAW,MAAM,KAAK;QACjD;;QANA,KAAK,kBAAE,GAAW,MAAM,GAAG,QAAQ;;;;AAStC\"}") |
| 73 | +/* |
| 74 | +{ |
| 75 | + "origin": "test.tsx", |
| 76 | + "name": "test_component_LUXeXe0DQrg", |
| 77 | + "entry": null, |
| 78 | + "displayName": "test.tsx_test_component", |
| 79 | + "hash": "LUXeXe0DQrg", |
| 80 | + "canonicalFilename": "test.tsx_test_component_LUXeXe0DQrg", |
| 81 | + "path": "", |
| 82 | + "extension": "js", |
| 83 | + "parent": null, |
| 84 | + "ctxKind": "function", |
| 85 | + "ctxName": "component$", |
| 86 | + "captures": false, |
| 87 | + "loc": [ |
| 88 | + 88, |
| 89 | + 510 |
| 90 | + ] |
| 91 | +} |
| 92 | +*/ |
| 93 | +== DIAGNOSTICS == |
| 94 | + |
| 95 | +[] |
0 commit comments