ventureinkorea-embed 1.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dobestan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,218 @@
1
+ # ventureinkorea-embed
2
+
3
+ [![npm](https://img.shields.io/npm/v/ventureinkorea-embed)](https://www.npmjs.com/package/ventureinkorea-embed)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ [![Zero Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)](https://www.npmjs.com/package/ventureinkorea-embed)
6
+
7
+ Embeddable widgets for [VentureInKorea](https://ventureinkorea.com) — the Korean venture startup database. Display certified venture companies, startup glossary terms, search, and guides on any website with a single script tag.
8
+
9
+ VentureInKorea tracks Korean government-certified venture companies (벤처인증기업), startup ecosystem terminology, and guides for entrepreneurs navigating the Korean startup landscape. The embed widgets bring this data to any website with zero dependencies, Shadow DOM isolation, and automatic dark mode support.
10
+
11
+ > **Try the live widgets at [widget.ventureinkorea.com](https://widget.ventureinkorea.com)**
12
+
13
+ ## Table of Contents
14
+
15
+ - [Install](#install)
16
+ - [Quick Start](#quick-start)
17
+ - [Widget Types](#widget-types)
18
+ - [Venture Card](#venture-card)
19
+ - [Glossary Term](#glossary-term)
20
+ - [Search](#search)
21
+ - [Guide Card](#guide-card)
22
+ - [Themes & Styles](#themes--styles)
23
+ - [Widget Options](#widget-options)
24
+ - [Korean Venture Ecosystem](#korean-venture-ecosystem)
25
+ - [CDN Options](#cdn-options)
26
+ - [License](#license)
27
+
28
+ ## Install
29
+
30
+ **CDN (recommended):**
31
+
32
+ ```html
33
+ <script src="https://cdn.jsdelivr.net/npm/ventureinkorea-embed@1/dist/embed.min.js"></script>
34
+ ```
35
+
36
+ **npm:**
37
+
38
+ ```bash
39
+ npm install ventureinkorea-embed
40
+ ```
41
+
42
+ ## Quick Start
43
+
44
+ Add the script tag to your HTML, then use `data-ventureinkorea` attributes to embed widgets:
45
+
46
+ ```html
47
+ <!-- Load the widget script -->
48
+ <script src="https://cdn.jsdelivr.net/npm/ventureinkorea-embed@1/dist/embed.min.js"></script>
49
+
50
+ <!-- Venture company card -->
51
+ <div data-ventureinkorea="entity" data-slug="example-venture"></div>
52
+
53
+ <!-- Startup glossary term -->
54
+ <div data-ventureinkorea="glossary" data-slug="venture-certification"></div>
55
+
56
+ <!-- Search box -->
57
+ <div data-ventureinkorea="search"></div>
58
+ ```
59
+
60
+ That's it. The script auto-initializes on DOM ready, observes dynamic elements via MutationObserver, and lazy-loads via IntersectionObserver.
61
+
62
+ ## Widget Types
63
+
64
+ ### Venture Card
65
+
66
+ Display a Korean certified venture company with certification badge, industry, and founding year.
67
+
68
+ ```html
69
+ <!-- Venture company card with dark theme -->
70
+ <div data-ventureinkorea="entity"
71
+ data-slug="kakao"
72
+ data-theme="dark"
73
+ data-size="default">
74
+ </div>
75
+ ```
76
+
77
+ **API:** `GET https://ventureinkorea.com/api/v1/ventures/{slug}/`
78
+
79
+ Shows: company name, certification type badge (벤처인증), industry tag, founded year, description excerpt, and link to full profile.
80
+
81
+ ### Glossary Term
82
+
83
+ Embed startup and venture ecosystem terminology with definitions. Automatically injects DefinedTerm JSON-LD rich snippets into the host page.
84
+
85
+ ```html
86
+ <!-- Glossary term card -->
87
+ <div data-ventureinkorea="glossary"
88
+ data-slug="tips-program"
89
+ data-theme="auto">
90
+ </div>
91
+ ```
92
+
93
+ **API:** `GET https://ventureinkorea.com/api/v1/glossary/{slug}/`
94
+
95
+ Rich snippet opt-out: add `data-no-snippet="true"` to disable JSON-LD injection.
96
+
97
+ ### Search
98
+
99
+ A search form that redirects users to VentureInKorea search results.
100
+
101
+ ```html
102
+ <!-- Search widget -->
103
+ <div data-ventureinkorea="search"
104
+ data-placeholder="Search Korean ventures..."
105
+ data-size="large">
106
+ </div>
107
+ ```
108
+
109
+ No API call required. Redirects to `https://ventureinkorea.com/search/?q={query}`.
110
+
111
+ ### Guide Card
112
+
113
+ Display blog posts and guides about Korean startup ecosystem.
114
+
115
+ ```html
116
+ <!-- Guide card -->
117
+ <div data-ventureinkorea="guide"
118
+ data-slug="venture-certification-process"
119
+ data-style-variant="minimal">
120
+ </div>
121
+ ```
122
+
123
+ **API:** `GET https://ventureinkorea.com/api/v1/guides/{slug}/`
124
+
125
+ ## Themes & Styles
126
+
127
+ ### 4 Themes
128
+
129
+ | Theme | Description |
130
+ |-------|-------------|
131
+ | `light` | White background, dark text |
132
+ | `dark` | Dark background, light text |
133
+ | `sepia` | Warm parchment tones |
134
+ | `auto` | Follows `prefers-color-scheme` (default) |
135
+
136
+ ### 3 Sizes
137
+
138
+ | Size | Max Width | Use Case |
139
+ |------|-----------|----------|
140
+ | `compact` | 280px | Sidebar, narrow columns |
141
+ | `default` | 420px | Standard embedding |
142
+ | `large` | 720px | Full-width sections |
143
+
144
+ ### 2 Styles
145
+
146
+ | Style | Description |
147
+ |-------|-------------|
148
+ | `modern` | Elevated card with accent header bar (default) |
149
+ | `minimal` | Flat, thin borders, transparent backgrounds |
150
+
151
+ ## Widget Options
152
+
153
+ All options are set via `data-*` attributes on the widget container element.
154
+
155
+ | Attribute | Values | Default | Description |
156
+ |-----------|--------|---------|-------------|
157
+ | `data-ventureinkorea` | `entity`, `glossary`, `search`, `guide` | (required) | Widget type |
158
+ | `data-slug` | string | (required*) | Entity/term/guide slug |
159
+ | `data-theme` | `light`, `dark`, `sepia`, `auto` | `auto` | Color theme |
160
+ | `data-size` | `compact`, `default`, `large` | `default` | Widget width |
161
+ | `data-style-variant` | `modern`, `minimal` | `modern` | Visual style |
162
+ | `data-placeholder` | string | `Search Korean ventures...` | Search placeholder text |
163
+ | `data-no-snippet` | `true` | `false` | Disable JSON-LD injection |
164
+
165
+ *`data-slug` is not required for the search widget.
166
+
167
+ ## Korean Venture Ecosystem
168
+
169
+ ### Venture Certification (벤처인증)
170
+
171
+ The Korean government's venture certification system (벤처기업확인제도) identifies innovative startups eligible for tax benefits, R&D funding, and preferential government procurement. Companies must meet criteria in technology innovation, R&D investment, or venture capital backing.
172
+
173
+ ### Key Programs
174
+
175
+ | Program | Operator | Focus |
176
+ |---------|----------|-------|
177
+ | **TIPS** (Tech Incubator Program for Startup) | KISED | Pre-Series A, up to 500M KRW |
178
+ | **K-Startup Grand Challenge** | NIPA | Foreign startups entering Korea |
179
+ | **Born2Global** | Born2Global Centre | Korean startups going global |
180
+ | **DCAMP** (D.Camp) | Banks Foundation | Fintech and digital innovation |
181
+ | **SparkLabs** | SparkLabs Group | Accelerator with global network |
182
+
183
+ ### Certification Types
184
+
185
+ | Type | Korean | Description |
186
+ |------|--------|-------------|
187
+ | Venture Capital-backed | 벤처투자기업 | VC investment ≥ 10% of capital |
188
+ | R&D Enterprise | 연구개발기업 | R&D spending ≥ 5% of revenue |
189
+ | Technology Innovation | 기술혁신기업 | Patent/IP commercialization |
190
+ | Pre-venture | 예비벤처기업 | Pre-revenue technology startup |
191
+
192
+ ### Government Bodies
193
+
194
+ - **KISED** (창업진흥원): Korea Institute of Startup & Entrepreneurship Development
195
+ - **MSS** (중소벤처기업부): Ministry of SMEs and Startups
196
+ - **KVCA** (한국벤처캐피털협회): Korea Venture Capital Association
197
+
198
+ ## CDN Options
199
+
200
+ | CDN | URL |
201
+ |-----|-----|
202
+ | **jsDelivr** (recommended) | `https://cdn.jsdelivr.net/npm/ventureinkorea-embed@1/dist/embed.min.js` |
203
+ | **unpkg** | `https://unpkg.com/ventureinkorea-embed@1/dist/embed.min.js` |
204
+
205
+ ## Features
206
+
207
+ - **Zero dependencies** — no external libraries required
208
+ - **Shadow DOM** — complete CSS isolation from host page
209
+ - **Auto dark mode** — follows `prefers-color-scheme` with real-time `matchMedia` listener
210
+ - **IntersectionObserver** — lazy-loads widgets when they enter viewport
211
+ - **MutationObserver** — auto-detects dynamically added widget elements (SPA support)
212
+ - **sessionStorage caching** — 5-minute API response cache, reduces network requests
213
+ - **Rich snippets** — glossary widgets inject DefinedTerm JSON-LD into host page
214
+ - **< 10KB gzipped** — minimal bundle size
215
+
216
+ ## License
217
+
218
+ MIT
@@ -0,0 +1,314 @@
1
+ var $="ventureinkorea_embed_";function D(e){try{let t=sessionStorage.getItem($+e);if(!t)return null;let r=JSON.parse(t);return Date.now()-r.ts>3e5?(sessionStorage.removeItem($+e),null):r.data}catch{return null}}function O(e,t){try{let r={data:t,ts:Date.now()};sessionStorage.setItem($+e,JSON.stringify(r))}catch{}}async function x(e,t){let r=t,n=D(r);if(n)return n;let a=e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""),i=await fetch(a,{headers:{Accept:"application/json"}});if(!i.ok)throw new Error(`API error ${i.status}: ${a}`);let s=await i.json();return O(r,s),s}var u={site:"ventureinkorea",name:"VentureInKorea",domain:"ventureinkorea.com",accent:"#2563EB",attribute:"data-ventureinkorea",apiBase:"https://ventureinkorea.com/api/v1/",searchPath:"/search/",entityName:"Ventures",entitySlug:"ventures"};var l=`
2
+ /* ========== Reset ========== */
3
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
4
+ a { color: inherit; text-decoration: none; }
5
+
6
+ /* ========== Themes ========== */
7
+ .ventureinkorea-widget[data-theme="light"] {
8
+ --bg: #ffffff;
9
+ --text: #1e293b;
10
+ --text-muted: #64748b;
11
+ --border: #e2e8f0;
12
+ --surface: #f8fafc;
13
+ --accent: #2563EB;
14
+ --accent-light: #dbeafe;
15
+ --accent-text: #1e40af;
16
+ }
17
+ .ventureinkorea-widget[data-theme="dark"] {
18
+ --bg: #1a1a2e;
19
+ --text: #f3f4f6;
20
+ --text-muted: #9ca3af;
21
+ --border: #374151;
22
+ --surface: #111827;
23
+ --accent: #3b82f6;
24
+ --accent-light: #1e3a5f;
25
+ --accent-text: #93c5fd;
26
+ }
27
+ .ventureinkorea-widget[data-theme="sepia"] {
28
+ --bg: #f5f0e8;
29
+ --text: #3d3529;
30
+ --text-muted: #8b7d6b;
31
+ --border: #d4c5a9;
32
+ --surface: #ede8df;
33
+ --accent: #2563EB;
34
+ --accent-light: #d6cfc4;
35
+ --accent-text: #1e40af;
36
+ }
37
+
38
+ /* ========== Base widget ========== */
39
+ .ventureinkorea-widget {
40
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
41
+ font-size: 14px;
42
+ line-height: 1.5;
43
+ color: var(--text);
44
+ background: var(--bg);
45
+ border: 1px solid var(--border);
46
+ border-radius: 8px;
47
+ overflow: hidden;
48
+ }
49
+
50
+ /* ========== Sizes ========== */
51
+ .ventureinkorea-widget[data-size="compact"] { max-width: 280px; font-size: 13px; }
52
+ .ventureinkorea-widget[data-size="default"] { max-width: 420px; }
53
+ .ventureinkorea-widget[data-size="large"] { max-width: 720px; }
54
+
55
+ /* ========== Loading ========== */
56
+ .ventureinkorea-loading {
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ padding: 32px;
61
+ }
62
+ .ventureinkorea-spinner {
63
+ width: 24px;
64
+ height: 24px;
65
+ border: 3px solid var(--border);
66
+ border-top-color: var(--accent);
67
+ border-radius: 50%;
68
+ animation: ventureinkorea-spin 0.8s linear infinite;
69
+ }
70
+ @keyframes ventureinkorea-spin {
71
+ to { transform: rotate(360deg); }
72
+ }
73
+
74
+ /* ========== Error ========== */
75
+ .ventureinkorea-error {
76
+ padding: 16px;
77
+ color: #dc2626;
78
+ font-size: 13px;
79
+ text-align: center;
80
+ }
81
+
82
+ /* ========== Powered by ========== */
83
+ .ventureinkorea-powered {
84
+ padding: 8px 16px;
85
+ font-size: 11px;
86
+ color: var(--text-muted);
87
+ text-align: right;
88
+ border-top: 1px solid var(--border);
89
+ background: var(--surface);
90
+ }
91
+ .ventureinkorea-powered a {
92
+ color: var(--accent);
93
+ text-decoration: underline;
94
+ }
95
+ .ventureinkorea-powered a:hover {
96
+ color: var(--accent-text);
97
+ }
98
+
99
+ /* ========== Card body ========== */
100
+ .ventureinkorea-body {
101
+ padding: 16px;
102
+ }
103
+ .ventureinkorea-widget[data-size="compact"] .ventureinkorea-body { padding: 12px; }
104
+ .ventureinkorea-widget[data-size="large"] .ventureinkorea-body { padding: 24px; }
105
+
106
+ /* ========== Title ========== */
107
+ .ventureinkorea-title {
108
+ font-size: 1.15em;
109
+ font-weight: 700;
110
+ color: var(--text);
111
+ margin-bottom: 4px;
112
+ }
113
+ .ventureinkorea-title a:hover { color: var(--accent); }
114
+
115
+ /* ========== Subtitle / meta ========== */
116
+ .ventureinkorea-meta {
117
+ font-size: 0.85em;
118
+ color: var(--text-muted);
119
+ margin-bottom: 8px;
120
+ }
121
+
122
+ /* ========== Description ========== */
123
+ .ventureinkorea-desc {
124
+ font-size: 0.92em;
125
+ color: var(--text);
126
+ margin-bottom: 12px;
127
+ }
128
+
129
+ /* ========== Badge ========== */
130
+ .ventureinkorea-badge {
131
+ display: inline-block;
132
+ font-size: 11px;
133
+ font-weight: 600;
134
+ padding: 2px 8px;
135
+ border-radius: 4px;
136
+ background: var(--accent-light);
137
+ color: var(--accent-text);
138
+ margin-right: 6px;
139
+ margin-bottom: 4px;
140
+ }
141
+
142
+ /* ========== Link ========== */
143
+ .ventureinkorea-link {
144
+ display: inline-flex;
145
+ align-items: center;
146
+ gap: 4px;
147
+ font-size: 0.85em;
148
+ font-weight: 600;
149
+ color: var(--accent);
150
+ }
151
+ .ventureinkorea-link:hover { text-decoration: underline; }
152
+ .ventureinkorea-link svg { flex-shrink: 0; }
153
+
154
+ /* ========== Header bar ========== */
155
+ .ventureinkorea-header {
156
+ padding: 10px 16px;
157
+ background: var(--surface);
158
+ border-bottom: 1px solid var(--border);
159
+ font-size: 0.8em;
160
+ font-weight: 600;
161
+ color: var(--text-muted);
162
+ text-transform: uppercase;
163
+ letter-spacing: 0.05em;
164
+ }
165
+
166
+ /* ========== Search ========== */
167
+ .ventureinkorea-search-form {
168
+ display: flex;
169
+ gap: 8px;
170
+ }
171
+ .ventureinkorea-search-input {
172
+ flex: 1;
173
+ padding: 8px 12px;
174
+ border: 1px solid var(--border);
175
+ border-radius: 6px;
176
+ background: var(--bg);
177
+ color: var(--text);
178
+ font-size: 14px;
179
+ outline: none;
180
+ }
181
+ .ventureinkorea-search-input:focus {
182
+ border-color: var(--accent);
183
+ box-shadow: 0 0 0 2px var(--accent-light);
184
+ }
185
+ .ventureinkorea-search-btn {
186
+ padding: 8px 16px;
187
+ border: none;
188
+ border-radius: 6px;
189
+ background: var(--accent);
190
+ color: #fff;
191
+ font-weight: 600;
192
+ cursor: pointer;
193
+ }
194
+ .ventureinkorea-search-btn:hover { opacity: 0.9; }
195
+
196
+ /* ========== Copy button ========== */
197
+ .ventureinkorea-copy-btn {
198
+ display: inline-flex;
199
+ align-items: center;
200
+ gap: 4px;
201
+ padding: 4px 8px;
202
+ border: 1px solid var(--border);
203
+ border-radius: 4px;
204
+ background: var(--surface);
205
+ color: var(--text-muted);
206
+ font-size: 12px;
207
+ cursor: pointer;
208
+ }
209
+ .ventureinkorea-copy-btn:hover {
210
+ border-color: var(--accent);
211
+ color: var(--accent);
212
+ }
213
+
214
+ /* ========== Tags row ========== */
215
+ .ventureinkorea-tags {
216
+ display: flex;
217
+ flex-wrap: wrap;
218
+ gap: 4px;
219
+ margin-bottom: 8px;
220
+ }
221
+ `;var p=`
222
+ /* Modern style overrides */
223
+ .ventureinkorea-widget.ventureinkorea-style-modern {
224
+ box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
225
+ }
226
+ .ventureinkorea-style-modern .ventureinkorea-header {
227
+ border-bottom: 2px solid var(--accent);
228
+ }
229
+ .ventureinkorea-style-modern .ventureinkorea-title {
230
+ font-size: 1.2em;
231
+ }
232
+ .ventureinkorea-style-modern .ventureinkorea-badge {
233
+ border-radius: 12px;
234
+ padding: 2px 10px;
235
+ }
236
+ `;var g=`
237
+ /* Minimal style overrides */
238
+ .ventureinkorea-widget.ventureinkorea-style-minimal {
239
+ box-shadow: none;
240
+ border-radius: 4px;
241
+ }
242
+ .ventureinkorea-style-minimal .ventureinkorea-header {
243
+ background: transparent;
244
+ border-bottom: 1px solid var(--border);
245
+ padding: 8px 16px;
246
+ }
247
+ .ventureinkorea-style-minimal .ventureinkorea-badge {
248
+ background: transparent;
249
+ border: 1px solid var(--accent);
250
+ color: var(--accent);
251
+ }
252
+ .ventureinkorea-style-minimal .ventureinkorea-powered {
253
+ background: transparent;
254
+ }
255
+ `;var G={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function o(e){return e.replace(/[&<>"']/g,t=>G[t]??t)}function m(e){return e.attachShadow({mode:"open"})}function v(e,t,r,n){let a=document.createElement("style");a.textContent=t,e.appendChild(a);let i=document.createElement("div");return i.className="ventureinkorea-widget",i.setAttribute("data-theme",r),i.setAttribute("data-size",n),e.appendChild(i),i}function f(e){return e==="light"||e==="dark"||e==="sepia"?e:typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function h(e,t){if(t!=="auto"||typeof window>"u")return;let r=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>{e.setAttribute("data-theme",r.matches?"dark":"light")};r.addEventListener("change",n)}function k(e){let t=e.getAttribute("data-theme")||"auto",r=e.getAttribute("data-size")||"default",n=e.getAttribute("data-style-variant")||"modern";return{theme:t,size:r,style:n}}function y(){return'<div class="ventureinkorea-loading"><div class="ventureinkorea-spinner"></div></div>'}function w(e){return`<div class="ventureinkorea-error">${o(e)}</div>`}function b(e){return`<div class="ventureinkorea-powered">Powered by <a href="https://${o(e)}" target="_blank" rel="noopener">${o(e)}</a></div>`}function S(){return'<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 1.5H10.5V8.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M10.5 1.5L1.5 10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'}function L(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="9" y="9" width="13" height="13" rx="2" stroke="currentColor" stroke-width="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" stroke="currentColor" stroke-width="2"/></svg>'}function C(e){e.querySelectorAll("[data-copy]").forEach(t=>{t.addEventListener("click",()=>{let r=t.getAttribute("data-copy")||"";navigator.clipboard.writeText(r).then(()=>{let n=t.innerHTML;t.innerHTML="&#10003;",setTimeout(()=>{t.innerHTML=n},1500)})})})}function P(e,t){let r=`https://${t}/ventures/${e.slug}/`,n=e.url||r,a="";e.certification_type&&(a+=`<span class="ventureinkorea-badge">${o(e.certification_type)}</span>`),e.industry&&(a+=`<span class="ventureinkorea-badge">${o(e.industry)}</span>`);let i=e.founded_year?`<span>Founded ${o(String(e.founded_year))}</span>`:"",s=e.description?`<div class="ventureinkorea-desc">${o(e.description.slice(0,200))}${e.description.length>200?"...":""}</div>`:"";return`
256
+ <div class="ventureinkorea-header">Venture</div>
257
+ <div class="ventureinkorea-body">
258
+ <div class="ventureinkorea-title">
259
+ <a href="${o(r)}" target="_blank" rel="noopener">${o(e.name)}</a>
260
+ </div>
261
+ <div class="ventureinkorea-tags">${a}</div>
262
+ <div class="ventureinkorea-meta">${i}</div>
263
+ ${s}
264
+ <a class="ventureinkorea-link" href="${o(n)}" target="_blank" rel="noopener">
265
+ View details ${S()}
266
+ </a>
267
+ </div>
268
+ ${b(t)}
269
+ `}function E(){let e=u.attribute;document.querySelectorAll(`[${e}="entity"]`).forEach(async t=>{let r=t.getAttribute("data-slug");if(!r)return;let n=k(t),a=f(n.theme),i=l+p+g,s=m(t),d=v(s,i,a,n.size);d.classList.add(`ventureinkorea-style-${n.style}`),h(d,n.theme),d.innerHTML=y();try{let c=await x(u.apiBase,`ventures/${r}/`);d.innerHTML=P(c,u.domain)}catch(c){d.innerHTML=w(c instanceof Error?c.message:"Failed to load venture")}})}var M="data-ventureinkorea-snippet",H=new Set;function A(e,t,r){if(typeof document>"u"||document.querySelector(`[${M}]`)?.getAttribute("data-no-snippet")==="true")return;let a=`term:${e}`;if(H.has(a))return;H.add(a);let i={"@context":"https://schema.org","@type":"DefinedTerm",name:e,description:t,url:r,inDefinedTermSet:{"@type":"DefinedTermSet",name:"VentureInKorea Glossary",url:"https://ventureinkorea.com/glossary/"}},s=document.createElement("script");s.type="application/ld+json",s.setAttribute(M,"true"),s.textContent=JSON.stringify(i),document.head.appendChild(s)}function R(e,t){let r=e.url||`https://${t}/glossary/${e.slug}/`;return`
270
+ <div class="ventureinkorea-header">Glossary</div>
271
+ <div class="ventureinkorea-body">
272
+ <div class="ventureinkorea-title">
273
+ <a href="${o(r)}" target="_blank" rel="noopener">${o(e.term)}</a>
274
+ </div>
275
+ <div class="ventureinkorea-desc">${o(e.definition)}</div>
276
+ <div style="display:flex;align-items:center;gap:8px;">
277
+ <a class="ventureinkorea-link" href="${o(r)}" target="_blank" rel="noopener">
278
+ Learn more ${S()}
279
+ </a>
280
+ <button class="ventureinkorea-copy-btn" data-copy="${o(e.definition)}" title="Copy definition">
281
+ ${L()}
282
+ </button>
283
+ </div>
284
+ </div>
285
+ ${b(t)}
286
+ `}function z(){let e=u.attribute;document.querySelectorAll(`[${e}="glossary"]`).forEach(async t=>{let r=t.getAttribute("data-slug");if(!r)return;let n=k(t),a=f(n.theme),i=l+p+g,s=m(t),d=v(s,i,a,n.size);d.classList.add(`ventureinkorea-style-${n.style}`),h(d,n.theme),d.innerHTML=y();try{let c=await x(u.apiBase,`glossary/${r}/`);d.innerHTML=R(c,u.domain),C(s);let B=c.url||`https://${u.domain}/glossary/${c.slug}/`;t.getAttribute("data-no-snippet")!=="true"&&A(c.term,c.definition,B)}catch(c){d.innerHTML=w(c instanceof Error?c.message:"Failed to load term")}})}function q(e,t,r){return`
287
+ <div class="ventureinkorea-header">Search</div>
288
+ <div class="ventureinkorea-body">
289
+ <form class="ventureinkorea-search-form" action="https://${o(e)}${o(t)}" method="get" target="_blank">
290
+ <input
291
+ class="ventureinkorea-search-input"
292
+ type="text"
293
+ name="q"
294
+ placeholder="${o(r)}"
295
+ autocomplete="off"
296
+ required
297
+ />
298
+ <button class="ventureinkorea-search-btn" type="submit">Search</button>
299
+ </form>
300
+ </div>
301
+ ${b(e)}
302
+ `}function I(){let e=u.attribute;document.querySelectorAll(`[${e}="search"]`).forEach(t=>{let r=k(t),n=f(r.theme),a=l+p+g,i=m(t),s=v(i,a,n,r.size);s.classList.add(`ventureinkorea-style-${r.style}`),h(s,r.theme);let d=t.getAttribute("data-placeholder")||"Search Korean ventures...";s.innerHTML=q(u.domain,u.searchPath,d)})}function V(e,t){let r=e.url||`https://${t}/guides/${e.slug}/`,n=e.description?`<div class="ventureinkorea-desc">${o(e.description.slice(0,250))}${e.description.length>250?"...":""}</div>`:"";return`
303
+ <div class="ventureinkorea-header">Guide</div>
304
+ <div class="ventureinkorea-body">
305
+ <div class="ventureinkorea-title">
306
+ <a href="${o(r)}" target="_blank" rel="noopener">${o(e.title)}</a>
307
+ </div>
308
+ ${n}
309
+ <a class="ventureinkorea-link" href="${o(r)}" target="_blank" rel="noopener">
310
+ Read guide ${S()}
311
+ </a>
312
+ </div>
313
+ ${b(t)}
314
+ `}function _(){let e=u.attribute;document.querySelectorAll(`[${e}="guide"]`).forEach(async t=>{let r=t.getAttribute("data-slug");if(!r)return;let n=k(t),a=f(n.theme),i=l+p+g,s=m(t),d=v(s,i,a,n.size);d.classList.add(`ventureinkorea-style-${n.style}`),h(d,n.theme),d.innerHTML=y();try{let c=await x(u.apiBase,`guides/${r}/`);d.innerHTML=V(c,u.domain)}catch(c){d.innerHTML=w(c instanceof Error?c.message:"Failed to load guide")}})}function T(){E(),z(),I(),_()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",T):T();typeof MutationObserver<"u"&&new MutationObserver(t=>{for(let r of t)if(r.addedNodes.length){T();break}}).observe(document.body,{childList:!0,subtree:!0});if(typeof IntersectionObserver<"u"){let e=new IntersectionObserver(t=>{for(let r of t)r.isIntersecting&&(e.unobserve(r.target),T())});document.querySelectorAll("[data-ventureinkorea]").forEach(t=>e.observe(t))}export{E as initEntity,z as initGlossary,_ as initGuide,I as initSearch};
@@ -0,0 +1,314 @@
1
+ "use strict";var VentureInKoreaEmbed=(()=>{var $=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var R=(e,t)=>{for(var r in t)$(e,r,{get:t[r],enumerable:!0})},q=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of G(t))!P.call(e,o)&&o!==r&&$(e,o,{get:()=>t[o],enumerable:!(n=O(t,o))||n.enumerable});return e};var V=e=>q($({},"__esModule",{value:!0}),e);var X={};R(X,{initEntity:()=>C,initGlossary:()=>E,initGuide:()=>H,initSearch:()=>M});var L="ventureinkorea_embed_";function W(e){try{let t=sessionStorage.getItem(L+e);if(!t)return null;let r=JSON.parse(t);return Date.now()-r.ts>3e5?(sessionStorage.removeItem(L+e),null):r.data}catch{return null}}function j(e,t){try{let r={data:t,ts:Date.now()};sessionStorage.setItem(L+e,JSON.stringify(r))}catch{}}async function x(e,t){let r=t,n=W(r);if(n)return n;let o=e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""),a=await fetch(o,{headers:{Accept:"application/json"}});if(!a.ok)throw new Error(`API error ${a.status}: ${o}`);let s=await a.json();return j(r,s),s}var u={site:"ventureinkorea",name:"VentureInKorea",domain:"ventureinkorea.com",accent:"#2563EB",attribute:"data-ventureinkorea",apiBase:"https://ventureinkorea.com/api/v1/",searchPath:"/search/",entityName:"Ventures",entitySlug:"ventures"};var l=`
2
+ /* ========== Reset ========== */
3
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
4
+ a { color: inherit; text-decoration: none; }
5
+
6
+ /* ========== Themes ========== */
7
+ .ventureinkorea-widget[data-theme="light"] {
8
+ --bg: #ffffff;
9
+ --text: #1e293b;
10
+ --text-muted: #64748b;
11
+ --border: #e2e8f0;
12
+ --surface: #f8fafc;
13
+ --accent: #2563EB;
14
+ --accent-light: #dbeafe;
15
+ --accent-text: #1e40af;
16
+ }
17
+ .ventureinkorea-widget[data-theme="dark"] {
18
+ --bg: #1a1a2e;
19
+ --text: #f3f4f6;
20
+ --text-muted: #9ca3af;
21
+ --border: #374151;
22
+ --surface: #111827;
23
+ --accent: #3b82f6;
24
+ --accent-light: #1e3a5f;
25
+ --accent-text: #93c5fd;
26
+ }
27
+ .ventureinkorea-widget[data-theme="sepia"] {
28
+ --bg: #f5f0e8;
29
+ --text: #3d3529;
30
+ --text-muted: #8b7d6b;
31
+ --border: #d4c5a9;
32
+ --surface: #ede8df;
33
+ --accent: #2563EB;
34
+ --accent-light: #d6cfc4;
35
+ --accent-text: #1e40af;
36
+ }
37
+
38
+ /* ========== Base widget ========== */
39
+ .ventureinkorea-widget {
40
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
41
+ font-size: 14px;
42
+ line-height: 1.5;
43
+ color: var(--text);
44
+ background: var(--bg);
45
+ border: 1px solid var(--border);
46
+ border-radius: 8px;
47
+ overflow: hidden;
48
+ }
49
+
50
+ /* ========== Sizes ========== */
51
+ .ventureinkorea-widget[data-size="compact"] { max-width: 280px; font-size: 13px; }
52
+ .ventureinkorea-widget[data-size="default"] { max-width: 420px; }
53
+ .ventureinkorea-widget[data-size="large"] { max-width: 720px; }
54
+
55
+ /* ========== Loading ========== */
56
+ .ventureinkorea-loading {
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ padding: 32px;
61
+ }
62
+ .ventureinkorea-spinner {
63
+ width: 24px;
64
+ height: 24px;
65
+ border: 3px solid var(--border);
66
+ border-top-color: var(--accent);
67
+ border-radius: 50%;
68
+ animation: ventureinkorea-spin 0.8s linear infinite;
69
+ }
70
+ @keyframes ventureinkorea-spin {
71
+ to { transform: rotate(360deg); }
72
+ }
73
+
74
+ /* ========== Error ========== */
75
+ .ventureinkorea-error {
76
+ padding: 16px;
77
+ color: #dc2626;
78
+ font-size: 13px;
79
+ text-align: center;
80
+ }
81
+
82
+ /* ========== Powered by ========== */
83
+ .ventureinkorea-powered {
84
+ padding: 8px 16px;
85
+ font-size: 11px;
86
+ color: var(--text-muted);
87
+ text-align: right;
88
+ border-top: 1px solid var(--border);
89
+ background: var(--surface);
90
+ }
91
+ .ventureinkorea-powered a {
92
+ color: var(--accent);
93
+ text-decoration: underline;
94
+ }
95
+ .ventureinkorea-powered a:hover {
96
+ color: var(--accent-text);
97
+ }
98
+
99
+ /* ========== Card body ========== */
100
+ .ventureinkorea-body {
101
+ padding: 16px;
102
+ }
103
+ .ventureinkorea-widget[data-size="compact"] .ventureinkorea-body { padding: 12px; }
104
+ .ventureinkorea-widget[data-size="large"] .ventureinkorea-body { padding: 24px; }
105
+
106
+ /* ========== Title ========== */
107
+ .ventureinkorea-title {
108
+ font-size: 1.15em;
109
+ font-weight: 700;
110
+ color: var(--text);
111
+ margin-bottom: 4px;
112
+ }
113
+ .ventureinkorea-title a:hover { color: var(--accent); }
114
+
115
+ /* ========== Subtitle / meta ========== */
116
+ .ventureinkorea-meta {
117
+ font-size: 0.85em;
118
+ color: var(--text-muted);
119
+ margin-bottom: 8px;
120
+ }
121
+
122
+ /* ========== Description ========== */
123
+ .ventureinkorea-desc {
124
+ font-size: 0.92em;
125
+ color: var(--text);
126
+ margin-bottom: 12px;
127
+ }
128
+
129
+ /* ========== Badge ========== */
130
+ .ventureinkorea-badge {
131
+ display: inline-block;
132
+ font-size: 11px;
133
+ font-weight: 600;
134
+ padding: 2px 8px;
135
+ border-radius: 4px;
136
+ background: var(--accent-light);
137
+ color: var(--accent-text);
138
+ margin-right: 6px;
139
+ margin-bottom: 4px;
140
+ }
141
+
142
+ /* ========== Link ========== */
143
+ .ventureinkorea-link {
144
+ display: inline-flex;
145
+ align-items: center;
146
+ gap: 4px;
147
+ font-size: 0.85em;
148
+ font-weight: 600;
149
+ color: var(--accent);
150
+ }
151
+ .ventureinkorea-link:hover { text-decoration: underline; }
152
+ .ventureinkorea-link svg { flex-shrink: 0; }
153
+
154
+ /* ========== Header bar ========== */
155
+ .ventureinkorea-header {
156
+ padding: 10px 16px;
157
+ background: var(--surface);
158
+ border-bottom: 1px solid var(--border);
159
+ font-size: 0.8em;
160
+ font-weight: 600;
161
+ color: var(--text-muted);
162
+ text-transform: uppercase;
163
+ letter-spacing: 0.05em;
164
+ }
165
+
166
+ /* ========== Search ========== */
167
+ .ventureinkorea-search-form {
168
+ display: flex;
169
+ gap: 8px;
170
+ }
171
+ .ventureinkorea-search-input {
172
+ flex: 1;
173
+ padding: 8px 12px;
174
+ border: 1px solid var(--border);
175
+ border-radius: 6px;
176
+ background: var(--bg);
177
+ color: var(--text);
178
+ font-size: 14px;
179
+ outline: none;
180
+ }
181
+ .ventureinkorea-search-input:focus {
182
+ border-color: var(--accent);
183
+ box-shadow: 0 0 0 2px var(--accent-light);
184
+ }
185
+ .ventureinkorea-search-btn {
186
+ padding: 8px 16px;
187
+ border: none;
188
+ border-radius: 6px;
189
+ background: var(--accent);
190
+ color: #fff;
191
+ font-weight: 600;
192
+ cursor: pointer;
193
+ }
194
+ .ventureinkorea-search-btn:hover { opacity: 0.9; }
195
+
196
+ /* ========== Copy button ========== */
197
+ .ventureinkorea-copy-btn {
198
+ display: inline-flex;
199
+ align-items: center;
200
+ gap: 4px;
201
+ padding: 4px 8px;
202
+ border: 1px solid var(--border);
203
+ border-radius: 4px;
204
+ background: var(--surface);
205
+ color: var(--text-muted);
206
+ font-size: 12px;
207
+ cursor: pointer;
208
+ }
209
+ .ventureinkorea-copy-btn:hover {
210
+ border-color: var(--accent);
211
+ color: var(--accent);
212
+ }
213
+
214
+ /* ========== Tags row ========== */
215
+ .ventureinkorea-tags {
216
+ display: flex;
217
+ flex-wrap: wrap;
218
+ gap: 4px;
219
+ margin-bottom: 8px;
220
+ }
221
+ `;var p=`
222
+ /* Modern style overrides */
223
+ .ventureinkorea-widget.ventureinkorea-style-modern {
224
+ box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
225
+ }
226
+ .ventureinkorea-style-modern .ventureinkorea-header {
227
+ border-bottom: 2px solid var(--accent);
228
+ }
229
+ .ventureinkorea-style-modern .ventureinkorea-title {
230
+ font-size: 1.2em;
231
+ }
232
+ .ventureinkorea-style-modern .ventureinkorea-badge {
233
+ border-radius: 12px;
234
+ padding: 2px 10px;
235
+ }
236
+ `;var g=`
237
+ /* Minimal style overrides */
238
+ .ventureinkorea-widget.ventureinkorea-style-minimal {
239
+ box-shadow: none;
240
+ border-radius: 4px;
241
+ }
242
+ .ventureinkorea-style-minimal .ventureinkorea-header {
243
+ background: transparent;
244
+ border-bottom: 1px solid var(--border);
245
+ padding: 8px 16px;
246
+ }
247
+ .ventureinkorea-style-minimal .ventureinkorea-badge {
248
+ background: transparent;
249
+ border: 1px solid var(--accent);
250
+ color: var(--accent);
251
+ }
252
+ .ventureinkorea-style-minimal .ventureinkorea-powered {
253
+ background: transparent;
254
+ }
255
+ `;var N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function i(e){return e.replace(/[&<>"']/g,t=>N[t]??t)}function m(e){return e.attachShadow({mode:"open"})}function v(e,t,r,n){let o=document.createElement("style");o.textContent=t,e.appendChild(o);let a=document.createElement("div");return a.className="ventureinkorea-widget",a.setAttribute("data-theme",r),a.setAttribute("data-size",n),e.appendChild(a),a}function f(e){return e==="light"||e==="dark"||e==="sepia"?e:typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function h(e,t){if(t!=="auto"||typeof window>"u")return;let r=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>{e.setAttribute("data-theme",r.matches?"dark":"light")};r.addEventListener("change",n)}function k(e){let t=e.getAttribute("data-theme")||"auto",r=e.getAttribute("data-size")||"default",n=e.getAttribute("data-style-variant")||"modern";return{theme:t,size:r,style:n}}function y(){return'<div class="ventureinkorea-loading"><div class="ventureinkorea-spinner"></div></div>'}function w(e){return`<div class="ventureinkorea-error">${i(e)}</div>`}function b(e){return`<div class="ventureinkorea-powered">Powered by <a href="https://${i(e)}" target="_blank" rel="noopener">${i(e)}</a></div>`}function S(){return'<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 1.5H10.5V8.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M10.5 1.5L1.5 10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'}function A(){return'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="9" y="9" width="13" height="13" rx="2" stroke="currentColor" stroke-width="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" stroke="currentColor" stroke-width="2"/></svg>'}function z(e){e.querySelectorAll("[data-copy]").forEach(t=>{t.addEventListener("click",()=>{let r=t.getAttribute("data-copy")||"";navigator.clipboard.writeText(r).then(()=>{let n=t.innerHTML;t.innerHTML="&#10003;",setTimeout(()=>{t.innerHTML=n},1500)})})})}function U(e,t){let r=`https://${t}/ventures/${e.slug}/`,n=e.url||r,o="";e.certification_type&&(o+=`<span class="ventureinkorea-badge">${i(e.certification_type)}</span>`),e.industry&&(o+=`<span class="ventureinkorea-badge">${i(e.industry)}</span>`);let a=e.founded_year?`<span>Founded ${i(String(e.founded_year))}</span>`:"",s=e.description?`<div class="ventureinkorea-desc">${i(e.description.slice(0,200))}${e.description.length>200?"...":""}</div>`:"";return`
256
+ <div class="ventureinkorea-header">Venture</div>
257
+ <div class="ventureinkorea-body">
258
+ <div class="ventureinkorea-title">
259
+ <a href="${i(r)}" target="_blank" rel="noopener">${i(e.name)}</a>
260
+ </div>
261
+ <div class="ventureinkorea-tags">${o}</div>
262
+ <div class="ventureinkorea-meta">${a}</div>
263
+ ${s}
264
+ <a class="ventureinkorea-link" href="${i(n)}" target="_blank" rel="noopener">
265
+ View details ${S()}
266
+ </a>
267
+ </div>
268
+ ${b(t)}
269
+ `}function C(){let e=u.attribute;document.querySelectorAll(`[${e}="entity"]`).forEach(async t=>{let r=t.getAttribute("data-slug");if(!r)return;let n=k(t),o=f(n.theme),a=l+p+g,s=m(t),d=v(s,a,o,n.size);d.classList.add(`ventureinkorea-style-${n.style}`),h(d,n.theme),d.innerHTML=y();try{let c=await x(u.apiBase,`ventures/${r}/`);d.innerHTML=U(c,u.domain)}catch(c){d.innerHTML=w(c instanceof Error?c.message:"Failed to load venture")}})}var I="data-ventureinkorea-snippet",_=new Set;function B(e,t,r){if(typeof document>"u"||document.querySelector(`[${I}]`)?.getAttribute("data-no-snippet")==="true")return;let o=`term:${e}`;if(_.has(o))return;_.add(o);let a={"@context":"https://schema.org","@type":"DefinedTerm",name:e,description:t,url:r,inDefinedTermSet:{"@type":"DefinedTermSet",name:"VentureInKorea Glossary",url:"https://ventureinkorea.com/glossary/"}},s=document.createElement("script");s.type="application/ld+json",s.setAttribute(I,"true"),s.textContent=JSON.stringify(a),document.head.appendChild(s)}function F(e,t){let r=e.url||`https://${t}/glossary/${e.slug}/`;return`
270
+ <div class="ventureinkorea-header">Glossary</div>
271
+ <div class="ventureinkorea-body">
272
+ <div class="ventureinkorea-title">
273
+ <a href="${i(r)}" target="_blank" rel="noopener">${i(e.term)}</a>
274
+ </div>
275
+ <div class="ventureinkorea-desc">${i(e.definition)}</div>
276
+ <div style="display:flex;align-items:center;gap:8px;">
277
+ <a class="ventureinkorea-link" href="${i(r)}" target="_blank" rel="noopener">
278
+ Learn more ${S()}
279
+ </a>
280
+ <button class="ventureinkorea-copy-btn" data-copy="${i(e.definition)}" title="Copy definition">
281
+ ${A()}
282
+ </button>
283
+ </div>
284
+ </div>
285
+ ${b(t)}
286
+ `}function E(){let e=u.attribute;document.querySelectorAll(`[${e}="glossary"]`).forEach(async t=>{let r=t.getAttribute("data-slug");if(!r)return;let n=k(t),o=f(n.theme),a=l+p+g,s=m(t),d=v(s,a,o,n.size);d.classList.add(`ventureinkorea-style-${n.style}`),h(d,n.theme),d.innerHTML=y();try{let c=await x(u.apiBase,`glossary/${r}/`);d.innerHTML=F(c,u.domain),z(s);let D=c.url||`https://${u.domain}/glossary/${c.slug}/`;t.getAttribute("data-no-snippet")!=="true"&&B(c.term,c.definition,D)}catch(c){d.innerHTML=w(c instanceof Error?c.message:"Failed to load term")}})}function K(e,t,r){return`
287
+ <div class="ventureinkorea-header">Search</div>
288
+ <div class="ventureinkorea-body">
289
+ <form class="ventureinkorea-search-form" action="https://${i(e)}${i(t)}" method="get" target="_blank">
290
+ <input
291
+ class="ventureinkorea-search-input"
292
+ type="text"
293
+ name="q"
294
+ placeholder="${i(r)}"
295
+ autocomplete="off"
296
+ required
297
+ />
298
+ <button class="ventureinkorea-search-btn" type="submit">Search</button>
299
+ </form>
300
+ </div>
301
+ ${b(e)}
302
+ `}function M(){let e=u.attribute;document.querySelectorAll(`[${e}="search"]`).forEach(t=>{let r=k(t),n=f(r.theme),o=l+p+g,a=m(t),s=v(a,o,n,r.size);s.classList.add(`ventureinkorea-style-${r.style}`),h(s,r.theme);let d=t.getAttribute("data-placeholder")||"Search Korean ventures...";s.innerHTML=K(u.domain,u.searchPath,d)})}function J(e,t){let r=e.url||`https://${t}/guides/${e.slug}/`,n=e.description?`<div class="ventureinkorea-desc">${i(e.description.slice(0,250))}${e.description.length>250?"...":""}</div>`:"";return`
303
+ <div class="ventureinkorea-header">Guide</div>
304
+ <div class="ventureinkorea-body">
305
+ <div class="ventureinkorea-title">
306
+ <a href="${i(r)}" target="_blank" rel="noopener">${i(e.title)}</a>
307
+ </div>
308
+ ${n}
309
+ <a class="ventureinkorea-link" href="${i(r)}" target="_blank" rel="noopener">
310
+ Read guide ${S()}
311
+ </a>
312
+ </div>
313
+ ${b(t)}
314
+ `}function H(){let e=u.attribute;document.querySelectorAll(`[${e}="guide"]`).forEach(async t=>{let r=t.getAttribute("data-slug");if(!r)return;let n=k(t),o=f(n.theme),a=l+p+g,s=m(t),d=v(s,a,o,n.size);d.classList.add(`ventureinkorea-style-${n.style}`),h(d,n.theme),d.innerHTML=y();try{let c=await x(u.apiBase,`guides/${r}/`);d.innerHTML=J(c,u.domain)}catch(c){d.innerHTML=w(c instanceof Error?c.message:"Failed to load guide")}})}function T(){C(),E(),M(),H()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",T):T();typeof MutationObserver<"u"&&new MutationObserver(t=>{for(let r of t)if(r.addedNodes.length){T();break}}).observe(document.body,{childList:!0,subtree:!0});if(typeof IntersectionObserver<"u"){let e=new IntersectionObserver(t=>{for(let r of t)r.isIntersecting&&(e.unobserve(r.target),T())});document.querySelectorAll("[data-ventureinkorea]").forEach(t=>e.observe(t))}return V(X);})();
@@ -0,0 +1,4 @@
1
+ export declare function initEntity(): void;
2
+ export declare function initGlossary(): void;
3
+ export declare function initSearch(): void;
4
+ export declare function initGuide(): void;
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "ventureinkorea-embed",
3
+ "version": "1.0.0",
4
+ "description": "Embeddable widgets for VentureInKorea — Korean venture startup database, glossary, and guides",
5
+ "main": "dist/embed.min.js",
6
+ "module": "dist/embed.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist/",
10
+ "README.md",
11
+ "LICENSE"
12
+ ],
13
+ "keywords": [
14
+ "ventureinkorea",
15
+ "korean-startups",
16
+ "venture-certification",
17
+ "embed-widget",
18
+ "startup-glossary",
19
+ "korean-ventures"
20
+ ],
21
+ "author": "dobestan",
22
+ "license": "MIT",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/dobestan/ventureinkorea-embed"
26
+ },
27
+ "homepage": "https://widget.ventureinkorea.com"
28
+ }