diff --git a/public/contracts/artifacts/types/jscontact-card/3.md b/public/contracts/artifacts/types/jscontact-card/3.md new file mode 100644 index 0000000..b44e1a5 --- /dev/null +++ b/public/contracts/artifacts/types/jscontact-card/3.md @@ -0,0 +1,225 @@ +--- +kind: mdbase.type +name: jscontact-card +version: 3 +description: A fully expanded, editable Markdown-backed JSContact 2.0 core Card +match: + where: + /@type: Card + version: "2.0" +schema: + dialect: json-schema-2020-12 + value: + $schema: https://json-schema.org/draft/2020-12/schema + title: JSContact Card 2.0 core profile + description: A local starting shape for an IETF JSContact 2.0 Card. + type: object + required: + - "@type" + - version + properties: + "@type": + const: Card + version: + const: "2.0" + uid: + type: string + minLength: 1 + kind: + enum: + - individual + - group + - org + - location + - device + - application + name: + type: object + properties: + "@type": + const: Name + components: + type: array + minItems: 1 + contains: + type: object + required: + - kind + properties: + kind: + not: + const: separator + items: + type: object + required: + - kind + - value + properties: + "@type": + const: NameComponent + kind: + enum: + - credential + - generation + - given + - given2 + - separator + - surname + - surname2 + - title + value: + type: string + additionalProperties: false + full: + type: string + minLength: 1 + isOrdered: + type: boolean + defaultSeparator: + type: string + anyOf: + - required: + - components + - required: + - full + additionalProperties: false + emails: + type: object + propertyNames: + type: string + minLength: 1 + additionalProperties: + type: object + required: + - address + properties: + "@type": + const: EmailAddress + address: + type: string + format: email + contexts: + type: object + additionalProperties: + const: true + pref: + type: integer + minimum: 1 + label: + type: string + additionalProperties: false + phones: + type: object + propertyNames: + type: string + minLength: 1 + additionalProperties: + type: object + required: + - number + properties: + "@type": + const: Phone + number: + type: string + minLength: 1 + features: + type: object + additionalProperties: + const: true + contexts: + type: object + additionalProperties: + const: true + pref: + type: integer + minimum: 1 + label: + type: string + additionalProperties: false + organizations: + type: object + propertyNames: + type: string + minLength: 1 + additionalProperties: + type: object + properties: + "@type": + const: Organization + name: + type: string + minLength: 1 + units: + type: array + minItems: 1 + items: + type: object + required: + - name + properties: + "@type": + const: OrgUnit + name: + type: string + minLength: 1 + additionalProperties: false + sortAs: + type: string + contexts: + type: object + additionalProperties: + const: true + anyOf: + - required: + - name + - required: + - units + additionalProperties: false + notes: + type: object + propertyNames: + type: string + minLength: 1 + additionalProperties: + type: object + required: + - note + properties: + "@type": + const: Note + note: + type: string + created: + type: string + format: date-time + additionalProperties: false + additionalProperties: false +collection: + display: + name_field: /name/full +implements: + - contract: mdbase.jscontact.card + version: 2.0.0 + fields: + /@type: /@type + version: version + uid: uid + kind: kind + name: name + emails: emails + phones: phones + organizations: organizations + notes: notes +--- + +# JSContact Card + +This starter type begins as a fully expanded local copy of the JSContact core +profile. Nested fields are declared inline so the type editor can edit them +directly. Its fields belong to the collection and can be added, renamed, or +reshaped. Update the explicit contract mapping whenever a compatible field +moves. + +The separately installed contract schema remains the portable boundary. Local +fields that are not mapped into that boundary remain collection-specific. diff --git a/public/contracts/catalog.json b/public/contracts/catalog.json index 0606d58..2758817 100644 --- a/public/contracts/catalog.json +++ b/public/contracts/catalog.json @@ -193,11 +193,11 @@ "packs": [ { "id": "mdbase.jscontact", - "version": "2.0.1", + "version": "2.0.2", "name": "JSContact 2.0 starter", - "description": "The mdbase JSContact Card core contract and an editable Markdown implementation.", - "digest": "sha256:c277f278b20acbd0b182d88e2c3c018220c2808aa57f73fa2da1b413383ed21c", - "provision": "./packs/mdbase.jscontact/2.0.1.json", + "description": "The mdbase JSContact Card core contract and a fully expanded, editable Markdown implementation.", + "digest": "sha256:f6f5aa76850c10b83d42c0fffb7f76d3a67b531fb1de7bb5ae9a9b2c783687b0", + "provision": "./packs/mdbase.jscontact/2.0.2.json", "provides": [ { "id": "mdbase.jscontact.card", diff --git a/public/contracts/packs/mdbase.jscontact/2.0.2.json b/public/contracts/packs/mdbase.jscontact/2.0.2.json new file mode 100644 index 0000000..81459ab --- /dev/null +++ b/public/contracts/packs/mdbase.jscontact/2.0.2.json @@ -0,0 +1,49 @@ +{ + "manifest": { + "kind": "mdbase.type-pack", + "id": "mdbase.jscontact", + "version": "2.0.2", + "name": "JSContact 2.0 starter", + "description": "The mdbase JSContact Card core contract and a fully expanded, editable Markdown implementation.", + "resources": [ + { + "kind": "schema", + "source": "schemas/mdbase.jscontact.card/2.0.0.schema.json", + "target": "schemas/mdbase.jscontact.card/2.0.0.schema.json", + "digest": "sha256:e2831b1203303075767aefd5e4892c81793d4b85c45db706ef189aa6124f8e26" + }, + { + "kind": "contract", + "source": "contracts/mdbase.jscontact.card/2.0.0.md", + "target": "_contracts/mdbase.jscontact.card/2.0.0.md", + "digest": "sha256:c56c5acbf7992155d6890294842a261fe80a933ec75a226ea875b97ba57dcaa2" + }, + { + "kind": "type", + "source": "types/jscontact-card/3.md", + "target": "_types/jscontact-card.md", + "digest": "sha256:881d5669053430b5183f57d51d8a3c41d53145ac158a638379163d5bb83c469d" + } + ] + }, + "resources": [ + { + "source": "schemas/mdbase.jscontact.card/2.0.0.schema.json", + "document": "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://mdbase.dev/contracts/schemas/mdbase.jscontact.card/2.0.0.schema.json\",\n \"title\": \"JSContact Card 2.0 core profile\",\n \"description\": \"A strict mdbase core profile of an IETF JSContact 2.0 Card.\",\n \"type\": \"object\",\n \"required\": [\"@type\", \"version\"],\n \"properties\": {\n \"@type\": { \"const\": \"Card\" },\n \"version\": { \"const\": \"2.0\" },\n \"uid\": { \"type\": \"string\", \"minLength\": 1 },\n \"kind\": {\n \"enum\": [\"individual\", \"group\", \"org\", \"location\", \"device\", \"application\"]\n },\n \"name\": { \"$ref\": \"#/$defs/name\" },\n \"emails\": {\n \"type\": \"object\",\n \"propertyNames\": { \"$ref\": \"#/$defs/id\" },\n \"additionalProperties\": { \"$ref\": \"#/$defs/emailAddress\" }\n },\n \"phones\": {\n \"type\": \"object\",\n \"propertyNames\": { \"$ref\": \"#/$defs/id\" },\n \"additionalProperties\": { \"$ref\": \"#/$defs/phone\" }\n },\n \"organizations\": {\n \"type\": \"object\",\n \"propertyNames\": { \"$ref\": \"#/$defs/id\" },\n \"additionalProperties\": { \"$ref\": \"#/$defs/organization\" }\n },\n \"notes\": {\n \"type\": \"object\",\n \"propertyNames\": { \"$ref\": \"#/$defs/id\" },\n \"additionalProperties\": { \"$ref\": \"#/$defs/note\" }\n }\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"trueSet\": {\n \"type\": \"object\",\n \"additionalProperties\": { \"const\": true }\n },\n \"name\": {\n \"type\": \"object\",\n \"properties\": {\n \"@type\": { \"const\": \"Name\" },\n \"components\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"contains\": {\n \"type\": \"object\",\n \"required\": [\"kind\"],\n \"properties\": {\n \"kind\": { \"not\": { \"const\": \"separator\" } }\n }\n },\n \"items\": { \"$ref\": \"#/$defs/nameComponent\" }\n },\n \"full\": { \"type\": \"string\", \"minLength\": 1 },\n \"isOrdered\": { \"type\": \"boolean\" },\n \"defaultSeparator\": { \"type\": \"string\" }\n },\n \"anyOf\": [\n { \"required\": [\"components\"] },\n { \"required\": [\"full\"] }\n ],\n \"additionalProperties\": false\n },\n \"nameComponent\": {\n \"type\": \"object\",\n \"required\": [\"kind\", \"value\"],\n \"properties\": {\n \"@type\": { \"const\": \"NameComponent\" },\n \"kind\": {\n \"enum\": [\n \"credential\",\n \"generation\",\n \"given\",\n \"given2\",\n \"separator\",\n \"surname\",\n \"surname2\",\n \"title\"\n ]\n },\n \"value\": { \"type\": \"string\" }\n },\n \"additionalProperties\": false\n },\n \"emailAddress\": {\n \"type\": \"object\",\n \"required\": [\"address\"],\n \"properties\": {\n \"@type\": { \"const\": \"EmailAddress\" },\n \"address\": { \"type\": \"string\", \"format\": \"email\" },\n \"contexts\": { \"$ref\": \"#/$defs/trueSet\" },\n \"pref\": { \"type\": \"integer\", \"minimum\": 1 },\n \"label\": { \"type\": \"string\" }\n },\n \"additionalProperties\": false\n },\n \"phone\": {\n \"type\": \"object\",\n \"required\": [\"number\"],\n \"properties\": {\n \"@type\": { \"const\": \"Phone\" },\n \"number\": { \"type\": \"string\", \"minLength\": 1 },\n \"features\": { \"$ref\": \"#/$defs/trueSet\" },\n \"contexts\": { \"$ref\": \"#/$defs/trueSet\" },\n \"pref\": { \"type\": \"integer\", \"minimum\": 1 },\n \"label\": { \"type\": \"string\" }\n },\n \"additionalProperties\": false\n },\n \"organization\": {\n \"type\": \"object\",\n \"properties\": {\n \"@type\": { \"const\": \"Organization\" },\n \"name\": { \"type\": \"string\", \"minLength\": 1 },\n \"units\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"$ref\": \"#/$defs/orgUnit\" }\n },\n \"sortAs\": { \"type\": \"string\" },\n \"contexts\": { \"$ref\": \"#/$defs/trueSet\" }\n },\n \"anyOf\": [\n { \"required\": [\"name\"] },\n { \"required\": [\"units\"] }\n ],\n \"additionalProperties\": false\n },\n \"orgUnit\": {\n \"type\": \"object\",\n \"required\": [\"name\"],\n \"properties\": {\n \"@type\": { \"const\": \"OrgUnit\" },\n \"name\": { \"type\": \"string\", \"minLength\": 1 }\n },\n \"additionalProperties\": false\n },\n \"note\": {\n \"type\": \"object\",\n \"required\": [\"note\"],\n \"properties\": {\n \"@type\": { \"const\": \"Note\" },\n \"note\": { \"type\": \"string\" },\n \"created\": { \"type\": \"string\", \"format\": \"date-time\" }\n },\n \"additionalProperties\": false\n }\n }\n}\n\n" + }, + { + "source": "contracts/mdbase.jscontact.card/2.0.0.md", + "document": "---\nkind: mdbase.contract\ncontract_type: record\nid: mdbase.jscontact.card\nversion: 2.0.0\nname: JSContact Card 2.0 core\ndescription: A strict, portable core profile of an IETF JSContact 2.0 Card.\nrecord_schema:\n dialect: json-schema-2020-12\n ref: ../../schemas/mdbase.jscontact.card/2.0.0.schema.json\nx-standard:\n name: JSContact\n version: \"2.0\"\n scope: Strict core profile covering the Card envelope, names, email addresses, phones, organizations, and notes.\n references:\n - https://www.rfc-editor.org/rfc/rfc9553.html\n - https://www.rfc-editor.org/rfc/rfc9982.html\n---\n\n# JSContact Card 2.0 core\n\nThis contract provides a deliberately bounded JSContact Card representation\nfor interoperable contact records. It follows JSContact 2.0, including the\noptional `uid` introduced by RFC 9982.\n\nThe profile accepts a strict subset of JSContact properties. It is not an\nofficial IETF JSON Schema and does not claim to validate every JSContact\nextension or conditional semantic rule.\n\n" + }, + { + "source": "types/jscontact-card/3.md", + "document": "---\nkind: mdbase.type\nname: jscontact-card\nversion: 3\ndescription: A fully expanded, editable Markdown-backed JSContact 2.0 core Card\nmatch:\n where:\n /@type: Card\n version: \"2.0\"\nschema:\n dialect: json-schema-2020-12\n value:\n $schema: https://json-schema.org/draft/2020-12/schema\n title: JSContact Card 2.0 core profile\n description: A local starting shape for an IETF JSContact 2.0 Card.\n type: object\n required:\n - \"@type\"\n - version\n properties:\n \"@type\":\n const: Card\n version:\n const: \"2.0\"\n uid:\n type: string\n minLength: 1\n kind:\n enum:\n - individual\n - group\n - org\n - location\n - device\n - application\n name:\n type: object\n properties:\n \"@type\":\n const: Name\n components:\n type: array\n minItems: 1\n contains:\n type: object\n required:\n - kind\n properties:\n kind:\n not:\n const: separator\n items:\n type: object\n required:\n - kind\n - value\n properties:\n \"@type\":\n const: NameComponent\n kind:\n enum:\n - credential\n - generation\n - given\n - given2\n - separator\n - surname\n - surname2\n - title\n value:\n type: string\n additionalProperties: false\n full:\n type: string\n minLength: 1\n isOrdered:\n type: boolean\n defaultSeparator:\n type: string\n anyOf:\n - required:\n - components\n - required:\n - full\n additionalProperties: false\n emails:\n type: object\n propertyNames:\n type: string\n minLength: 1\n additionalProperties:\n type: object\n required:\n - address\n properties:\n \"@type\":\n const: EmailAddress\n address:\n type: string\n format: email\n contexts:\n type: object\n additionalProperties:\n const: true\n pref:\n type: integer\n minimum: 1\n label:\n type: string\n additionalProperties: false\n phones:\n type: object\n propertyNames:\n type: string\n minLength: 1\n additionalProperties:\n type: object\n required:\n - number\n properties:\n \"@type\":\n const: Phone\n number:\n type: string\n minLength: 1\n features:\n type: object\n additionalProperties:\n const: true\n contexts:\n type: object\n additionalProperties:\n const: true\n pref:\n type: integer\n minimum: 1\n label:\n type: string\n additionalProperties: false\n organizations:\n type: object\n propertyNames:\n type: string\n minLength: 1\n additionalProperties:\n type: object\n properties:\n \"@type\":\n const: Organization\n name:\n type: string\n minLength: 1\n units:\n type: array\n minItems: 1\n items:\n type: object\n required:\n - name\n properties:\n \"@type\":\n const: OrgUnit\n name:\n type: string\n minLength: 1\n additionalProperties: false\n sortAs:\n type: string\n contexts:\n type: object\n additionalProperties:\n const: true\n anyOf:\n - required:\n - name\n - required:\n - units\n additionalProperties: false\n notes:\n type: object\n propertyNames:\n type: string\n minLength: 1\n additionalProperties:\n type: object\n required:\n - note\n properties:\n \"@type\":\n const: Note\n note:\n type: string\n created:\n type: string\n format: date-time\n additionalProperties: false\n additionalProperties: false\ncollection:\n display:\n name_field: /name/full\nimplements:\n - contract: mdbase.jscontact.card\n version: 2.0.0\n fields:\n /@type: /@type\n version: version\n uid: uid\n kind: kind\n name: name\n emails: emails\n phones: phones\n organizations: organizations\n notes: notes\n---\n\n# JSContact Card\n\nThis starter type begins as a fully expanded local copy of the JSContact core\nprofile. Nested fields are declared inline so the type editor can edit them\ndirectly. Its fields belong to the collection and can be added, renamed, or\nreshaped. Update the explicit contract mapping whenever a compatible field\nmoves.\n\nThe separately installed contract schema remains the portable boundary. Local\nfields that are not mapped into that boundary remain collection-specific.\n" + } + ], + "provides": [ + { + "id": "mdbase.jscontact.card", + "version": "2.0.0" + } + ] +} diff --git a/site-sources.json b/site-sources.json index 650eedd..a98abd3 100644 --- a/site-sources.json +++ b/site-sources.json @@ -9,7 +9,7 @@ }, "contracts": { "repository": "mdbase-dev/mdbase-contracts", - "ref": "1367ddb4fb0de0bf121bec65c9316ae51f7f2198" + "ref": "d58e5a4b22b61b6ed341ef9ef30e2874a434e87c" }, "implementations": [ { diff --git a/src/data/contracts.json b/src/data/contracts.json index 0606d58..2758817 100644 --- a/src/data/contracts.json +++ b/src/data/contracts.json @@ -193,11 +193,11 @@ "packs": [ { "id": "mdbase.jscontact", - "version": "2.0.1", + "version": "2.0.2", "name": "JSContact 2.0 starter", - "description": "The mdbase JSContact Card core contract and an editable Markdown implementation.", - "digest": "sha256:c277f278b20acbd0b182d88e2c3c018220c2808aa57f73fa2da1b413383ed21c", - "provision": "./packs/mdbase.jscontact/2.0.1.json", + "description": "The mdbase JSContact Card core contract and a fully expanded, editable Markdown implementation.", + "digest": "sha256:f6f5aa76850c10b83d42c0fffb7f76d3a67b531fb1de7bb5ae9a9b2c783687b0", + "provision": "./packs/mdbase.jscontact/2.0.2.json", "provides": [ { "id": "mdbase.jscontact.card",