@refrakt-md/places 0.7.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/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +95 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -0
- package/dist/schema/event.d.ts +21 -0
- package/dist/schema/event.d.ts.map +1 -0
- package/dist/schema/event.js +11 -0
- package/dist/schema/event.js.map +1 -0
- package/dist/schema/itinerary.d.ts +58 -0
- package/dist/schema/itinerary.d.ts.map +1 -0
- package/dist/schema/itinerary.js +27 -0
- package/dist/schema/itinerary.js.map +1 -0
- package/dist/schema/map.d.ts +52 -0
- package/dist/schema/map.d.ts.map +1 -0
- package/dist/schema/map.js +25 -0
- package/dist/schema/map.js.map +1 -0
- package/dist/tags/event.d.ts +3 -0
- package/dist/tags/event.d.ts.map +1 -0
- package/dist/tags/event.js +79 -0
- package/dist/tags/event.js.map +1 -0
- package/dist/tags/itinerary.d.ts +5 -0
- package/dist/tags/itinerary.d.ts.map +1 -0
- package/dist/tags/itinerary.js +246 -0
- package/dist/tags/itinerary.js.map +1 -0
- package/dist/tags/map.d.ts +4 -0
- package/dist/tags/map.d.ts.map +1 -0
- package/dist/tags/map.js +256 -0
- package/dist/tags/map.js.map +1 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -0
- package/package.json +30 -0
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA6F7C,CAAC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { isTag, readMeta } from '@refrakt-md/transform';
|
|
2
|
+
export const config = {
|
|
3
|
+
Event: {
|
|
4
|
+
block: 'event',
|
|
5
|
+
contentWrapper: { tag: 'div', ref: 'content' },
|
|
6
|
+
modifiers: {
|
|
7
|
+
date: { source: 'meta' },
|
|
8
|
+
endDate: { source: 'meta' },
|
|
9
|
+
location: { source: 'meta' },
|
|
10
|
+
url: { source: 'meta' },
|
|
11
|
+
},
|
|
12
|
+
structure: {
|
|
13
|
+
details: {
|
|
14
|
+
tag: 'div', before: true,
|
|
15
|
+
children: [
|
|
16
|
+
{
|
|
17
|
+
tag: 'div', ref: 'detail', condition: 'date',
|
|
18
|
+
children: [
|
|
19
|
+
{ tag: 'span', ref: 'label', children: ['Date'] },
|
|
20
|
+
{ tag: 'span', ref: 'value', metaText: 'date' },
|
|
21
|
+
{ tag: 'span', ref: 'end-date', metaText: 'endDate', textPrefix: ' — ', condition: 'endDate' },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
tag: 'div', ref: 'detail', condition: 'location',
|
|
26
|
+
children: [
|
|
27
|
+
{ tag: 'span', ref: 'label', children: ['Location'] },
|
|
28
|
+
{ tag: 'span', ref: 'value', metaText: 'location' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
tag: 'a', ref: 'register', condition: 'url',
|
|
33
|
+
attrs: { href: { fromModifier: 'url' } },
|
|
34
|
+
children: ['Register'],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
Itinerary: {
|
|
41
|
+
block: 'itinerary',
|
|
42
|
+
modifiers: {
|
|
43
|
+
style: { source: 'meta', default: 'day-by-day' },
|
|
44
|
+
direction: { source: 'meta', default: 'vertical' },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
ItineraryDay: {
|
|
48
|
+
block: 'itinerary-day',
|
|
49
|
+
parent: 'Itinerary',
|
|
50
|
+
autoLabel: { label: 'header' },
|
|
51
|
+
},
|
|
52
|
+
ItineraryStop: {
|
|
53
|
+
block: 'itinerary-stop',
|
|
54
|
+
parent: 'Itinerary',
|
|
55
|
+
modifiers: {
|
|
56
|
+
activity: { source: 'meta' },
|
|
57
|
+
duration: { source: 'meta' },
|
|
58
|
+
},
|
|
59
|
+
autoLabel: { time: 'time', location: 'location' },
|
|
60
|
+
},
|
|
61
|
+
Map: {
|
|
62
|
+
block: 'map',
|
|
63
|
+
modifiers: {
|
|
64
|
+
style: { source: 'meta', default: 'street' },
|
|
65
|
+
height: { source: 'meta', default: 'medium' },
|
|
66
|
+
},
|
|
67
|
+
postTransform(node) {
|
|
68
|
+
// Move remaining meta values to data attributes for the web component
|
|
69
|
+
const metaProps = ['zoom', 'center', 'provider', 'interactive', 'route', 'cluster', 'apiKey'];
|
|
70
|
+
const dataAttrs = {};
|
|
71
|
+
for (const prop of metaProps) {
|
|
72
|
+
const val = readMeta(node, prop);
|
|
73
|
+
if (val) {
|
|
74
|
+
const kebab = prop.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
75
|
+
dataAttrs[`data-${kebab}`] = val;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Remove consumed meta children
|
|
79
|
+
const children = node.children.filter(child => {
|
|
80
|
+
if (!isTag(child) || child.name !== 'meta')
|
|
81
|
+
return true;
|
|
82
|
+
const prop = child.attributes.property;
|
|
83
|
+
return !metaProps.includes(prop);
|
|
84
|
+
});
|
|
85
|
+
return {
|
|
86
|
+
...node,
|
|
87
|
+
name: 'rf-map',
|
|
88
|
+
attributes: { ...node.attributes, ...dataAttrs },
|
|
89
|
+
children,
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
MapPin: { block: 'map-pin', parent: 'Map' },
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=config.js.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B,CAAC;AAMrD,eAAO,MAAM,MAAM,EAAE,WA8EpB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { event } from './tags/event.js';
|
|
2
|
+
import { map, mapPin } from './tags/map.js';
|
|
3
|
+
import { itinerary, itineraryDay, itineraryStop } from './tags/itinerary.js';
|
|
4
|
+
import { config } from './config.js';
|
|
5
|
+
export const places = {
|
|
6
|
+
name: 'places',
|
|
7
|
+
displayName: 'Places',
|
|
8
|
+
version: '0.6.0',
|
|
9
|
+
runes: {
|
|
10
|
+
'event': {
|
|
11
|
+
transform: event,
|
|
12
|
+
description: 'Event information with date, location, and agenda',
|
|
13
|
+
seoType: 'Event',
|
|
14
|
+
reinterprets: { heading: 'event name', list: 'speakers/agenda', blockquote: 'venue description', link: 'registration URL' },
|
|
15
|
+
fixture: `{% event date="2026-03-15" endDate="2026-03-17" location="Stockholm, Sweden" url="https://example.com/register" %}
|
|
16
|
+
# Nordic Developer Summit
|
|
17
|
+
|
|
18
|
+
A three-day conference bringing together developers, designers, and product engineers from across the Nordics.
|
|
19
|
+
|
|
20
|
+
- Keynote: The Future of Web Components
|
|
21
|
+
- Workshop: Building Design Systems at Scale
|
|
22
|
+
- Panel: Open Source in Enterprise
|
|
23
|
+
{% /event %}`,
|
|
24
|
+
},
|
|
25
|
+
'map': {
|
|
26
|
+
transform: map,
|
|
27
|
+
description: 'Interactive map visualization from Markdown lists of locations with pins, routes, and grouped layers',
|
|
28
|
+
seoType: 'Place',
|
|
29
|
+
reinterprets: { list: 'location pins or route waypoints', heading: 'pin group label', strong: 'pin name', em: 'pin description', link: 'pin click URL' },
|
|
30
|
+
fixture: `{% map zoom="13" height="large" %}
|
|
31
|
+
## Landmarks
|
|
32
|
+
- **Eiffel Tower** - *Iconic iron lattice tower* - 48.8566, 2.3522
|
|
33
|
+
- **Louvre Museum** - *World's largest art museum* - 48.8606, 2.3376
|
|
34
|
+
|
|
35
|
+
## Parks
|
|
36
|
+
- **Jardin du Luxembourg** - 48.8462, 2.3372
|
|
37
|
+
{% /map %}`,
|
|
38
|
+
},
|
|
39
|
+
'map-pin': {
|
|
40
|
+
transform: mapPin,
|
|
41
|
+
description: 'Individual map pin with location data',
|
|
42
|
+
},
|
|
43
|
+
'itinerary': {
|
|
44
|
+
transform: itinerary,
|
|
45
|
+
aliases: ['trip', 'travel-plan'],
|
|
46
|
+
description: 'Travel itinerary with day groupings and timed stops. Headings become stops with "time — location" parsing; h2 headings create day groups.',
|
|
47
|
+
seoType: 'ItemList',
|
|
48
|
+
reinterprets: { heading: 'stop time and location (h2 = day group, h3 = stop)', paragraph: 'stop description' },
|
|
49
|
+
fixture: `{% itinerary style="day-by-day" %}
|
|
50
|
+
## Day 1 — Arrival
|
|
51
|
+
|
|
52
|
+
### 9:00 AM — Narita Airport
|
|
53
|
+
|
|
54
|
+
Clear customs and pick up your Japan Rail Pass.
|
|
55
|
+
|
|
56
|
+
### 12:00 PM — Shinjuku
|
|
57
|
+
|
|
58
|
+
Check in to the hotel and grab lunch at a nearby ramen shop.
|
|
59
|
+
|
|
60
|
+
### 6:00 PM — Shibuya
|
|
61
|
+
|
|
62
|
+
Explore the famous crossing and have dinner in the area.
|
|
63
|
+
|
|
64
|
+
## Day 2 — Temples & Gardens
|
|
65
|
+
|
|
66
|
+
### 8:00 AM — Meiji Shrine
|
|
67
|
+
|
|
68
|
+
Start the day with a peaceful walk through the shrine grounds.
|
|
69
|
+
{% /itinerary %}`,
|
|
70
|
+
},
|
|
71
|
+
'itinerary-day': {
|
|
72
|
+
transform: itineraryDay,
|
|
73
|
+
description: 'Day grouping within an itinerary',
|
|
74
|
+
},
|
|
75
|
+
'itinerary-stop': {
|
|
76
|
+
transform: itineraryStop,
|
|
77
|
+
description: 'Individual stop within an itinerary with time, location, and optional duration/activity',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
theme: {
|
|
81
|
+
runes: config,
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
export default places;
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAgB;IACjC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE;QACL,OAAO,EAAE;YACP,SAAS,EAAE,KAAK;YAChB,WAAW,EAAE,mDAAmD;YAChE,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,IAAI,EAAE,kBAAkB,EAAE;YAC3H,OAAO,EAAE;;;;;;;;aAQF;SACR;QACD,KAAK,EAAE;YACL,SAAS,EAAE,GAAG;YACd,WAAW,EAAE,sGAAsG;YACnH,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,EAAE,IAAI,EAAE,kCAAkC,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,eAAe,EAAE;YACxJ,OAAO,EAAE;;;;;;;WAOJ;SACN;QACD,SAAS,EAAE;YACT,SAAS,EAAE,MAAM;YACjB,WAAW,EAAE,uCAAuC;SACrD;QACD,WAAW,EAAE;YACX,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;YAChC,WAAW,EAAE,2IAA2I;YACxJ,OAAO,EAAE,UAAU;YACnB,YAAY,EAAE,EAAE,OAAO,EAAE,oDAAoD,EAAE,SAAS,EAAE,kBAAkB,EAAE;YAC9G,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;iBAoBE;SACZ;QACD,eAAe,EAAE;YACf,SAAS,EAAE,YAAY;YACvB,WAAW,EAAE,kCAAkC;SAChD;QACD,gBAAgB,EAAE;YAChB,SAAS,EAAE,aAAa;YACxB,WAAW,EAAE,yFAAyF;SACvG;KACF;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAA4D;KACpE;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentType, PageSection, PageSectionProperties } from "@refrakt-md/types";
|
|
2
|
+
export declare class Event extends PageSection {
|
|
3
|
+
date: string;
|
|
4
|
+
endDate: string;
|
|
5
|
+
location: string;
|
|
6
|
+
url: string;
|
|
7
|
+
}
|
|
8
|
+
export interface EventProperties extends PageSectionProperties {
|
|
9
|
+
date: 'meta';
|
|
10
|
+
endDate: 'meta';
|
|
11
|
+
location: 'meta';
|
|
12
|
+
url: 'meta';
|
|
13
|
+
}
|
|
14
|
+
export interface EventComponent extends ComponentType<Event> {
|
|
15
|
+
tag: 'article';
|
|
16
|
+
properties: EventProperties;
|
|
17
|
+
refs: {
|
|
18
|
+
body: 'div';
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/schema/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEtF,qBAAa,KAAM,SAAQ,WAAW;IACrC,IAAI,EAAE,MAAM,CAAM;IAClB,OAAO,EAAE,MAAM,CAAM;IACrB,QAAQ,EAAE,MAAM,CAAM;IACtB,GAAG,EAAE,MAAM,CAAM;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa,CAAC,KAAK,CAAC;IAC3D,GAAG,EAAE,SAAS,CAAC;IACf,UAAU,EAAE,eAAe,CAAC;IAC5B,IAAI,EAAE;QACL,IAAI,EAAE,KAAK,CAAC;KACZ,CAAA;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/schema/event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAyB,MAAM,mBAAmB,CAAC;AAEtF,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACC,SAAI,GAAW,EAAE,CAAC;QAClB,YAAO,GAAW,EAAE,CAAC;QACrB,aAAQ,GAAW,EAAE,CAAC;QACtB,QAAG,GAAW,EAAE,CAAC;IAClB,CAAC;CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ComponentType, PageSection, PageSectionProperties } from "@refrakt-md/types";
|
|
2
|
+
export declare class ItineraryStop {
|
|
3
|
+
time: string;
|
|
4
|
+
location: string;
|
|
5
|
+
duration: string;
|
|
6
|
+
activity: string;
|
|
7
|
+
lat: string;
|
|
8
|
+
lng: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ItineraryStopComponent extends ComponentType<ItineraryStop> {
|
|
11
|
+
tag: 'li';
|
|
12
|
+
properties: {
|
|
13
|
+
time: 'time';
|
|
14
|
+
location: 'span';
|
|
15
|
+
duration: 'meta';
|
|
16
|
+
activity: 'meta';
|
|
17
|
+
lat: 'meta';
|
|
18
|
+
lng: 'meta';
|
|
19
|
+
};
|
|
20
|
+
refs: {
|
|
21
|
+
body: 'div';
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare class ItineraryDay {
|
|
25
|
+
label: string;
|
|
26
|
+
date: string;
|
|
27
|
+
stop: ItineraryStop[];
|
|
28
|
+
}
|
|
29
|
+
export interface ItineraryDayComponent extends ComponentType<ItineraryDay> {
|
|
30
|
+
tag: 'article';
|
|
31
|
+
properties: {
|
|
32
|
+
label: 'h3';
|
|
33
|
+
date: 'meta';
|
|
34
|
+
stop: 'li';
|
|
35
|
+
};
|
|
36
|
+
refs: {
|
|
37
|
+
stops: 'ol';
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export declare class Itinerary extends PageSection {
|
|
41
|
+
day: ItineraryDay[];
|
|
42
|
+
style: string;
|
|
43
|
+
direction: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ItineraryProperties extends PageSectionProperties {
|
|
46
|
+
day: 'article';
|
|
47
|
+
}
|
|
48
|
+
export interface ItineraryComponent extends ComponentType<Itinerary> {
|
|
49
|
+
tag: 'section';
|
|
50
|
+
properties: ItineraryProperties & {
|
|
51
|
+
style: 'meta';
|
|
52
|
+
direction: 'meta';
|
|
53
|
+
};
|
|
54
|
+
refs: {
|
|
55
|
+
days: 'div';
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=itinerary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itinerary.d.ts","sourceRoot":"","sources":["../../src/schema/itinerary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAEtF,qBAAa,aAAa;IACzB,IAAI,EAAE,MAAM,CAAM;IAClB,QAAQ,EAAE,MAAM,CAAM;IACtB,QAAQ,EAAE,MAAM,CAAM;IACtB,QAAQ,EAAE,MAAM,CAAM;IACtB,GAAG,EAAE,MAAM,CAAM;IACjB,GAAG,EAAE,MAAM,CAAM;CACjB;AAED,MAAM,WAA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
|
+
import { PageSection } from "@refrakt-md/types";
|
|
2
|
+
export class ItineraryStop {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.time = '';
|
|
5
|
+
this.location = '';
|
|
6
|
+
this.duration = '';
|
|
7
|
+
this.activity = '';
|
|
8
|
+
this.lat = '';
|
|
9
|
+
this.lng = '';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export class ItineraryDay {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.label = '';
|
|
15
|
+
this.date = '';
|
|
16
|
+
this.stop = [];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class Itinerary extends PageSection {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.day = [];
|
|
23
|
+
this.style = 'day-by-day';
|
|
24
|
+
this.direction = 'vertical';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=itinerary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itinerary.js","sourceRoot":"","sources":["../../src/schema/itinerary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,WAAW,EAAyB,MAAM,mBAAmB,CAAC;AAEtF,MAAM,OAAO,aAAa;IAA1B;QACC,SAAI,GAAW,EAAE,CAAC;QAClB,aAAQ,GAAW,EAAE,CAAC;QACtB,aAAQ,GAAW,EAAE,CAAC;QACtB,aAAQ,GAAW,EAAE,CAAC;QACtB,QAAG,GAAW,EAAE,CAAC;QACjB,QAAG,GAAW,EAAE,CAAC;IAClB,CAAC;CAAA;AAiBD,MAAM,OAAO,YAAY;IAAzB;QACC,UAAK,GAAW,EAAE,CAAC;QACnB,SAAI,GAAW,EAAE,CAAC;QAClB,SAAI,GAAoB,EAAE,CAAC;IAC5B,CAAC;CAAA;AAcD,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QACC,QAAG,GAAmB,EAAE,CAAC;QACzB,UAAK,GAAW,YAAY,CAAC;QAC7B,cAAS,GAAW,UAAU,CAAC;IAChC,CAAC;CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComponentType } from "@refrakt-md/types";
|
|
2
|
+
export declare class MapPin {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
lat: string;
|
|
6
|
+
lng: string;
|
|
7
|
+
address: string;
|
|
8
|
+
url: string;
|
|
9
|
+
group: string;
|
|
10
|
+
}
|
|
11
|
+
export interface MapPinComponent extends ComponentType<MapPin> {
|
|
12
|
+
tag: 'li';
|
|
13
|
+
properties: {
|
|
14
|
+
name: 'span';
|
|
15
|
+
description: 'span';
|
|
16
|
+
lat: 'meta';
|
|
17
|
+
lng: 'meta';
|
|
18
|
+
address: 'meta';
|
|
19
|
+
url: 'meta';
|
|
20
|
+
group: 'meta';
|
|
21
|
+
};
|
|
22
|
+
refs: {};
|
|
23
|
+
}
|
|
24
|
+
export declare class Map {
|
|
25
|
+
pin: MapPin[];
|
|
26
|
+
zoom: string;
|
|
27
|
+
center: string;
|
|
28
|
+
style: string;
|
|
29
|
+
height: string;
|
|
30
|
+
provider: string;
|
|
31
|
+
interactive: string;
|
|
32
|
+
route: string;
|
|
33
|
+
cluster: string;
|
|
34
|
+
}
|
|
35
|
+
export interface MapComponent extends ComponentType<Map> {
|
|
36
|
+
tag: 'div';
|
|
37
|
+
properties: {
|
|
38
|
+
pin: 'li';
|
|
39
|
+
zoom: 'meta';
|
|
40
|
+
center: 'meta';
|
|
41
|
+
style: 'meta';
|
|
42
|
+
height: 'meta';
|
|
43
|
+
provider: 'meta';
|
|
44
|
+
interactive: 'meta';
|
|
45
|
+
route: 'meta';
|
|
46
|
+
cluster: 'meta';
|
|
47
|
+
};
|
|
48
|
+
refs: {
|
|
49
|
+
pins: 'ol';
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources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AQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,IAAI,EAAE;QACL,IAAI,EAAE,IAAI,CAAC;KACX,CAAA;CACD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class MapPin {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.name = '';
|
|
4
|
+
this.description = '';
|
|
5
|
+
this.lat = '';
|
|
6
|
+
this.lng = '';
|
|
7
|
+
this.address = '';
|
|
8
|
+
this.url = '';
|
|
9
|
+
this.group = '';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export class Map {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.pin = [];
|
|
15
|
+
this.zoom = '';
|
|
16
|
+
this.center = '';
|
|
17
|
+
this.style = 'street';
|
|
18
|
+
this.height = 'medium';
|
|
19
|
+
this.provider = 'openstreetmap';
|
|
20
|
+
this.interactive = 'true';
|
|
21
|
+
this.route = 'false';
|
|
22
|
+
this.cluster = 'false';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/schema/map.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,MAAM;IAAnB;QACC,SAAI,GAAW,EAAE,CAAC;QAClB,gBAAW,GAAW,EAAE,CAAC;QACzB,QAAG,GAAW,EAAE,CAAC;QACjB,QAAG,GAAW,EAAE,CAAC;QACjB,YAAO,GAAW,EAAE,CAAC;QACrB,QAAG,GAAW,EAAE,CAAC;QACjB,UAAK,GAAW,EAAE,CAAC;IACpB,CAAC;CAAA;AAgBD,MAAM,OAAO,GAAG;IAAhB;QACC,QAAG,GAAa,EAAE,CAAC;QACnB,SAAI,GAAW,EAAE,CAAC;QAClB,WAAM,GAAW,EAAE,CAAC;QACpB,UAAK,GAAW,QAAQ,CAAC;QACzB,WAAM,GAAW,QAAQ,CAAC;QAC1B,aAAQ,GAAW,eAAe,CAAC;QACnC,gBAAW,GAAW,MAAM,CAAC;QAC7B,UAAK,GAAW,OAAO,CAAC;QACxB,YAAO,GAAW,OAAO,CAAC;IAC3B,CAAC;CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/tags/event.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AA6DvC,eAAO,MAAM,KAAK,gBAA2B,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import Markdoc from '@markdoc/markdoc';
|
|
11
|
+
const { Tag } = Markdoc;
|
|
12
|
+
import { attribute, group, Model, createComponentRenderable, createSchema, NodeStream, pageSectionProperties } from '@refrakt-md/runes';
|
|
13
|
+
import { schema } from '../types.js';
|
|
14
|
+
class EventModel extends Model {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.date = '';
|
|
18
|
+
this.endDate = '';
|
|
19
|
+
this.location = '';
|
|
20
|
+
this.url = '';
|
|
21
|
+
}
|
|
22
|
+
transform() {
|
|
23
|
+
const header = this.header.transform();
|
|
24
|
+
const body = this.body.transform();
|
|
25
|
+
const dateMeta = new Tag('meta', { content: this.date });
|
|
26
|
+
const endDateMeta = new Tag('meta', { content: this.endDate });
|
|
27
|
+
const locationMeta = new Tag('meta', { content: this.location });
|
|
28
|
+
const urlMeta = new Tag('meta', { content: this.url });
|
|
29
|
+
const bodyDiv = body.wrap('div');
|
|
30
|
+
return createComponentRenderable(schema.Event, {
|
|
31
|
+
tag: 'article',
|
|
32
|
+
property: 'contentSection',
|
|
33
|
+
properties: {
|
|
34
|
+
...pageSectionProperties(header),
|
|
35
|
+
date: dateMeta,
|
|
36
|
+
endDate: endDateMeta,
|
|
37
|
+
location: locationMeta,
|
|
38
|
+
url: urlMeta,
|
|
39
|
+
},
|
|
40
|
+
refs: {
|
|
41
|
+
body: bodyDiv,
|
|
42
|
+
},
|
|
43
|
+
children: [
|
|
44
|
+
dateMeta,
|
|
45
|
+
endDateMeta,
|
|
46
|
+
locationMeta,
|
|
47
|
+
urlMeta,
|
|
48
|
+
header.wrap('header').next(),
|
|
49
|
+
bodyDiv.next(),
|
|
50
|
+
],
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
__decorate([
|
|
55
|
+
attribute({ type: String, required: false }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], EventModel.prototype, "date", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
attribute({ type: String, required: false }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], EventModel.prototype, "endDate", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
attribute({ type: String, required: false }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], EventModel.prototype, "location", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
attribute({ type: String, required: false }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], EventModel.prototype, "url", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
group({ include: ['heading', 'paragraph', 'image'] }),
|
|
72
|
+
__metadata("design:type", NodeStream)
|
|
73
|
+
], EventModel.prototype, "header", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
group({ include: ['list', 'blockquote', 'tag'] }),
|
|
76
|
+
__metadata("design:type", NodeStream)
|
|
77
|
+
], EventModel.prototype, "body", void 0);
|
|
78
|
+
export const event = createSchema(EventModel);
|
|
79
|
+
//# sourceMappingURL=event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/tags/event.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACxI,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,UAAW,SAAQ,KAAK;IAA9B;;QAEC,SAAI,GAAW,EAAE,CAAC;QAGlB,YAAO,GAAW,EAAE,CAAC;QAGrB,aAAQ,GAAW,EAAE,CAAC;QAGtB,QAAG,GAAW,EAAE,CAAC;IA0ClB,CAAC;IAlCA,SAAS;QACR,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QAEnC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QACzD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/D,MAAM,YAAY,GAAG,IA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AAC,EAAE,CAAC;8BAC9C,UAAU;0CAAC;AAGnB;IADC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;8BAC5C,UAAU;wCAAC;AAsClB,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itinerary.d.ts","sourceRoot":"","sources":["../../src/tags/itinerary.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAmOvC,eAAO,MAAM,aAAa,gBAAmC,CAAC;AAE9D,eAAO,MAAM,YAAY,gBAAkC,CAAC;AAE5D,eAAO,MAAM,SAAS,gBAA+B,CAAC"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import Markdoc from '@markdoc/markdoc';
|
|
11
|
+
const { Ast, Tag } = Markdoc;
|
|
12
|
+
import { attribute, group, Model, createComponentRenderable, createSchema, NodeStream, headingsToList, pageSectionProperties } from '@refrakt-md/runes';
|
|
13
|
+
import { schema } from '../types.js';
|
|
14
|
+
// Parse "9:00 AM — Narita Airport" or "Morning - Meiji Shrine"
|
|
15
|
+
const TIME_LOCATION_PATTERN = /^(.+?)\s*[-–—]\s*(.+)$/;
|
|
16
|
+
function extractText(node) {
|
|
17
|
+
return Array.from(node.walk())
|
|
18
|
+
.filter(n => n.type === 'text')
|
|
19
|
+
.map(n => n.attributes.content)
|
|
20
|
+
.join('');
|
|
21
|
+
}
|
|
22
|
+
class ItineraryStopModel extends Model {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.time = '';
|
|
26
|
+
this.location = '';
|
|
27
|
+
this.duration = '';
|
|
28
|
+
this.activity = '';
|
|
29
|
+
this.lat = '';
|
|
30
|
+
this.lng = '';
|
|
31
|
+
}
|
|
32
|
+
transform() {
|
|
33
|
+
const timeTag = new Tag('time', {}, [this.time]);
|
|
34
|
+
const locationTag = new Tag('span', {}, [this.location]);
|
|
35
|
+
const durationMeta = new Tag('meta', { content: this.duration });
|
|
36
|
+
const activityMeta = new Tag('meta', { content: this.activity });
|
|
37
|
+
const latMeta = new Tag('meta', { content: this.lat });
|
|
38
|
+
const lngMeta = new Tag('meta', { content: this.lng });
|
|
39
|
+
const body = this.transformChildren().wrap('div');
|
|
40
|
+
return createComponentRenderable(schema.ItineraryStop, {
|
|
41
|
+
tag: 'li',
|
|
42
|
+
properties: {
|
|
43
|
+
time: timeTag,
|
|
44
|
+
location: locationTag,
|
|
45
|
+
duration: durationMeta,
|
|
46
|
+
activity: activityMeta,
|
|
47
|
+
lat: latMeta,
|
|
48
|
+
lng: lngMeta,
|
|
49
|
+
},
|
|
50
|
+
refs: {
|
|
51
|
+
body: body.tag('div'),
|
|
52
|
+
},
|
|
53
|
+
children: [timeTag, locationTag, durationMeta, activityMeta, latMeta, lngMeta, body.next()],
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
__decorate([
|
|
58
|
+
attribute({ type: String, required: false }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], ItineraryStopModel.prototype, "time", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
attribute({ type: String, required: false }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], ItineraryStopModel.prototype, "location", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
attribute({ type: String, required: false }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], ItineraryStopModel.prototype, "duration", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
attribute({ type: String, required: false }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], ItineraryStopModel.prototype, "activity", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
attribute({ type: String, required: false }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], ItineraryStopModel.prototype, "lat", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
attribute({ type: String, required: false }),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], ItineraryStopModel.prototype, "lng", void 0);
|
|
81
|
+
class ItineraryDayModel extends Model {
|
|
82
|
+
constructor() {
|
|
83
|
+
super(...arguments);
|
|
84
|
+
this.label = '';
|
|
85
|
+
this.date = '';
|
|
86
|
+
}
|
|
87
|
+
transform() {
|
|
88
|
+
const header = this.header.transform();
|
|
89
|
+
const stopsStream = this.stops.transform();
|
|
90
|
+
const labelTag = new Tag('h3', {}, [this.label]);
|
|
91
|
+
const dateMeta = new Tag('meta', { content: this.date });
|
|
92
|
+
const stopItems = stopsStream.tag('li').typeof('ItineraryStop');
|
|
93
|
+
const stopsList = new Tag('ol', {}, stopItems.toArray());
|
|
94
|
+
const children = [labelTag, dateMeta];
|
|
95
|
+
if (header.count() > 0) {
|
|
96
|
+
children.push(header.wrap('div').next());
|
|
97
|
+
}
|
|
98
|
+
children.push(stopsList);
|
|
99
|
+
return createComponentRenderable(schema.ItineraryDay, {
|
|
100
|
+
tag: 'article',
|
|
101
|
+
properties: {
|
|
102
|
+
label: labelTag,
|
|
103
|
+
date: dateMeta,
|
|
104
|
+
stop: stopItems,
|
|
105
|
+
},
|
|
106
|
+
refs: {
|
|
107
|
+
stops: stopsList,
|
|
108
|
+
},
|
|
109
|
+
children,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
__decorate([
|
|
114
|
+
attribute({ type: String, required: false }),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], ItineraryDayModel.prototype, "label", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
attribute({ type: String, required: false }),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], ItineraryDayModel.prototype, "date", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
group({ include: ['paragraph'] }),
|
|
123
|
+
__metadata("design:type", NodeStream)
|
|
124
|
+
], ItineraryDayModel.prototype, "header", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
group({ include: ['tag'] }),
|
|
127
|
+
__metadata("design:type", NodeStream)
|
|
128
|
+
], ItineraryDayModel.prototype, "stops", void 0);
|
|
129
|
+
class ItineraryModel extends Model {
|
|
130
|
+
constructor() {
|
|
131
|
+
super(...arguments);
|
|
132
|
+
this.headingLevel = undefined;
|
|
133
|
+
this.style = 'day-by-day';
|
|
134
|
+
this.direction = 'vertical';
|
|
135
|
+
}
|
|
136
|
+
processChildren(nodes) {
|
|
137
|
+
return super.processChildren(this.convertToItems(nodes));
|
|
138
|
+
}
|
|
139
|
+
convertToItems(nodes) {
|
|
140
|
+
const hasH2 = nodes.some(n => n.type === 'heading' && n.attributes.level === 2);
|
|
141
|
+
if (hasH2) {
|
|
142
|
+
return this.convertWithDays(nodes);
|
|
143
|
+
}
|
|
144
|
+
return this.convertFlat(nodes);
|
|
145
|
+
}
|
|
146
|
+
convertWithDays(nodes) {
|
|
147
|
+
const grouped = headingsToList({ level: 2 })(nodes);
|
|
148
|
+
const result = [];
|
|
149
|
+
for (const node of grouped) {
|
|
150
|
+
if (node.type === 'list') {
|
|
151
|
+
for (const item of node.children) {
|
|
152
|
+
const heading = item.children[0];
|
|
153
|
+
const headingText = extractText(heading);
|
|
154
|
+
// Convert h3s within this day to stop tags
|
|
155
|
+
const dayChildren = this.convertStops(item.children.slice(1));
|
|
156
|
+
result.push(new Ast.Node('tag', { label: headingText }, dayChildren, 'itinerary-day'));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
result.push(node);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return result;
|
|
164
|
+
}
|
|
165
|
+
convertFlat(nodes) {
|
|
166
|
+
// Create a single implicit day wrapping all stops
|
|
167
|
+
const stops = this.convertStops(nodes);
|
|
168
|
+
const headingNodes = stops.filter(n => n.type === 'heading' || n.type === 'paragraph');
|
|
169
|
+
const tagNodes = stops.filter(n => n.type === 'tag');
|
|
170
|
+
if (tagNodes.length === 0)
|
|
171
|
+
return stops;
|
|
172
|
+
return [...headingNodes, new Ast.Node('tag', { label: '' }, tagNodes, 'itinerary-day')];
|
|
173
|
+
}
|
|
174
|
+
convertStops(nodes) {
|
|
175
|
+
const level = this.headingLevel ?? nodes.find(n => n.type === 'heading')?.attributes.level;
|
|
176
|
+
if (!level)
|
|
177
|
+
return nodes;
|
|
178
|
+
const grouped = headingsToList({ level })(nodes);
|
|
179
|
+
const result = [];
|
|
180
|
+
for (const node of grouped) {
|
|
181
|
+
if (node.type === 'list') {
|
|
182
|
+
for (const item of node.children) {
|
|
183
|
+
const heading = item.children[0];
|
|
184
|
+
const headingText = extractText(heading);
|
|
185
|
+
const match = headingText.match(TIME_LOCATION_PATTERN);
|
|
186
|
+
const time = match ? match[1].trim() : '';
|
|
187
|
+
const location = match ? match[2].trim() : headingText;
|
|
188
|
+
result.push(new Ast.Node('tag', { time, location }, item.children.slice(1), 'itinerary-stop'));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
result.push(node);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
transform() {
|
|
198
|
+
const header = this.header.transform();
|
|
199
|
+
const bodyStream = this.body.transform();
|
|
200
|
+
const styleMeta = new Tag('meta', { content: this.style });
|
|
201
|
+
const directionMeta = new Tag('meta', { content: this.direction });
|
|
202
|
+
const days = bodyStream.tag('article').typeof('ItineraryDay');
|
|
203
|
+
const daysContainer = new Tag('div', {}, days.toArray());
|
|
204
|
+
const children = [styleMeta, directionMeta];
|
|
205
|
+
if (header.count() > 0) {
|
|
206
|
+
children.push(header.wrap('header').next());
|
|
207
|
+
}
|
|
208
|
+
children.push(daysContainer);
|
|
209
|
+
return createComponentRenderable(schema.Itinerary, {
|
|
210
|
+
tag: 'section',
|
|
211
|
+
property: 'contentSection',
|
|
212
|
+
properties: {
|
|
213
|
+
...pageSectionProperties(header),
|
|
214
|
+
style: styleMeta,
|
|
215
|
+
direction: directionMeta,
|
|
216
|
+
day: days,
|
|
217
|
+
},
|
|
218
|
+
refs: { days: daysContainer },
|
|
219
|
+
children,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
__decorate([
|
|
224
|
+
attribute({ type: Number, required: false }),
|
|
225
|
+
__metadata("design:type", Object)
|
|
226
|
+
], ItineraryModel.prototype, "headingLevel", void 0);
|
|
227
|
+
__decorate([
|
|
228
|
+
attribute({ type: String, required: false }),
|
|
229
|
+
__metadata("design:type", String)
|
|
230
|
+
], ItineraryModel.prototype, "style", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
attribute({ type: String, required: false }),
|
|
233
|
+
__metadata("design:type", String)
|
|
234
|
+
], ItineraryModel.prototype, "direction", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
group({ include: ['heading', 'paragraph'] }),
|
|
237
|
+
__metadata("design:type", NodeStream)
|
|
238
|
+
], ItineraryModel.prototype, "header", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
group({ include: ['tag'] }),
|
|
241
|
+
__metadata("design:type", NodeStream)
|
|
242
|
+
], ItineraryModel.prototype, "body", void 0);
|
|
243
|
+
export const itineraryStop = createSchema(ItineraryStopModel);
|
|
244
|
+
export const itineraryDay = createSchema(ItineraryDayModel);
|
|
245
|
+
export const itinerary = createSchema(ItineraryModel);
|
|
246
|
+
//# sourceMappingURL=itinerary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itinerary.js","sourceRoot":"","sources":["../../src/tags/itinerary.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACxJ,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,+DAA+D;AAC/D,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAEvD,SAAS,WAAW,CAAC,IAAU;IAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC;SAC9B,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;SAC9B,IAAI,CAAC,EAAE,CAAC,CAAC;AACZ,CAAC;AAED,MAAM,kBAAmB,SAAQ,KAAK;IAAtC;;QAEC,SAAI,GAAW,EAAE,CAAC;QAGlB,aAAQ,GAAW,EAAE,CAAC;QAGtB,aAAQ,GAAW,EAAE,CAAC;QAGtB,aAAQ,GAAW,EAAE,CAAC;QAGtB,QAAG,GAAW,EAAE,CAAC;QAGjB,QAAG,GAAW,EAAE,CAAC;IA2BlB,CAAC;IAzBA,SAAS;QACR,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,EA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0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/tags/map.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAsOvC,eAAO,MAAM,MAAM,gBAA4B,CAAC;AAChD,eAAO,MAAM,GAAG,gBAAyB,CAAC"}
|
package/dist/tags/map.js
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import Markdoc from '@markdoc/markdoc';
|
|
11
|
+
const { Ast, Tag } = Markdoc;
|
|
12
|
+
import { attribute, group, Model, createComponentRenderable, createSchema, NodeStream } from '@refrakt-md/runes';
|
|
13
|
+
import { schema } from '../types.js';
|
|
14
|
+
const styleType = ['street', 'satellite', 'terrain', 'dark', 'minimal'];
|
|
15
|
+
const heightType = ['small', 'medium', 'large', 'full'];
|
|
16
|
+
const providerType = ['openstreetmap', 'mapbox'];
|
|
17
|
+
// Match coordinate pairs like "48.8566, 2.3522" or "-33.8688, 151.2093"
|
|
18
|
+
const COORD_PATTERN = /(-?\d+\.?\d*)\s*,\s*(-?\d+\.?\d*)/;
|
|
19
|
+
// Separator between name/description/coordinates: " - ", " — ", " – "
|
|
20
|
+
const SEPARATOR = /\s*[-–—]\s*/;
|
|
21
|
+
// Extract plain text content from an AST node
|
|
22
|
+
function extractText(node) {
|
|
23
|
+
return Array.from(node.walk())
|
|
24
|
+
.filter(n => n.type === 'text')
|
|
25
|
+
.map(n => n.attributes.content)
|
|
26
|
+
.join('');
|
|
27
|
+
}
|
|
28
|
+
// Parse a list item node into location properties
|
|
29
|
+
function parseLocationItem(node) {
|
|
30
|
+
let name = '';
|
|
31
|
+
let description = '';
|
|
32
|
+
let url = '';
|
|
33
|
+
const textParts = [];
|
|
34
|
+
// Walk the item's direct children (paragraph/inline wrapper)
|
|
35
|
+
const allNodes = Array.from(node.walk());
|
|
36
|
+
for (const child of allNodes) {
|
|
37
|
+
if (child.type === 'strong') {
|
|
38
|
+
name = Array.from(child.walk())
|
|
39
|
+
.filter(n => n.type === 'text')
|
|
40
|
+
.map(n => n.attributes.content)
|
|
41
|
+
.join('');
|
|
42
|
+
}
|
|
43
|
+
else if (child.type === 'em' && child !== node) {
|
|
44
|
+
// Only pick up em nodes that aren't the root
|
|
45
|
+
const emText = Array.from(child.walk())
|
|
46
|
+
.filter(n => n.type === 'text')
|
|
47
|
+
.map(n => n.attributes.content)
|
|
48
|
+
.join('');
|
|
49
|
+
if (!description)
|
|
50
|
+
description = emText;
|
|
51
|
+
}
|
|
52
|
+
else if (child.type === 'link') {
|
|
53
|
+
url = child.attributes.href || '';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Collect all text content and strip out the name/description parts
|
|
57
|
+
const fullText = extractText(node);
|
|
58
|
+
let remaining = fullText;
|
|
59
|
+
if (name)
|
|
60
|
+
remaining = remaining.replace(name, '');
|
|
61
|
+
if (description)
|
|
62
|
+
remaining = remaining.replace(description, '');
|
|
63
|
+
// Extract coordinates BEFORE stripping separators, so negative signs survive
|
|
64
|
+
let lat = '';
|
|
65
|
+
let lng = '';
|
|
66
|
+
const coordMatch = remaining.match(COORD_PATTERN);
|
|
67
|
+
if (coordMatch) {
|
|
68
|
+
lat = coordMatch[1];
|
|
69
|
+
lng = coordMatch[2];
|
|
70
|
+
remaining = remaining.replace(COORD_PATTERN, '').trim();
|
|
71
|
+
}
|
|
72
|
+
// Strip separators
|
|
73
|
+
remaining = remaining.replace(new RegExp(SEPARATOR.source, 'g'), ' ').trim();
|
|
74
|
+
// Whatever is left is the address
|
|
75
|
+
const address = remaining.replace(/\s+/g, ' ').trim();
|
|
76
|
+
// If no name was found via bold, use the address or full text
|
|
77
|
+
if (!name && !lat && !lng) {
|
|
78
|
+
name = address || fullText.trim();
|
|
79
|
+
}
|
|
80
|
+
else if (!name) {
|
|
81
|
+
name = address || `${lat}, ${lng}`;
|
|
82
|
+
}
|
|
83
|
+
return { name, description, lat, lng, address, url };
|
|
84
|
+
}
|
|
85
|
+
class MapPinModel extends Model {
|
|
86
|
+
constructor() {
|
|
87
|
+
super(...arguments);
|
|
88
|
+
this.name = '';
|
|
89
|
+
this.description = '';
|
|
90
|
+
this.lat = '';
|
|
91
|
+
this.lng = '';
|
|
92
|
+
this.address = '';
|
|
93
|
+
this.url = '';
|
|
94
|
+
this.group = '';
|
|
95
|
+
}
|
|
96
|
+
transform() {
|
|
97
|
+
const nameTag = new Tag('span', {}, [this.name]);
|
|
98
|
+
const descriptionTag = new Tag('span', {}, [this.description]);
|
|
99
|
+
const latMeta = new Tag('meta', { content: this.lat });
|
|
100
|
+
const lngMeta = new Tag('meta', { content: this.lng });
|
|
101
|
+
const addressMeta = new Tag('meta', { content: this.address });
|
|
102
|
+
const urlMeta = new Tag('meta', { content: this.url });
|
|
103
|
+
const groupMeta = new Tag('meta', { content: this.group });
|
|
104
|
+
return createComponentRenderable(schema.MapPin, {
|
|
105
|
+
tag: 'li',
|
|
106
|
+
properties: {
|
|
107
|
+
name: nameTag,
|
|
108
|
+
description: descriptionTag,
|
|
109
|
+
lat: latMeta,
|
|
110
|
+
lng: lngMeta,
|
|
111
|
+
address: addressMeta,
|
|
112
|
+
url: urlMeta,
|
|
113
|
+
group: groupMeta,
|
|
114
|
+
},
|
|
115
|
+
children: [nameTag, descriptionTag, latMeta, lngMeta, addressMeta, urlMeta, groupMeta],
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
__decorate([
|
|
120
|
+
attribute({ type: String, required: false }),
|
|
121
|
+
__metadata("design:type", String)
|
|
122
|
+
], MapPinModel.prototype, "name", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
attribute({ type: String, required: false }),
|
|
125
|
+
__metadata("design:type", String)
|
|
126
|
+
], MapPinModel.prototype, "description", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
attribute({ type: String, required: false }),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], MapPinModel.prototype, "lat", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
attribute({ type: String, required: false }),
|
|
133
|
+
__metadata("design:type", String)
|
|
134
|
+
], MapPinModel.prototype, "lng", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
attribute({ type: String, required: false }),
|
|
137
|
+
__metadata("design:type", String)
|
|
138
|
+
], MapPinModel.prototype, "address", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
attribute({ type: String, required: false }),
|
|
141
|
+
__metadata("design:type", String)
|
|
142
|
+
], MapPinModel.prototype, "url", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
attribute({ type: String, required: false }),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], MapPinModel.prototype, "group", void 0);
|
|
147
|
+
class MapModel extends Model {
|
|
148
|
+
constructor() {
|
|
149
|
+
super(...arguments);
|
|
150
|
+
this.zoom = '';
|
|
151
|
+
this.center = '';
|
|
152
|
+
this.style = 'street';
|
|
153
|
+
this.height = 'medium';
|
|
154
|
+
this.provider = 'openstreetmap';
|
|
155
|
+
this.interactive = 'true';
|
|
156
|
+
this.route = 'false';
|
|
157
|
+
this.cluster = 'false';
|
|
158
|
+
}
|
|
159
|
+
processChildren(nodes) {
|
|
160
|
+
const converted = [];
|
|
161
|
+
let currentGroup = '';
|
|
162
|
+
for (const node of nodes) {
|
|
163
|
+
if (node.type === 'heading') {
|
|
164
|
+
currentGroup = extractText(node);
|
|
165
|
+
}
|
|
166
|
+
else if (node.type === 'list') {
|
|
167
|
+
for (const item of node.children) {
|
|
168
|
+
if (item.type === 'item') {
|
|
169
|
+
const loc = parseLocationItem(item);
|
|
170
|
+
converted.push(new Ast.Node('tag', {
|
|
171
|
+
name: loc.name,
|
|
172
|
+
description: loc.description,
|
|
173
|
+
lat: loc.lat,
|
|
174
|
+
lng: loc.lng,
|
|
175
|
+
address: loc.address,
|
|
176
|
+
url: loc.url,
|
|
177
|
+
group: currentGroup,
|
|
178
|
+
}, [], 'map-pin'));
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
converted.push(node);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return super.processChildren(converted);
|
|
187
|
+
}
|
|
188
|
+
transform() {
|
|
189
|
+
const body = this.body.transform();
|
|
190
|
+
const zoomMeta = new Tag('meta', { content: this.zoom });
|
|
191
|
+
const centerMeta = new Tag('meta', { content: this.center });
|
|
192
|
+
const styleMeta = new Tag('meta', { content: this.style });
|
|
193
|
+
const heightMeta = new Tag('meta', { content: this.height });
|
|
194
|
+
const providerMeta = new Tag('meta', { content: this.provider });
|
|
195
|
+
const interactiveMeta = new Tag('meta', { content: this.interactive });
|
|
196
|
+
const routeMeta = new Tag('meta', { content: this.route });
|
|
197
|
+
const clusterMeta = new Tag('meta', { content: this.cluster });
|
|
198
|
+
const pins = body.tag('li').typeof('MapPin');
|
|
199
|
+
const pinsList = new Tag('ol', {}, pins.toArray());
|
|
200
|
+
return createComponentRenderable(schema.Map, {
|
|
201
|
+
tag: 'div',
|
|
202
|
+
properties: {
|
|
203
|
+
zoom: zoomMeta,
|
|
204
|
+
center: centerMeta,
|
|
205
|
+
style: styleMeta,
|
|
206
|
+
height: heightMeta,
|
|
207
|
+
provider: providerMeta,
|
|
208
|
+
interactive: interactiveMeta,
|
|
209
|
+
route: routeMeta,
|
|
210
|
+
cluster: clusterMeta,
|
|
211
|
+
pin: pins,
|
|
212
|
+
},
|
|
213
|
+
refs: { pins: pinsList },
|
|
214
|
+
children: [zoomMeta, centerMeta, styleMeta, heightMeta, providerMeta, interactiveMeta, routeMeta, clusterMeta, pinsList],
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
__decorate([
|
|
219
|
+
attribute({ type: String, required: false }),
|
|
220
|
+
__metadata("design:type", String)
|
|
221
|
+
], MapModel.prototype, "zoom", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
attribute({ type: String, required: false }),
|
|
224
|
+
__metadata("design:type", String)
|
|
225
|
+
], MapModel.prototype, "center", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
attribute({ type: String, required: false, matches: styleType.slice() }),
|
|
228
|
+
__metadata("design:type", Object)
|
|
229
|
+
], MapModel.prototype, "style", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
attribute({ type: String, required: false, matches: heightType.slice() }),
|
|
232
|
+
__metadata("design:type", Object)
|
|
233
|
+
], MapModel.prototype, "height", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
attribute({ type: String, required: false, matches: providerType.slice() }),
|
|
236
|
+
__metadata("design:type", Object)
|
|
237
|
+
], MapModel.prototype, "provider", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
attribute({ type: String, required: false }),
|
|
240
|
+
__metadata("design:type", String)
|
|
241
|
+
], MapModel.prototype, "interactive", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
attribute({ type: String, required: false }),
|
|
244
|
+
__metadata("design:type", String)
|
|
245
|
+
], MapModel.prototype, "route", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
attribute({ type: String, required: false }),
|
|
248
|
+
__metadata("design:type", String)
|
|
249
|
+
], MapModel.prototype, "cluster", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
group({ include: ['tag'] }),
|
|
252
|
+
__metadata("design:type", NodeStream)
|
|
253
|
+
], MapModel.prototype, "body", void 0);
|
|
254
|
+
export const mapPin = createSchema(MapPinModel);
|
|
255
|
+
export const map = createSchema(MapModel);
|
|
256
|
+
//# sourceMappingURL=map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../src/tags/map.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AACjF,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AACjE,MAAM,YAAY,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAU,CAAC;AAE1D,wEAAwE;AACxE,MAAM,aAAa,GAAG,mCAAmC,CAAC;AAE1D,sEAAsE;AACtE,MAAM,SAAS,GAAG,aAAa,CAAC;AAEhC,8CAA8C;AAC9C,SAAS,WAAW,CAAC,IAAU;IAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC5B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC;SAC9B,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;SAC9B,IAAI,CAAC,EAAE,CAAC,CAAC;AACZ,CAAC;AAED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E,KAAK,EAAE,CAAC;;yCACnB;AAG1B;IADC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;8BACtB,UAAU;sCAAC;AAkElB,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventComponent } from './schema/event.js';
|
|
2
|
+
import { ItineraryComponent, ItineraryDayComponent, ItineraryStopComponent } from './schema/itinerary.js';
|
|
3
|
+
import { MapComponent, MapPinComponent } from './schema/map.js';
|
|
4
|
+
export declare const schema: {
|
|
5
|
+
Event: import("@refrakt-md/types").Type<EventComponent>;
|
|
6
|
+
Itinerary: import("@refrakt-md/types").Type<ItineraryComponent>;
|
|
7
|
+
ItineraryDay: import("@refrakt-md/types").Type<ItineraryDayComponent>;
|
|
8
|
+
ItineraryStop: import("@refrakt-md/types").Type<ItineraryStopComponent>;
|
|
9
|
+
Map: import("@refrakt-md/types").Type<MapComponent>;
|
|
10
|
+
MapPin: import("@refrakt-md/types").Type<MapPinComponent>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAa,kBAAkB,EAAgB,qBAAqB,EAAiB,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAClJ,OAAO,EAAO,YAAY,EAAU,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE7E,eAAO,MAAM,MAAM;;;;;;;CAOlB,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useSchema } from '@refrakt-md/types';
|
|
2
|
+
import { Event } from './schema/event.js';
|
|
3
|
+
import { Itinerary, ItineraryDay, ItineraryStop } from './schema/itinerary.js';
|
|
4
|
+
import { Map, MapPin } from './schema/map.js';
|
|
5
|
+
export const schema = {
|
|
6
|
+
Event: useSchema(Event).defineType('Event'),
|
|
7
|
+
Itinerary: useSchema(Itinerary).defineType('Itinerary'),
|
|
8
|
+
ItineraryDay: useSchema(ItineraryDay).defineType('ItineraryDay'),
|
|
9
|
+
ItineraryStop: useSchema(ItineraryStop).defineType('ItineraryStop'),
|
|
10
|
+
Map: useSchema(Map).defineType('Map'),
|
|
11
|
+
MapPin: useSchema(MapPin).defineType('MapPin'),
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAkB,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAsB,YAAY,EAAyB,aAAa,EAA0B,MAAM,uBAAuB,CAAC;AAClJ,OAAO,EAAE,GAAG,EAAgB,MAAM,EAAmB,MAAM,iBAAiB,CAAC;AAE7E,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,UAAU,CAAiB,OAAO,CAAC;IAC3D,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,UAAU,CAAqB,WAAW,CAAC;IAC3E,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,UAAU,CAAwB,cAAc,CAAC;IACvF,aAAa,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC,UAAU,CAAyB,eAAe,CAAC;IAC3F,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,UAAU,CAAe,KAAK,CAAC;IACnD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,UAAU,CAAkB,QAAQ,CAAC;CAChE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@refrakt-md/places",
|
|
3
|
+
"description": "Places runes for refrakt.md — events, maps, and itineraries",
|
|
4
|
+
"version": "0.7.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/refrakt-md/refrakt.git",
|
|
10
|
+
"directory": "runes/places"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@refrakt-md/types": "0.7.0",
|
|
25
|
+
"@refrakt-md/transform": "0.7.0",
|
|
26
|
+
"@refrakt-md/runes": "0.7.0",
|
|
27
|
+
"@markdoc/markdoc": "0.4.0",
|
|
28
|
+
"reflect-metadata": "^0.2.0"
|
|
29
|
+
}
|
|
30
|
+
}
|